/* Mobile Layout Optimization */
@media screen and (max-width: 768px) {
    /* General Layout */
    .container {
        padding: 1rem;
    }

    /* Typography */
    h1 { font-size: clamp(2.2rem, 8vw, 3rem); }
    h2 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
    h3 { font-size: 1.5rem; }
    p { 
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 1.2rem;
    }

    /* Content Grid Layout */
    .content-grid {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        margin: 2.5rem 0;
    }

    .content-column {
        width: 100%;
        padding: 0;
    }

    .content-column img {
        width: 100%;
        aspect-ratio: 4/3;
        object-fit: cover;
        border-radius: 15px;
        margin-bottom: 1.5rem;
    }

    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .portfolio-item {
        aspect-ratio: 4/5;
    }

    /* Team Section */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .team-member {
        background: #fff;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    }

    .member-image {
        width: 100%;
        aspect-ratio: 1/1;
    }

    .team-info {
        padding: 2rem;
    }

    /* Values Section */
    .values-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .value-card {
        padding: 2.5rem;
    }

    /* Contact Section */
    .contact-info-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .form-group {
        margin-bottom: 2rem;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 1.2rem;
        text-align: center;
        margin: 0.5rem 0;
    }

    /* Spacing Utilities */
    .section-padding {
        padding: 4rem 1.5rem;
    }

    .section-margin {
        margin: 4rem 0;
    }

    /* Hero Sections: make hero height fluid and avoid cropping */
    .hero, .hero-section {
        height: auto;
        min-height: 40vh;
        padding: 2rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 60px; /* Account for fixed header */
        background-position: center top;
        background-size: cover;
    }

    .hero-content {
        width: 100%;
        max-width: 640px;
        padding: 0 0.75rem 1.5rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .hero-content h1 {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
        line-height: 1.15;
        margin: 0;
    }

    .hero-content p {
        font-size: clamp(0.95rem, 4vw, 1.15rem);
        line-height: 1.6;
        margin: 0;
    }

    /* Button Fixes */
    .hero-buttons,
    .content-buttons {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        padding: 1rem 0;
    }

    .btn-primary,
    .btn-secondary {
        display: block;
        width: 100%;
        padding: 1.2rem;
        text-align: center;
        font-size: 1.2rem;
        border-radius: 10px;
        margin: 0;
    }

    /* Navigation Fixes */
    .header-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.85);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }

    #nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        padding: 1.5rem 0;
        transform: translateY(-100%);
        transition: transform 0.4s ease;
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    #nav-links.active {
        transform: translateY(0);
    }

    #nav-links a {
        display: block;
        padding: 1.2rem 2.5rem;
        font-size: 1.2rem;
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    #nav-links a:last-child {
        border-bottom: none;
    }

    .hamburger.active .bar:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Ensure main content doesn't hide under fixed header */
    main {
        padding-top: 60px;
    }

    /* Make room at the bottom for the fixed cookie banner and sticky CTA so content isn't cut off */
    body {
        padding-bottom: 120px;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-item {
        aspect-ratio: 4/5;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .service-card {
        padding: 2rem;
    }

    /* Footer */
    footer {
        padding: 3rem 1.5rem;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 2.5rem;
    }

    .social-links {
        justify-content: center;
        gap: 2.5rem;
    }

    /* Position sticky CTA above cookie banner */
    .sticky-cta {
        position: fixed;
        bottom: 96px; /* above cookie banner */
        right: 16px;
        z-index: 10005;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
}