/* ==========================================================================
   FILE 3: home.css — Homepage Hero, Topic Directory Cards & Featured Showcase
   ==========================================================================
   HOW THIS FILE WORKS:
   - Loaded primarily for the Main Marketing Homepage (index.php).
   - Controls:
     1. Left Hero Brand Lockup & Scope Strip (.hero-brand-lockup, .hero-scope-strip)
     2. Right Hero Panel & Direct Call Box (.hero-panel, .hero-panel__callbox)
     3. Alternating Page Sections (.section, .section--alt, .section--dark)
     4. Specific Services Card Grid (.category-block, .topic-grid, .topic-card)
     5. Highlighted Services Image Cards (.featured-media-grid, .featured-media-card)
   ========================================================================== */

/* ==========================================================================
   1. Homepage Marketing Hero Section (.hero)
   ========================================================================== */
.hero {
    position: relative;
    background-color: var(--bg-hero);
    background-image:
        radial-gradient(circle at 82% 22%, rgba(29, 78, 216, 0.24) 0%, transparent 45%),
        radial-gradient(circle at 18% 80%, rgba(234, 88, 12, 0.18) 0%, transparent 45%),
        linear-gradient(180deg, rgba(17, 20, 26, 0.96) 0%, rgba(17, 20, 26, 1) 100%);
    color: var(--text-on-dark);
    padding: 2.35rem 0 2.5rem;
    border-bottom: 4px solid var(--brand-blue);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 2.5rem;
    align-items: center;
}

/* Left Hero Brand Block (Space-Electric Logo + Scope Container Directly Underneath) */
.hero-brand-lockup {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1.15rem;
}

.hero-brand-lockup__logo {
    display: block;
    width: 100%;
    max-width: 440px;
    height: auto;
    max-height: 185px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
}

.hero-scope-strip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.55rem;
    padding: 0.38rem 0.85rem;
    background: rgba(29, 78, 216, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.38);
    border-left: 3px solid var(--brand-orange-bright);
    border-radius: 6px;
}

.hero-scope-pill {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #FAF8F5;
}

.hero-scope-dot {
    color: var(--brand-orange-bright);
    font-weight: 800;
}

/* Hero Headline & Copy */
.hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.95rem, 3.3vw, 2.75rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #FAF8F5;
    margin-bottom: 0.85rem;
}

.hero__title-highlight {
    color: var(--brand-orange-bright);
}

.hero__title-blue {
    color: #60A5FA;
}

.hero__lead {
    font-size: 1.02rem;
    color: var(--text-on-dark-muted);
    max-width: 640px;
    margin-bottom: 1.35rem;
    line-height: 1.6;
}

.hero__cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.4rem;
}

/* Hero Bottom 3-Column Trust Metrics */
.hero__metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-metric__val {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: #FAF8F5;
}

.hero-metric__label {
    font-size: 0.8rem;
    color: var(--text-on-dark-muted);
}

.hero-metric__link {
    color: #93C5FD;
    font-weight: 600;
    font-size: 0.82rem;
}

.hero-metric__link:hover {
    color: var(--brand-orange-bright);
}

/* ==========================================================================
   2. Hero Right Panel — Core Capabilities & Direct Contractor Phone Box
   ========================================================================== */
.hero-panel {
    background-color: #1A1F29;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-top: 4px solid var(--brand-orange);
    border-radius: 10px;
    padding: 1.35rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.hero-panel__list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.hero-panel__item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.58rem 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #3B82F6;
}

.hero-panel__item--orange {
    border-left-color: var(--brand-orange-bright);
}

.hero-panel__item strong {
    display: block;
    color: #FAF8F5;
    font-size: 0.88rem;
}

.hero-panel__item span {
    font-size: 0.78rem;
    color: var(--text-on-dark-muted);
}

.hero-panel__callbox {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.18), rgba(29, 78, 216, 0.18));
    border: 1px solid rgba(249, 115, 22, 0.4);
    border-radius: 8px;
    padding: 0.85rem;
    text-align: center;
}

.hero-panel__callbox-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: #FDBA74;
    text-transform: uppercase;
}

.hero-panel__callbox-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    color: #FFFFFF !important;
    margin: 0.1rem 0;
}

.hero-panel__callbox-number:hover {
    color: var(--brand-orange-bright) !important;
}

/* ==========================================================================
   3. Page Section Containers & Section Headers
   ========================================================================== */
