/* Al-Afia S.C - Responsive Styles */

/* Large Desktops */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .slide-content h1 {
        font-size: 4rem;
    }
}

/* Tablets and Small Desktops */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .slide-content h1 {
        font-size: 3rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .achievement-item h3 {
        font-size: 3rem;
    }
}

/* Tablets */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 20px;
    }
    
    .logo {
        justify-content: center;
        text-align: center;
    }
    
    .language-switcher {
        margin-right: 0;
    }
    
    .navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-slider {
        height: 70vh;
        margin-top: 120px;
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .slide-content p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 250px;
        text-align: center;
    }
    
    .achievement-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Mobile Landscape */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    .header {
        position: relative;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .navigation ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .hero-slider {
        height: 60vh;
        margin-top: 0;
    }
    
    .slide-content {
        width: 90%;
    }
    
    .slide-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .slide-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
        width: 200px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .achievements {
        padding: 60px 0;
    }
    
    .achievement-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .achievement-item {
        padding: 2rem 1rem;
    }
    
    .achievement-item h3 {
        font-size: 2.5rem;
    }
    
    .services-carousel {
        padding: 60px 0;
    }
    
    .values {
        padding: 60px 0;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer {
        padding: 60px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

/* Mobile Portrait */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-slider {
        height: 50vh;
    }
    
    .slide-content h1 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        width: 180px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .achievement-item h3 {
        font-size: 2rem;
    }
    
    .achievement-item p {
        font-size: 1.1rem;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    .service-content h3 {
        font-size: 1.3rem;
    }
    
    .value-item {
        padding: 2rem 1rem;
    }
    
    .value-item h4 {
        font-size: 1.3rem;
    }
}

/* Very Small Mobile Devices */
@media (max-width: 375px) {
    .slide-content h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        width: 160px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .achievement-item {
        padding: 1.5rem 1rem;
    }
    
    .achievement-item h3 {
        font-size: 1.8rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .hero-slider,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in-up,
    .slide-in-left {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .swiper-container {
        transition: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f8f9fa;
        --text-light: #adb5bd;
        --background-light: #343a40;
        --border-light: #495057;
        --white: #212529;
    }
    
    body {
        background-color: var(--white);
        color: var(--text-dark);
    }
    
    .header {
        background: var(--white);
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .achievement-item,
    .service-slide {
        background: var(--background-light);
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slider {
        height: 100vh;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 1rem;
    }
    
    .btn {
        width: auto;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .achievement-item:hover {
        transform: none;
    }
    
    .service-slide:hover {
        transform: none;
    }
    
    .value-item:hover {
        transform: none;
    }
    
    .navigation a::after {
        display: none;
    }
}

/* Loading States */
.language-changing * {
    cursor: wait !important;
}

.language-changing {
    opacity: 0.7;
    pointer-events: none;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: var(--shadow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Mobile Menu Toggle (if added later) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .navigation {
        display: none;
    }
    
    .navigation.active {
        display: block;
    }
}