/* css/layout.css */

/* ===== HEADER & HERO ===== */
header {
    position: relative; /* Keep relative for flow */
    height: 100vh; /* Full viewport height */
    min-height: 550px; /* Minimum height for content */
    display: flex;
    align-items: center;
    justify-content: center; /* Center hero content */
    text-align: left;
    z-index: var(--z-index-default);
    padding-top: 70px; /* Add padding for nav height */
    overflow: hidden; /* Crucial: Prevent video overflow issues */
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: var(--z-index-background);
    background-color: var(--black);
}

/* --- Styles for the Vimeo Container --- */
.vimeo-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Prevent interaction */
}

/* --- Styles for the Vimeo Iframe (#header-vimeo-player) --- */
.vimeo-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the iframe */

    /* --- Robust Cover Strategy --- */
    min-width: calc(100vh * (16 / 9)); /* Min width to cover height */
    min-height: calc(100vw * (9 / 16)); /* Min height to cover width */
    width: 100vw; /* Ensure full viewport width coverage */
    height: 100vh; /* Ensure full viewport height coverage */
}

.video-background .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.6), rgba(10, 10, 10, 0.4));
    z-index: var(--z-index-default);
}

.hero-content {
    max-width: 800px;
    padding: 0 var(--space-md);
    position: relative;
    z-index: var(--z-index-overlay);
}

.hero-content h1 {
    margin-bottom: var(--space-sm);
}

.hero-content h1 span {
    color: var(--accent);
}

.hero-content p {
    font-size: clamp(1.0rem, 2vw, 1.3rem);
    margin-bottom: var(--space-md);
    opacity: 0.9;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* --- Mobile Adjustments for Header/Hero --- */
@media (max-width: 767px) {
    header {
        padding-top: 60px;
        min-height: 500px;
    }
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: var(--space-xs);
    }
    .hero-cta a {
        width: 80%;
        max-width: 300px;
    }
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background-color: var(--black);
}
/* Align the container div for the header left */
.about-section .section-header {
    text-align: left;
}
/* Ensure About heading is block and aligned left */
#about-heading {
    display: block; /* Override generic inline-block */
    text-align: left; /* Ensure text inside is left */
    position: relative; /* Needed for ::after */
    padding-bottom: 15px; /* Keep space */
    margin-bottom: 0; /* Keep margin */
}
/* Ensure About underline is aligned left */
#about-heading::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0; /* Align left */
    transform: translateX(0); /* Override centering */
    width: 0;
    height: 3px;
    background-color: var(--accent);
    transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
/* Animate About underline */
#about-heading.in-view::after {
    width: 60px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    align-items: center;
}
.about-text {
    order: 2;
}
.about-text p {
    opacity: 0.9;
    max-width: 60ch;
}
.about-image {
    order: 1;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}
.about-image img {
     width: 100%;
     height: auto;
     border-radius: 8px;
     object-fit: cover;
}
@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }
    .about-text { order: initial; }
    .about-image { order: initial; margin: 0; max-width: none; }
}
@media (min-width: 992px) {
    .about-content {
        gap: var(--space-xl);
    }
}


/* ===== CLIENTS SECTION ===== */
.clients-section {
    background-color: var(--black);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--gray);
    border-bottom: 1px solid var(--gray);
}
/* Align the container div for the header left */
#clients .section-header {
    text-align: left;
}
/* Ensure Clients heading is block and aligned left */
#clients .section-header h2 { /* Assuming h2 inside .section-header */
    display: block;
    text-align: left;
    position: relative; /* Added for ::after */
    padding-bottom: 15px; /* Added for ::after */
    margin-bottom: 0; /* Added for ::after */
}
/* Ensure Clients underline is aligned left */
#clients .section-header h2::after {
    content: ''; /* Need content property */
    position: absolute; /* Need position */
    bottom: 3px; /* Need position */
    left: 0; /* Align left */
    transform: translateX(0); /* Override centering */
    width: 0; /* Need initial state */
    height: 3px; /* Need height */
    background-color: var(--accent); /* Need color */
    transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1); /* Add transition */
}
/* Animate Clients underline */
#clients .section-header h2.in-view::after {
    width: 60px;
}

.client-grid {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    margin-top: var(--space-md);
    overflow: hidden;
    position: relative;
    padding: var(--space-sm) 0;
    scrollbar-width: none; /* Firefox - hide scrollbar */
    -ms-overflow-style: none; /* IE/Edge - hide scrollbar */
    width: 100%;
}

/* Hide scrollbar in webkit browsers */
.client-grid::-webkit-scrollbar {
    display: none;
}

/* Create a scrolling container for the marquee effect */
.client-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        var(--black) 0%, 
        transparent 10%, 
        transparent 90%, 
        var(--black) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Marquee container - no CSS animation, JavaScript controlled */
.client-marquee {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    will-change: transform;
    width: max-content;
    transition: none; /* Remove any transitions that might interfere */
}

/* Remove the animation and keyframes completely */

.client-item {
    text-align: center;
    cursor: pointer;
    position: relative;
    padding-bottom: 2em;
    width: 150px; /* Fixed width for consistent marquee */
    flex-shrink: 0; /* Prevent items from shrinking */
}

