/* ==========================================================================
   NEW HOMEPAGE DESIGN SYSTEM (OUTFIT FONT & PREMIUM STYLING)
   ========================================================================== */

/* Main Wrapper and Typography Reset */
.new-homepage-wrapper {
    font-family: 'Outfit', sans-serif;
    color: #111111;
    background-color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

.new-homepage-wrapper * {
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
}

/* Color Variables & Styling Tokens */
:root {
    --primary-red: #CE3A26;
    --primary-red-hover: #D00A0A;
    --dark-charcoal: #1C1C1C;
    --light-cream: #F6F1EB;
    --border-gray: #E5E5E5;
    --text-muted: #666666;
    --white: #FFFFFF;
    --hp-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.sfm-rollback {
    z-index: 100 !important;
}

/* Helpers and Layout Utilities */
.hp-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.hp-section-padding {
    padding: 100px 0;
}

.hp-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-items: center;
}

.hp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.hp-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.hp-title-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background-color: rgba(240, 13, 13, 0.1);
    color: var(--primary-red);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hp-title-pill.hp-white-pill {
    background-color: var(--white);
    color: var(--primary-red);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Red Separator Utilities */
.hp-red-line {
    width: 120px;
    height: 2px;
    background-color: var(--primary-red);
    margin: 20px 0;
}

.hp-red-line.center {
    margin: 20px auto;
}

.hp-red-line.long {
    width: 100%;
}

.hp-heading-large {
    font-size: 38px;
    line-height: 1.2;
    color: var(--dark-charcoal);
    margin-bottom: 24px;
}

.hp-heading-medium {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark-charcoal);
    margin-bottom: 20px;
}

.hp-heading-small {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-charcoal);
    margin-bottom: 8px;
}

.hp-paragraph {
    font-size: 18px;
    color: #444444;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* Button UI Components */
.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 8px;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.hp-btn-red {
    background-color: var(--primary-red);
    color: var(--white);
    border: 2px solid var(--primary-red);
}

.hp-btn-red:hover {
    background-color: var(--primary-red-hover);
    border-color: var(--primary-red-hover);
    transform: translateY(-3px);
}

.hp-btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.hp-btn-outline:hover {
    background-color: var(--white);
    color: var(--dark-charcoal);
    transform: translateY(-3px);
}

.hp-btn-white {
    background-color: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--white);
}

.hp-btn-white:hover {
    background-color: var(--white);
    color: var(--primary-red-hover);
    transform: translateY(-3px);

}

.hp-btn-dark-outline {
    background-color: transparent;
    color: var(--dark-charcoal);
    border: 2px solid var(--dark-charcoal);
}

.hp-btn-dark-outline:hover {
    background-color: var(--dark-charcoal);
    color: var(--white);
    transform: translateY(-3px);
}

.hp-btn-dark {
    background-color: var(--dark-charcoal);
    color: var(--white);
    border: 2px solid var(--dark-charcoal);
}

.hp-btn-dark:hover {
    background-color: #787878;
    border-color: #5a5959;
    transform: translateY(-3px);
}

/* ==========================================================================
   SECTION 1: HERO WITH BACKGROUND VIDEO
   ========================================================================== */
.hp-hero {
    position: relative;
    height: 70vh;
    min-height: 980px;
    display: flex;
    align-items: end;
    justify-content: center;
    overflow: hidden;
    background-color: #000;
    padding-bottom: 100px;
}

.hp-hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hp-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 2;
}

.hp-hero-container {
    position: relative;
    z-index: 3;
    width: 100%;
}

.hp-hero-content {
    position: relative;
    text-align: left;
    color: var(--white);
    padding: 0;
}

.hp-hero-content .hp-title-pill {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: none;
    font-size: 24px;
    letter-spacing: normal;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-family: 'General Sans', 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transform: rotate(-3deg) !important;
}

.hp-hero-content .hp-title-pill.hp-white-pill {
    background-color: var(--light-cream);
    color: var(--dark-charcoal);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    font-family: 'General Sans', 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hp-hero-title {
    font-size: 70px;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 15px;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    color: var(--white);
}

.hp-hero-subtext {
    font-size: 22px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
    font-weight: 300;
    max-width: 750px;
}

.hp-hero-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.hp-hero-contact-row {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    border-top: none;
    padding-top: 10px;
}

.hp-hero-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    opacity: 0.95;
    font-weight: 500;
}

