/* ==================================================
   SPARC PHYSIO SUB SERVICES MASTER ENGINE
================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #004D4D;       /* Updated to match your exact home page brand purple */
    --primary-dark: #004D4D;  /* Updated to match your dark purple variable */
    --light: #e3eeee;
    --border: #e3eeee;
    --text: #1a1a1a;
    --gray: #666;
    --white: #fff;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: #fff;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1400px; /* Synchronized layout limits match your portal master grids */
    margin: 0 auto;
    padding: 0 32px;   /* Fixed horizontal layout margin system */
}

/* ==================================================
   HERO SECTION (DYNAMIC HYBRID MOBILE BACKDROP ENGINE)
================================================== */
.subservice-hero {
    padding: 40px 0;
    background: #faf9fc;
    position: relative;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 5;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 25px;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--primary);
    font-weight: 600;
}

.sub-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

.hero-content h1 {
    font-size: 45px;
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--text);
}

.title-line {
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin-bottom: 25px;
    border-radius: 2px;
}

.hero-content p {
    font-size: 18px;
    line-height: 1.65;
    color: #444;
    margin-bottom: 35px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature {
    text-align: center;
    cursor: pointer;
}

.feature-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #e3eeee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-icon i {
    font-size: 22px;
    color: var(--primary);
    transition: color 0.3s ease;
}

.feature h4 {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    color: #333;
}

/* Interactive States */
.feature:hover .feature-icon {
    background: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(92, 29, 92, 0.2);
}

.feature:hover .feature-icon i {
    color: var(--white);
}

.hero-image {
    width: 100%;
}

.hero-image img {
    width: 100%;
    height: 440px;
    display: block;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ==================================================
   WHAT WE TREAT
================================================== */
.treatments-section {
    padding: 40px 0;
    background: #ffffff;
}

.section-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 55px;
}

.section-heading span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-heading h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 10px 0 15px;
    color: var(--text);
}

.section-heading p {
    color: var(--gray);
    line-height: 1.65;
    font-size: 15px;
}

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

.treatment-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.treatment-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.treatment-content {
    padding: 24px;
}

.treatment-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

.treatment-content p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.treatment-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(92, 29, 92, 0.1);
}

/* ==================================================
   OVERVIEW SECTION (MAINTAINS GRID INTEGRITY)
================================================== */
.overview-section {
    padding: 40px 0 80px;
}

.overview-box {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    overflow: hidden;
    width: 100%;
} 

.overview-col {
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.approach-col {
    border-right: 1px solid var(--border);
}

.treat-col {
    border-right: 1px solid var(--border);
}

.overview-col h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.treat-list {
    list-style: none;
}

.treat-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 15px;
    line-height: 1.5;
}

.treat-list i {
    color: var(--primary);
    font-size: 16px;
    margin-top: 4px;
    flex-shrink: 0;
}

.approach-col p {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 24px;
    color: #444;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.step {
    text-align: center;
    flex: 1;
}

.step i {
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 6px;
}

.step span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.arrow {
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}

.overview-image {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overview-image img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

/* ==================================================
   CTA CARD
================================================== */
.overview-cta {
    /* background: linear-gradient(135deg, var(--primary-dark) 0%, #4a154a 50%, var(--primary) 100%); */
    background-color: #004D4D;
    color: var(--white);
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cta-icon {
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    margin-bottom: 20px;
}

.cta-icon i {
    font-size: 22px;
}

.overview-cta h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.overview-cta p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-btn {
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
    padding: 14px 20px;
    font-size: 14px;
    border-radius: 8px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ==================================================
   BENEFITS SECTION
================================================== */
.benefits {
    padding-bottom: 40px;
}

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

.benefit-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.benefit-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f2e8f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon i {
    color: var(--primary);
    font-size: 20px;
}

.benefit-card h4 {
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.benefit-card p {
    color: #555;
    font-size: 13.5px;
    line-height: 1.6;
}

.benefit-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(92, 29, 92, 0.12);
}

/* ==================================================
   RESPONSIVE MEDIA OVERHAUL ENGINE
================================================== */

/* --- TABLET MEDIA BREAKPOINT (LAPTOP / SMALL DESKTOP SHIFTS) --- */
@media (max-width: 1199px) {
    .container {
        padding: 0 24px;
    }

    .hero-grid {
        gap: 40px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

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

    .overview-box {
        grid-template-columns: 1fr 1fr;
    }

    .overview-image {
        display: none; /* Safely strips duplicate image plane to maximize structural columns balance */
    }

    .treat-col {
        border-right: none;
    }

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

/* --- MOBILE COMPATIBILITY ENGINE (THEMED BACKDROP SHIFT OVERLAY) --- */
@media (max-width: 991px) {
    /* 
       THE MOBILE INTERFACE UPGRADE ARCHITECTURE:
       Converts the right-pane image element into an immersive, high-contrast 
       section background layout box featuring a dark purple linear gradient overlay.
    */
    .subservice-hero {
        padding: 60px 0;
        /* background-image: linear-gradient(135deg, rgba(62, 18, 62, 0.95) 0%, rgba(74, 21, 74, 0.92) 50%, rgba(92, 29, 92, 0.88) 100%),  */
        background-image: #004D4D,
                          url('/images/services-hero.png'); /* Replace cleanly with your custom subservice banner path if needed */
        background-size: cover;
        background-position: center;
        background-attachment: scroll;
    }

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

    /* Color invert mapping enforces readable presentation over brand dark purple overlay backdrop */
    .breadcrumb a, .breadcrumb span {
        color: rgba(255, 255, 255, 0.7);
    }
    
    .breadcrumb span {
        color: #ffffff;
        font-weight: 700;
    }

    .sub-title {
        color: #ebdbe8;
    }

    .hero-content h1 {
        font-size: 34px;
        color: #ffffff;
    }

    .title-line {
        background: #ffffff;
    }

    .hero-content p {
        font-size: 16px;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 35px;
    }

    .feature-icon {
        background: rgba(255, 255, 255, 0.15);
    }

    .feature-icon i {
        color: #ffffff;
    }

    .feature h4 {
        color: #ffffff;
    }

    .hero-image {
        display: none; /* Hides standard explicit inline node frame, background translation layer takes over */
    }

    /* Overview Component Stack Restructuring */
    .overview-box {
        grid-template-columns: 1fr;
    }

    .approach-col {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

/* --- SMALL MOBILE RESPONSIVE TUNING --- */
@media (max-width: 767px) {
    .container {
        padding: 0 16px;
    }

    .subservice-hero {
        padding: 50px 0;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
    }

    .feature-icon i {
        font-size: 20px;
    }

    .section-heading h2 {
        font-size: 28px;
    }

    .treatment-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .treatment-card img {
        height: 200px;
    }

    .steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .step {
        flex: 0 0 calc(33.333% - 12px);
        min-width: 70px;
    }

    .arrow {
        transform: rotate(90deg); /* Flips horizontal process arrow tracking downward */
        margin: 4px 0;
    }

    .benefit-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 24px;
    }

    .section-heading h2 {
        font-size: 24px;
    }

    .overview-col {
        padding: 24px;
    }
}