.client-logo-link {
    display: block;
    margin-bottom: var(--space-sm);
    line-height: 0;
    height: calc(var(--client-logo-height) * 1.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo-link img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    filter: grayscale(36%);
    opacity: 0.9;
    transition: filter 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.client-name {
    display: block;
    font-size: 0.8rem;
    color: var(--light-gray);
    margin-top: var(--space-xs);
    opacity: 0; 
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s, transform 0.3s ease-in-out;
    position: absolute;
    bottom: 0; 
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 100%;
}

.client-item:hover .client-logo-link img {
    filter: grayscale(0%);
    opacity: 1;
}

.client-item:hover .client-name {
    opacity: 1; 
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.3s ease-in-out 0.1s, visibility 0s linear 0s, transform 0.3s ease-in-out 0.1s;
}

/* Mobile specific marquee adjustments */
@media (max-width: 767px) {
    .client-grid {
        gap: var(--space-md);
        padding: var(--space-xs) 0;
    }
    
    .client-marquee {
        gap: var(--space-md);
    }
    
    .client-item {
        width: 120px;
        padding-bottom: 1.5em;
    }
}

@media (min-width: 768px) {
    .client-grid {
        gap: var(--space-lg);
    }
    
    .client-marquee {
        gap: var(--space-lg);
    }
}

@media (min-width: 992px) {
    .client-marquee {
        animation-duration: 31.5s;
    }
}


/* ===== CONTACT SECTION ===== */
.contact-section {
    background-color: var(--dark-gray);
}
/* Align the container div for the header left */
.contact-section .section-header {
    text-align: left; /* Force left alignment for the container */
}
/* Ensure Contact heading is block and aligned left */
#contact-heading {
    display: block; /* Override generic inline-block */
    text-align: left; /* Ensure text inside is left */
    position: relative; /* Needed for ::after */
    padding-bottom: 15px; /* Keep space */
    margin-bottom: 0; /* Keep margin */
}
/* Ensure Contact underline is aligned left */
#contact-heading::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0; /* Align left */
    transform: translateX(0); /* Override centering */
    width: 0;
    height: 3px;
    background-color: var(--accent);
    transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
/* Animate Contact underline */
#contact-heading.in-view::after {
    width: 60px;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}
.contact-content > p {
    /* This intro paragraph should be left-aligned now */
    text-align: left;
    margin-bottom: var(--space-md);
    opacity: 0.9;
    max-width: 60ch;
    /* Remove auto margins if parent is left-aligned */
    margin-left: 0;
    margin-right: 0;
}
.contact-form {
    margin-bottom: var(--space-lg);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
}
.form-group {
    margin-bottom: var(--space-sm);
}
label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light-gray);
}
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--black);
    border: 1px solid var(--gray);
    border-radius: 4px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.2);
}
textarea {
    resize: vertical;
    min-height: 120px;
}
.contact-form button[type="submit"] {
    margin-top: var(--space-sm);
    width: 100%;
}
.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center; /* Keep info items centered on mobile */
    margin-top: var(--space-lg);
}
.info-item h3 {
    color: var(--accent);
    margin-bottom: var(--space-xs);
    font-size: 1.1rem;
}
.info-item p,
.info-item .social-links {
    margin-bottom: 0;
}
.info-item p a {
    word-break: break-all;
}
@media (min-width: 768px) {
     .contact-form {
        grid-template-columns: 1fr 1fr;
    }
    .form-group.full-width {
        grid-column: 1 / -1;
    }
    .contact-form button[type="submit"] {
         grid-column: 1 / -1;
         justify-self: start;
         width: auto;
         margin-left: 0;
    }
    .contact-info {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        text-align: left; /* Align info items left on desktop */
        gap: var(--space-lg);
    }
     /* Align social links left within contact info on desktop */
     .contact-info .social-links {
        justify-content: flex-start;
    }
}


/* ===== FOOTER ===== */
footer {
    background-color: var(--black);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--gray);
    position: relative;
    overflow: hidden;
}
footer::before {
    content: '';
    position: absolute;
    bottom: -50px; left: 0;
    width: 100%; height: 200px;
    background-image: var(--footer-bg-motif);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    text-align: center;
    position: relative;
    z-index: 1;
}
.footer-logo {
    line-height: 0;
    order: -1;
}
.copyright {
    font-size: 0.85rem;
    opacity: 0.7;
    order: 1;
}
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    .footer-content .footer-logo { margin-right: var(--space-md); order: -1; }
    .footer-content .copyright { text-align: right; order: 1; }
}


/* ===== Specific Section Header Alignments (Consolidated & Corrected) ===== */

/* Ensure the PARENT .section-header is left-aligned for these sections */
#recent-visuals .section-header,
#clients .section-header,
.about-section .section-header,
.contact-section .section-header,
.services-section.redesigned .section-header
 {
    text-align: left; /* Override default center alignment */
}

/* Ensure the specific HEADING itself is a block element aligned left */
#about-heading,
#contact-heading,
#services-heading,
#clients .section-header h2, /* Assuming h2 for Clients */
#recent-visuals .section-header h2 /* Assuming h2 for Featured In */
{
    display: block; /* Override generic inline-block */
    text-align: left; /* Ensure text is left */
    position: relative; /* Needed for ::after */
    padding-bottom: 15px; /* Keep space */
    margin-bottom: 0; /* Keep margin */
}

/* Define the LEFT-ALIGNED underline style completely */
#recent-visuals .section-header h2::after,
#clients .section-header h2::after,
#about-heading::after,
#contact-heading::after,
#services-heading::after
 {
    content: ''; /* Add content */
    position: absolute; /* Add position */
    bottom: 3px; /* Add position */
    left: 0; /* Align left */
    transform: translateX(0); /* Override centering */
    width: 0; /* Add initial state */
    height: 3px; /* Add height */
    background-color: var(--accent); /* Add color */
    transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1); /* Add transition */
}

/* Define the animation trigger for the left-aligned underlines */
#recent-visuals .section-header h2.in-view::after,
#clients .section-header h2.in-view::after,
#about-heading.in-view::after,
#contact-heading.in-view::after,
#services-heading.in-view::after
{
    width: 60px; /* Animate width */
}

/* NOTE: Web Design heading underline is handled separately in features.css */