.section {
    padding: 4.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.section--alt {
    background-color: var(--bg-section-alt);
}

.section--dark {
    background-color: var(--bg-code-section);
    color: var(--text-on-dark);
    border-top: 3px solid var(--brand-orange);
    border-bottom: 3px solid var(--brand-blue);
}

.section-header {
    max-width: 780px;
    margin-bottom: 2.75rem;
}

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-orange);
    background-color: var(--brand-orange-tint);
    border: 1px solid var(--brand-orange-border);
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.section-eyebrow--blue {
    color: var(--brand-blue);
    background-color: var(--brand-blue-tint);
    border-color: var(--brand-blue-border);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.section--dark .section-title {
    color: #FAF8F5;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.section--dark .section-desc {
    color: var(--text-on-dark-muted);
}

/* ==========================================================================
   4. Complete Service & Technical Directory Cards (.topic-grid, .topic-card)
   ========================================================================== */
.category-block {
    margin-bottom: 3.25rem;
}

.category-block:last-child {
    margin-bottom: 0;
}

.category-block__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 0.9rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-strong);
}

.category-block__title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.category-block__pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background-color: var(--brand-blue);
    color: #FFFFFF;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.35rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--brand-orange);
}

/* Dark Technical Spec Header Band on Every Directory Card (Choice 2, Option 2) */
.topic-card__tech-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.25rem;
    background-color: #151922;
    background-image:
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 2px,
            transparent 2px,
            transparent 8px
        ),
        radial-gradient(circle at 90% 50%, rgba(29, 78, 216, 0.28) 0%, transparent 65%);
    border-bottom: 3px solid var(--brand-blue);
}

.topic-card:nth-child(odd) .topic-card__tech-bar {
    border-bottom-color: var(--brand-orange);
    background-image:
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 2px,
            transparent 2px,
            transparent 8px
        ),
        radial-gradient(circle at 90% 50%, rgba(234, 88, 12, 0.25) 0%, transparent 65%);
}

.topic-card__code-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #93C5FD;
    background-color: rgba(29, 78, 216, 0.28);
    border: 1px solid rgba(96, 165, 250, 0.4);
    padding: 0.18rem 0.55rem;
    border-radius: 4px;
}

.topic-card:nth-child(odd) .topic-card__code-pill {
    color: #FDBA74;
    background-color: rgba(234, 88, 12, 0.22);
    border-color: rgba(249, 115, 22, 0.45);
}

.topic-card__schematic-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #60A5FA;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.topic-card:nth-child(odd) .topic-card__schematic-icon {
    color: var(--brand-orange-bright);
}

.topic-card:hover .topic-card__schematic-icon {
    transform: scale(1.08);
    border-color: var(--brand-orange-bright);
    color: #FFFFFF;
}

.topic-card__body {
    padding: 1.35rem 1.4rem 0.25rem;
}

.topic-card__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.topic-card:hover .topic-card__title {
    color: var(--brand-orange);
}

.topic-card__summary {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 1.15rem;
    line-height: 1.55;
}

.topic-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.4rem;
    border-top: 1px solid var(--border-subtle);
    background-color: var(--bg-surface-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-blue);
}

.topic-card:hover .topic-card__footer {
    color: var(--brand-orange);
}

/* ==========================================================================
   5. Highlighted Services Featured Image Grid (.featured-media-grid)
   ========================================================================== */
.featured-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.5rem;
}

.featured-media-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.featured-media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--brand-orange);
}

.featured-media-card__img-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    background-color: #141820;
    overflow: hidden;
    border-bottom: 3px solid var(--brand-orange);
}

.featured-media-card:nth-child(even) .featured-media-card__img-wrap {
    border-bottom-color: var(--brand-blue);
}

.featured-media-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.featured-media-card:hover .featured-media-card__img-wrap img {
    transform: scale(1.04);
}

.featured-media-card__tag {
    position: absolute;
    bottom: 0.65rem;
    left: 0.65rem;
    background-color: rgba(17, 20, 26, 0.88);
    color: #FDBA74;
    border: 1px solid rgba(249, 115, 22, 0.5);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.featured-media-card__body {
    padding: 1.25rem;
}

.featured-media-card__body h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.featured-media-card__body p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   6. Homepage Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .hero__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 2rem 0;
    }

    .hero__metrics {
        grid-template-columns: 1fr;
    }
}
