/* ===== Mobile First Responsive Design ===== */

/* Extra small devices (phones, 576px and down) */
@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .feature-card,
    .course-card,
    .news-card {
        margin-bottom: 1.5rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .container {
        max-width: 540px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .container {
        max-width: 720px;
    }
    
    .navbar-nav .nav-link {
        margin: 0 0.25rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .container {
        max-width: 960px;
    }
    
    .navbar-nav .nav-link {
        margin: 0 0.5rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Specific component adjustments */
@media (max-width: 768px) {
    .course-detail-card .row {
        flex-direction: column;
    }
    
    .course-detail-card .col-md-4 {
        width: 100%;
    }
    
    .course-detail-card .col-md-8 {
        width: 100%;
    }
    
    .hero-stats .col-4 {
        margin-bottom: 1rem;
    }
    
    .cta-section .row {
        text-align: center;
    }
    
    .cta-section .text-lg-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

/* Navigation mobile adjustments */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 10px;
        box-shadow: var(--shadow);
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
    
    .navbar-nav .btn {
        margin-top: 0.5rem;
        width: 100%;
        text-align: center;
    }
}

/* Footer mobile adjustments */
@media (max-width: 768px) {
    .footer .col-md-6 {
        margin-bottom: 2rem;
    }
    
    .footer .text-md-end {
        text-align: left !important;
    }
    
    .social-links {
        margin-top: 1rem;
    }
}

/* Hero image adjustments */
@media (max-width: 992px) {
    .hero-image {
        margin-top: 3rem;
    }
    
    .hero-image img {
        transform: none !important;
    }
}

/* Course cards mobile */
@media (max-width: 576px) {
    .course-actions {
        flex-direction: column;
    }
    
    .course-actions .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
}

/* Modal mobile adjustments */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-content {
        border-radius: 10px;
    }
}

/* Back to top button mobile */
@media (max-width: 576px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section-title,
    .hero-title,
    .page-title {
        color: black !important;
    }
}