/* Responsive Design */

/* Large Desktop */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .carousel-content h1 {
        font-size: 4.5rem;
    }
}

/* Desktop */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .about-content {
        gap: 40px;
    }
    
    .stats {
        gap: 30px;
    }
}

/* Tablet */
@media screen and (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-text {
        text-align: center;
    }
    
    .stats {
        justify-content: center;
        gap: 50px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Small Tablet */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    body {
        padding-top: 80px;
    }
    
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Sections */
    .about-section,
    .services-preview,
    .news-section,
    .cta-section {
        padding: 60px 0;
    }
    
    .about-image img {
        height: 300px;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Modal */
    .modal-content {
        margin: 10% auto;
        padding: 30px 20px;
        width: 95%;
    }
}

/* Mobile */
@media screen and (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    /* Sections */
    .about-section,
    .services-preview,
    .news-section,
    .cta-section {
        padding: 40px 0;
    }
    
    .about-image img {
        height: 250px;
    }
    
    .service-card {
        padding: 25px 15px;
    }
    
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .news-card img {
        height: 150px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-section {
        margin-bottom: 20px;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 20px 15px;
        width: 95%;
    }
    
    .close {
        right: 15px;
        top: 10px;
        font-size: 1.5rem;
    }
}

/* Very Small Mobile */
@media screen and (max-width: 360px) {
    .carousel-content h1 {
        font-size: 1.8rem;
    }
    
    .carousel-content p {
        font-size: 0.9rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .service-card,
    .news-content {
        padding: 15px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
}

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

/* Landscape Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 400px;
    }
    
    .carousel-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .carousel-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .carousel-indicators {
        bottom: 15px;
    }
}

/* Print Styles */
@media print {
    .header,
    .carousel-btn,
    .carousel-indicators,
    .modal,
    .btn-login {
        display: none !important;
    }
    
    .hero {
        height: auto;
        min-height: auto;
    }
    
    .carousel-slide {
        position: static;
        opacity: 1 !important;
    }
    
    .carousel-slide:not(.active) {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    .service-card,
    .news-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .carousel-slide {
        transition: none;
    }
    
    .carousel-content h1,
    .carousel-content p,
    .carousel-content .btn-primary {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #2c3e50;
        color: #fff;
    }
    
    .form-group input {
        background-color: #34495e;
        border-color: #4a5f7a;
        color: #fff;
    }
    
    .form-group label {
        color: #fff;
    }
}