/* =========================================
   Heritage3D - Responsive CSS
   ========================================= */

/* Mobile First Approach */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    body {
        padding-top: 70px;
    overflow-x: hidden;
}
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Disable animations on mobile for reduced motion */
    [data-sal] {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Stack timeline vertically on mobile */
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item::before {
        left: 20px;
    }
    
    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: 50px;
        margin-right: 0;
        max-width: calc(100% - 50px);
    }
    
    /* Team members in single column */
    .team-member .member-photo img {
        width: 80px;
        height: 80px;
    }
    
    /* Smaller service images */
    .service-card .service-image img,
    .blog-card .blog-image img,
    .case-study-card .case-image img {
        height: 150px;
    }
    
    /* Price cards smaller text */
    .price-card .price-amount {
        font-size: 2rem;
    }
    
    /* Process steps smaller */
    .process-step .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .step-badge {
        width: 60px;
        height: 60px;
    }
    
    /* Reduce hero shapes on mobile */
    .hero-shapes .shape-1,
    .hero-shapes .shape-2,
    .hero-shapes .shape-3 {
        display: none;
    }
    
    /* Gallery grid adjustments */
    .gallery-item {
        margin-bottom: 0.5rem;
    }
    
    /* Contact form adjustments */
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Footer adjustments */
    #footer .col-lg-2,
    #footer .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Card padding reduction */
    .feature-card,
    .service-card,
    .price-card,
    .review-card,
    .case-study-card,
    .career-card,
    .info-card,
    .blog-card,
    .equipment-card,
    .faq-card {
        padding: 1.5rem;
    }
    
    /* FAQ Section Mobile Improvements */
    #faq {
        padding-bottom: 3rem !important;
        margin-bottom: 2rem !important;
    }
    
    #faq .row.g-4 {
        gap: 1rem !important;
    }
    
    #faq .col-lg-6 {
        margin-bottom: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }
    
    #faq .col-lg-6:last-child {
        margin-bottom: 0 !important;
    }
    
    .faq-card {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .faq-card h4 {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .faq-card p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }
    
    /* Very small screens (under 375px) */
    @media (max-width: 374px) {
        .faq-card {
            padding: 0.75rem !important;
            margin-bottom: 0.75rem !important;
        }
        
        .faq-card h4 {
            font-size: 0.9rem !important;
            line-height: 1.25 !important;
            margin-bottom: 0.5rem !important;
        }
        
        .faq-card p {
            font-size: 0.8rem !important;
            line-height: 1.35 !important;
        }
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    body {
        padding-top: 75px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    /* FAQ Section Tablet Improvements */
    .faq-card {
        padding: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    .faq-card h4 {
        font-size: 1rem !important;
        line-height: 1.35 !important;
    }
    
    .faq-card p {
        font-size: 0.9rem !important;
        line-height: 1.45 !important;
    }
    
    /* Timeline adjustments */
    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        max-width: 80%;
    }
    
    /* Service cards */
    .service-card .service-image img,
    .blog-card .blog-image img,
    .case-study-card .case-image img {
        height: 180px;
    }
    
    /* Process steps */
    .process-step .step-number {
        width: 55px;
        height: 55px;
        font-size: 1.35rem;
    }
    
    .step-badge {
        width: 70px;
        height: 70px;
    }
    
    /* Price amount */
    .price-card .price-amount {
        font-size: 2.25rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding: 5rem 0;
    }
    
    /* FAQ Section Tablet Landscape */
    #faq {
        padding-bottom: 4rem !important;
        margin-bottom: 2rem !important;
    }
    
    #faq .row.g-4 {
        gap: 1.5rem !important;
        justify-content: center;
    }
    
    #faq .col-lg-6 {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .faq-card {
        padding: 1.5rem !important;
        margin-bottom: 1.25rem !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .faq-card h4 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .faq-card p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
    
    /* Timeline back to center */
    .timeline-container::before {
        left: 50%;
    }
    
    .timeline-item::before {
        left: 50%;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: auto;
        margin-right: 0;
        max-width: 45%;
    }
    
    .timeline-item:nth-child(odd) .timeline-content {
        margin-right: auto;
        margin-left: 0;
        max-width: 45%;
    }
    
    /* Team members */
    .team-member .member-photo img {
        width: 90px;
        height: 90px;
    }
    
    /* Service cards */
    .service-card .service-image img,
    .blog-card .blog-image img,
    .case-study-card .case-image img {
        height: 200px;
    }
    
    /* Gallery adjustments */
    .gallery-item {
        aspect-ratio: 1;
    }
    
    /* Process steps */
    .process-step .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .step-badge {
        width: 80px;
        height: 80px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        min-height: 100vh;
    }
    
    /* Full team member display */
    .team-member .member-photo img {
        width: 100px;
        height: 100px;
    }
    
    /* Optimal service card images */
    .service-card .service-image img,
    .blog-card .blog-image img,
    .case-study-card .case-image img {
        height: 200px;
    }
    
    /* Full gallery display */
    .gallery-item {
        aspect-ratio: 1;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        min-height: 100vh;
    }
    
    /* Enhanced typography for large screens */
    .display-4 {
        font-size: 2.75rem;
    }
    
    .display-5 {
        font-size: 2.25rem;
    }
    
    .lead {
        font-size: 1.25rem;
    }
    
    /* Larger team photos */
    .team-member .member-photo img {
        width: 120px;
        height: 120px;
    }
    
    /* Enhanced service cards */
    .service-card .service-image img,
    .blog-card .blog-image img,
    .case-study-card .case-image img {
        height: 220px;
    }
    
    /* Enhanced process steps */
    .process-step .step-number {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    .step-badge {
        width: 90px;
        height: 90px;
    }
    
    /* Price amount larger */
    .price-card .price-amount {
        font-size: 3rem;
    }
    
    /* Enhanced card padding */
    .feature-card,
    .service-card,
    .price-card,
    .review-card,
    .case-study-card,
    .career-card,
    .info-card,
    .blog-card,
    .equipment-card,
    .faq-card {
        padding: 2.5rem;
    }
    
    /* FAQ Section Large Screens */
    #faq .row.g-4 {
        gap: 2rem !important;
    }
    
    .faq-card {
        padding: 2rem !important;
        margin-bottom: 1.5rem !important;
        min-height: 200px;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .faq-card h4 {
        font-size: 1.25rem !important;
        margin-bottom: 1.25rem !important;
        flex: 0 0 auto;
    }
    
    .faq-card p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        flex: 1;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container,
    .container-xl {
        max-width: 1320px;
    }
    
    /* Enhanced typography */
    .display-4 {
        font-size: 3rem;
    }
    
    .display-5 {
        font-size: 2.5rem;
    }
    
    /* Larger hero elements */
    .hero-decoration {
        width: 120px;
        height: 120px;
    }
    
    .hero-shapes .shape-1 {
        width: 250px;
        height: 250px;
    }
    
    .hero-shapes .shape-2 {
        width: 180px;
        height: 180px;
    }
    
    .hero-shapes .shape-3 {
        width: 120px;
        height: 120px;
    }
}

/* Landscape orientation specific styles */
@media (orientation: landscape) and (max-height: 576px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    body {
        padding-top: 60px;
    }
}

/* Print media adjustments */
@media print {
    * {
        color: #000 !important;
        background: #fff !important;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    .col-lg-6,
    .col-lg-4,
    .col-lg-3,
    .col-md-6,
    .col-md-4 {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .service-card,
    .feature-card,
    .review-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .hero-section {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .gallery-item {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #666;
        --accent-color: #333;
        --text-color: #000;
        --text-light: #333;
        --text-dark: #000;
        --neutral-color: #f0f0f0;
        --neutral-light: #fff;
        --neutral-dark: #ddd;
    }
    
    .btn-outline-primary {
        border-color: #000;
        color: #000;
    }
    
    .btn-outline-primary:hover {
        background-color: #000;
        color: #fff;
    }
}

/* Reduced motion media query compliance */
@media (prefers-reduced-motion: reduce) {
    .hero-shapes .shape-1,
    .hero-shapes .shape-2,
    .hero-shapes .shape-3 {
        animation: none;
    }
    
    .gallery-item:hover,
    .feature-card:hover,
    .service-card:hover,
    .career-card:hover,
    .info-card:hover,
    .blog-card:hover,
    .equipment-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .navbar-nav .nav-link::after {
        transition: none;
    }
    
    [data-sal] {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Dark mode support (future enhancement) */

.hero-section h1 {
    padding-top: 125px;
}