.hp-hero-contact-item i {
    color: var(--primary-red);
    font-size: 20px;
}

/* ==========================================================================
   PAGE HERO (compact inner-page hero — e.g. template-team.php)
   Reuses the homepage hero tokens (overlay, rotated pill, title, hp-btn
   actions) but on a shorter, image-backed proportion that clears the fixed
   site header.
   ========================================================================== */
.hp-page-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 560px;
    padding: 170px 0 90px;
    background-color: #000;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hp-page-hero .hp-hero-content {
    max-width: 820px;
}

.hp-page-hero .hp-hero-title {
    font-size: 56px;
}

@media only screen and (max-width: 1024px) {
    .hp-page-hero {
        min-height: 480px;
        padding: 150px 0 70px;
    }

    .hp-page-hero .hp-hero-title {
        font-size: 44px;
    }
}

@media only screen and (max-width: 767px) {
    .hp-page-hero {
        min-height: 0;
        padding: 220px 0 60px;
        background-position: 15% 0;
    }

    .hp-page-hero .hp-hero-title {
        font-size: 34px;
    }
}

/* ==========================================================================
   SECTION 2: SERVICES SECTION WITH ACTIVE TABS
   ========================================================================== */
.hp-services-section {
    background-color: var(--white);
}

.hp-services-right-col {
    padding-left: 40px;
}

.hp-services-tabs-container {
    display: flex;
    flex-direction: column;
}

.hp-services-tab-link {
    display: flex;
    align-items: center;
    padding: 18px 0;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #CCCCCC;
    border-radius: 0;
    text-decoration: none;
    color: var(--dark-charcoal);
    font-size: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hp-services-tab-link i {
    margin-left: auto;
    font-size: 14px;
    color: var(--dark-charcoal);
    transition: all 0.3s ease;
}

.hp-services-tab-link:hover {
    border-bottom-color: var(--primary-red);
    background-color: transparent;
    transform: translateX(5px);
}

.hp-services-tab-link:hover i {
    color: var(--primary-red);
    transform: translateX(3px);
}

.hp-services-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-charcoal);
    font-weight: 700;
    text-decoration: none;
    font-size: 18px;
    margin-top: 20px;
    transition: gap 0.2s ease;
}

.hp-services-view-all:hover {
    gap: 12px;
    color: var(--primary-red);
}

/* ==========================================================================
   SECTION 3: BEIGE QUOTE BANNER
   ========================================================================== */
.hp-quote-section {
    background-color: var(--light-cream);
    overflow: hidden;
    position: relative;
    padding: 100px 0 140px;
}

.hp-quote-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.hp-quote-spacer {
    height: 380px;
    width: 100%;
}

.hp-quote-spacer img {
    position: relative;
    top: -50px;
}

.hp-quote-content {
    position: relative;
}

.hp-quote-text {
    font-size: 38px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--dark-charcoal);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    border: 0;
    margin-left: 0;
    padding-left: 0;
}

.hp-quote-author {
    font-size: 22px;
    font-weight: 300;
    color: var(--dark-charcoal);
    opacity: 0.9;
}

/* ==========================================================================
   SECTION 4: SETTING THE STANDARD (RESPECTED BY INDUSTRY)
   ========================================================================== */
.hp-industry-section {
    background-color: var(--white);
}

.hp-industry-bullets {
    list-style: none;
    padding: 0;
    margin: 30px 0 0 0;
}

.hp-industry-bullets li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 400;
    color: var(--dark-charcoal);
    margin-bottom: 10px;
}

.hp-industry-bullets li i {
    color: var(--white);
    font-size: 22px;
    background: #FFA512;
    border-radius: 50px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp-industry-bullets li i::before {
    font-size: 18px;
}

.hp-industry-logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 20px;
    align-items: center;
    justify-items: center;
    padding-top: 30px;
    width: 100%;
    max-width: 520px;
}

