/* ============================================================
   RESPONSIVE STYLES (Mobile & Tablet)
   ============================================================ */

/* Global Reset for Responsiveness */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    margin: 0;
    padding: 0;
}

/* COOKIE CONSENT BANNER */
.cookie-consent {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    transition: bottom 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 1.5rem 0;
    border-top: 1px solid rgba(6, 182, 212, 0.3);
}

.cookie-consent.show {
    bottom: 0;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-icon {
    width: 60px;
    height: 60px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.cookie-text {
    flex: 1;
    min-width: 280px;
}

.cookie-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #ffffff;
}

.cookie-text p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
}

.btn-cookie {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.btn-cookie-primary {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-cookie-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4);
}

.btn-cookie-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-cookie-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Tablet Optimizations */
@media (max-width: 1024px) {
    .cookie-content {
        gap: 1.5rem;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .cookie-consent {
        /* Lift above mobile bottom nav (approx 70px) */
        bottom: -100%;
        padding-bottom: calc(1.5rem + 70px);
    }

    .cookie-consent.show {
        bottom: 0;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    .cookie-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .cookie-text {
        min-width: auto;
    }

    .cookie-text h3 {
        font-size: 1.1rem;
    }

    .cookie-text p {
        font-size: 0.85rem;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: row;
        /* Keep buttons side by side or stack if needed */
    }

    .btn-cookie {
        flex: 1;
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .cookie-actions {
        flex-direction: column;
    }
}

/* MOBILE BOTTOM NAVIGATION */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
    z-index: 10000 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    overflow: hidden;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    flex: 1 1 0;
    padding: 0.4rem 0.1rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    min-width: 0;
}

.mobile-nav-item i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.mobile-nav-item span {
    font-size: 0.6rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
    text-align: center;
    display: block;
}

.mobile-nav-item.active {
    color: #06b6d4;
    /* var(--accent) */
}

.mobile-nav-item.active i {
    transform: translateY(-2px);
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #06b6d4;
    /* var(--accent) */
    border-radius: 0 0 3px 3px;
    transition: width 0.3s ease;
}

.mobile-nav-item.active::before {
    width: 60%;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
    }

    /* Add padding to body to prevent content from being hidden behind nav */
    body {
        padding-bottom: 75px !important;
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
    }

    html {
        overflow-x: hidden !important;
        width: 100%;
    }

    /* Adjust footer back-to-top button position */
    .back-to-top {
        bottom: 85px !important;
        right: 1.5rem !important;
    }
}

/* ============================================================
   HOMEPAGE RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 768px) {

    /* Hero Slider Dots - Optimized Size for Mobile */
    .hero-slider-dots-wrapper {
        bottom: 1rem !important;
    }
    
    .hero-slider-dots {
        gap: 0.6rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    .hero-slider-dot {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px !important;
        min-height: 8px !important;
    }
    
    .hero-slider-dot.active {
        width: 20px !important;
        height: 8px !important;
        transform: scale(1) !important;
        border-radius: 4px !important;
    }
    
    .hero-slider-dot::after {
        display: none !important;
    }

    /* Global Container/Section Padding */
    .container {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .section {
        padding: 3rem 0 !important;
    }

    /* Search Bar Section Fixes */
    .search-bar-section {
        padding: 4rem 1rem !important;
        text-align: center;
        overflow: hidden;
        /* Prevent leaked glow effects from causing overflow */
    }

    .search-bar-title {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }

    .search-bar-description {
        font-size: 0.85rem !important;
        margin-bottom: 1.5rem !important;
    }

    .standalone-search-input-group {
        flex-direction: column !important;
        padding: 1rem !important;
        border-radius: 20px !important;
        gap: 1rem;
        background: rgba(2, 6, 23, 0.6) !important;
        border: 1px solid rgba(6, 182, 212, 0.4) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .standalone-search-input-group i.fa-search {
        display: none !important;
    }

    .standalone-search-input-group input {
        width: 100% !important;
        text-align: center !important;
        font-size: 1rem !important;
        padding: 0.8rem 1rem !important;
        border-radius: 12px !important;
        background: rgba(15, 23, 42, 0.8) !important;
        /* Make it visible */
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
        display: block !important;
        min-height: 45px !important;
    }

    .standalone-search-input-group .btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 1rem !important;
        font-size: 1rem !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .search-bar-quick-links {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
        margin-top: 2rem !important;
    }

    .search-bar-quick-links span {
        width: 100% !important;
        justify-content: center !important;
        margin-bottom: 0.5rem !important;
    }

    .quick-link {
        font-size: 0.75rem !important;
        padding: 0.5rem 1rem !important;
        background: rgba(30, 41, 59, 0.5) !important;
        border: 1px solid rgba(6, 182, 212, 0.2) !important;
        border-radius: 30px !important;
    }


    /* Grid System Overrides (Crucial for Homepage) */
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    /* Comparison Card Fixes */
    .comparison-card div[style*="grid-template-columns: 1fr 1fr"] {
        height: 160px !important;
    }

    .comparison-card h3 {
        font-size: 1rem !important;
        min-height: auto !important;
    }

    /* Comparison Builder Widget */
    .cmp-builder-wrapper {
        padding: 1.5rem !important;
        border-radius: 20px !important;
    }

    .compare-builder-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .cmp-card-slot {
        min-height: 200px !important;
        padding: 1rem !important;
    }

    .cmp-vs-container {
        margin: 1rem 0;
    }

    .cmp-vs-badge {
        width: 70px !important;
        height: 70px !important;
    }

    .vs-circle span {
        font-size: 1.2rem !important;
    }

    .cmp-search-field {
        font-size: 0.9rem !important;
        padding: 0.8rem !important;
    }

    .cmp-main-btn {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1rem !important;
    }

    /* Section Title Adjustments */
    .section-title {
        margin-bottom: 2rem !important;
        text-align: center !important;
    }

    .section-title h2 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }

    .section-title p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* Fix for Footer and Bottom Spacing */
    .footer {
        padding: 3rem 0 5rem !important;
        /* Extra bottom padding for mobile nav */
    }

    .footer-content {
        gap: 2rem !important;
    }
}

@media (max-width: 480px) {
    .search-bar-title {
        font-size: 1.5rem !important;
    }


    .grid-4,
    .grid-3,
    .grid-2 {
        gap: 1rem !important;
    }

    /* Product Card Image Container Fix */
    .card div[style*="height: 240px"] {
        height: 180px !important;
        margin: -1.25rem -1.25rem 1rem -1.25rem !important;
    }
}

/* HEADER & NAVIGATION REDESIGN (Premium Mobile Menu) */
@media (max-width: 992px) {
    header .header-content {
        padding: 0.75rem 0 !important;
    }

    header .logo img {
        height: 32px !important;
    }

    header #mainNav.nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        background: radial-gradient(circle at top right, #0a192f, #020617) !important;
        backdrop-filter: blur(25px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 3.5rem 2rem 3rem !important;
        gap: 0.5rem !important;
        transform: translateX(100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
        z-index: 9998 !important;
        border: none !important;
        box-shadow: none !important;
        margin-top: 0 !important;
    }

    header #mainNav.nav.active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-top: 0 !important;
        display: flex !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5) !important;
    }

    header #mainNav .nav-link {
        width: 100% !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        color: #f8fafc !important;
        padding: 0.75rem 1.5rem !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 1rem !important;
        transform: translateY(20px);
        opacity: 0;
        text-align: left !important;
        border-radius: 12px !important;
    }

    header #mainNav.nav.active .nav-link {
        transform: translateY(0);
        opacity: 1;
    }

    /* Stagger animation for nav links */
    header #mainNav.nav.active .nav-link:nth-child(1) {
        transition-delay: 0.1s !important;
    }

    header #mainNav.nav.active .nav-link:nth-child(2) {
        transition-delay: 0.15s !important;
    }

    header #mainNav.nav.active .nav-link:nth-child(3) {
        transition-delay: 0.2s !important;
    }

    header #mainNav.nav.active .nav-link:nth-child(4) {
        transition-delay: 0.25s !important;
    }

    header #mainNav.nav.active .nav-link:nth-child(5) {
        transition-delay: 0.3s !important;
    }

    header #mainNav .nav-link i {
        font-size: 1.2rem !important;
        color: #06b6d4 !important;
        margin-right: 0 !important;
        min-width: 24px !important;
        opacity: 0.9;
        flex-shrink: 0;
    }

    header #mainNav .nav-link:hover,
    header #mainNav .nav-link:active {
        color: #22d3ee !important;
        transform: translateX(5px) !important;
        background: rgba(6, 182, 212, 0.1) !important;
    }

    header #mainNav .nav-link::before,
    header #mainNav .nav-link::after {
        display: none !important;
    }

    /* Categories Removal - DEFINITIVE FIX */
    header #nav-categories,
    header #mainNav .nav-item-dropdown,
    header #mainNav a[href*="categories.php"] {
        display: none !important;
    }

    /* Action Buttons (Request, Login, Register) */
    header #mainNav .btn-request {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.85rem 1.75rem !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
        border: none !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        margin-top: 1.5rem !important;
        color: #fff !important;
        box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.75rem !important;
    }

    header #mainNav .header-auth {
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding-top: 1.5rem !important;
        margin-top: 1.5rem !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    header #mainNav .btn-login,
    header #mainNav .btn-register,
    header #mainNav .btn-logout {
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 0.75rem 1.5rem !important;
        border-radius: 12px !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        color: #fff !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    header #mainNav .btn-register {
        background: #06b6d4 !important;
        border-color: #06b6d4 !important;
    }

    /* HIDE DESKTOP HEADER-AUTH IN MOBILE MENU */
    header #mainNav .header-auth {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Close Button Glow */
    header .mobile-menu-toggle.active {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: #06b6d4 !important;
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.4) !important;
    }

    header .mobile-menu-toggle.active .hamburger-line {
        background: #fff !important;
        box-shadow: 0 0 10px #06b6d4 !important;
    }
}

