/* ========================================
   Public Pages Shared Styles
   Common styles for non-authenticated pages
   (Home, Error Pages)
   ======================================== */

/* ============================================
   Navbar Styles for Public Pages
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background-color: var(--bg-surface);
    border-bottom-color: var(--border-default);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.brand-logo {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.brand-logo svg {
    width: 100%;
    height: 100%;
}

.navbar .brand-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-text {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.navbar .brand-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
    opacity: 0.7;
}

[data-theme="dark"] .navbar .brand-subtitle {
    color: rgba(148, 163, 184, 0.7);
}

.navbar-controls {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Language Switcher Button - Glass Morphism */
.navbar-controls .btn-lang {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 var(--space-3);
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.2) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.navbar-controls .btn-lang:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.35) 100%);
    border-color: rgba(255,255,255,0.65);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
}

.navbar-controls .btn-lang .lang-code {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.navbar-controls .btn-lang:hover .lang-code {
    color: var(--text-primary);
}

/* Theme Toggle - Glass Morphism */
.navbar-controls .theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.2) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.navbar-controls .theme-toggle:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.35) 100%);
    border-color: rgba(255,255,255,0.65);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
}

/* Theme Toggle Icons */
.theme-toggle .theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle .theme-icon svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-dark {
    display: block;
}

/* Dark Mode - Glass Morphism */
[data-theme="dark"] .navbar-controls .btn-lang,
[data-theme="dark"] .navbar-controls .theme-toggle {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    border-color: rgba(100,120,180,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
}

[data-theme="dark"] .navbar-controls .btn-lang:hover,
[data-theme="dark"] .navbar-controls .theme-toggle:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.06) 100%);
    border-color: rgba(100,120,180,0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Language Dropdown */
.dropdown {
    position: relative;
}

.navbar-controls .dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 140px;
    padding: var(--space-2);
    background: #ffffff;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

[data-theme="dark"] .navbar-controls .dropdown-menu {
    background: #0f1f3d;
    border-color: rgba(100,120,180,0.25);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
}

.navbar-controls .dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.navbar-controls .dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.navbar-controls .dropdown-item.active {
    background-color: var(--color-primary-muted);
    color: var(--color-primary);
}

/* ============================================
   Visual Wrapper & Gradient Blobs
   ============================================ */
.visual-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Colorful gradient blobs behind cards for glass effect */
.visual-wrapper::before {
    content: "";
    position: absolute;
    top: 5%;
    left: 5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.5) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    animation: blobMove1 8s ease-in-out infinite;
}

.visual-wrapper::after {
    content: "";
    position: absolute;
    bottom: 10%;
    right: 10%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    animation: blobMove2 10s ease-in-out infinite;
}

[data-theme="dark"] .visual-wrapper::before {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, transparent 70%);
}

[data-theme="dark"] .visual-wrapper::after {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
}

/* ============================================
   Blob Animations
   ============================================ */
@keyframes blobMove1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -15px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.98); }
}

@keyframes blobMove2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, 10px) scale(1.03); }
    66% { transform: translate(15px, -20px) scale(1.05); }
}

@keyframes blobMove3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, 20px) scale(1.04); }
}

/* ============================================
   Floating Cards - Premium Frosted Metallic Glass
   ============================================ */
.floating-card {
    position: absolute;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);

    /* Frosted glass base - more transparent for glass effect */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.35) 100%
    );
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);

    /* Subtle blue border for light mode */
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-xl);

    /* Top edge highlight glow */
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.7),
        inset 0 -1px 1px rgba(255, 255, 255, 0.2),
        0 4px 24px -4px rgba(0, 0, 0, 0.1),
        0 8px 32px -8px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(99, 102, 241, 0.08);

    animation: float 6s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    overflow: hidden;
}

/* Top-left shine highlight like real glass */
.floating-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    background: radial-gradient(
        ellipse at 15% 15%,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.15) 40%,
        rgba(255, 255, 255, 0) 70%
    );
    border-radius: var(--radius-xl) 0 0 0;
    pointer-events: none;
    z-index: 2;
}

