/* ===== RESPONSIVE DESIGN ===== */

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container-xl {
        max-width: 1320px;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.5rem;
    }
    
    .shape-1 {
        width: 300px;
        height: 300px;
    }
    
    .shape-2 {
        width: 250px;
        height: 250px;
    }
    
    .service-card img {
        height: 250px;
    }
    
    .team-member img {
        width: 180px;
        height: 180px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section .lead {
        font-size: 1.25rem;
    }
    
    .service-card img {
        height: 220px;
    }
    
    .price-plan-card.popular {
        transform: scale(1.03);
    }
    
    .team-member img {
        width: 160px;
        height: 160px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        min-height: 90vh;
        padding-top: 100px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.125rem;
    }
    
    .shape-1 {
        width: 150px;
        height: 150px;
        top: 5%;
        right: 5%;
    }
    
    .shape-2 {
        width: 120px;
        height: 120px;
        bottom: 10%;
        left: 3%;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .service-card img {
        height: 180px;
    }
    
    .team-member img {
        width: 140px;
        height: 140px;
    }
    
    .price-plan-card.popular {
        transform: none;
        margin-top: 1rem;
    }
    
    .testimonials-swiper {
        padding: 1rem 0 2rem 0;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        margin: 0.5rem 0;
    }
    
    .breadcrumb-nav {
        margin-top: 60px;
    }
    
    .accordion-button {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .contact-form {
        margin: 0 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        min-height: 80vh;
        padding-top: 80px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .shape-1 {
        width: 100px;
        height: 100px;
        top: 3%;
        right: 3%;
    }
    
    .shape-2 {
        width: 80px;
        height: 80px;
        bottom: 5%;
        left: 2%;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.125rem; }
    h6 { font-size: 1rem; }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .service-card img {
        height: 160px;
    }
    
    .team-member {
        margin-bottom: 2rem;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    .price-plan-card {
        margin-bottom: 2rem;
    }
    
    .price-plan-card.popular {
        transform: none;
    }
    
    .popular-badge {
        top: -5px;
    }
    
    .testimonial-card {
        margin: 0.5rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0;
        border-bottom: 1px solid var(--medium-gray);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .breadcrumb-nav {
        margin-top: 56px;
        padding: 0.25rem 0;
    }
    
    .breadcrumb-icon {
        width: 20px;
        height: 20px;
    }
    
    .contact-form {
        margin: 0 0.5rem;
        padding: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
    
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    footer {
        text-align: center;
    }
    
    footer .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    :root {
        --font-size-base: 0.9rem;
        --spacing-xs: 0.2rem;
        --spacing-sm: 0.4rem;
        --spacing-md: 0.8rem;
        --spacing-lg: 1.2rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 3rem;
    }
    
    body {
        font-size: 0.9rem;
    }
    
    .hero-section {
        min-height: 70vh;
        padding: 60px 0 2rem 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
        line-height: 1.2;
    }
    
    .hero-section h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-section .lead {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .shape-1, .shape-2 {
        display: none;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.95rem; }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .service-card img {
        height: 140px;
    }
    
    .service-card, .feature-card, .info-card, .blog-card,
    .benefit-card, .event-card, .resource-card, .partnership-card {
        padding: 1rem;
    }
    
    .team-member {
        margin-bottom: 2rem;
    }
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    .price-plan-card {
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    
    .price-plan-card.popular {
        transform: none;
        border-width: 1px;
    }
    
    .popular-badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.75rem;
    }
    
    .price-display {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .price-display .display-4 {
        font-size: 2rem;
    }
    
    .testimonial-card {
        margin: 0.25rem;
        padding: 1rem;
    }
    
    .stars {
        margin-bottom: 0.75rem;
    }
    
    .stars i {
        font-size: 0.9rem;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-toggler {
        padding: 0.2rem 0.4rem;
        font-size: 1rem;
    }
    
    .navbar-collapse {
        margin-top: 0.75rem;
        background: var(--white);
        border-radius: var(--radius-md);
        box-shadow: 0 4px 15px var(--shadow-light);
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 0.5rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1.5rem;
        margin: 0;
        font-size: 0.95rem;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .breadcrumb-nav {
        margin-top: 52px;
        padding: 0.25rem 0;
    }
    
    .breadcrumb-icon {
        width: 18px;
        height: 18px;
    }
    
    .contact-form {
        margin: 0;
        padding: 1rem;
    }
    
    .form-control, .form-select {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .accordion-item {
        margin-bottom: 0.5rem;
    }
    
    .accordion-button {
        padding: 0.75rem;
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .accordion-body {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    #gallery .col-md-4 {
        margin-bottom: 0.75rem;
    }
    
    #gallery img {
        border-radius: var(--radius-sm);
    }
    
    footer {
        text-align: center;
        padding: 2rem 0;
    }
    
    footer .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    footer h5 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    footer p, footer li {
        font-size: 0.85rem;
    }
    
    footer .list-unstyled li {
        margin-bottom: 0.5rem;
    }
    
    /* Hide decorative elements on very small screens */
    .hero-shapes {
        display: none;
    }
    
    /* Optimize spacing for mobile */
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
    
    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    /* Improve touch targets */
    .btn, .form-control, .form-select, .accordion-button {
        min-height: 44px;
    }
    
    /* Optimize typography for mobile reading */
    p, .lead {
        line-height: 1.6;
    }
    
    /* Ensure images are responsive */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* ===== LANDSCAPE ORIENTATION SPECIFIC ===== */
@media (max-width: 991.98px) and (orientation: landscape) {
    .hero-section {
        min-height: 90vh;
        padding-top: 60px;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    .breadcrumb-nav {
        margin-top: 50px;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* ===== PRINT RESPONSIVE ===== */
@media print {
    @page {
        margin: 1in;
    }
    
    .hero-section {
        min-height: auto;
        page-break-after: always;
    }
    
    .service-card, .feature-card, .team-member, .testimonial-card {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .accordion-item {
        page-break-inside: avoid;
    }
    
    #gallery {
        display: none;
    }
}

/* ===== REDUCED MOTION RESPONSIVE ===== */
@media (prefers-reduced-motion: reduce) {
    @media (max-width: 767.98px) {
        .hero-section h1, .hero-section h2, .hero-section .lead {
            animation: none;
            transform: none;
        }
        
        .card:hover, .service-card:hover, .feature-card:hover {
            transform: none;
        }
        
        .btn:hover {
            transform: none;
        }
        
        .team-member:hover img {
            transform: none;
        }
        
        #gallery img:hover {
            transform: none;
        }
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .card, .service-card, .feature-card, .testimonial-card, .info-card {
        border: 2px solid var(--text-primary);
    }
    
    .btn-primary {
        background: var(--text-primary);
        border: 2px solid var(--text-primary);
    }
    
    .btn-outline-primary {
        border-width: 3px;
    }
    
    .form-control:focus, .form-select:focus {
        border-width: 3px;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) {
    .card:hover, .service-card:hover, .feature-card:hover,
    .info-card:hover, .blog-card:hover, .benefit-card:hover,
    .event-card:hover {
        transform: none;
        box-shadow: 0 5px 25px var(--shadow-light);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .navbar-nav .nav-link:hover::after {
        width: 0;
    }
    
    .team-member:hover img {
        transform: none;
        border-color: var(--primary-light);
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* ===== SWIPER RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 767.98px) {
    .swiper {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .swiper-slide {
        width: 90%;
    }
    
    .swiper-pagination {
        bottom: 0;
    }
    
    .swiper-pagination-bullet {
        margin: 0 3px;
        width: 8px;
        height: 8px;
    }
}

/* ===== FORM RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 575.98px) {
    .contact-form .row.g-3 > .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .contact-form .col-12 {
        margin-bottom: 1rem;
    }
    
    .form-control[rows] {
        rows: 4;
    }
    
    select.form-select {
        background-size: 16px 12px;
        padding-right: 2.5rem;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (max-width: 767.98px) {
    .sr-only {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }
    
    /* Larger touch targets for mobile */
    .navbar-nav .nav-link {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    /* Better spacing for readability */
    .accordion-button {
        line-height: 1.5;
    }
    
    /* Ensure sufficient color contrast */
    .text-muted {
        color: var(--text-secondary) !important;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 575.98px) {
    /* Reduce animations to improve performance */
    .fade-in-up {
        animation: none;
    }
    
    /* Simplify shadows */
    .card, .service-card, .feature-card, .testimonial-card, .info-card {
        box-shadow: 0 2px 10px var(--shadow-light);
    }
    
    /* Reduce border radius for performance */
    .card, .service-card, .feature-card, .btn {
        border-radius: var(--radius-sm);
    }
} 