/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography */
    h1, .hero-title {
        font-size: 2rem !important;
    }
    
    h2, .section-title {
        font-size: 1.75rem !important;
    }
    
    .hero-subtitle,
    .section-subtitle,
    .cta-subtitle {
        font-size: 1rem !important;
    }
    
    /* Navigation */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .language-switcher {
        justify-content: center;
    }
    
    .role-selector,
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Hero Section */
    .hero-section {
        padding-top: 80px;
        padding-bottom: 3rem;
    }
    
    .hero-title {
        font-size: 2rem !important;
        text-align: center;
    }
    
    .hero-subtitle {
        text-align: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Floating badges */
    .floating-badge {
        display: none;
    }
    
    /* Sections */
    .section-padding {
        padding: 3rem 0;
    }
    
    /* Cards */
    .feature-card,
    .role-card,
    .course-card,
    .testimonial-card {
        padding: 1.5rem 1rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .course-thumbnail {
        height: 150px;
    }
    
    /* Cookie Consent */
    .cookie-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
    }
    
    /* Back to Top Button */
    .btn-back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Footer */
    .footer {
        text-align: center;
    }
    
    .footer-brand {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .floating-badge {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .floating-badge {
        font-size: 0.875rem;
    }
    
    .course-card .btn {
        font-size: 0.875rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Desktop-specific styles */
    .hero-content {
        padding-right: 2rem;
    }
    
    .floating-badge {
        font-size: 1rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding-top: 80px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img,
    .course-thumbnail img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-gray: #121212;
        --text-dark: #ffffff;
        --text-light: #b0b0b0;
        --white: #1e1e1e;
        --border-color: #333333;
    }
    
    .feature-card,
    .role-card,
    .course-card,
    .testimonial-card,
    .cookie-consent {
        background-color: #2d2d2d;
    }
    
    .footer {
        background-color: #000000;
    }
    
    .cookie-consent {
        background-color: #2d2d2d;
        color: #ffffff;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .floating-badge,
    .cookie-consent,
    .btn-back-to-top {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000000 !important;
        background: #ffffff !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    a {
        color: #000000 !important;
        text-decoration: underline;
    }
    
    .section-padding {
        padding: 1rem 0 !important;
    }
}

/* Mobile-first centered text utilities */
.text-center-mobile {
    text-align: left;
}

.list-center-mobile {
    text-align: left;
}

@media (max-width: 767.98px) {
    .text-center-mobile {
        text-align: center !important;
    }
    
    .list-center-mobile {
        text-align: center !important;
    }
    
    .list-center-mobile ul {
        display: inline-block;
        text-align: left;
    }
    
    /* Center align all headings and paragraphs on mobile */
    .hero-content h1,
    .hero-content p,
    .section-header h2,
    .section-header p,
    .feature-card h4,
    .feature-card p,
    .role-card h4,
    .course-card h4,
    .testimonial-card h5,
    .testimonial-card p {
        text-align: center;
    }
    
    /* Center role features lists */
    .role-features {
        display: inline-block;
        text-align: left;
    }
}

/* Grid adjustments for mobile */
@media (max-width: 767.98px) {
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .col, [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Stack cards vertically on mobile */
    .feature-card,
    .role-card,
    .course-card,
    .testimonial-card {
        margin-bottom: 1rem;
    }
    
    /* Adjust button sizes for touch */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .btn-sm {
        min-height: 36px;
    }
    
    .btn-lg {
        min-height: 50px;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none !important;
    }
    
    .nav-link:hover::after {
        width: 0 !important;
    }
    
    .nav-link.active::after {
        width: 80% !important;
    }
    
    .course-card:hover,
    .feature-card:hover,
    .role-card:hover {
        transform: none !important;
    }
    
    /* Increase touch target sizes */
    .nav-link {
        padding: 1rem !important;
    }
    
    .lang-btn {
        padding: 0.75rem 1rem;
    }
    
    .social-link {
        width: 44px;
        height: 44px;
    }
}