/*
 * ImageLab - Layout System
 * Version: 4.3 - 80% WIDTH IMPLEMENTATION
 * Container, sections, and grid structures
 * Updated: March 2026
 *
 * CHANGES FROM v4.2:
 * ✅ CHANGED: .container now uses width: min(80%, 1400px) instead of
 *             max-width: 1200px. Content sits at 80% of the viewport
 *             on tablet and desktop, capping at 1400px on very large
 *             screens. Header and footer backgrounds still bleed full
 *             width — only content columns are constrained.
 * ✅ ADDED:   Mobile override: at ≤767px the container returns to 100%
 *             width with standard padding. 80% of a 375px phone is 300px,
 *             which combined with internal padding would be too narrow.
 * ✅ REMOVED: Hardcoded max-width: 1200px and max-width: 1400px overrides
 *             from breakpoint blocks — they are superseded by the base rule.
 *
 * NOTE: 12-responsiveness.css also sets max-width on .container at its
 * 48em and 64em breakpoints. Those values are now intentionally overridden
 * by this file's base rule (03-layout loads before 12-responsiveness, so
 * 12-responsiveness wins on specificity — see 12-responsiveness.css v2.3
 * which removes those conflicting container declarations).
 */

/* ============================================
 * PARENT CONTAINER CENTERING
 * Headings inherit text-align from these containers.
 * Do NOT set text-align on h1-h6 directly.
 * ============================================ */
main,
.container,
section,
.section-padding {
    text-align: center;
}

/* ============================================
 * LEFT-ALIGNED EXCEPTIONS
 * ============================================ */
p,
li,
ul,
ol,
blockquote,
pre {
    text-align: left;
}

.footer-column,
.footer-column * {
    text-align: left;
}

.text-left,
.text-left * {
    text-align: left;
}

.text-right,
.text-right * {
    text-align: right;
}

@media (min-width: 768px) {
    .main-nav,
    .main-nav * {
        text-align: left;
    }
}

.service-section .service-list li {
    text-align: left;
}

/* ============================================
 * CONTAINER — 80% WIDTH
 *
 * min(80%, 1400px) means:
 *   320px viewport  → 256px  (overridden to 100% by mobile rule below)
 *   768px viewport  → 614px
 *   1000px viewport → 800px
 *   1200px viewport → 960px
 *   1500px viewport → 1200px
 *   1750px viewport → 1400px (caps here)
 *   1920px viewport → 1400px
 *
 * position: relative is kept for any child absolute positioning.
 * z-index is intentionally omitted — it would create a stacking context
 * that conflicts with the position:fixed mobile nav (see 04-header.css).
 * ============================================ */
.container {
    width: min(80%, 1400px);
    margin: 0 auto;
    padding: 0 var(--space-lg, 1.5rem);
    position: relative;
}

/*
 * MOBILE OVERRIDE: Restore full-width on small screens.
 * 80% of a 375px phone = 300px. With 1.5rem padding each side
 * (48px total) the content area drops to ~252px — too narrow.
 * At ≤767px the container becomes full-width with tighter padding.
 */
@media (max-width: 767px) {
    .container {
        width: 100%;
        padding-left: var(--space-md, 1rem);
        padding-right: var(--space-md, 1rem);
    }
}

/* ============================================
 * SECTION PADDING
 * ============================================ */
.section-padding {
    padding: var(--space-xxxl, 4rem) 0;
    position: relative;
}

.section-padding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(183, 148, 246, 0.15),
        transparent);
}

