/* Responsive Design - Mobile First Approach */

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .hero-container {
        gap: 2rem;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Tablet */
@media (max-width: 991px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .nav-link {
        font-size: 1.125rem;
        padding: 12px 24px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Grids */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .languages-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Large */
@media (max-width: 767px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Header */
    .nav-container {
        padding: 0 15px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    /* Hero */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
        width: 100%;
        max-width: 200px;
    }
    
    /* Page Header */
    .page-header {
        padding: 100px 0 40px;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    /* Sections */
    section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Cards */
    .about-card,
    .feature-card,
    .language-card,
    .course-card {
        padding: 1.5rem;
    }
    
    /* Grids */
    .about-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .languages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Course Cards */
    .course-highlights {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .highlight-item {
        font-size: 0.75rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-content p {
        font-size: 1rem;
    }
    
    .slider-controls {
        gap: 0.5rem;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    /* Forms */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.875rem;
    }
    
    .checkbox-label {
        font-size: 0.75rem;
    }
    
    /* CTA */
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Mobile Small */
@media (max-width: 575px) {
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    /* Typography */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .hero {
        padding: 90px 0 50px;
    }
    
    .hero-img {
        height: 250px;
    }
    
    /* Page Header */
    .page-header {
        padding: 90px 0 30px;
    }
    
    /* Sections */
    section {
        padding: 30px 0;
    }
    
    /* Cards */
    .about-card,
    .feature-card,
    .language-card,
    .course-card {
        padding: 1rem;
    }
    
    /* Languages Grid */
    .languages-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .language-card {
        text-align: center;
    }
    
    /* Course Images */
    .course-img {
        height: 150px;
    }
    
    /* Icons */
    .about-icon,
    .feature-icon,
    .language-flag {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1rem;
    }
    
    .testimonial-content p {
        font-size: 0.875rem;
    }
    
    /* Footer */
    .footer-section h3 {
        font-size: 1rem;
    }
    
    .footer-description,
    .footer-links a,
    .footer-contact p {
        font-size: 0.875rem;
    }
    
    /* Social Links */
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.875rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-menu {
        height: 100vh;
        padding-top: 1rem;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .hero {
        padding: 80px 0 40px;
    }
    
    .page-header {
        padding: 80px 0 30px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero::before {
        background-size: 50px 50px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .header,
    .footer,
    .nav-toggle,
    .slider-controls,
    .btn {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }
    
    .page-header,
    .hero {
        padding: 20px 0 !important;
    }
    
    section {
        padding: 20px 0 !important;
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-link:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1001;
}

.skip-link:focus {
    top: 6px;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Smooth Scrolling Enhancement */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .nav-link:hover,
    .social-link:hover,
    .about-card:hover,
    .feature-card:hover,
    .language-card:hover,
    .course-card:hover {
        transform: none;
    }
    
    .btn:active,
    .nav-link:active,
    .social-link:active {
        transform: scale(0.95);
    }
    
    /* Increase touch targets */
    .nav-link,
    .btn,
    .social-link {
        min-height: 44px;
        min-width: 44px;
    }
}



/* Mobile-First Responsive Improvements */

/* Hero Section Mobile Layout - Image First */
@media (max-width: 991px) {
    .hero-content {
        display: flex;
        flex-direction: column-reverse;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .hero-text {
        order: 1;
        text-align: center;
    }
}

/* About Section Mobile Layout - Image First */
@media (max-width: 991px) {
    .about-section .hero-content {
        display: flex;
        flex-direction: column-reverse;
    }
    
    .about-section .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .about-section .hero-text {
        order: 1;
        text-align: center;
    }
}

/* About Us Page - Leadership Grid Mobile Layout */
@media (max-width: 768px) {
    .leadership-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .leader-card:first-child {
        order: 1;
    }
    
    .leader-card:last-child {
        order: 2;
    }
}

/* Course Images - Better Fitting */
.course-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition-slow);
}

@media (max-width: 768px) {
    .course-image {
        height: 200px;
    }
}

@media (max-width: 575px) {
    .course-image {
        height: 180px;
    }
}

/* Mobile Navigation - Darker Background */
@media (max-width: 991px) {
    .nav-menu {
        background: rgba(15, 20, 25, 0.98);
        backdrop-filter: blur(15px);
        border-left: 3px solid var(--accent-pink);
    }
    
    .nav-link {
        color: var(--text-primary);
        border-bottom: 1px solid var(--border-primary);
        padding: 15px 24px;
        width: 100%;
        text-align: center;
    }
    
    .nav-link:hover {
        background: var(--bg-tertiary);
        color: var(--accent-pink);
    }
    
    .nav-link.active {
        background: var(--accent-pink);
        color: var(--text-primary);
    }
}

/* Improved Button Responsiveness */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .btn-group .btn {
        width: 100%;
        max-width: 320px;
        padding: 14px 28px;
        font-size: 1.1rem;
    }
}

/* Enhanced Grid Responsiveness */
@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Better Typography Scaling */
@media (max-width: 575px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .section-title {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .page-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
}

/* Enhanced Card Spacing */
@media (max-width: 768px) {
    .card {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Improved Footer Mobile Layout */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .footer-section {
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--border-primary);
    }
    
    .footer-section:last-child {
        border-bottom: none;
    }
    
    .social-links {
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Enhanced Touch Targets */
@media (hover: none) and (pointer: coarse) {
    .nav-link,
    .btn,
    .social-link,
    .slider-btn {
        min-height: 48px;
        min-width: 48px;
        padding: 12px 16px;
    }
    
    .nav-toggle {
        padding: 8px;
        min-height: 48px;
        min-width: 48px;
    }
}

/* Better Image Aspect Ratios */
.hero-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
    .hero-img {
        max-height: 300px;
    }
}

@media (max-width: 575px) {
    .hero-img {
        max-height: 250px;
    }
}

/* Improved Section Spacing */
@media (max-width: 768px) {
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
}

@media (max-width: 575px) {
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-lg);
    }
}



/* Enhanced Hero Section Responsive Improvements */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.8rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        line-height: 1.6;
    }
}

@media (max-width: 991px) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.3;
        margin-bottom: var(--spacing-md);
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: var(--spacing-lg);
        text-align: center;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0 50px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: var(--spacing-md);
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: var(--spacing-lg);
        padding: 0 var(--spacing-sm);
    }
    
    .hero-img {
        height: 350px;
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 575px) {
    .hero {
        padding: 70px 0 40px;
    }
    
    .hero-title {
        font-size: 1.9rem;
        line-height: 1.4;
        margin-bottom: var(--spacing-sm);
        padding: 0 var(--spacing-xs);
        word-break: break-word;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: var(--spacing-md);
        padding: 0 var(--spacing-sm);
    }
    
    .hero-img {
        height: 280px;
        border-radius: var(--radius-md);
    }
    
    .hero-content {
        gap: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.7rem;
        line-height: 1.4;
        padding: 0 var(--spacing-xs);
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.7;
        padding: 0 var(--spacing-sm);
    }
    
    .hero-img {
        height: 250px;
    }
}

/* Enhanced Button Group Responsiveness */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        max-width: 250px;
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 0.95rem;
    }
}

@media (max-width: 575px) {
    .btn-group .btn {
        max-width: 200px;
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.9rem;
    }
}

/* Container Responsive Improvements */
@media (max-width: 575px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
}



/* Responsive adjustments for language cards */
@media (max-width: 768px) {
    .language-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .language-card-content h3 {
        font-size: 1.3em;
    }

    .language-card-content p {
        font-size: 0.9em;
    }

    .language-card-content .students {
        font-size: 0.8em;
    }

    .language-card-content .learn-more {
        font-size: 0.9em;
    }
}