/* Noise texture for physical feel */
.floating-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 150px 150px;
    border-radius: var(--radius-xl);
    opacity: 0.03;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 3;
}

/* Dark mode frosted glass - Match body background */
[data-theme="dark"] .floating-card {
    background: linear-gradient(
        165deg,
        rgba(5, 10, 24, 0.95) 0%,
        rgba(8, 14, 32, 0.92) 100%
    );
    border: 1px solid rgba(60, 90, 150, 0.2);
    border-top-color: rgba(80, 120, 180, 0.25);
    box-shadow:
        inset 0 1px 0 rgba(100, 140, 200, 0.1),
        0 4px 16px -4px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .floating-card::before {
    background: linear-gradient(
        165deg,
        rgba(100, 140, 200, 0.08) 0%,
        transparent 50%
    );
}

[data-theme="dark"] .floating-card::after {
    opacity: 0.02;
    mix-blend-mode: overlay;
}

/* ============================================
   Floating Card Content
   ============================================ */
.floating-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.25) 100%
    );
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    color: var(--color-primary);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        inset 0 -1px 1px rgba(255, 255, 255, 0.2),
        0 2px 8px -2px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.floating-card-icon svg {
    width: 24px;
    height: 24px;
}

[data-theme="dark"] .floating-card-icon {
    background: rgba(15, 25, 45, 0.8);
    border-color: rgba(60, 90, 150, 0.25);
    box-shadow: inset 0 1px 0 rgba(80, 120, 180, 0.1);
}

.floating-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    position: relative;
    z-index: 1;
}

.floating-card-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.floating-card-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ============================================
   Card Positions
   ============================================ */
.card-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.card-2 {
    top: -10%;
    right: 5%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 25%;
    left: 15%;
    animation-delay: 2s;
}

.card-4 {
    bottom: 10%;
    right: 10%;
    animation-delay: 3s;
}

/* Card Color Variants */
.card-1 .floating-card-icon {
    background-color: var(--color-primary-muted);
    color: var(--color-primary);
}

.card-2 .floating-card-icon {
    background-color: var(--color-success-muted);
    color: var(--color-success);
}

.card-3 .floating-card-icon {
    background-color: var(--color-warning-muted);
    color: var(--color-warning);
}

.card-4 .floating-card-icon {
    background-color: var(--color-info-muted);
    color: var(--color-info);
}

/* ============================================
   Float Animation
   ============================================ */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* ============================================
   Background Elements
   ============================================ */
.visual-bg-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: 20%;
    left: 20%;
    background: linear-gradient(135deg, var(--color-primary) 0%, transparent 70%);
    opacity: 0.1;
    filter: blur(60px);
}

.circle-2 {
    width: 250px;
    height: 250px;
    bottom: 10%;
    right: 20%;
    background: linear-gradient(135deg, var(--color-info) 0%, transparent 70%);
    opacity: 0.1;
    filter: blur(50px);
}

.visual-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(96, 165, 250, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, 0.4) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.6;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    z-index: 0;
}

[data-theme="dark"] .visual-bg-grid {
    background-image:
        linear-gradient(rgba(96, 165, 250, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, 0.5) 1px, transparent 1px);
    opacity: 0.5;
}

/* ============================================
   Landing Footer
   ============================================ */
.landing-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: transparent;
}

.footer-divider {
    opacity: 0.3;
}

.landing-footer .footer-branding-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.landing-footer .footer-branding-link:hover {
    opacity: 1;
}

.landing-footer .footer-branding-divider {
    opacity: 0.3;
}

.landing-footer .footer-branding-logo {
    height: 13px;
    width: auto;
    flex-shrink: 0;
    transform: translateY(1px);
}

/* Light mode: show dark logo, hide white logo */
.landing-footer .footer-branding-logo-dark {
    display: none;
}
.landing-footer .footer-branding-logo-light {
    display: block;
}

/* Dark mode: show white logo, hide dark logo */
[data-theme="dark"] .landing-footer .footer-branding-logo-dark {
    display: block;
}
[data-theme="dark"] .landing-footer .footer-branding-logo-light {
    display: none;
}