/* ============================================
 * GRID SYSTEMS
 * These use auto-fit minmax() for intermediate breakpoints.
 * The mobile reset collapses them all to 1fr.
 * 08-components.css owns .services-grid and .portfolio-grid
 * column counts at named breakpoints — do not redefine those here.
 * ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg, 2rem);
    margin-top: var(--space-xl, 3rem);
}

.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg, 2rem);
    margin-top: var(--space-xl, 2.5rem);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg, 2rem);
    margin-top: var(--space-xl, 3rem);
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl, 2.5rem);
    margin-top: var(--space-xl, 2.5rem);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg, 2rem);
    margin-top: var(--space-xl, 2.5rem);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg, 2rem);
    margin-top: var(--space-xl, 3rem);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg, 2rem);
    margin-top: var(--space-xl, 3rem);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg, 2rem);
    margin-top: var(--space-xl, 3rem);
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg, 2rem);
    margin-top: var(--space-xl, 3rem);
}

/* FIXED v4.2: added .about-values — was missing from mobile reset */
.about-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl, 2rem);
    margin-top: var(--space-xxl, 3rem);
}

/* ============================================
 * SECTION INTRO
 * ============================================ */
.section-intro {
    font-size: 1.125rem;
    color: var(--text-secondary, #e0e4ea);
    max-width: 700px;
    margin: 0 auto var(--space-xl, 3rem);
    text-align: center;
    line-height: 1.7;
}

/* ============================================
 * SERVICE DETAIL ITEMS
 * ============================================ */
.service-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl, 2.5rem);
    margin-top: var(--space-lg, 2rem);
}

.service-detail-item {
    padding: var(--space-lg, 2rem);
    background: var(--glass-card-default, rgba(15, 22, 35, 0.6));
    backdrop-filter: var(--glass-blur-medium, blur(6px));
    -webkit-backdrop-filter: var(--glass-blur-medium, blur(6px));
    border-radius: var(--radius-md, 0.75rem);
    border: var(--glass-border, 1px solid rgba(183, 148, 246, 0.2));
    transition: all var(--transition-base, 0.2s);
}

.service-detail-item:hover {
    background: var(--glass-card-hover, rgba(21, 29, 45, 0.75));
    border: var(--glass-border-strong, 1px solid rgba(183, 148, 246, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.service-detail-item h3 {
    color: var(--color-primary-400, #ddd6fe);
    margin-bottom: var(--space-md, 1rem);
    font-size: 1.5rem;
}

.service-detail-item p {
    margin-bottom: var(--space-md, 1rem);
    line-height: 1.7;
    color: var(--text-secondary, #e0e4ea);
}

/* ============================================
 * IDEAL FOR TAG
 * ============================================ */
.ideal-for {
    color: var(--text-muted, #9ca3af);
    font-size: 0.95rem;
    font-style: italic;
    margin-top: var(--space-md, 1rem);
    padding-top: var(--space-md, 1rem);
    border-top: 1px solid rgba(183, 148, 246, 0.15);
}

.ideal-for strong {
    color: var(--color-accent-400, #fb923c);
    font-style: normal;
}

/* ============================================
 * RESPONSIVE BREAKPOINTS
 * ============================================ */

/* Mobile (< 768px) */
@media (max-width: 47.999em) {
    /* Container already handled by the max-width:767px rule above */

    .section-padding {
        padding: var(--space-xl, 3rem) 0;
    }

    .services-grid,
    .industries-grid,
    .portfolio-grid,
    .approach-grid,
    .process-steps,
    .capabilities-grid,
    .pricing-grid,
    .benefits-grid,
    .value-grid,
    .about-values {
        grid-template-columns: 1fr;
        gap: var(--space-md, 1.5rem);
    }
}

/* Tablet (768px–1023px) */
@media (min-width: 48em) and (max-width: 63.999em) {
    /*
     * Container: the base min(80%, 1400px) rule applies.
     * At 768px: 80% = 614px — appropriate for tablet.
     * No override needed.
     */

    .services-grid,
    .portfolio-grid,
    .capabilities-grid,
    .pricing-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Laptop (1024px+) */
@media (min-width: 64em) {
    /*
     * Container: the base min(80%, 1400px) rule applies.
     * At 1024px: 80% = 819px — tighter than old 1200px hard limit.
     * At 1500px: 80% = 1200px — matches the old limit.
     * No override needed here.
     */

    .capabilities-grid,
    .pricing-grid,
    .value-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 90em) {
    /*
     * Container: the base min(80%, 1400px) caps at 1400px on
     * screens ≥1750px. No max-width override needed.
     */
}