/* ==========================================================================
   Locations Hub Page Styles
   Riga Home Pro - Fairfield County CT
   Typography, colors and spacing mirror /css/roofing.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables (same scheme as the Roofing page)
   -------------------------------------------------------------------------- */
:root {
    --charcoal-primary: #1C1C1C;
    --charcoal-soft: #222222;
    --charcoal-dark: #555555;
    --accent-red: #9B1C2C;
    --accent-red-hover: #7F1824;
    --white: #FFFFFF;
    --light-gray: #DFDFDF;
    --body-text: #333333;
    --light-text: #DADADA;
    --border-color: #E5E5E5;
    /* Featured Locations card body. Keep --card-dark-rgb in sync with
       --card-dark: it feeds the transparent stops of the fade gradient. */
    --card-dark: #393939;
    --card-dark-rgb: 57, 57, 57;
}

/* --------------------------------------------------------------------------
   Base Locations Page Styles
   -------------------------------------------------------------------------- */
.locations-page {
    font-family: 'Inter', sans-serif;
    color: var(--body-text);
    line-height: 1.7;
}

.locations-page h1,
.locations-page h2,
.locations-page h3,
.locations-page h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75em;
}

.locations-page h1 { font-size: 2.75rem; }
.locations-page h2 { font-size: 2.45rem; }
.locations-page h3 { font-size: 1.7rem; }

.locations-page p {
    margin-bottom: 1em;
}

/* Section spacing */
.locations-section {
    padding: 53px 0;
}

@media (min-width: 992px) {
    .locations-section {
        padding: 67px 0;
    }
}

/* --------------------------------------------------------------------------
   Button Styles
   -------------------------------------------------------------------------- */
.btn-locations-primary {
    display: inline-block;
    background-color: var(--accent-red);
    color: var(--white);
    padding: 0 30px;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 40px;
    height: 44px;
    border: 2px solid var(--accent-red);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-locations-primary:hover,
.btn-locations-primary:focus {
    background-color: var(--accent-red-hover);
    border-color: var(--accent-red-hover);
    color: var(--white);
    text-decoration: none;
}

.btn-locations-primary,
.btn-locations-outline,
.btn-locations-primary:hover,
.btn-locations-primary:focus,
.btn-locations-outline:hover,
.btn-locations-outline:focus {
    text-shadow: none;
    background-image: none;
}

.btn-locations-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--white);
    padding: 0 30px;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 40px;
    height: 44px;
    border: 2px solid var(--white);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-locations-outline:hover,
.btn-locations-outline:focus {
    background-color: var(--white);
    color: var(--charcoal-primary);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Section 1: Hero
   -------------------------------------------------------------------------- */
.locations-hero {
    position: relative;
    background: var(--charcoal-primary);
    background-image: url('/images/locations/riga-home-pro-exterior-project-stamford-ct.webp');
    background-size: cover;
    background-position: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 100px 0;
}

.locations-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 1;
}

.locations-hero .container {
    position: relative;
    z-index: 2;
}

.locations-hero h1 {
    color: var(--white);
    font-size: 5.0rem;
    font-weight: 600;
    margin-bottom: 0.5em;

    line-height: 5.0rem;
}

.locations-hero .hero-text {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 400;
    max-width: 700px;
    margin-bottom: 2em;

    line-height: 3.0rem;
}

.locations-hero .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 2em;
}

/* --------------------------------------------------------------------------
   Section 2: Trust Strip (White Background)
   -------------------------------------------------------------------------- */
.locations-authority {
    background-color: var(--white);
    padding: 30px 0;
}

.locations-authority .authority-text {
    margin: 0 auto;
    text-align: center;
    font-size: 2.0rem;
    font-weight: 500;
    color: var(--charcoal-soft);

    line-height: 3.0rem;
}

.locations-authority .authority-text p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Section 3: Local Home Exterior Services (Dark Background)
   -------------------------------------------------------------------------- */
.locations-intro {
    background-color: var(--charcoal-dark);
}