.hp-industry-badge {
    height: 100px;
    max-width: 240px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.hp-industry-image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hp-industry-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* ==========================================================================
   SECTION 5: CORE VALUES GRID (REWRITTEN STYLISHLY)
   ========================================================================== */
.hp-values-section {
    background-color: rgb(246 241 235 / 30%);
}

.hp-values-header {
    max-width: 800px;
}

.hp-value-card {
    background-color: var(--white);
    border: 1px solid var(--border-gray);
    padding: 10px 20px 20px;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hp-value-content {
    min-height: 220px;
}

.hp-value-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: start;
    transition: all 0.3s ease;
}

/* ==========================================================================
   SECTION 6: OUR TEAM SECTION (CARDS MATCHING Mockup)
   ========================================================================== */
.hp-team-section {
    background-color: var(--white);
}

.hp-team-header {
    text-align: start;
}

.hp-team-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-gray);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.hp-team-img-box {
    position: relative;
    height: 340px;
    overflow: hidden;
}

.hp-team-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hp-team-info {
    padding: 24px 20px;
}

.hp-team-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-charcoal);
    margin-bottom: 0;
    padding-bottom: 0;
}

.hp-team-title {
    font-size: 18px;
    color: var(--dark-charcoal);
    font-weight: 400;
}

.hp-team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.1);
    border-color: rgba(240, 13, 13, 0.15);
}

.hp-team-footer {
    text-align: center;
    margin-top: 50px;
}

.hp-team-meet-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-red);
    font-weight: 700;
    text-decoration: none;
    font-size: 18px;
    transition: gap 0.2s ease;
}

.hp-team-meet-btn:hover {
    gap: 12px;
}

/* ==========================================================================
   SECTION 7: NEWS & ARTICLES
   ========================================================================== */
.hp-news-section {
    background-color: rgba(246, 241, 235, 0.3);
}

.hp-news-header {
    text-align: center;
    margin-bottom: 60px;
}

.hp-news-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-gray);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.hp-news-img-box {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.hp-news-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hp-news-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hp-news-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.hp-news-category {
    color: var(--primary-red);
}

.hp-news-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-charcoal);
    line-height: 1.4;
    margin-bottom: 12px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hp-news-title:hover {
    color: var(--primary-red);
}

.hp-news-excerpt {
    font-size: 16px;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.hp-news-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
}

.hp-news-link i {
    transition: transform 0.2s ease;
}

.hp-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(240, 13, 13, 0.15);
}

.hp-news-card:hover .hp-news-link i {
    transform: translateX(4px);
}

/* ==========================================================================
   SECTION 8: HEALTH INSURANCE BAR
   ========================================================================== */
.hp-insurance-section {
    background-color: var(--white);
}

.hp-insurance-logos-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    align-items: center;
    margin-top: 40px;
}

.hp-insurance-logo {
    width: 100%;
    height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
    max-width: 150px;
    max-height: 56px;
}

.hp-insurance-section p.lead {
    line-height: 1.2;
}

/* ==========================================================================
   SECTION 9: BOTTOM CTA (TAKE THE FIRST STEP)
   ========================================================================== */
.hp-bottom-cta-section {
    background-color: rgba(246, 241, 235, 0.3);
}

.hp-bottom-cta-section .hp-grid-2 {
    align-items: start;
}

.hp-bottom-cta-bullets {
    list-style: none;
    padding: 0;
    margin: 30px 0 40px 0;
}

.hp-bottom-cta-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 18px;
    color: #444444;
    margin-bottom: 16px;
    line-height: 1.4;
}

.hp-bottom-cta-bullets li i {
    color: var(--primary-red);
    font-size: 20px;
}

.hp-bottom-cta-actions {
    display: flex;
    gap: 20px;
}

.hp-bottom-cta-image-box {
    border-radius: 10px;
    overflow: hidden;
    height: 480px;
}

.hp-bottom-cta-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   RESPONSIVENESS (MOBILE AND TABLET OPTIMISATIONS)
   ========================================================================== */

