/* =====================================================
   RESPONSIVE.CSS - Mobile-First Responsive Design
   Abdeutsch Center - Optimisé pour tous les appareils
   ===================================================== */

/* ===== MOBILE: Hide hero description on all mobile devices ===== */
@media (max-width: 768px), 
       (max-device-width: 768px),
       (hover: none) and (pointer: coarse) {
    .slide-content p,
    .slide .slide-content p,
    .german-flag-slide .slide-content p,
    .hero-slider .slide-content p {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 0 !important;
        line-height: 0 !important;
    }
}

/* ===== CSS Variables for Responsive Design ===== */
:root {
    /* Touch-friendly sizes (WCAG minimum 44x44px) */
    --touch-target-min: 44px;
    --touch-target-comfortable: 48px;
    
    /* Responsive spacing */
    --spacing-xs: clamp(0.25rem, 1vw, 0.5rem);
    --spacing-sm: clamp(0.5rem, 2vw, 1rem);
    --spacing-md: clamp(1rem, 3vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 4vw, 2.5rem);
    --spacing-xl: clamp(2rem, 5vw, 4rem);
    
    /* Fluid typography */
    --font-size-xs: clamp(0.75rem, 2vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 2.5vw, 1rem);
    --font-size-base: clamp(1rem, 3vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 3.5vw, 1.25rem);
    --font-size-xl: clamp(1.25rem, 4vw, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 5vw, 2rem);
    --font-size-3xl: clamp(1.75rem, 6vw, 2.5rem);
    --font-size-4xl: clamp(2rem, 7vw, 3rem);
    --font-size-hero: clamp(2rem, 8vw, 3.5rem);
}

/* ===== Base Mobile-First Styles ===== */

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Smooth scrolling with reduced motion support */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch-friendly tap highlights */
* {
    -webkit-tap-highlight-color: rgba(221, 0, 0, 0.1);
}