.locations-intro h2 {
    color: var(--white);
    font-size: 2.0rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 1.5em;

    line-height: 1.0rem;
}

.locations-intro .intro-text {
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
    font-size: 1.7rem;
    font-weight: 400;

    line-height: 3.0rem;
}

.locations-intro .intro-text p:last-child {
    margin-bottom: 0;
}

.locations-intro .intro-text a {
    color: var(--white);
    font-weight: 600;
    background-image: none;
    text-shadow: none;
    transition: color 0.3s ease;
}

.locations-intro .intro-text a:hover,
.locations-intro .intro-text a:focus {
    color: var(--light-text);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Section 4: Featured Locations (White Background)
   -------------------------------------------------------------------------- */
.locations-featured {
    background-color: var(--white);
}

.locations-featured h2 {
    color: var(--charcoal-primary);
    text-align: center;
    font-size: 2.0rem;
    font-weight: 600;
    margin: 0 0 1.5em;

    line-height: 1.0rem;
}

.locations-featured .featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 576px) {
    .locations-featured .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .locations-featured .featured-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

.location-card {
    display: flex;
    flex-direction: column;
    background: var(--card-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card:hover,
.location-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.20);
}

.location-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* The body overlaps the bottom of the photo and carries a gradient that fades
   from transparent into the solid card colour, so there is no hard seam.
   The stops are in pixels on purpose — they must not depend on text length. */
.location-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 25px;
    position: relative;
    z-index: 1;
    margin-top: -100px;
    padding-top: 100px;
    background-image: linear-gradient(
        to bottom,
        rgba(var(--card-dark-rgb), 0) 0,
        rgba(var(--card-dark-rgb), 0.55) 55px,
        rgba(var(--card-dark-rgb), 0.92) 85px,
        var(--card-dark) 105px
    );
}

@media (prefers-reduced-motion: reduce) {
    .location-card {
        transition: box-shadow 0.3s ease;
    }

    .location-card:hover,
    .location-card:focus-within {
        transform: none;
    }
}

.location-card h3 {
    color: var(--white);
    font-size: 2.0rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
}

.location-card p {
    color: var(--light-text);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 2rem;

    line-height: 2.5rem;
}

.location-card .location-link {
    color: var(--accent-red);
    font-size: 1.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    background-image: none;
    text-shadow: none;
    margin-top: auto;
}

.location-card .location-link:hover,
.location-card .location-link:focus {
    color: var(--accent-red-hover);
    text-decoration: underline;
}

.location-card .location-link svg {
    margin-left: 8px;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* --------------------------------------------------------------------------
   Section 5: All Locations (White Background)
   -------------------------------------------------------------------------- */
.locations-all {
    background-color: var(--white);
}

.locations-all h2 {
    color: var(--charcoal-primary);
    text-align: center;
    font-size: 2.0rem;
    font-weight: 600;
    margin: 0 0 1.0em;

    line-height: 1.0rem;
}

.locations-all .all-subtitle {
    text-align: center;
    color: var(--body-text);
    font-size: 1.7rem;
    font-weight: 400;
    margin: 0 auto 35px;

    line-height: 3.0rem;
}

.locations-all .all-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    gap: 15px;
}

.locations-all .all-grid a {
    display: block;
    padding: 10px 25px;
    background-color: #ededed;
    color: var(--charcoal-soft);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    background-image: none;
    text-shadow: none;
    border-radius: 4px;
}