/* Tablet & Smaller Screens (1024px and below) */
@media only screen and (max-width: 1024px) {
    .hp-hero {
        min-height: 1200px;
    }

    .hp-hero-content .hp-title-pill {
        font-size: 16px;
    }

    .hp-section-padding {
        padding: 80px 0;
    }

    .hp-heading-large {
        font-size: 30px;
    }

    .hp-paragraph {
        padding-bottom: 0;
    }

    .hp-hero-title {
        font-size: 52px;
    }

    .hp-insurance-section h2.hp-heading-large {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .hp-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .hp-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-quote-section {
        background-image: none;
    }

    .hp-quote-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hp-quote-spacer {
        display: none;
    }

    .hp-quote-text {
        font-size: 24px;
    }

    .hp-insurance-logos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* MOBILE RESPONSIVE BLOCK (767px and below) */
@media only screen and (max-width: 767px) {
    .hp-section-padding {
        padding: 60px 0;
    }

    .hp-services-right-col {
        padding-left: 0;
    }

    .hp-grid-2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hp-grid-3 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hp-grid-4 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Hero section scale down */
    .hp-hero {
        height: auto;
        min-height: 620px;
        padding: 360px 0 80px 0;
        background-position: center;
    }

    /* The hero video (~50MB) is unreliable and costly to autoplay on phones, so
       we hide it and let the section's fallback background image stand in. The
       image is set inline on .hp-hero in template-homepage.php. */
    .hp-hero-video {
        display: none !important;
    }

    .hp-hero-title {
        font-size: 38px;
    }

    .hp-hero-subtext {
        font-size: 18px;
    }

    .hp-hero-actions .hp-btn {
        width: 100%;
        padding: 12px 15px;
    }

    .hp-hero-contact-row {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    /* Industry section: prevent overflow on phones */
    .hp-grid-2>* {
        min-width: 0;
    }

    .hp-industry-bullets li {
        font-size: 16px;
        align-items: flex-start;
    }

    .hp-industry-bullets li i {
        flex-shrink: 0;
        margin-top: 2px;
    }

    .hp-industry-logos {
        width: 100%;
        max-width: 100%;
        gap: 12px;
        padding-top: 20px;
    }

    .hp-industry-badge {
        width: 100%;
        height: auto;
        max-height: 80px;
        max-width: 100%;
    }

    .hp-industry-image-container img {
        width: 100%;
        height: auto;
    }

    /* Quote mobile text size */
    .hp-quote-text {
        font-size: 24px;
    }

    /* Team section images padding */
    .hp-team-img-box {
        height: 350px;
    }

    .hp-team-img-box img {
        object-position: top;
    }

    /* Bottom CTA image and layout */
    .hp-bottom-cta-image-box {
        height: 300px;
    }

    .hp-bottom-cta-actions .hp-btn {
        width: 100%;
        padding: 12px 15px;
    }

    /* Insurances logowall */
    .hp-insurance-logo {
        height: 50px;
    }

    .hp-insurance-logos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.fw-lighter {
    font-weight: lighter !important;
}

.fw-light {
    font-weight: 300 !important;
}

.fw-normal {
    font-weight: 400 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-bolder {
    font-weight: bolder !important;
}

.pt-30px {
    padding-top: 30px;
}

.pb-30px {
    padding-bottom: 30px;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

.hp-values-section .hp-grid-4 {
    gap: 0;
}

.mb-0 {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   ENTRANCE ANIMATIONS
   Subtle staggered fade-up reveals + a settling hero zoom.
   All gated behind `.hp-anim-on`, which JS adds only when the browser
   supports IntersectionObserver and the user hasn't requested reduced motion.
   ========================================================================== */

@keyframes hpFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hpBgSettle {
    from {
        transform: translate(-50%, -50%) scale(1.12);
    }

    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* --- Hero: background settle zoom + staggered content load-in --- */
.hp-anim-on .hp-hero-video {
    animation: hpBgSettle 1.8s var(--hp-ease-out) forwards;
}

.hp-anim-on .hp-hero-content>* {
    opacity: 0;
    animation: hpFadeUp 0.8s var(--hp-ease-out) forwards;
}

.hp-anim-on .hp-hero-content>*:nth-child(1) {
    animation-delay: 0.20s;
}

.hp-anim-on .hp-hero-content>*:nth-child(2) {
    animation-delay: 0.33s;
}

.hp-anim-on .hp-hero-content>*:nth-child(3) {
    animation-delay: 0.46s;
}

.hp-anim-on .hp-hero-content>*:nth-child(4) {
    animation-delay: 0.59s;
}

.hp-anim-on .hp-hero-content>*:nth-child(5) {
    animation-delay: 0.72s;
}

/* --- Scroll-triggered reveals (single elements + staggered groups) --- */
.hp-anim-on .hp-reveal,
.hp-anim-on .hp-reveal-group>* {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--hp-ease-out),
        transform 0.7s var(--hp-ease-out);
    transition-delay: var(--hp-delay, 0s);
    will-change: opacity, transform;
}

.hp-anim-on .hp-reveal.hp-in,
.hp-anim-on .hp-reveal-group.hp-in>* {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   CUSTOM HOMEPAGE FOOTER
   Rendered by footer-homepage.php, replaces the Divi Theme Builder footer
   on this template only.
   ========================================================================== */

.hp-footer {
    font-family: 'Outfit', sans-serif;
    background-color: #0e0e0e;
    color: rgba(255, 255, 255, 0.75);
    padding: 80px 0 48px;
    line-height: 1.6;
    border-bottom: 8px solid var(--primary-red);
}

.hp-footer * {
    box-sizing: border-box;
}

.hp-footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hp-footer a:hover {
    color: var(--white);
}

.hp-footer__top {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1.4fr 1.1fr;
    gap: 48px;
    padding-bottom: 72px;
}

.hp-footer__heading {
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 24px;
}

.hp-footer__links,
.hp-footer__contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-footer__links li {
    margin-bottom: 12px;
    font-size: 15px;
}

.hp-footer__links a {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease, transform 0.2s ease;
}

.hp-footer__links a:hover {
    color: var(--white);
    transform: translateX(3px);
}

.hp-footer__news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-footer__news-list li {
    margin-bottom: 18px;
}

.hp-footer__news-list li:last-child {
    margin-bottom: 0;
}

.hp-footer__news-link {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.hp-footer__news-link:hover {
    color: var(--white);
}

.hp-footer__news-date {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.hp-footer__contact li {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    font-size: 15px;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.75);
}

.hp-footer__contact li i {
    color: var(--primary-red);
    font-size: 16px;
    margin-top: 4px;
    flex-shrink: 0;
}

.hp-footer__contact li>div {
    display: flex;
    flex-direction: column;
}

.hp-footer__contact li>div span {
    display: block;
    line-height: 1.5;
}

.hp-footer__contact a {
    color: rgba(255, 255, 255, 0.75);
}

.hp-footer__contact a:hover {
    color: var(--white);
}

/* --- Bottom bar: logo, social, copyright (centered stack) --- */
.hp-footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.hp-footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hp-footer__logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hp-footer__logo-text {
    color: var(--white);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hp-footer__logo-text span {
    color: var(--primary-red);
}

.hp-footer__social {
    display: inline-flex;
    align-items: center;
    gap: 18px;
}

.hp-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 22px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.hp-footer__social a:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.hp-footer__copy {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 960px) {
    .hp-footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 40px 32px;
        padding-bottom: 56px;
    }

    .hp-footer__col--news {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .hp-footer {
        padding: 56px 0 36px;
    }

    .hp-footer__top {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-bottom: 40px;
    }

    .hp-footer__col--news {
        grid-column: auto;
    }
}

/* ==========================================================================
   TEAM PAGE (template-team.php)
   Homepage-styled cards (single flat grid) that open a Bootstrap profile modal.
   ========================================================================== */
/* Card acts as the modal trigger — reset native <button> styling so it matches
   the homepage .hp-team-card exactly. */
.hp-team-card.hp-team-trigger {
    display: block;
    width: 100%;
    padding: 0;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    background-color: var(--white);
}

.hp-team-card.hp-team-trigger:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: 3px;
}

.hp-team-card.hp-team-trigger:hover .hp-team-img-box img {
    transform: scale(1.05);
}

.hp-team-card .hp-team-meet-btn {
    display: block;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 400;
}

.hp-team-card.hp-team-trigger:hover .hp-team-meet-btn {
    gap: 12px;
}

/* Branded Bootstrap modal */
.hp-team-modal .modal-dialog {
    max-width: 900px;
}

.hp-team-modal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    max-height: 88vh;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.hp-team-modal .modal-body {
    padding: 0;
}

.hp-team-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    padding: 12px;
    border-radius: 50%;
    background-color: var(--white);
    opacity: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.hp-team-modal-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    max-height: 88vh;
}

.hp-team-modal-img {
    background-color: var(--light-cream);
}

.hp-team-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top;
}

.hp-team-modal-info {
    padding: 44px 40px;
    overflow-y: auto;
}

.hp-team-modal-role {
    display: inline-block;
    color: var(--primary-red);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
}

.hp-team-modal-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-charcoal);
    margin: 0;
    padding: 0;
}

.hp-team-modal-divider {
    width: 60px;
    height: 2px;
    background-color: var(--primary-red);
    margin: 16px 0 24px;
}

.hp-team-modal-bio {
    color: #333333;
    line-height: 1.7;
    font-size: 16px;
}

.hp-team-modal-bio p {
    margin-bottom: 1em;
}

.hp-team-modal-bio p:last-child {
    margin-bottom: 0;
}

@media only screen and (max-width: 767px) {
    .hp-team-modal .modal-content {
        max-height: 92vh;
    }

    .hp-team-modal-grid {
        grid-template-columns: 1fr;
        max-height: 92vh;
        overflow-y: auto;
    }

    .hp-team-modal-img {
        height: 420px;
    }

    .hp-team-modal-img img {
        object-fit: cover;
    }

    .hp-team-modal-info {
        overflow: visible;
        padding: 28px 24px;
    }
}

/* ==========================================================================
   SERVICES PAGE (template-services.php)
   Icon-led service cards laid out on the shared hp-grid-3 (so the homepage
   responsive breakpoints already cover the column collapse). Visual language
   mirrors the team/news cards: white surface, subtle border, lift on hover.
   ========================================================================== */
.hp-service-grid-section {
    background-color: rgba(246, 241, 235, 0.3);
}

.hp-service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    padding: 36px 32px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hp-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.1);
    border-color: rgba(240, 13, 13, 0.15);
}

.hp-service-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background-color: rgba(206, 58, 38, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    transition: background-color 0.3s ease;
}

.hp-service-icon i {
    font-size: 30px;
    color: var(--primary-red);
    line-height: 1;
}

.hp-service-card:hover .hp-service-icon {
    background-color: var(--primary-red);
}

.hp-service-card:hover .hp-service-icon i {
    color: var(--white);
}

.hp-service-card h3 {
    margin-bottom: 12px;
}

.hp-service-card p {
    font-size: 16px;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 22px;
    flex-grow: 1;
}

.hp-service-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--primary-red);
    font-weight: 700;
    font-size: 16px;
}

.hp-service-link i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.hp-service-card:hover .hp-service-link i {
    transform: translateX(4px);
}

/* ==========================================================================
   SERVICES PAGE — REVIEWS & TESTIMONIALS
   ========================================================================== */
.hp-reviews-section {
    background-color: var(--white);
}

.hp-reviews-header {
    max-width: 760px;
}

.hp-review-stars {
    display: inline-flex;
    gap: 4px;
    color: #FFA512;
    font-size: 18px;
}

.hp-review-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    background-color: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hp-review-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.1);
    border-color: rgba(240, 13, 13, 0.15);
}