/* Tablet refinements */
@media (min-width: 769px) and (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* PRODUCT PAGE OPTIMIZATIONS */
@media (max-width: 992px) {

    /* Main Product Grid Stacking */
    .product-header-panel {
        padding: 1.5rem !important;
        margin-top: 1rem;
    }

    /* Tabs Container Optimization */
    .product-tabs-container,
    div[style*="display: flex; gap: 1rem; border-bottom: 2px solid rgba(255, 255, 255, 0.1); flex-wrap: wrap;"] {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem !important;
        padding-bottom: 5px !important;
        scrollbar-width: none;
        /* Hide scrollbar for Firefox */
    }

    div[style*="display: flex; gap: 1rem; border-bottom: 2px solid rgba(255, 255, 255, 0.1); flex-wrap: wrap;"]::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar for Chrome/Safari */
    }

    /* Individual Tab Styling */
    .product-tab {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.85rem !important;
        white-space: nowrap !important;
        border-radius: 10px 10px 0 0 !important;
        min-width: max-content;
    }

    /* Tab Content Padding */
    .tab-content-wrapper,
    div[style*="background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0 12px 12px 12px; padding: 2.5rem; margin-top: -2px;"] {
        padding: 1.5rem !important;
        border-radius: 0 0 12px 12px !important;
    }

    .tab-content h2 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    /* Specs Table Responsive */
    .specs-table td {
        padding: 12px 15px !important;
        font-size: 0.85rem !important;
    }

    .specs-table td:first-child {
        width: 40% !important;
    }

    /* Affiliate Buttons Grid */
    .affiliate-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .affiliate-btn {
        padding: 0.75rem !important;
    }

    .affiliate-btn span {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .affiliate-grid {
        grid-template-columns: 1fr !important;
    }

    .product-title-gradient {
        font-size: 1.5rem !important;
    }
}

/* ============================================================
   PROFESSIONAL TOOLS GLOBAL RESPONSIVE FIXES
   ============================================================ */
@media (max-width: 768px) {

    /* Main Layout */
    .pdf-converter-wrapper {
        padding-top: 30px !important;
    }

    /* Hero Section */
    .hero-icon-box {
        width: 80px !important;
        height: 80px !important;
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 20px !important;
    }

    .hero-title {
        font-size: 1.8rem !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        padding: 0 10px !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        padding: 0 15px !important;
    }

    /* Glass Premium Cards */
    .glass-premium {
        padding: 1.25rem !important;
        border-radius: 24px !important;
        /* Keep glass effect on mobile */
        background: rgba(15, 23, 42, 0.6) !important;
        backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .converter-card-new {
        padding: 1.25rem !important;
        margin-bottom: 2rem !important;
    }

    /* Tool SEO Section - CRITICAL FIX */
    .tool-seo-section {
        padding: 1.5rem !important;
        margin-top: 2rem !important;
        line-height: 1.6 !important;
    }

    .seo-text h2 {
        font-size: 1.4rem !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        margin-bottom: 1rem !important;
        color: white !important;
    }

    .seo-text h3 {
        font-size: 1.2rem !important;
        word-break: break-word !important;
        margin-top: 1.5rem !important;
    }

    .seo-text p {
        font-size: 0.95rem !important;
        margin-bottom: 1rem !important;
        color: #94a3b8 !important;
    }

    /* Input & Panels */
    .setting-input,
    .text-editor {
        font-size: 0.9rem !important;
    }

    .btn-convert-v2 {
        padding: 0.85rem 1.5rem !important;
        font-size: 0.95rem !important;
    }

    /* Grid adjustments for tools */
    .options-grid {
        grid-template-columns: 1fr !important;
    }

    .panel-footer {
        flex-direction: column !important;
    }

    .panel-footer button {
        width: 100% !important;
    }
}

/* ============================================================
   REQUEST COMPARISON PAGE RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    /* Two column grid to single column */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    /* Hero section */
    section[style*="padding: 80px 0 60px"] {
        padding: 50px 0 40px !important;
    }
    
    section[style*="padding: 80px 0 60px"] h1 {
        font-size: 2rem !important;
    }
    
    section[style*="padding: 80px 0 60px"] p {
        font-size: 1rem !important;
    }
    
    /* Form card */
    .card[style*="padding: 2.5rem"] {
        padding: 1.5rem !important;
    }
    
    /* Info boxes */
    div[style*="padding: 2rem"] {
        padding: 1.5rem !important;
    }
    
    /* Grid 2 columns to 1 */
    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* ============================================================
   CONTACT PAGE RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    /* Contact page hero */
    section.hero[style*="padding: 6rem 0"] {
        padding: 3rem 0 2rem 0 !important;
    }
    
    section.hero h1 {
        font-size: 2rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    section.hero p {
        font-size: 0.95rem !important;
        margin-bottom: 0 !important;
    }
    
    /* Contact grid - stack columns */
    .grid.grid-2[style*="gap: 5rem"] {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
    
    /* Contact info section */
    .section-title[style*="margin-bottom: 4rem"] {
        margin-bottom: 2rem !important;
        text-align: center !important;
    }
    
    .section-title h2 {
        font-size: 1.5rem !important;
    }
    
    .section-title p {
        max-width: 100% !important;
    }
    
    /* Contact card */
    .card[style*="padding: 3.5rem"] {
        padding: 2rem !important;
    }
    
    /* Form grid - stack name and email */
    form div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

@media (max-width: 768px) {
    /* Contact hero mobile */
    section.hero[style*="padding: 6rem 0"],
    section.hero[style*="padding: 4rem 0"],
    section.hero[style*="padding: 3rem 0"] {
        padding: 2.5rem 0 1.5rem 0 !important;
    }
    
    section.hero .hero-content {
        text-align: center !important;
    }
    
    section.hero h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
    }
    
    section.hero p {
        font-size: 0.9rem !important;
        padding: 0 1rem !important;
        line-height: 1.5 !important;
    }
    
    /* Contact section padding */
    .section {
        padding: 2rem 0 !important;
    }
    
    /* Contact grid gap */
    .grid.grid-2[style*="gap: 5rem"],
    .grid.grid-2[style*="gap: 3rem"],
    .grid.grid-2[style*="gap: 2.5rem"] {
        gap: 2rem !important;
    }
    
    /* Section title */
    .section-title {
        text-align: center !important;
        margin-bottom: 1.5rem !important;
    }
    
    .section-title h2 {
        font-size: 1.4rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .section-title p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    .section-title span {
        font-size: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Contact info container */
    div[style*="display: flex; flex-direction: column; gap: 2rem;"] {
        gap: 1.5rem !important;
    }
    
    /* Contact info items */
    div[style*="display: flex; gap: 1.5rem; align-items: center;"] {
        gap: 1rem !important;
        flex-wrap: wrap !important;
    }
    
    div[style*="width: 50px; height: 50px"] {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
    }
    
    /* Contact card */
    .card[style*="padding: 3.5rem"],
    .card[style*="padding: 2rem"] {
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }
    
    .card h2 {
        font-size: 1.3rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Form elements */
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 1rem !important;
        padding: 0.85rem !important;
    }
    
    .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .form-group {
        margin-bottom: 1.25rem !important;
    }
    
    /* Submit button */
    button[type="submit"] {
        padding: 1rem !important;
        font-size: 1rem !important;
    }
    
    /* Office location box */
    div[style*="margin-top: 4rem"],
    div[style*="margin-top: 2rem"] {
        margin-top: 2rem !important;
        padding: 1.5rem !important;
        border-radius: 12px !important;
    }
    
    div[style*="margin-top: 4rem"] h4,
    div[style*="margin-top: 2rem"] h4 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    div[style*="margin-top: 4rem"] p,
    div[style*="margin-top: 2rem"] p {
        font-size: 0.9rem !important;
    }
    
    /* Status messages */
    #contactStatus > div {
        padding: 1.25rem !important;
        font-size: 0.9rem !important;
        flex-direction: column !important;
        text-align: center !important;
    }
    
    #contactStatus i {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile */
    section.hero h1 {
        font-size: 1.5rem !important;
    }
    
    section.hero p {
        font-size: 0.85rem !important;
    }
    
    .card[style*="padding: 1.5rem"] {
        padding: 1.25rem !important;
    }
    
    .card h2 {
        font-size: 1.15rem !important;
    }
    
    /* Contact info items - smaller icons */
    div[style*="width: 45px; height: 45px"] {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }
    
    /* Contact info text */
    div[style*="display: flex; gap: 1.5rem; align-items: center;"] h4 {
        font-size: 0.75rem !important;
    }
    
    div[style*="display: flex; gap: 1.5rem; align-items: center;"] p {
        font-size: 1rem !important;
    }
    
    /* Form spacing */
    .form-group {
        margin-bottom: 1rem !important;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 0.95rem !important;
        padding: 0.75rem !important;
    }
    
    /* Office location */
    div[style*="margin-top: 2rem"] {
        margin-top: 1.5rem !important;
        padding: 1.25rem !important;
    }
    
    /* Section title */
    .section-title h2 {
        font-size: 1.25rem !important;
    }
    
    .section-title span {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 768px) {
    /* Hero section mobile */
    section[style*="padding: 80px 0 60px"] {
        padding: 40px 0 30px !important;
    }
    
    section[style*="padding: 80px 0 60px"] h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    section[style*="padding: 80px 0 60px"] p {
        font-size: 0.95rem !important;
        padding: 0 1rem !important;
    }
    
    /* Badge */
    div[style*="border-radius: 50px; padding: 0.5rem 1.5rem"] {
        padding: 0.4rem 1rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Form section */
    section[style*="padding: 60px 0"] {
        padding: 40px 0 !important;
    }
    
    /* Form card */
    .card[style*="padding: 2.5rem"],
    .card[style*="padding: 1.5rem"] {
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }
    
    /* Form inputs */
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 0.95rem !important;
        padding: 0.75rem !important;
    }
    
    /* Form labels */
    .form-label {
        font-size: 0.9rem !important;
    }
    
    /* Submit button */
    button[type="submit"] {
        padding: 0.85rem !important;
        font-size: 1rem !important;
    }
    
    /* Info boxes */
    div[style*="padding: 2rem"],
    div[style*="padding: 1.5rem"] {
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }
    
    /* Section headings */
    h3[style*="font-size: 1.5rem"] {
        font-size: 1.25rem !important;
    }
    
    /* Steps */
    div[style*="width: 40px; height: 40px"] {
        width: 35px !important;
        height: 35px !important;
        font-size: 1.1rem !important;
    }
    
    /* Step text */
    h4 {
        font-size: 0.95rem !important;
    }
    
    /* Stats box */
    div[style*="font-size: 2.5rem"] {
        font-size: 2rem !important;
    }
    
    /* Success/Error messages */
    div[style*="padding: 1.5rem"][style*="margin-bottom: 2rem"] {
        padding: 1.25rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    div[style*="padding: 1.5rem"] i[style*="font-size: 3rem"] {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile adjustments */
    section[style*="padding: 80px 0 60px"] h1,
    section[style*="padding: 40px 0 30px"] h1 {
        font-size: 1.5rem !important;
    }
    
    .card[style*="padding: 1.25rem"] {
        padding: 1rem !important;
    }
    
    div[style*="padding: 1.25rem"] {
        padding: 1rem !important;
    }
    
    /* Form group spacing */
    .form-group {
        margin-bottom: 1rem !important;
    }
}


/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Save data mode - reduce animations and effects */
.save-data * {
    animation: none !important;
    transition: none !important;
}

.save-data img {
    filter: none !important;
}

/* Reduce animations on low-end devices */
.reduce-motion * {
    animation-duration: 0.3s !important;
    transition-duration: 0.2s !important;
}

/* Lazy loading placeholder */
img[data-src] {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

img.loaded {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* GPU acceleration for smooth animations */
.card,
.btn,
.hero-slide {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Contain layout shifts */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift for images */
img {
    aspect-ratio: attr(width) / attr(height);
}


/* Mobile User Section */
.mobile-user-section {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 1rem;
}

.mobile-user-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-user-link:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.mobile-user-link i {
    font-size: 1.25rem;
    width: 30px;
    text-align: center;
}

/* Mobile Badge Count */
.mobile-user-link .badge-count {
    position: static !important;
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}

/* Mobile Social Links Styling */
.mobile-social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 0 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 1rem;
}

.mobile-social-links a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 50%;
    color: #06b6d4;
    transition: all 0.3s ease;
    text-decoration: none;
}

.mobile-social-links a:hover {
    background: #06b6d4;
    color: white;
    transform: translateY(-2px);
}

/* ============================================================
   FOOTER ACCORDION FOR MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .footer-section h4 {
        cursor: pointer;
        user-select: none;
        position: relative;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 0 !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: all 0.3s ease;
    }
    
    .footer-heading-mobile {
        cursor: pointer !important;
    }
    
    .footer-toggle-icon {
        font-size: 1rem;
        transition: transform 0.3s ease;
        color: #06b6d4;
    }
    
    .footer-heading-mobile.active .footer-toggle-icon {
        transform: rotate(180deg);
    }
    
    .footer-section ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        padding: 0 !important;
    }
    
    .footer-section ul.active {
        max-height: 500px;
        padding: 1rem 0 !important;
    }
    
    .footer-section .footer-contact {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .footer-section ul.active + .footer-contact {
        max-height: 100px;
        padding: 0.5rem 0 !important;
        margin-top: 0.5rem !important;
    }
    
    /* Keep About section always open */
    .footer-about {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1.5rem;
        margin-bottom: 1rem;
    }
}b6d4;
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.mobile-social-links a:active {
    transform: translateY(-1px) scale(1);
}

.mobile-social-links a i {
    font-size: 1.1rem;
}

/* Desktop: Hide mobile social links */
@media (min-width: 993px) {
    .mobile-social-links {
        display: none !important;
    }
}


/* Hide desktop header-auth in mobile menu */
@media (max-width: 992px) {
    #mainNav .header-auth {
        display: none !important;
    }
    
    /* Show mobile user section only */
    .mobile-user-section {
        display: block !important;
    }
}

/* Desktop: Hide mobile user section */
@media (min-width: 993px) {
    .mobile-user-section {
        display: none !important;
    }
}

/* Mobile User Section Improvements */
.mobile-user-section {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 1rem;
}

.mobile-user-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-user-link:hover {
    color: var(--accent);
    padding-left: 0.5rem;
}

.mobile-user-link:active {
    transform: scale(0.98);
}

/* Mobile Badge Styling */
.mobile-user-link .badge-count {
    position: static !important;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    min-width: 24px;
    text-align: center;
    font-weight: 700;
}

/* Remove duplicate bottom navigation on mobile menu */
@media (max-width: 768px) {
    #mainNav .mobile-bottom-nav {
        display: none;
    }
}