.locations-all .all-grid a:hover,
.locations-all .all-grid a:focus {
    background-color: #dedede;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Section 6: Built for Connecticut Weather (Light Gray Background)
   Sits between sections 4 and 5 in the page order.
   -------------------------------------------------------------------------- */
.locations-weather {
    background-color: var(--light-gray);
}

.locations-weather h2 {
    color: var(--charcoal-primary);
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 1.5em;

    line-height: 1.0rem;
}

.locations-weather .icon-boxes {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    margin-bottom: 25px;
}

@media (min-width: 576px) {
    .locations-weather .icon-boxes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .locations-weather .icon-boxes {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.locations-weather .icon-box {
    text-align: center;
    padding: 25px 15px;
}

.locations-weather .icon-box .icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.locations-weather .icon-box .icon-wrapper img {
    max-width: 100%;
    max-height: 100%;
    /* The source SVGs carry mixed strokes/fills (#000, #464747, none);
       brightness(0) flattens them all to one solid dark silhouette. */
    filter: brightness(0);
}

.locations-weather .icon-box h4 {
    color: var(--charcoal-primary);
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 2.5rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 25px;
}

.locations-weather .icon-box p {
    color: var(--body-text);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 2.5rem;
    margin-bottom: 0;
}

.locations-weather .closing-statement {
    text-align: center;
    color: var(--body-text);
    font-size: 1.8rem;
    font-weight: 500;
    margin: 0 auto;

    line-height: 3.0rem;
}

/* --------------------------------------------------------------------------
   Section 7: Recent Local Projects (Light Gray Background)
   -------------------------------------------------------------------------- */
.locations-projects {
    background-color: var(--light-gray);
}

.locations-projects h2 {
    color: var(--charcoal-primary);
    text-align: center;
    font-size: 2.0rem;
    font-weight: 600;
    margin: 0 0 1.0em;

    line-height: 1.0rem;
}

.locations-projects .projects-subtitle {
    text-align: center;
    color: var(--body-text);
    font-size: 1.7rem;
    font-weight: 400;
    margin: 0 auto 35px;

    line-height: 3.0rem;
}

.locations-projects .projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .locations-projects .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border-radius: 4px;
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
}

.project-card .card-body {
    padding: 25px;
}

.project-card h3 {
    color: var(--charcoal-primary);
    font-size: 2.0rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
}

.project-card p {
    color: var(--body-text);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0;

    line-height: 2.5rem;
}

.locations-projects .projects-closing {
    text-align: center;
    margin-top: 35px;
}

.locations-projects .view-more-link {
    color: var(--accent-red);
    font-size: 1.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    background-image: none;
    text-shadow: none;
}

.locations-projects .view-more-link:hover,
.locations-projects .view-more-link:focus {
    color: var(--accent-red-hover);
    text-decoration: underline;
}

.locations-projects .view-more-link svg {
    margin-left: 8px;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* --------------------------------------------------------------------------
   Section 8: Final CTA (Dark Background)
   -------------------------------------------------------------------------- */
.locations-final-cta {
    background-color: var(--charcoal-dark);
    text-align: center;
    padding: 80px 0;
}

.locations-final-cta h2 {
    color: var(--white);
    font-size: 2.0rem;
    font-weight: 600;
    margin: 0 0 3.5rem;

    line-height: 1.0rem;
}

.locations-final-cta .cta-subtext {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 2em;

    line-height: 3.0rem;
}

.locations-final-cta .cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 3.5rem;
}

.locations-final-cta .cta-buttons .btn-locations-primary {
    font-size: 1.6rem;
    font-weight: 600;

    line-height: 40px;
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .locations-all .all-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(8, auto);
    }
}

@media (max-width: 767px) {
    .locations-page h1 { font-size: 2rem; }
    .locations-page h2 { font-size: 1.85rem; }
    .locations-page h3 { font-size: 1.85rem; }

    .locations-section {
        padding: 60px 0;
    }

    .locations-hero {
        min-height: 500px;
        padding: 80px 0;
    }

    .locations-hero h1 {
        font-size: 3.2rem;
        line-height: 3.8rem;
    }

    .btn-locations-primary,
    .btn-locations-outline {
        width: 100%;
        text-align: center;
    }

    .locations-hero .hero-buttons {
        flex-direction: column;
    }

    .locations-all .all-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-auto-flow: row;
    }

    .location-card .card-body,
    .project-card .card-body {
        padding: 20px;
    }
}
