/* Mobile-First Responsive Design */

/* Extra small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Disable animations on mobile as per requirements */
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    
    [data-sal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Hero section adjustments */
    #hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    #hero .container {
        padding: 1rem;
    }
    
    /* Section padding adjustments */
    section {
        padding: 2rem 0;
    }
    
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    #services .card-body,
    #priceplan .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Form adjustments */
    #contacts .form-control {
        padding: 0.5rem;
    }
    
    #contacts .btn-primary {
        padding: 0.5rem 1.5rem;
        width: 100%;
    }
    
    /* Team section adjustments */
    #team .card-img-top {
        width: 120px;
        height: 120px;
    }
    
    /* Gallery adjustments */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Footer adjustments */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Disable animations on mobile as per requirements */
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    
    [data-sal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.875rem;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    .py-5 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Enable subtle animations for tablets */
    .card:hover {
        transform: translateY(-2px);
    }
    
    #about .card:hover,
    #services .card:hover,
    #priceplan .card:hover {
        transform: translateY(-3px);
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .py-5 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Adjust team images for tablets */
    #team .card-img-top {
        width: 140px;
        height: 140px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Full animations for desktop */
    section {
        padding: 4rem 0;
    }
    
    .py-5 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    /* Hero section enhancements */
    #hero {
        min-height: 100vh;
    }
    
    /* Services grid optimization */
    #services .row.g-4 {
        row-gap: 2rem;
    }
    
    /* Team grid adjustments */
    #team .card-img-top {
        width: 150px;
        height: 150px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing for larger screens */
    section {
        padding: 5rem 0;
    }
    
    .py-5 {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
    
    /* Larger hero text for big screens */
    #hero h1 {
        font-size: 3rem;
    }
    
    #hero h2 {
        font-size: 2.25rem;
    }
    
    #hero p {
        font-size: 1.2rem;
    }
}

/* Print styles */
@media print {
    /* Remove unnecessary elements */
    #header,
    #footer,
    #gallery,
    .btn {
        display: none !important;
    }
    
    /* Ensure good contrast */
    * {
        color: black !important;
        background: white !important;
    }
    
    /* Page breaks */
    section {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --primary-light: #333333;
        --primary-dark: #000000;
        --text-dark: #000000;
        --text-light: #333333;
        --neutral-color: #cccccc;
        --neutral-light: #ffffff;
    }
    
    .card {
        border: 2px solid #000000;
    }
    
    .btn-primary {
        background-color: #000000;
        border: 2px solid #000000;
        color: #ffffff;
    }
}

/* Reduced motion support - critical for accessibility */
@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;
    }
    
    [data-sal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .card:hover {
        transform: none !important;
    }
    
    #gallery img:hover {
        transform: none !important;
    }
}

/* Dark mode support */

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(107, 142, 35, 0.5);
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Ensure images don't break layout */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile navigation improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--neutral-light);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 0.375rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        text-align: center;
        border-bottom: 1px solid var(--neutral-color);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Ensure sufficient color contrast */
.text-muted {
    color: var(--text-light) !important;
}

/* Form validation styles */
.form-control:invalid {
    border-color: #dc3545;
}

.form-control:valid {
    border-color: var(--primary-color);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth scrolling for non-reduced motion users */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
} 