.hp-review-card .hp-review-stars {
    margin-bottom: 18px;
}

.hp-review-quote {
    font-size: 18px;
    line-height: 1.6;
    color: var(--dark-charcoal);
    margin: 0 0 24px;
    flex-grow: 1;
    border: 0;
    margin-left: 0;
    padding-left: 0;
}

.hp-review-author {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-gray);
    padding-top: 18px;
}

.hp-review-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark-charcoal);
}

.hp-review-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   SERVICES PAGE — FAQ ACCORDION (Bootstrap collapse, branded)
   ========================================================================== */
.hp-faq-section {
    background-color: rgba(246, 241, 235, 0.3);
}

.hp-faq-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 60px;
    align-items: start;
}

.hp-faq-intro .hp-red-line {
    margin: 20px 0 24px;
}

.hp-faq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.hp-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hp-faq-item {
    background-color: var(--white);
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 13px 3px rgba(0, 0, 0, 0.05);
}

.hp-faq-question-heading {
    margin: 0;
    padding-bottom: 0;
}

/* Full-width gray header bar (mirrors the site's Divi FAQ component). */
.hp-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 16px 22px;
    background-color: #e6e6e6;
    border: none;
    border-radius: 0;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hp-faq-question:hover {
    background-color: #dedede;
    color: var(--primary-red);
}

