/* ===================================
   AppProdigy - Components
   Navbar, Footer, Buttons, Cards
   =================================== */

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--navbar-height);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.logo .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 1.75rem;
    margin-right: 4px;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
}

/* Language Switcher - Dropdown Style */
.lang-switcher {
    position: relative;
    margin-left: 8px;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.lang-toggle:hover {
    color: var(--text);
    background: var(--bg-light);
}

.lang-toggle .lang-icon {
    font-size: 1.125rem;
}

.lang-toggle .lang-current {
    font-size: 0.75rem;
    text-transform: uppercase;
}

.lang-toggle .lang-arrow {
    font-size: 0.625rem;
    transition: transform var(--transition);
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    z-index: 1000;
    overflow: hidden;
}

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

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
}

.lang-dropdown-item:hover {
    background: var(--bg-light);
}

.lang-dropdown-item.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
}

.lang-dropdown-item .lang-flag {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.lang-dropdown-item .lang-name {
    flex: 1;
}

.lang-dropdown-item .lang-check {
    opacity: 0;
    color: var(--primary);
}

.lang-dropdown-item.active .lang-check {
    opacity: 1;
}

.lang-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Dark mode support */
html.dark-mode .lang-dropdown {
    background: var(--bg);
    border-color: var(--border);
}

html.dark-mode .lang-dropdown-item:hover {
    background: var(--bg-light);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    position: relative;
    transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text);
    left: 0;
    transition: transform var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Mobile Nav Open State */
.nav-open .hamburger { background: transparent; }
.nav-open .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-open .hamburger::after { transform: rotate(-45deg); top: 0; }

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-open .mobile-nav {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-links a {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text);
    padding: 8px 0;
}

.mobile-nav .lang-switcher {
    margin: 24px 0 0;
    padding: 16px 0 0;
    border-left: none;
    border-top: 1px solid var(--border);
    justify-content: center;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}

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

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

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

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

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

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.125rem;
}

/* ===== HERO ===== */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background: var(--gradient-hero);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero .highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== APP CARDS ===== */
.app-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.app-card-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.app-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.app-card-tagline {
    color: var(--text-light);
    margin-bottom: 16px;
}

.app-card-platforms {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.platform-badge {
    background: var(--bg-light);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.app-card-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.status-live { background: var(--success); }
.status-coming { background: var(--warning); }
.status-beta { background: var(--info); }

.app-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--primary);
    font-weight: 600;
    transition: gap var(--transition);
}

.app-card-link:hover {
    gap: 12px;
}

.app-card-link::after {
    content: '\2192';
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    background: var(--bg-light);
    padding: 32px;
    border-radius: var(--radius-lg);
    transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

/* ===== VALUE CARDS (About page) ===== */
.value-card {
    text-align: center;
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform var(--transition), box-shadow var(--transition);
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.value-card h3 {
    margin-bottom: 12px;
}

.value-card p {
    color: var(--text-light);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.cta-section h2 {
    margin-bottom: 16px;
    color: white;
    position: relative;
    z-index: 1;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.cta-section .btn {
    position: relative;
    z-index: 1;
}

.cta-section .btn-gradient {
    background: white;
    color: #0ea5e9;
}

.cta-section .btn-gradient:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ===== DOWNLOAD SECTION ===== */
.download {
    padding: 100px 0;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    text-align: center;
    position: relative;
    z-index: 5;
}

.download h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: white;
}

.download > .container > p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.store-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.store-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.store-icon {
    font-size: 2rem;
}

.store-text {
    text-align: left;
}

.store-small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
}

.store-name {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ===== FOOTER ===== */
.footer {
    padding: 60px 0 30px;
    background: #0f172a;
    color: white;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    color: white;
    margin-bottom: 12px;
}

.footer-brand .logo .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-nav h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-nav a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom .lang-switcher {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
}

.footer-bottom .lang-toggle {
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom .lang-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.footer-bottom .lang-dropdown {
    background: var(--bg);
}

.footer-bottom .lang-dropdown-item {
    color: var(--text);
}

.footer-bottom .lang-dropdown-item:hover {
    background: var(--bg-light);
}

.footer-bottom .lang-dropdown-item.active {
    color: var(--primary);
}

.footer .dark-mode-toggle {
    color: rgba(255, 255, 255, 0.8);
}

.footer .dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Simple Footer (for app pages) */
.footer-simple {
    padding: 40px 0;
    background: #0f172a;
    color: white;
    position: relative;
    z-index: 10;
}

.footer-simple .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-simple-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-simple-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition);
}

.footer-simple-links a:hover {
    color: white;
}

.footer-simple .lang-switcher {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
}

.footer-simple .lang-toggle {
    color: rgba(255, 255, 255, 0.6);
}

.footer-simple .lang-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.footer-simple .lang-dropdown {
    background: var(--bg);
}

.footer-simple .lang-dropdown-item {
    color: var(--text);
}

.footer-simple .lang-dropdown-item:hover {
    background: var(--bg-light);
}

.footer-simple .lang-dropdown-item.active {
    color: var(--primary);
}

.footer-simple .dark-mode-toggle {
    color: rgba(255, 255, 255, 0.8);
}

.footer-simple .dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== LEGAL PAGES ===== */
.legal-page {
    padding: 120px 0 60px;
}

.legal-page h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.legal-page .last-updated {
    color: var(--text-light);
    margin-bottom: 40px;
}

.legal-page h2 {
    font-size: 1.5rem;
    margin: 40px 0 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.legal-page h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.legal-page p,
.legal-page ul {
    margin-bottom: 16px;
    color: var(--text-light);
}

.legal-page ul {
    padding-left: 24px;
}

.legal-page li {
    margin-bottom: 8px;
}

.legal-page a {
    color: var(--primary);
}

/* ===== CONTACT PAGE ===== */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.contact-card {
    background: var(--bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.contact-card h3 {
    margin-bottom: 8px;
}

.contact-card p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.contact-card a {
    color: var(--primary);
    font-weight: 600;
    transition: color var(--transition);
}

.contact-card a:hover {
    color: var(--primary-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .mobile-nav {
        display: block;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .apps-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-simple .container {
        flex-direction: column;
        text-align: center;
    }
}
