/* Shared Header, Navigation, Footer CSS - Source of Truth from index.html */

/* Dark Theme CSS Variables */
:root {
    /* Brand Colors */
    --primary-color: #17afa5;
    --primary-dark: #0d8b82;
    --primary-light: #1fc4b8;
    --primary-glow: rgba(23, 175, 165, 0.3);

    /* Dark Theme Colors */
    --bg-black: #0a0a0a;
    --bg-dark: #121212;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --border-dark: #2a2a2a;
    --border-light: #333333;

    /* Text Colors */
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;

    /* Accent Colors */
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
}

/* Header Styles */
.pro-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(10, 10, 10, 0.8);
    border-bottom: 1px solid var(--border-dark);
    transition: all 0.3s ease;
}

.pro-header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    padding: 12px 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 0 0 var(--primary-glow),
                0 4px 12px rgba(23, 175, 165, 0.3);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 0 20px var(--primary-glow),
                0 6px 16px rgba(23, 175, 165, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Navigation Links */
.nav-link-dark {
    position: relative;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link-dark:hover {
    color: var(--primary-color);
    background: rgba(23, 175, 165, 0.1);
}

.nav-link-dark.active {
    color: var(--primary-color);
}

/* Download Dropdown */
.download-dropdown {
    position: relative;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.download-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

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

.download-menu-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-dark);
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-dark);
}

.download-option:last-child {
    border-bottom: none;
}

.download-option:hover {
    background: rgba(23, 175, 165, 0.1);
    padding-left: 20px;
}

.download-option i {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.download-option-text small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.download-option-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

/* Gradient Text */
.gradient-text-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Badge Styles */
.badge-dark {
    background: rgba(23, 175, 165, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(23, 175, 165, 0.3);
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-dark);
    border-left: 1px solid var(--border-dark);
    transition: right 0.3s ease;
    z-index: 2000;
    padding: 80px 24px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    right: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === MOBILE RESPONSIVENESS FIXES === */

/* Features dropdown — cap to viewport width */
.features-menu {
    max-width: calc(100vw - 32px);
}

@media (max-width: 767px) {
    /* Failsafe: hide features dropdown on mobile */
    .features-dropdown .features-menu {
        display: none !important;
    }

    /* Download dropdown — prevent viewport clipping */
    .download-menu {
        min-width: 200px;
        right: -8px;
        max-width: calc(100vw - 32px);
    }

    /* Nav link touch targets — WCAG 2.5.5 minimum 44px */
    .nav-link-dark {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Mobile feature submenu spacing (overrides inline gap: 2px) */
.mobile-menu nav > div[style*="gap"] {
    gap: 8px !important;
}

.mobile-menu nav > div[style*="gap"] .nav-link-dark {
    padding: 10px 12px !important;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Eliminate 300ms tap delay */
.nav-link-dark,
.btn-primary,
.btn-secondary,
.download-btn,
.download-option,
.mobile-menu a,
.mobile-menu button {
    touch-action: manipulation;
}