.hp-faq-question:not(.collapsed) {
    background-color: #dedede;
}

.hp-faq-question:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: -2px;
}

.hp-faq-icon {
    flex-shrink: 0;
    font-size: 14px;
    color: #333333;
    transition: transform 0.3s var(--hp-ease-out);
}

.hp-faq-question:hover .hp-faq-icon {
    color: var(--primary-red);
}

.hp-faq-question:not(.collapsed) .hp-faq-icon {
    transform: rotate(180deg);
}

.hp-faq-answer {
    padding: 18px 22px;
    background-color: var(--white);
}

.hp-faq-answer p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: #333333;
}

/* ==========================================================================
   SERVICES PAGE — LOCATION INFORMATION
   ========================================================================== */
.hp-location-section {
    background-color: var(--white);
}

.hp-location-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 50px;
    align-items: stretch;
    padding-top: 20px;
}

.hp-location-list {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
}

.hp-location-list li {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 22px 0;
    border-bottom: 1px solid var(--border-gray);
}

.hp-location-list li:first-child {
    padding-top: 0;
}

.hp-location-list li i {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(206, 58, 38, 0.08);
    color: var(--primary-red);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp-location-list li>div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hp-location-list li>div span,
.hp-location-list li>div a {
    font-size: 17px;
    color: #444444;
    line-height: 1.5;
    text-decoration: none;
}

.hp-location-list li>div a:hover {
    color: var(--primary-red);
}

.hp-location-label {
    font-size: 14px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark-charcoal) !important;
    margin-bottom: 4px;
}

