/* --- GLOBAL COMPONENT STYLES (Header & Footer) --- */

:root {
    --f-primary: #4f46e5;
    --f-secondary: #0ea5e9;
    --f-gradient: linear-gradient(135deg, var(--f-primary) 0%, var(--f-secondary) 100%);
    --f-text-dark: #0f172a;
    --f-text-gray: #475569;
    --f-text-light: #94a3b8;
    --f-border: rgba(226, 232, 240, 0.6);
    --f-bg-soft: #f8fafc;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Custom Scrollbar */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
    background: #f1f5f9;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    border-radius: 10px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

/* LOGO STYLES */
.logo-text {
    font-size: 34px;
    /* Increased from 32px */
    font-weight: 800;
    color: var(--f-text-dark);
    letter-spacing: -2px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-text:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.logo-dot {
    background: var(--f-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 42px;
    /* Increased from 38px */
}

/* HEADER STYLES */
header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--f-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 5%;
    /* Significantly reduced for more space */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

header.scrolled {
    padding: 8px 5%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-nav a {
    text-decoration: none;
    color: var(--f-text-gray);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    padding: 10px 0;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--f-gradient);
    transition: width 0.3s ease;
}

.header-nav a:hover {
    color: var(--f-text-dark);
}

.header-nav a:not(.btn-login):not(.btn-trial):hover::after {
    width: 100%;
}

/* --- MODERN SEGMENTED LANGUAGE SWITCHER --- */
.lang-switcher-pill {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.05);
    padding: 4px;
    border-radius: 100px;
    border: 1px solid rgba(79, 70, 229, 0.08);
    margin-left: 25px;
    transition: all 0.3s ease;
}

.lang-switcher-pill a {
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 800;
    color: var(--f-text-gray);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lang-switcher-pill a:after {
    display: none !important;
}

.lang-switcher-pill a.active {
    background: var(--f-gradient);
    color: white !important;
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.25);
    transform: scale(1.05);
}

.lang-switcher-pill a:hover:not(.active) {
    color: var(--f-text-dark) !important;
    background: rgba(15, 23, 42, 0.04);
}


/* AUTH SECTION RE-ENGINEERED */
.nav-auth {
    display: flex !important;
    align-items: center !important;
    gap: 25px !important;
    margin-left: 20px !important;
    padding: 2px 0 2px 30px !important;
    border-left: 2px solid var(--f-border) !important;
}

.nav-auth a::after {
    display: none !important;
}

.btn-login {
    color: var(--f-text-gray) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
}

.btn-login:hover {
    color: var(--f-text-dark) !important;
}

.btn-trial {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--f-gradient) !important;
    color: white !important;
    padding: 14px 40px !important;
    /* MASSIVE padding to stop clipping */
    border-radius: 50px !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.btn-trial:hover {
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.5) !important;
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--f-text-dark);
    transition: all 0.3s;
}

/* MOBILE MENU */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    border-left: 1px solid rgba(226, 232, 240, 0.5);
}

.mobile-menu.active {
    right: 0;
    visibility: visible;
    pointer-events: all;
    box-shadow: -30px 0 70px rgba(0, 0, 0, 0.12);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 28px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
}

.btn-close-menu {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #f1f5f9;
    border: none;
    color: var(--f-text-dark);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-close-menu:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.mobile-nav-links {
    list-style: none;
    padding: 30px 24px;
    flex: 1;
}

.mobile-nav-links li {
    margin-bottom: 8px;
    opacity: 0;
    transform: translateX(30px);
}

.mobile-menu.active .mobile-nav-links li {
    animation: flyIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--i) * 0.1s);
}

@keyframes flyIn {
    to { 
        opacity: 1; 
        transform: translateX(0);
    }
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: var(--f-text-dark);
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    border-radius: 16px;
    transition: all 0.3s ease;
    background: transparent;
}

.mobile-nav-links a i {
    width: 24px;
    font-size: 18px;
    color: var(--f-primary);
    transition: transform 0.3s ease;
}

.mobile-nav-links a:hover {
    background: var(--f-bg-soft);
    color: var(--f-primary);
}

.mobile-nav-links a:hover i {
    transform: scale(1.2);
}

.mobile-menu-footer {
    padding: 30px 28px;
    border-top: 1px solid rgba(226, 232, 240, 0.4);
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
}

.mobile-menu.active .mobile-menu-footer {
    animation: flyInFooter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.6s;
}

@keyframes flyInFooter {
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.btn-trial-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--f-gradient);
    color: white;
    padding: 16px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.btn-trial-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.4);
}

.btn-login-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--f-text-gray);
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    text-align: center;
    border: 1px solid var(--f-border);
    transition: all 0.3s ease;
    background: white;
}

.btn-login-mobile:hover {
    border-color: var(--f-primary);
    color: var(--f-primary);
    background: rgba(79, 70, 229, 0.03);
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}


.mobile-lang-switcher {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.btn-lang-m {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--f-border);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--f-text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-lang-m img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-lang-m.active {
    background: rgba(79, 70, 229, 0.05);
    border-color: var(--f-primary);
    color: var(--f-primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

.btn-lang-m:not(.active):hover {
    background: var(--f-bg-soft);
    border-color: var(--f-text-light);
}

/* FOOTER STYLES */
.main-footer {
    background: white;
    padding: 80px 0 40px;
    border-top: 1px solid var(--f-border);
    margin-top: 100px;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 60px;
}

.main-footer .logo-text {
    font-size: 42px;
    /* Even bigger in footer as requested */
    display: inline-flex;
}

.main-footer .logo-text:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.main-footer .logo-dot {
    font-size: 50px;
}

.brand-col .brand-desc {
    margin-top: 20px;
    font-size: 15px;
    color: var(--f-text-gray);
    line-height: 1.6;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: var(--f-bg-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--f-text-gray);
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--f-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-col h4 {
    color: var(--f-text-dark);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 25px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 15px;
}

.footer-col a {
    color: var(--f-text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--f-primary);
}

.footer-divider {
    height: 1px;
    background: var(--f-border);
    margin-bottom: 40px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-legal-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--f-text-gray);
}

.legal-item i {
    width: 16px;
    color: var(--f-text-light);
}

.footer-copy p {
    font-size: 13px;
    color: var(--f-text-light);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .header-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: left;
    }

    .main-footer {
        padding: 60px 0 100px; /* Extra bottom padding for chat widget button */
        margin-top: 60px;
    }

    .footer-container {
        padding: 0 20px;
    }

    .footer-legal-info {
        gap: 10px;
    }

    .legal-item {
        font-size: 12px;
    }

    .footer-copy p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 4%;
    }

    header.scrolled {
        padding: 8px 4%;
    }

    .logo-text {
        font-size: 28px;
    }

    .logo-dot {
        font-size: 36px;
    }

    .hamburger span {
        width: 22px;
    }
}
