/* Mobile Responsiveness */
@media (max-width: 991px) {

    /* Navbar Styling */
    .header-section {
        padding: 0.5rem 0;
        background: rgba(255, 255, 255, 0.95);
        /* Ensure header has background */
        height: auto !important;
        /* Allow auto height */
        min-height: 70px;
    }

    .navbar {
        padding: 0;
        min-height: 70px;
        /* Ensure sufficient height */
        justify-content: center;
        /* Center brand if needed, but absolute toggler handles corners */
    }

    .navbar .container {
        display: flex;
        justify-content: flex-end;
        /* Align brand to right */
        align-items: center;
        position: relative;
        /* Context for absolute toggler */
    }

    .navbar-brand {
        margin: 0;
    }

    .navbar-toggler {
        border-color: rgba(0, 0, 0, 0.1);
        display: block !important;
        position: absolute;
        /* Absolute force */
        left: 0;
        /* Pin to left */
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    /* RTL specific adjustment for toggler */
    html[dir="rtl"] .navbar-toggler {
        left: 0;
        right: auto;
    }

    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: 15px;
        margin-top: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        position: absolute;
        width: 100%;
        /* Full width relative to container */
        left: 0;
        right: 0;
        z-index: 1000;
        top: 100%;
    }

    .nav-link {
        color: #000000 !important;
        padding: 12px 0 !important;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Hero Section Fixes */
    .hero-section {
        padding-top: 140px !important;
        /* Balanced padding */
        padding-bottom: 60px;
        text-align: center;
        /* Ensure background covers full height */
        min-height: auto;
        height: auto;
    }

    .hero-title-text {
        font-size: 2.2rem;
        line-height: 1.3;
        color: #ffffff !important;
        /* Force white text for contrast */
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
        margin-bottom: 20px !important;
    }

    .hero-subtitle-text {
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.9) !important;
        margin-bottom: 30px !important;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
        /* Full width on mobile */
        margin: 0 !important;
        padding: 12px 20px;
    }

    .hero-buttons .btn-outline-primary {
        background: transparent;
        color: white;
        border: 2px solid white;
    }

    .hero-buttons .btn-outline-primary:hover {
        background: white;
        color: var(--primary-color);
    }

    /* Stats Mobile Fix */
    .hero-section .row.mt-5 {
        margin-top: 3rem !important;
        padding-top: 0 !important;
        display: flex;
        flex-direction: row;
        /* Keep side-by-side if they fit, or wrap */
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }

    .hero-section .col-md-4 {
        width: 45%;
        /* 2 per row */
        margin-bottom: 10px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .hero-section h5.text-light {
        font-size: 0.9rem;
        color: rgba(8, 8, 8, 0.8) !important;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .hero-title-text {
        font-size: 1.8rem;
    }

    .hero-section .col-md-4 {
        width: 100%;
        /* 1 per row on very small screens */
    }
}