/* Mobile Responsive Styles */

/* Global Styles for Mobile Elements (Hidden on Desktop) */
.header-buttons-mobile, .mobile-overlay {
    display: none;
}

@media screen and (max-width: 991px) {
    /* Container Adjustments */
    .container {
        padding: 0 15px;
        width: 100%;
    }

    /* Header & Navbar */
    header {
        height: 70px;
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Slightly stronger shadow for separation */
    }

    .navbar {
        justify-content: space-between;
        padding: 0;
        position: relative; /* For absolute positioning of logo */
        display: flex;
        align-items: center;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1002; /* Above menu if needed, but menu is usually side drawer */
    }

    .logo-img {
        height: 40px; /* Adjusted height for mobile */
    }

    /* Modern Hamburger Menu */
    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 45px;
        height: 45px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        gap: 6px; /* Spacing between lines */
        margin-right: 0; /* Align to right edge */
    }

    .mobile-menu-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--secondary-color);
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    /* Hamburger Animation States */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Navigation Links - Mobile Sidebar */
    .nav-links {
        padding-top: 100px; /* Increased top padding for better spacing */
        position: fixed;
        top: 0;
        right: -100%; /* Hidden by default */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        gap: 20px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    /* Header Buttons in Mobile Menu */
    .header-buttons-mobile {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 20px;
    }

    .header-buttons-mobile .header-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    /* Hide desktop header buttons */
    .desktop-header-buttons { 
        display: none !important;
    }

    /* Overlay for Mobile Menu */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Hero Section */
    .hero-section {
        height: 400px; /* Reduced height */
        margin-top: 70px; /* Offset for fixed header */
    }

    .hero-content {
        left: 5%;
        width: 90%;
        text-align: center;
        transform: translateY(-50%);
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    /* Features Section */
    .features-grid {
        grid-template-columns: 1fr; /* Stack vertically */
        gap: 40px;
    }

    .feature-item {
        margin-bottom: 20px;
    }

    /* Info Bar Section */
    .info-bar-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .info-bar-item {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 30px 20px;
    }

    .info-bar-item:last-child {
        border-bottom: none;
    }

    /* Courses Section */
    .courses-section {
        padding: 40px 0;
    }

    .course-grid {
        grid-template-columns: 1fr; /* Single column */
    }

    /* Promo Section */
    .promo-grid {
        grid-template-columns: 1fr;
    }

    .promo-card {
        height: auto;
        min-height: 250px;
    }
    
    .promo-icon {
        font-size: 6rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-widget {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links li {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }

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

    .footer-contact-buttons {
        flex-direction: column;
        width: 100%;
    }

    .contact-btn-white {
        width: 100%;
        justify-content: center;
    }

    .footer-legal-bar {
        flex-direction: column;
        gap: 15px;
    }

    .payment-logos {
        justify-content: center;
    }
}

/* Extra Small Screens */
@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .page-header {
        padding: 80px 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}
