/* ===== RESPONSIVE STYLES ===== */

/* Large Devices (Desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content h2 {
        font-size: 1.6rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .footer-logo,
    .footer-links,
    .footer-courses,
    .footer-social {
        flex-basis: 50%;
        margin-bottom: 30px;
    }
}

/* Medium Devices (Tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .stat-item {
        flex-basis: calc(50% - 20px);
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .contact-form {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-info {
        flex-direction: column;
    }
    
    .info-item {
        margin-bottom: 15px;
    }
}

/* Small Devices (Landscape Phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    .hamburger {
        display: block;
        z-index: 101;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px 30px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 100;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        margin: 0 0 20px;
        width: 100%;
    }
    
    .nav-link {
        color: var(--dark-color);
        font-size: 1.2rem;
        width: 100%;
        display: block;
        padding: 10px 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    .course-carousel {
        display: none;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .course-filters {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        margin-bottom: 10px;
    }
    
    .footer-logo,
    .footer-links,
    .footer-courses,
    .footer-social {
        flex-basis: 100%;
    }
    
    .back-to-top {
        bottom: 100px;
    }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content h2 {
        font-size: 1.1rem;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .stat-item {
        flex-basis: 100%;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-content {
        padding: 30px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .chat-popup {
        width: 280px;
    }
    
    .chat-body {
        height: 250px;
    }
}

/* Landscape Mode Fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0;
    }
    
    .nav-menu {
        padding-top: 60px;
    }
    
    .nav-item {
        margin-bottom: 10px;
    }
    
    .chat-body {
        height: 150px;
    }
}

/* High Resolution Displays */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .chat-bubble,
    .back-to-top,
    .cta-button,
    .learn-more-btn,
    .enroll-btn,
    .submit-btn,
    .course-filters,
    .testimonial-controls {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .courses-grid {
        display: block;
    }
    
    .course-card {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .card-inner {
        transform: none !important;
    }
    
    .card-back {
        display: none;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    .map-container {
        display: none;
    }
    
    .info-content h3 {
        color: #000;
    }
    
    .info-icon {
        background-color: #fff;
        color: #000;
        border: 1px solid #000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background-color: #121212;
        color: #f8f9fa;
    }
    
    body.dark-mode .header.scrolled {
        background-color: #1e1e1e;
    }
    
    body.dark-mode .header.scrolled .logo a,
    body.dark-mode .header.scrolled .nav-link {
        color: #f8f9fa;
    }
    
    body.dark-mode .header.scrolled .bar {
        background-color: #f8f9fa;
    }
    
    body.dark-mode .card-front,
    body.dark-mode .modal-content,
    body.dark-mode .chat-popup,
    body.dark-mode .testimonial-content {
        background-color: #1e1e1e;
        color: #f8f9fa;
    }
    
    body.dark-mode .card-front h3,
    body.dark-mode .modal-description h3,
    body.dark-mode .modal-syllabus h3,
    body.dark-mode .modal-form h3 {
        color: #f8f9fa;
    }
    
    body.dark-mode .card-front p {
        color: #adb5bd;
    }
    
    body.dark-mode .form-group input,
    body.dark-mode .form-group textarea,
    body.dark-mode .form-group select {
        background-color: #2d2d2d;
        border-color: #444;
        color: #f8f9fa;
    }
    
    body.dark-mode .chat-input input {
        background-color: #2d2d2d;
        border-color: #444;
        color: #f8f9fa;
    }
    
    body.dark-mode .section-title h2,
    body.dark-mode .about-text h3 {
        color: #f8f9fa;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
    
    .carousel-track,
    .testimonial-track {
        animation: none;
    }
    
    .chat-icon {
        animation: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}