/* Better touch scrolling */
.scroll-container {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

/* ===== Typography - Fluid Sizing ===== */
body {
    font-size: var(--font-size-base);
    line-height: 1.6;
}

h1 {
    font-size: var(--font-size-hero);
    line-height: 1.2;
}

h2 {
    font-size: var(--font-size-3xl);
    line-height: 1.25;
}

h3 {
    font-size: var(--font-size-xl);
    line-height: 1.3;
}

h4 {
    font-size: var(--font-size-lg);
    line-height: 1.35;
}

p {
    font-size: var(--font-size-base);
    line-height: 1.7;
}

/* ===== Container Responsive ===== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

/* ===== Navbar Responsive for Medium Screens ===== */
@media (max-width: 1200px) {
    .nav-menu {
        gap: clamp(10px, 1.5vw, 20px);
    }
    
    .nav-link {
        font-size: clamp(11px, 1.1vw, 14px);
    }
    
    .navbar-logo {
        height: clamp(40px, 5vw, 60px);
    }
    
    .logo-text {
        font-size: clamp(14px, 1.8vw, 20px);
    }
    
    .nav-buttons .btn {
        padding: clamp(6px, 0.8vw, 10px) clamp(12px, 1.2vw, 20px);
        font-size: clamp(10px, 1vw, 13px);
    }
}

/* ===== Mobile Navigation ===== */
@media (max-width: 992px) {
    .hamburger {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 1002 !important;
        padding: 10px;
        margin: -10px;
        position: relative;
    }
    
    .hamburger span {
        width: 28px;
        height: 3px;
        background: #fff !important;
        border-radius: 3px;
        transition: all 0.3s ease;
        display: block;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(85vw, 400px);
        height: 100vh;
        height: 100dvh;
        background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%) !important;
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 30px 40px;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 1001 !important;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
        display: flex !important;
    }
    
    .nav-menu.active {
        right: 0;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: none;
        display: block !important;
        visibility: visible !important;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block !important;
        padding: 18px 0;
        font-size: 17px;
        color: #ffffff !important;
        min-height: var(--touch-target-min);
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Mobile dropdown */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent !important;
        border-radius: 10px;
        margin: 0;
        padding: 0;
        border-top: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease, background 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu,
    .dropdown.open .dropdown-menu {
        max-height: 500px;
        padding: 15px 0;
        background: rgba(255, 255, 255, 0.05) !important;
    }
    
    .dropdown-menu li {
        border-bottom: none;
    }
    
    .dropdown-menu li a {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .dropdown-menu li a::before {
        display: none;
    }
    
    .dropdown-menu li a:hover {
        background: rgba(255, 255, 255, 0.1);
        padding-left: 25px;
    }
    
    .nav-buttons {
        display: none;
    }
    
    /* Mobile menu overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 998;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-container {
        padding: 0 20px;
    }
}

/* ===== Hero Section Medium Screens (Tablets) ===== */
@media (max-width: 992px) {
    .hero-slider {
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .slide-content h1 {
        font-size: clamp(1.3rem, 4vw, 2rem);
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .slide-content p {
        font-size: clamp(0.85rem, 1.8vw, 1rem);
        margin-bottom: 20px;
        line-height: 1.5;
    }
}

/* ===== Tablet & Small Laptop (992px - 768px) ===== */
@media (max-width: 992px) and (min-width: 769px) {
    .hero-content-container {
        gap: clamp(20px, 2.5vw, 40px);
    }
    
    .hero-logo-animated {
        width: clamp(120px, 16vw, 180px) !important;
    }
    
    .slide-content h1 {
        font-size: clamp(1.5rem, 4.5vw, 2.2rem) !important;
    }
}

/* ===== Hero Section Mobile ===== */
@media (max-width: 768px) {
    .hero-slider {
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .hero-content-container {
        gap: clamp(10px, 1.8vw, 25px);
        width: 95%;
    }
    
    .hero-logo-animated {
        width: clamp(90px, 22vw, 130px) !important;
        max-width: 130px !important;
        height: auto !important;
        animation: none !important;
        transform: none !important;
    }
    
    .slide-content {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .german-flag-line {
        margin-top: 0;
        margin-bottom: 10px;
        width: 60px;
        height: 4px;
        animation: none !important;
    }
    
    .slide-content h1 {
        font-size: clamp(0.85rem, 4.2vw, 1.3rem) !important;
        margin-bottom: 14px !important;
        margin-top: 0 !important;
        line-height: 1.3 !important;
        animation: none !important;
    }
    
    .slide-content p,
    .slide .slide-content p,
    .german-flag-slide .slide-content p {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .slide-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
        animation: none !important;
    }
    
    .slide-buttons .btn {
        width: 100%;
        padding: 10px 18px;
        font-size: 13px;
        min-height: var(--touch-target-min);
    }
    
    .slider-controls {
        bottom: 25px;
    }
    
    .slider-dot {
        width: 7px;
        height: 7px;
    }
    
    /* German flag animation - simplified for mobile */
    .german-flag-bg {
        animation: none;
    }
    
    .flag-stripe {
        animation: none;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .hero-content-container {
        gap: clamp(8px, 1.5vw, 20px);
    }
    
    .hero-logo-animated {
        width: clamp(80px, 22vw, 115px) !important;
        max-width: 115px !important;
        height: auto !important;
        animation: none !important;
        transform: none !important;
    }
    
    .german-flag-line {
        width: 55px;
        height: 4px;
        margin-top: 0;
        margin-bottom: 8px;
    }
    
    .slide-content h1 {
        font-size: clamp(0.75rem, 4vw, 1.15rem) !important;
        margin-bottom: 10px !important;
        margin-top: 0 !important;
        line-height: 1.25 !important;
    }
    
    .slide-buttons .btn {
        padding: 9px 16px;
        font-size: 12px;
    }
    
    .slider-dot {
        width: 6px;
        height: 6px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .hero-content-container {
        gap: clamp(6px, 1.2vw, 15px);
    }
    
    .hero-logo-animated {
        width: clamp(70px, 20vw, 100px) !important;
        max-width: 100px !important;
        height: auto !important;
        animation: none !important;
        transform: none !important;
    }
    
    .german-flag-line {
        width: 50px;
        height: 3px;
        margin-top: 0;
        margin-bottom: 6px;
    }
    
    .slide-content h1 {
        font-size: clamp(0.7rem, 3.8vw, 1rem) !important;
        margin-bottom: 8px !important;
        margin-top: 0 !important;
    }
    
    .slide-buttons .btn {
        padding: 8px 14px;
        font-size: 11px;
    }
    
    .slider-dot {
        width: 5px;
        height: 5px;
    }
}

/* ===== Quick Links Mobile ===== */
@media (max-width: 992px) {
    .quick-links {
        margin-top: -60px;
    }
    
    .quick-links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .quick-link-card {
        padding: 20px 15px;
    }
    
    .quick-link-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .quick-link-icon i {
        font-size: 24px;
    }
    
    .quick-link-card h3 {
        font-size: 16px;
    }
    
    .quick-link-card p {
        font-size: 12px;
        display: none;
    }
}

@media (max-width: 576px) {
    .quick-links {
        margin-top: -50px;
        padding: 0 10px;
    }
    
    .quick-links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .quick-link-card {
        padding: 15px 10px;
        border-radius: 12px;
    }
    
    .quick-link-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
    
    .quick-link-icon i {
        font-size: 20px;
    }
    
    .quick-link-card h3 {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* ===== About Section Mobile ===== */
@media (max-width: 992px) {
    .about-section {
        padding: var(--spacing-xl) 0;
        display: block !important;
        visibility: visible !important;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        display: grid !important;
    }
    
    .about-image {
        order: -1;
        display: block !important;
    }
    
    .about-image img {
        width: 100%;
        height: auto;
        border-radius: var(--border-radius-lg);
    }
    
    .about-stats {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: -50px;
        margin-left: auto;
        margin-right: 15px;
        justify-content: center;
        display: flex !important;
        max-width: 260px;
        padding: 18px 22px;
        gap: 25px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .about-content {
        display: block !important;
    }
    
    .section-tag {
        font-size: 12px;
        padding: 6px 14px;
        display: inline-block !important;
    }
    
    .about-content h2 {
        font-size: 1.4rem;
        text-align: left;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .about-content p {
        text-align: left;
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .about-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        display: grid !important;
        margin: 20px 0;
    }
    
    .feature {
        display: flex !important;
        font-size: 12px;
        gap: 8px;
    }
    
    .feature i {
        font-size: 14px;
    }
    
    .about-content .btn {
        display: inline-block;
        text-align: center;
        max-width: 200px;
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .about-section {
        padding: 50px 0;
    }
    
    .about-grid {
        gap: 25px;
    }
    
    .about-stats {
        margin-top: -35px;
        margin-right: 10px;
        padding: 12px 16px;
        gap: 20px;
        max-width: 200px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .section-tag {
        font-size: 11px;
        padding: 5px 12px;
    }
    
    .about-content h2 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .about-content p {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 10px;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 15px 0;
    }
    
    .feature {
        font-size: 11px;
    }
    
    .about-content .btn {
        display: block;
        width: 100%;
        max-width: none;
    }
}

/* ===== Services Section Mobile ===== */
@media (max-width: 992px) {
    .services-section {
        padding: var(--spacing-xl) 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .service-card {
        padding: 25px 20px;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-icon i {
        font-size: 28px;
    }
    
    .service-card h3 {
        font-size: 18px;
    }
    
    .service-card p {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .service-card {
        padding: 15px 12px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-icon i {
        font-size: 20px;
    }
    
    .service-card h3 {
        font-size: 13px;
    }
    
    .service-card p {
        font-size: 11px;
        line-height: 1.4;
    }
}

/* ===== Courses Section Mobile ===== */
@media (max-width: 1200px) {
    .courses-grid-new {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .courses-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .course-item {
        padding: 25px 20px;
    }
    
    .course-level-circle {
        width: 70px;
        height: 70px;
    }
    
    .level-text {
        font-size: 24px;
    }
    
    .course-info h3 {
        font-size: 16px;
    }
    
    .course-info > p {
        font-size: 12px;
        min-height: 50px;
    }
    
    .course-price {
        font-size: 26px;
    }
    
    .course-cta {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .courses-section-new {
        padding: var(--spacing-lg) 0;
    }
    
    .courses-grid-new {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: var(--spacing-md) auto 0;
    }
    
    .course-item {
        padding: 25px 20px;
    }
    
    .popular-tag {
        top: -10px;
        padding: 5px 14px;
        font-size: 10px;
    }
    
    .course-info > p {
        min-height: auto;
    }
}

/* ===== Exams Section Mobile ===== */
@media (max-width: 992px) {
    .exams-section {
        padding: var(--spacing-xl) 0;
    }
    
    .exams-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .exam-card {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .exams-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .exam-card {
        padding: 15px 12px;
    }
    
    .exam-logo img {
        max-height: 45px;
    }
    
    .exam-card h3 {
        font-size: 14px;
    }
    
    .exam-levels {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .exam-levels span {
        padding: 3px 8px;
        font-size: 10px;
    }
}

/* ===== Events Section Mobile ===== */
@media (max-width: 992px) {
    .events-preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .events-preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .event-preview-card {
        padding: 15px 12px;
    }
    
    .event-preview-icon {
        width: 60px;
        height: 60px;
    }
    
    .event-preview-icon i {
        font-size: 24px;
    }
}

/* ===== Testimonials Mobile ===== */
@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .testimonials-section {
        padding: var(--spacing-lg) 0;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .testimonial-card {
        padding: 15px 12px;
    }
    
    .testimonial-card p {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .testimonial-author img {
        width: 35px;
        height: 35px;
    }
    
    .testimonial-author h4 {
        font-size: 12px;
    }
    
    .testimonial-author span {
        font-size: 10px;
    }
}

/* ===== Contact Section Mobile ===== */
@media (max-width: 992px) {
    .contact-section {
        padding: var(--spacing-xl) 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-details {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .contact-item {
        justify-content: flex-start;
        text-align: left;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .contact-form-wrapper {
        padding: 25px 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: var(--touch-target-min);
    }
    
    .contact-form .btn {
        padding: 16px 24px;
        font-size: 16px;
        min-height: var(--touch-target-comfortable);
    }
}

/* ===== Instagram Section Mobile ===== */
@media (max-width: 992px) {
    .instagram-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .instagram-section {
        padding: var(--spacing-lg) 0;
    }
    
    .instagram-videos-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .instagram-video-item iframe {
        height: 400px;
    }
    
    .instagram-follow {
        flex-direction: column;
        gap: 15px;
    }
    
    .instagram-follow .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ===== Map Section Mobile ===== */
@media (max-width: 768px) {
    .map-container iframe {
        height: 300px;
    }
    
    .map-info-card {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin: -30px 20px 0;
        border-radius: 15px;
    }
}

/* ===== Footer Mobile ===== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-about {
        grid-column: span 2;
        text-align: center;
    }
}

@media (max-width: 768px) {
    /* Hide footer description on mobile */
    .footer-about p {
        display: none !important;
    }
    
    /* Hide contact section on mobile footer */
    .footer-contact {
        display: none !important;
    }
    
    .footer-main {
        padding: 30px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: center;
    }
    
    /* Line 1: Abdeutsch Center title */
    .footer-about {
        grid-column: span 1;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .footer-title {
        font-size: 20px;
        margin-bottom: 0;
    }
    
    /* Line 2: Two columns for Liens Rapides & Nos Services */
    .footer-links {
        display: block !important;
    }
    
    .footer-grid {
        display: flex;
        flex-direction: column;
    }
    
    /* Create a row for the two link sections */
    .footer-grid::after {
        content: '';
        display: table;
        clear: both;
    }
    
    .footer-links {
        width: 50%;
        float: left;
        padding: 10px 5px;
    }
    
    .footer-links h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .footer-links ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .footer-links li a {
        font-size: 12px;
        padding: 5px 0;
        min-height: 32px;
    }
    
    /* Footer bottom - Line 3 */
    .footer-bottom {
        padding: 15px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .footer-bottom .container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        text-align: center;
        align-items: center;
    }
    
    .footer-bottom-right {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        font-size: 11px;
    }
    
    .footer-bottom-right p {
        font-size: 11px;
        margin: 0;
        width: 100%;
        text-align: center;
    }
    
    .footer-separator {
        display: inline !important;
        opacity: 0.5;
    }
    
    .footer-bottom-right a {
        font-size: 11px;
    }
    
    .footer-social {
        justify-content: center;
        gap: 15px;
        order: 1;
    }
    
    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .footer-main {
        padding: 25px 0 15px;
    }
    
    .footer-about {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .footer-title {
        font-size: 18px;
    }
    
    .footer-links {
        padding: 8px 3px;
    }
    
    .footer-links h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .footer-links li a {
        font-size: 11px;
        padding: 4px 0;
        min-height: 28px;
    }
    
    .footer-bottom {
        padding: 12px 0;
    }
    
    .footer-bottom-right p,
    .footer-bottom-right a {
        font-size: 10px;
    }
    
    .footer-social a {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ===== Floating Buttons Mobile ===== */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        left: 20px;
    }
    
    .whatsapp-float i {
        font-size: 26px;
    }
    
    .translate-float {
        bottom: 20px;
        right: 20px;
    }
    
    .translate-btn {
        width: 55px;
        height: 55px;
    }
    
    .translate-btn i {
        font-size: 22px;
    }
    
    .translate-menu {
        bottom: 65px;
        right: 0;
        min-width: 160px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 85px;
        right: 20px;
    }
}

/* ===== Section Headers Mobile ===== */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: var(--spacing-lg);
        padding: 0 10px;
    }
    
    .section-header h2 {
        font-size: var(--font-size-2xl);
    }
    
    .section-header h2::after {
        width: 60px;
        height: 3px;
        margin-top: 15px;
    }
    
    .section-header p {
        font-size: var(--font-size-sm);
    }
    
    .section-tag {
        padding: 8px 18px;
        font-size: 11px;
    }
}

/* ===== Partners Section Mobile ===== */
@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .partner-logo {
        padding: 20px;
    }
    
    .partner-logo img {
        max-height: 50px;
    }
}

/* ===== Page Header Mobile ===== */
@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 50px;
    }
    
    .page-header h1 {
        font-size: var(--font-size-2xl);
    }
    
    .breadcrumb {
        font-size: 13px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===== Forms Mobile Optimization ===== */
@media (max-width: 576px) {
    /* Prevent zoom on input focus (iOS) */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
    }
    
    /* Better touch targets for checkboxes and radios */
    input[type="checkbox"],
    input[type="radio"] {
        width: 22px;
        height: 22px;
        margin-right: 10px;
    }
    
    /* Form labels */
    label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
    }
}

/* ===== Buttons Touch Optimization ===== */
.btn {
    min-height: var(--touch-target-min);
    padding: 12px 24px;
    touch-action: manipulation;
}

@media (max-width: 576px) {
    .btn {
        padding: 14px 20px;
        font-size: 15px;
        width: 100%;
        max-width: 320px;
    }
    
    .btn-lg {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .btn i {
        font-size: 14px;
    }
}

/* ===== Cards Touch Optimization ===== */
@media (max-width: 768px) {
    .service-card,
    .course-item,
    .exam-card,
    .testimonial-card,
    .event-preview-card {
        /* Remove hover effects on touch devices */
        transform: none !important;
    }
    
    .service-card:active,
    .course-item:active,
    .exam-card:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease;
    }
}

/* ===== Tables Responsive ===== */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    th, td {
        white-space: nowrap;
        padding: 12px 15px;
    }
}

/* ===== Images Responsive ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

/* ===== Videos Responsive ===== */
.video-container,
.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container video,
.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Accessibility Improvements ===== */

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--german-red);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--german-red);
    color: white;
    padding: 10px 20px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .footer,
    .whatsapp-float,
    .translate-float,
    .back-to-top,
    .hero-slider {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* ===== Mobile Image Optimization ===== */
@media (max-width: 768px) {
    /* General image sizing */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Service/Feature card images */
    .service-card img,
    .feature-card img,
    .course-card img,
    .about-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    /* Instagram grid images/videos - full display */
    .instagram-video-item {
        max-width: 100%;
        height: auto;
    }
    
    .instagram-video-item video,
    .instagram-video-item img {
        max-width: 100%;
        height: auto;
    }
    
    .instagram-video-item iframe {
        width: 100% !important;
        height: auto !important;
        min-height: 500px !important;
    }
    
    /* Formation images */
    .formation-image {
        height: 180px !important;
    }
    
    .formation-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* About section images */
    .about-image {
        max-width: 100%;
    }
    
    .about-image img {
        max-width: 100%;
        height: auto;
    }
    
    /* Logo sizing */
    .navbar-logo {
        max-height: 50px !important;
        width: auto;
    }
    
    /* Reduce hero section images */
    .hero-logo-animated {
        max-width: 140px !important;
    }
}

/* Extra small screens - even smaller images */
@media (max-width: 480px) {
    .formation-image {
        height: 160px !important;
    }
    
    .hero-logo-animated {
        max-width: 120px !important;
    }
    
    .instagram-video-item iframe {
        min-height: 450px !important;
    }
}

/* ===== Landscape Mode Adjustments ===== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-slider {
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .hero-content-container {
        gap: clamp(8px, 1.5vw, 20px);
        width: 95%;
    }
    
    .hero-logo-animated {
        width: clamp(60px, 12vw, 90px) !important;
        max-width: 90px !important;
    }
    
    .german-flag-line {
        width: 50px;
        height: 3px;
        margin-bottom: 8px;
    }
    
    .slide-content h1 {
        font-size: clamp(0.9rem, 3.5vw, 1.2rem) !important;
        margin-bottom: 10px !important;
    }
    
    .slide-content p {
        font-size: clamp(0.7rem, 2vw, 0.85rem) !important;
        margin-bottom: 12px !important;
        display: block !important;
        visibility: visible !important;
        height: auto !important;
    }
    
    .slide-buttons {
        flex-direction: row;
        gap: 10px;
        max-width: 100%;
    }
    
    .slide-buttons .btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .slider-controls {
        bottom: 15px;
    }
    
    .slider-dot {
        width: 6px;
        height: 6px;
    }
    
    /* Reduce section padding in landscape */
    section {
        padding: 40px 0 !important;
    }
    
    .page-header {
        min-height: 35vh !important;
        padding: 80px 0 40px !important;
    }
    
    .page-header h1 {
        font-size: 1.8rem !important;
    }
    
    /* Navbar adjustments */
    .navbar {
        padding: 10px 0 !important;
    }
    
    .navbar-logo {
        height: 45px !important;
    }
    
    /* Team member cards in landscape */
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .member-image {
        height: 150px;
    }
    
    .member-avatar-placeholder i {
        font-size: 50px;
    }
    
    .member-info {
        padding: 12px;
    }
    
    .member-info h3 {
        font-size: 0.95rem;
    }
    
    .member-info p {
        font-size: 0.75rem;
    }
    
    /* Instagram videos in landscape */
    .instagram-videos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .instagram-video-item iframe {
        min-height: 300px !important;
    }
}

/* ===== Safe Area Insets (Notched Devices) ===== */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    /* Only apply padding-bottom to mobile menu */
    @media (max-width: 992px) {
        .nav-menu {
            padding-bottom: max(40px, env(safe-area-inset-bottom));
        }
    }
    
    .footer-bottom {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .whatsapp-float {
        left: max(20px, env(safe-area-inset-left));
        bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .translate-float,
    .back-to-top {
        right: max(20px, env(safe-area-inset-right));
        bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
    .btn {
        border-width: 3px;
    }
    
    .nav-link::after {
        height: 3px;
    }
    
    .section-header h2::after {
        height: 5px;
    }
}

/* ===== Pages Specific Responsive ===== */

/* About Page */
@media (max-width: 992px) {
    .about-intro {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .mission-grid {
        grid-template-columns: 1fr;
    }
    
    .mission-card {
        padding: 30px 25px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .stat-item .stat-number {
        font-size: 32px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .certifications-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Exams Page */
@media (max-width: 900px) {
    .exam-card-new {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 30px 25px;
    }
    
    .exam-card-logo {
        max-width: 200px;
        margin: 0 auto;
        padding: 20px;
        min-height: auto;
    }
    
    .exam-card-features {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .exam-pricing {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Events Page */
@media (max-width: 768px) {
    .events-intro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .events-features {
        grid-template-columns: 1fr;
    }
    
    .event-types-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        padding-left: 60px;
        padding-right: 0;
        margin-left: 0;
    }
    
    .timeline-marker,
    .timeline-item:nth-child(even) .timeline-marker {
        left: -5px !important;
        right: auto !important;
        width: 40px;
        height: 40px;
    }
}

/* Contact Page */
@media (max-width: 768px) {
    .contact-page-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-methods {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .contact-methods {
        grid-template-columns: 1fr;
    }
}

/* Formations/Packs Pages */
@media (max-width: 992px) {
    .packs-grid,
    .formations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .packs-grid,
    .formations-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Carousel Responsive ===== */
@media (max-width: 768px) {
    .course-carousel-wrapper {
        max-width: 100%;
        padding: 20px 0;
    }
    
    .course-carousel {
        margin: 0;
        padding: 10px;
    }
    
    .carousel-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .carousel-dots {
        gap: 8px;
    }
    
    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* ===== Animations Performance ===== */
@media (max-width: 768px) {
    /* Disable complex animations on mobile for better performance */
    .floating-icons-bg {
        display: none;
    }
    
    .animated-bg::before,
    .animated-bg::after {
        animation: none;
    }
    
    @keyframes logoFloat {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-5px);
        }
    }
}

/* ===== Loading States ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
/* ===== Mobile Optimization - Smaller Text & More Cards ===== */
@media (max-width: 768px) {
    /* Smaller text throughout */
    h1 {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
    }
    
    h2 {
        font-size: clamp(1.25rem, 4vw, 1.6rem) !important;
    }
    
    h3 {
        font-size: clamp(1rem, 3vw, 1.2rem) !important;
    }
    
    p, li {
        font-size: clamp(0.8rem, 2.5vw, 0.95rem) !important;
    }
    
    .section-header h2 {
        font-size: 1.4rem !important;
    }
    
    .section-header p {
        font-size: 0.85rem !important;
    }
    
    /* CTA Buttons - Side by side on mobile */
    .cta-buttons {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 10px !important;
        width: 100%;
    }
    
    .cta-buttons .btn {
        flex: 1 !important;
        max-width: 160px !important;
        padding: 10px 12px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }
    
    .cta-buttons .btn i {
        margin-right: 5px;
    }
    
    .cta-content h2 {
        font-size: 1.3rem !important;
    }
    
    .cta-content p {
        font-size: 0.85rem !important;
        margin-bottom: 20px;
    }
}

/* Extra small screens - even smaller */
@media (max-width: 480px) {
    h1 {
        font-size: 1.3rem !important;
    }
    
    h2 {
        font-size: 1.15rem !important;
    }
    
    h3 {
        font-size: 0.95rem !important;
    }
    
    p, li {
        font-size: 0.8rem !important;
    }
    
    .section-header h2 {
        font-size: 1.2rem !important;
    }
    
    .cta-buttons .btn {
        padding: 8px 10px !important;
        font-size: 11px !important;
    }
    
    .cta-content h2 {
        font-size: 1.1rem !important;
    }
}