/* ============================================
   GLOBAL STYLES - Shared across all pages
   FXiation Digital
   ============================================ */

/* CSS Variables */
:root {
    --navy: #1e3a5f;
    --navy-deep: #0f2439;
    --teal: #0d9488;
    --teal-light: #14b8a6;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --dark: #111827;

    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--gray-700);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Section */
.section {
    padding: 100px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 70px 0;
    }
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--navy-deep);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    border-radius: 8px;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--teal);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--teal-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(13, 148, 136, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.btn-dark {
    background: var(--navy-deep);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--navy);
    transform: translateY(-2px);
}

.btn-white {
    background: var(--white);
    color: var(--navy-deep);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-medium);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy-deep);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--teal);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links > li {
    position: relative;
}

.nav-links a, .nav-links .dropdown-trigger {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: color var(--transition-fast);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-display);
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-links a:hover, .nav-links .dropdown-trigger:hover {
    color: var(--teal);
}

.dropdown-trigger svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    transition: transform var(--transition-fast);
}

.nav-dropdown-parent:hover .dropdown-trigger svg,
.nav-dropdown-parent.open .dropdown-trigger svg {
    transform: rotate(180deg);
}

/* Mega Menu Dropdown */
.mega-menu {
    position: absolute;
    top: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 32px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
    z-index: 100;
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

.nav-dropdown-parent:hover .mega-menu,
.nav-dropdown-parent.open .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    top: calc(100% + 12px);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    min-width: 520px;
}

.mega-menu-column h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-column ul li {
    margin-bottom: 4px;
}

.mega-menu-column ul li a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--gray-700);
    transition: all var(--transition-fast);
}

.mega-menu-column ul li a:hover {
    background: var(--gray-50);
    color: var(--teal);
}

.mega-menu-column ul li a .menu-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-400);
    font-weight: 400;
    margin-top: 2px;
}

/* Small dropdown (Resources) */
.mega-menu.compact {
    min-width: auto;
}

.mega-menu.compact .mega-menu-grid {
    grid-template-columns: 1fr;
    min-width: 240px;
    gap: 0;
}

.nav-cta {
    padding: 12px 24px;
    font-size: 0.95rem;
}

.nav-links .nav-cta {
    background: var(--teal);
    color: var(--white);
    border-radius: 8px;
    padding: 12px 24px;
}

.nav-links .nav-cta:hover {
    background: var(--teal-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(13, 148, 136, 0.3);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy-deep);
    transition: all var(--transition-fast);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile dropdown accordion */
.mobile-dropdown-toggle {
    display: none;
}

.mobile-dropdown-content {
    display: block;
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        padding: 24px;
        gap: 12px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Disable hover dropdowns on mobile */
    .mega-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 8px;
        background: var(--gray-50);
        padding: 16px;
        margin-top: 8px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        display: none;
    }

    .mega-menu::before {
        display: none;
    }

    .nav-dropdown-parent.open .mega-menu {
        display: block;
        top: auto;
    }

    .nav-dropdown-parent:hover .mega-menu {
        display: none;
    }

    .nav-dropdown-parent.open:hover .mega-menu {
        display: block;
    }

    .mega-menu-grid {
        grid-template-columns: 1fr;
        min-width: auto;
        gap: 16px;
    }

    .mega-menu.compact .mega-menu-grid {
        min-width: auto;
    }

    .mobile-dropdown-toggle {
        display: inline-flex;
    }

    .dropdown-trigger {
        width: 100%;
        justify-content: space-between;
    }

    .nav-cta {
        width: 100%;
    }
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #0f172a 0%, #0a0f1a 100%);
    color: var(--gray-400);
    padding: 60px 0 30px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 16px;
    display: inline-block;
}

.footer-brand p {
    font-size: 0.95rem;
    color: var(--gray-400);
    max-width: 300px;
}

.footer-links h4 {
    color: var(--white);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--teal-light);
    transition: width var(--transition-fast);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-links a:hover {
    color: var(--teal-light);
}

.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--teal);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: var(--gray-400);
    transition: fill var(--transition-fast);
}

.footer-social a:hover svg {
    fill: var(--white);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--teal-light);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--teal);
}

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Selection */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: var(--navy-deep);
}

::-moz-selection {
    background: rgba(13, 148, 136, 0.2);
    color: var(--navy-deep);
}

/* Skip to Content */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--teal);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10001;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 20px;
}

/* Page Load Animation */
body {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Enhanced Link Hover Effects */
a {
    transition: all var(--transition-fast);
}

/* Logo Animation on Hover */
.logo {
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}
