/* ==========================================================================
   TUNEUPX PREMIUM UI COMPONENT SYSTEM (components.css)
   ========================================================================== */

/* --- Sticky Glassmorphic Header --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--header-border);
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    background: var(--header-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
}

.header-container {
    width: 90%;
    max-width: 1200px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.main-header.scrolled .header-container {
    height: 65px;
}

/* --- Brand Logo Styling --- */
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    color: var(--text-primary);
}

/* Logo image (replaces text logo) */
.logo-img-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
    /* The image has a white background — add a subtle filter to make it
       look clean against any header background */
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
    transition: opacity 0.2s ease;
}

.nav-logo-img:hover {
    opacity: 0.85;
}

/* Dark mode: invert the black "UP" arrow to white so it stays visible */
body.dark-mode .nav-logo-img {
    filter: invert(1) hue-rotate(180deg) saturate(2) brightness(1.2);
}

/* Footer logo — always white since footer bg is always dark */
.footer-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 0.75rem;
}

/* Always invert the logo in the footer regardless of light/dark mode */
.footer-logo-always-light {
    filter: invert(1) hue-rotate(180deg) saturate(2) brightness(1.2);
}

/* Big centered knob column (replaces Corporate section) */
.footer-icon-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-knob-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

/* The image fills the column — no ring, just big and clean */
.footer-knob-big {
    width: 280px;
    height: 280px;
    object-fit: contain;
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.footer-knob-big:hover {
    transform: rotate(18deg) scale(1.04);
}

@keyframes knob-ring-pulse {
    0%, 100% {
        box-shadow:
            0 0 18px rgba(232, 97, 10, 0.6),
            0 0 42px rgba(232, 97, 10, 0.28);
    }
    50% {
        box-shadow:
            0 0 28px rgba(232, 97, 10, 0.85),
            0 0 64px rgba(232, 97, 10, 0.45);
    }
}

.footer-knob-big-tagline {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent-orange);
    text-transform: uppercase;
    line-height: 1.6;
}

/* About section round logo + label */
.about-logo-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.about-round-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.logo-tune {
    color: var(--accent-orange);
}

.logo-px {
    background: linear-gradient(135deg, var(--accent-amber) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Desktop Nav Links --- */
.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--accent-orange);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-gold));
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* --- Theme Toggle Button --- */
.theme-toggle-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    transform: scale(1.05);
}

body.dark-mode .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-orange);
}

/* --- Language Toggle Button --- */
.rtl-toggle-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    color: var(--accent-gold);
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition-fast);
}

.rtl-toggle-btn:hover {
    border-color: var(--accent-gold);
    background: rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(200, 150, 42, 0.15);
}

/* Language Label Visibility swapping */
.lang-ar { display: none; }
.rtl .lang-en { display: none; }
.rtl .lang-ar { display: inline; }

/* --- High-End Shimmer Buttons --- */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.9rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-orange) 0%, var(--accent-amber) 50%, var(--accent-orange) 100%);
    background-size: 200% auto;
    color: #FFFFFF !important;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
    background-position: right center;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
    transform: translateY(-2px);
    color: #FFFFFF !important;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 4px 12px rgba(200, 150, 42, 0.15);
    color: var(--accent-gold);
    transform: translateY(-2px);
}

/* Small Button variants */
.btn-primary-small, .btn-secondary-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 500;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-primary-small {
    background: var(--accent-orange);
    color: #FFFFFF !important;
    border: none;
}

.btn-primary-small:hover {
    background: var(--accent-amber);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    color: #FFFFFF !important;
}

.btn-secondary-small {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.btn-secondary-small:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* --- Glassmorphic Card System --- */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02), 0 2px 8px rgba(0, 0, 0, 0.01);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05), 0 0 15px rgba(245, 158, 11, 0.05);
}

/* Spotlight glow background following cursor */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.glass-card:hover .card-glow {
    opacity: 1;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.gold-glow-box {
    background: rgba(200, 150, 42, 0.06);
    color: var(--accent-gold);
    border: 1px solid rgba(200, 150, 42, 0.15);
}

.orange-glow-box {
    background: rgba(245, 158, 11, 0.06);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.amber-glow-box {
    background: rgba(245, 158, 11, 0.06);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.card-heading {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
    color: var(--text-primary);
}

.card-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.card-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    z-index: 2;
}

/* --- High-Contrast Responsive Forms --- */
.briefing-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
    background: var(--bg-card);
}

.form-group select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

/* --- Universal Modal Styling --- */
.global-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.modal-content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--bg-card);
}

.max-w-lg {
    max-width: 500px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--accent-orange);
}

@keyframes scaleUp {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Mobile Menu Navigation Toggle --- */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    z-index: 1500;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: var(--transition-smooth);
}

.mobile-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.drawer-close-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-links ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.2rem;
    color: var(--text-secondary);
    display: block;
}

.mobile-link:hover, .mobile-link.active {
    color: var(--accent-orange);
    padding-left: 0.5rem;
}

.mobile-cta-link {
    color: var(--accent-gold) !important;
    border-bottom: 1px dashed rgba(200, 150, 42, 0.3);
    padding-bottom: 0.5rem;
}

.drawer-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* --- Mobile Breakpoint Rules --- */
@media (max-width: 1024px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .get-started-btn {
        display: none;
    }
}

/* --- WhatsApp Floating Chat Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    z-index: 9990;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(-110%) translateY(-50%) scale(1);
    pointer-events: auto;
}

.whatsapp-tooltip {
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateX(-100%) translateY(-50%) scale(0.8);
    background: #111827;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.07);
    margin-right: 0.75rem;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #111827;
    border-right: 1px solid rgba(255,255,255,0.07);
    border-top: 1px solid rgba(255,255,255,0.07);
}

.rtl .whatsapp-float {
    right: auto;
    left: 2rem;
}

.rtl .whatsapp-tooltip {
    right: auto;
    left: 100%;
    transform: translateX(100%) translateY(-50%) scale(0.8);
    margin-right: 0;
    margin-left: 0.75rem;
}

.rtl .whatsapp-float:hover .whatsapp-tooltip {
    transform: translateX(110%) translateY(-50%) scale(1);
}

.rtl .whatsapp-tooltip::after {
    right: auto;
    left: -6px;
    border-right: none;
    border-top: none;
    border-left: 1px solid rgba(255,255,255,0.07);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