.hp-location-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.hp-location-map {
    position: relative;
    min-height: 420px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hp-location-map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* "Coming via Metro?" — image + numbered walking directions. */
.hp-metro-callout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    margin-top: 70px;
    background-color: rgba(246, 241, 235, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 20px 0px hsl(0deg 0% 0% / 10%);
}

.hp-metro-image {
    position: relative;
    min-height: 300px;
}

.hp-metro-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hp-metro-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    background-color: #ece5dc;
    border: 2px dashed #c9bfb2;
}

.hp-metro-image-placeholder i {
    font-size: 40px;
}

.hp-metro-image-placeholder span {
    font-size: 15px;
    font-weight: 500;
    max-width: 220px;
}

.hp-metro-content {
    padding: 44px 48px 60px;
}

.hp-metro-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--primary-red);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hp-metro-badge i {
    font-size: 18px;
}

.hp-metro-steps {
    list-style: none;
    counter-reset: metro;
    margin: 20px 0 0;
    padding: 0;
}

.hp-metro-steps li {
    position: relative;
    padding-left: 48px;
    margin-bottom: 18px;
    font-size: 18px;
    line-height: 1.5;
    color: #444444;
}

.hp-metro-steps li:last-child {
    margin-bottom: 0;
}

.hp-metro-steps li::before {
    counter-increment: metro;
    content: counter(metro);
    position: absolute;
    left: 0;
    top: -3px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-red);
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media only screen and (max-width: 1024px) {
    .hp-faq-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hp-location-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hp-location-map {
        min-height: 340px;
    }

    .hp-metro-callout {
        grid-template-columns: 1fr;
    }

    .hp-metro-image {
        min-height: 240px;
    }
}

@media only screen and (max-width: 767px) {
    .hp-review-quote {
        font-size: 17px;
    }

    .hp-faq-question {
        font-size: 17px;
        padding: 16px 20px;
    }

    .hp-faq-answer {
        padding: 16px 20px;
    }

    .hp-faq-actions .hp-btn,
    .hp-location-actions .hp-btn {
        width: 100%;
        padding: 12px 15px;
    }

    .hp-metro-content {
        padding: 32px 24px;
    }
}