/* Mobile First Responsive Design */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    h1, .display-4 { font-size: 2rem; }
    h2, .h2 { font-size: 1.75rem; }
    h3, .h3 { font-size: 1.5rem; }
    .lead { font-size: 1rem; }
    
    /* Navigation */
    .navbar-brand { font-size: 1.2rem; }
    .navbar-nav .nav-link { padding: 0.75rem 1rem; }
    
    /* Hero Section */
    #hero {
        padding: 80px 0 60px;
        text-align: center;
    }
    
    .hero-buttons {
        margin-top: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.75rem 0;
        padding: 1rem;
    }
    
    /* Sections */
    section { padding: 3rem 0; }
    .py-5 { padding: 3rem 0 !important; }
    
    /* Cards */
    .card { margin-bottom: 1.5rem; }
    .card-body { padding: 1.5rem;
    overflow-x: hidden;
}
    .card-img-top { height: 180px; }
    
    /* Team Images */
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    /* Contact Form */
    .form-control {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Gallery */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Footer */
    footer .col-lg-4,
    footer .col-lg-2,
    footer .col-lg-3 {
        margin-bottom: 2rem;
        text-align: center;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    h1, .display-4 { font-size: 2.5rem; }
    h2, .h2 { font-size: 2rem; }
    
    /* Hero Section */
    #hero { padding: 100px 0 80px; }
    
    /* Sections */
    section { padding: 4rem 0; }
    
    /* Cards in Grid */
    .row.g-4 .col-md-6 {
        margin-bottom: 2rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation */
    .navbar-nav .nav-link { margin: 0 0.25rem; }
    
    /* Hero Section */
    #hero {
        padding: 120px 0 100px;
    }
    
    .hero-buttons .btn {
        margin: 0.5rem 0.25rem;
    }
    
    /* Services Grid */
    .services-grid .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Team Grid */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Contact Form */
    .contact-form .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Container adjustments */
    .container { max-width: 960px; }
    
    /* Typography fine-tuning */
    .section-title { font-size: 2.25rem; }
    
    /* Card spacing */
    .row.g-4 { --bs-gutter-x: 1.5rem; }
}

/* Animation Restrictions for Mobile */
@media (max-width: 768px) {
    /* Disable animations on mobile for better performance */
    .card:hover {
        transform: none;
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .team-member:hover img {
        transform: none;
        border-color: var(--secondary-color);
    }
    
    #gallery img:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Reduce motion for accessibility */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-link {
        padding: 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    /* Remove hover effects */
    .card:hover,
    .service-card:hover,
    .team-member:hover img,
    #gallery img:hover {
        transform: none;
        box-shadow: initial;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        padding: 60px 0 40px;
        min-height: auto;
    }
    
    .hero-buttons {
        margin-top: 1rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .card-img-top,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Container Responsive Adjustments */
@media (min-width: 1400px) {
    .container-xxl { max-width: 1200px; }
}

/* Specific Component Responsive Adjustments */

/* Navbar Collapse */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-item {
        margin: 0.5rem 0;
    }
}

/* Services Section Responsive */
@media (max-width: 767.98px) {
    #services .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    .services-item-features {
        font-size: 0.9rem;
    }
}

/* Price Plan Responsive */
@media (max-width: 991.98px) {
    #priceplan .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* FAQ Responsive */
@media (max-width: 767.98px) {
    #faq .col-md-6 {
        margin-bottom: 1.5rem;
    }
}

/* Blog Grid Responsive */
@media (max-width: 767.98px) {
    #blog_grid .col-md-4 {
        margin-bottom: 2rem;
    }
}

/* Contact Section Responsive */
@media (max-width: 767.98px) {
    #contact .row.mt-5 .col-md-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
}

/* Gallery Responsive */
@media (max-width: 767.98px) {
    #gallery .row.g-2 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }
    
    #gallery .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

/* Additional Page Sections Responsive */
@media (max-width: 767.98px) {
    .additional-section {
        padding: 2rem 0;
    }
    
    .additional-section .col-md-6,
    .additional-section .col-lg-4 {
        margin-bottom: 1.5rem;
    }
}

/* Print Responsive */
@media print {
    body { font-size: 12pt; }
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    .row {
        display: block !important;
    }
    
    .col-lg-4,
    .col-lg-6,
    .col-md-4,
    .col-md-6 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 1rem;
    }
}

/* Accessibility Responsive */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .card,
    .service-card,
    .team-member img,
    #gallery img,
    .btn,
    .form-control,
    .nav-link {
        transition: none !important;
    }
    
    .fade-in,
    .slide-up {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
} 