/* 
   ========================================
   Enhanced Responsive and SEO Styles
   ========================================
*/

/* Banner overlays for page headers */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header {
    background-color: var(--apple-black);
    color: white;
    padding: 120px 0 300px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    /*background-attachment: fixed;*/
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Additional responsive styles */
@media (max-width: 1200px) {
    .hero-content {
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .page-header {
        padding: 100px 0 50px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-cards {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-overlay {
        opacity: 0.7;
    }
    
    .about-process-steps::before {
        left: 20px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.1rem;
    }
    
    .page-header {
        padding: 80px 0 40px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .about-process-steps::before {
        left: 17px;
    }
    
    /* Improved mobile navigation */
    .nav-links {
        display: none; /* Hidden on smallest screens, shown in mobile menu instead */
    }
    
    .cta-button {
        display: none; /* Hidden on smallest screens */
    }
    
    .mobile-menu-toggle {
        margin-left: auto; /* Ensure toggle is right-aligned */
    }
    
    /* Responsive form elements */
    input, 
    select, 
    textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    /* Gallery adjustments */
    .gallery-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .gallery-filters .filter-btn {
        flex: 1 0 auto;
        min-width: 45%;
        margin: 0.25rem;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Contact page */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* iPad and Tablet-specific styles */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-content {
        padding: 0 2rem;
    }
    
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-methods {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-process-steps {
        padding-left: 1rem;
    }
    
    .faq-layout {
        grid-template-columns: 1fr;
    }
    
    .faq-sidebar {
        margin-bottom: 2rem;
    }
    
    .faq-categories {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .faq-categories li {
        margin: 0;
    }
}

/* Landscape tablet styles */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero-content {
        max-width: 600px;
    }
    
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-members {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Specific device orientation adjustments */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: 450px;
        height: auto;
    }
    
    .mobile-menu {
        overflow-y: scroll;
    }
    
    .mobile-menu-header {
        position: sticky;
        top: 0;
        background-color: var(--apple-black);
        z-index: 10;
    }
}

/* SEO Improvements for accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

a:focus, button:focus {
    outline: 2px solid var(--apple-blue);
    outline-offset: 2px;
}

/* Skip to content link for keyboard users */
.skip-link {
    background-color: var(--apple-black);
    color: var(--apple-white);
    font-weight: 700;
    left: 50%;
    padding: 0.5rem;
    position: absolute;
    transform: translate(-50%, -100%);
    transition: transform 0.3s;
    z-index: 9999;
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

/* High-density displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Enhance image sharpness on retina displays */
    .hero-image,
    .gallery-image img,
    .product-image-showcase img {
        image-rendering: -webkit-optimize-contrast;
    }
}



/* High Contrast Mode for Accessibility */
@media (prefers-contrast: high) {
    body {
        --apple-blue: #0057da;
    }
    
    .banner-overlay {
        opacity: 0.85; /* Higher opacity for better text contrast */
    }
    
    a:focus, button:focus {
        outline: 3px solid yellow;
        outline-offset: 3px;
    }
}