/* ===============================================
   Modern Header & Footer Styles
   =============================================== */

/* CSS Variables */
:root {
    --header-height: 70px;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    --transition: all 0.3s ease;
}

/* Base Reset for Header */
*, *:before, *:after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ===============================================
   MODERN HEADER
   =============================================== */

.modern-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Brand/Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    box-shadow: var(--shadow);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    display: none;
}

@media (min-width: 480px) {
    .brand-text {
        display: block;
    }
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    flex: 1;
    justify-content: center;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }
}

.desktop-nav > ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-nav > ul > li {
    position: relative;
}

.desktop-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
}

.desktop-nav > ul > li > a i {
    font-size: 0.875rem;
    opacity: 0.7;
}

.desktop-nav > ul > li > a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.desktop-nav > ul > li.active > a {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: var(--white);
}

.desktop-nav > ul > li.active > a i {
    opacity: 1;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle .fa-chevron-down {
    font-size: 0.625rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.nav-dropdown.open .dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    list-style: none;
    z-index: 100;
    border: 1px solid var(--gray-200);
}

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

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
}

.dropdown-menu li a i {
    width: 20px;
    text-align: center;
    color: var(--gray-400);
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.dropdown-menu li a:hover i {
    color: var(--primary);
}

.dropdown-menu li.active a {
    background: var(--primary);
    color: var(--white);
}

.dropdown-menu li.active a i {
    color: var(--white);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Translate Wrapper */
.translate-wrapper {
    display: none;
}

@media (min-width: 768px) {
    .translate-wrapper {
        display: block;
    }
}

.translate-wrapper .goog-te-gadget {
    font-size: 0 !important;
}

.translate-wrapper .goog-te-gadget-simple {
    background: var(--gray-100) !important;
    border: none !important;
    border-radius: var(--radius) !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
}

/* Logout Button */
.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--danger);
    color: var(--white);
}

.btn-logout span {
    display: none;
}

@media (min-width: 640px) {
    .btn-logout span {
        display: inline;
    }
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
}

@media (min-width: 1024px) {
    .mobile-toggle {
        display: none;
    }
}

.mobile-toggle:hover {
    background: var(--gray-100);
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gray-700);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.mobile-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1001;
}

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

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--white);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
}

.mobile-nav-header .brand {
    color: var(--white);
}

.mobile-nav-header .brand-icon {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-nav-header .brand-text {
    display: block;
    color: var(--white);
}

.mobile-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Nav Links */
.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    flex: 1;
}

.mobile-nav-links li a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
}

.mobile-nav-links li a i {
    width: 24px;
    text-align: center;
    font-size: 1rem;
    color: var(--gray-400);
}

.mobile-nav-links li a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

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

.mobile-nav-links li.active a {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: var(--white);
}

.mobile-nav-links li.active a i {
    color: var(--white);
}

/* Mobile Section Title */
.mobile-section-title {
    padding: 1rem 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mobile Translate */
.mobile-translate {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    color: var(--gray-700);
}

.mobile-translate i {
    width: 24px;
    text-align: center;
    color: var(--gray-400);
}

.mobile-translate span {
    flex: 1;
}

/* Logout Item */
.logout-item a {
    color: var(--danger) !important;
}

.logout-item a i {
    color: var(--danger) !important;
}

.logout-item a:hover {
    background: #fef2f2 !important;
}

/* ===============================================
   MODERN FOOTER
   =============================================== */

.modern-footer {
    background: var(--white);
    margin-top: auto;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Referral Section */
.footer-referral {
    margin-bottom: 1.5rem;
}

.referral-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}

.referral-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.referral-content {
    flex: 1;
    min-width: 0;
}

.referral-content h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.referral-content p {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.referral-link-box {
    display: flex;
    gap: 0.5rem;
}

.referral-link-box input {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    outline: none;
}

.referral-link-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.copy-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Social Share Section */
.footer-social {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.footer-social h5 {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-social h5 i {
    color: var(--primary);
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 1.125rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

.social-btn.facebook {
    background: linear-gradient(135deg, #4267B2 0%, #3b5998 100%);
}

.social-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%);
}

.social-btn.linkedin {
    background: linear-gradient(135deg, #0077B5 0%, #005885 100%);
}

.social-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.social-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

/* Footer Bottom */
.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-weight: 600;
}

.footer-brand i {
    color: var(--primary);
    font-size: 1.25rem;
}

.copyright {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ===============================================
   RESPONSIVE ADJUSTMENTS
   =============================================== */

@media (min-width: 640px) {
    .header-container {
        padding: 0 1.5rem;
    }

    .footer-container {
        padding: 2rem 1.5rem;
    }

    .referral-card {
        padding: 1.5rem;
    }

    .referral-content h4 {
        font-size: 1.125rem;
    }

    .referral-link-box input {
        font-size: 0.875rem;
    }
}

@media (min-width: 768px) {
    .social-btn {
        width: 48px;
        height: 48px;
    }
}

@media (min-width: 1024px) {
    .header-container {
        padding: 0 2rem;
    }
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Hide scrollbar but keep functionality */
.mobile-nav::-webkit-scrollbar {
    width: 6px;
}

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

.mobile-nav::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

.mobile-nav::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Animation for menu items */
.mobile-nav-links li {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.3s ease forwards;
}

.mobile-nav.open .mobile-nav-links li {
    animation: slideIn 0.3s ease forwards;
}

.mobile-nav-links li:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav-links li:nth-child(2) { animation-delay: 0.1s; }
.mobile-nav-links li:nth-child(3) { animation-delay: 0.15s; }
.mobile-nav-links li:nth-child(4) { animation-delay: 0.2s; }
.mobile-nav-links li:nth-child(5) { animation-delay: 0.25s; }
.mobile-nav-links li:nth-child(6) { animation-delay: 0.3s; }
.mobile-nav-links li:nth-child(7) { animation-delay: 0.35s; }
.mobile-nav-links li:nth-child(8) { animation-delay: 0.4s; }
.mobile-nav-links li:nth-child(9) { animation-delay: 0.45s; }
.mobile-nav-links li:nth-child(10) { animation-delay: 0.5s; }
.mobile-nav-links li:nth-child(11) { animation-delay: 0.55s; }
.mobile-nav-links li:nth-child(12) { animation-delay: 0.6s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
