/* ==========================================================================
   Family First Guidance — Family Counselling service page
   Same approach as home-serene.css: everything is scoped under .svc so the
   shared header (navbar.php) and footer (footer.php) styles in style.css
   are completely untouched.
   ========================================================================== */

.svc{
    /* Design tokens (shared with the Serene Guidance System) */
    --svc-teal: #2BB1A4;
    --svc-teal-dark: #006a62;
    --svc-coral: #FF756B;
    --svc-cream: #F9F7F2;
    --svc-sage: #E9EDE9;
    --svc-charcoal: #2D3131;
    --svc-ink: #181c1c;
    --svc-muted: #5e5e5b;
    --svc-outline: #bcc9c6;
    --svc-white: #FFFFFF;
    --svc-surface: #f7faf9;
    --svc-shadow: 0px 10px 30px rgba(45, 49, 49, 0.05);
    --svc-shadow-soft: 0px 10px 30px rgba(45, 49, 49, 0.02);
    --svc-serif: 'Libre Caslon Text', Georgia, serif;
    --svc-sans: 'Inter', 'Poppins', sans-serif;

    background-color: var(--svc-surface);
    color: var(--svc-charcoal);
    display: block;
    overflow-x: hidden;
}

/* Neutralise the global * { font-family / text-transform } rules from
   style.css inside this page's content only. */
.svc,
.svc *{
    font-family: var(--svc-sans);
    text-transform: none;
    box-sizing: border-box;
}

/* The rule above must not clobber Font Awesome's icon font, or every icon
   inside .svc renders as an empty square. */
.svc i[class^="fa-"],
.svc i[class*=" fa-"],
.svc i.fa,
.svc i.fas,
.svc i.fa-solid{
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
}

/* --------------------------------------------------------------------------
   Shared layout helpers
   -------------------------------------------------------------------------- */

.svc .svc-container{
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.svc .svc-h2{
    font-family: var(--svc-serif);
    font-size: 30px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--svc-teal);
}

/* --------------------------------------------------------------------------
   Hero banner
   -------------------------------------------------------------------------- */

.svc .svc-hero{
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svc .svc-hero-img{
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

/* Centre-weighted scrim keeps the headline legible over a bright photo */
.svc .svc-hero-scrim{
    position: absolute;
    inset: 0;
    /* Tight pool of shade behind the headline only — the rest of the photo
       stays essentially untouched. */
    background-color: rgba(0, 0, 0, 0.05);
    background-image: radial-gradient(ellipse 62% 58% at center,
                        rgba(0, 0, 0, 0.5) 0%,
                        rgba(0, 0, 0, 0.34) 45%,
                        rgba(0, 0, 0, 0.1) 78%,
                        rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.svc .svc-hero-content{
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.svc .svc-hero-title{
    font-family: var(--svc-serif);
    font-size: 30px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--svc-white);
    opacity: 0.9;
    max-width: 56rem;
    margin: 0 auto;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.85), 0 4px 20px rgba(0, 0, 0, 0.65);
}

/* --------------------------------------------------------------------------
   Carousel + FAQ
   -------------------------------------------------------------------------- */

.svc .svc-split{
    padding-top: 32px;
    padding-bottom: 32px;
}

.svc .svc-split-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

/* Carousel — auto-rotating, no manual controls */
.svc .svc-carousel{
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: var(--svc-cream);
    box-shadow: var(--svc-shadow-soft);
}

/* Carousel variant for pages whose photography is portrait. A square frame
   keeps far more of a tall image than the default landscape one, without
   towering over the FAQ column beside it. The double class beats the
   aspect-ratio set in the tablet media query below. */
.svc .svc-carousel.svc-carousel--portrait{
    aspect-ratio: 4 / 5;
}

.svc .svc-carousel--portrait .svc-slide{
    background-position: center 40%;
}

.svc .svc-slide{
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.svc .svc-slide.is-active{
    opacity: 1;
}

/* FAQ accordion */
.svc .svc-faq{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.svc .svc-faq-head{
    margin-bottom: 12px;
}

.svc .svc-faq-item{
    border: 1px solid var(--svc-outline);
    border-radius: 0.5rem;
    background-color: var(--svc-white);
    overflow: hidden;
    box-shadow: var(--svc-shadow-soft);
}

.svc .svc-faq-toggle{
    width: 100%;
    text-align: left;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background-color: var(--svc-white);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.svc .svc-faq-toggle:hover{
    background-color: var(--svc-cream);
}

.svc .svc-faq-toggle span{
    font-size: 18px;
    line-height: 1.6;
    font-weight: 600;
    color: var(--svc-charcoal);
}

.svc .svc-faq-toggle i{
    color: var(--svc-teal);
    font-size: 1rem;
    flex: 0 0 auto;
    transition: transform 0.3s ease;
}

.svc .svc-faq-toggle i.is-open{
    transform: rotate(180deg);
}

.svc .svc-faq-content{
    padding: 8px 24px 18px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--svc-muted);
}

.svc .svc-faq-content.is-hidden{
    display: none;
}

/* --------------------------------------------------------------------------
   Specialized support cards
   -------------------------------------------------------------------------- */

.svc .svc-services{
    background-color: var(--svc-cream);
    border-radius: 0.75rem;
    padding: 32px 20px;
    margin: 32px auto;
}

.svc .svc-services-head{
    text-align: center;
    margin-bottom: 24px;
}

.svc .svc-cards{
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.svc .svc-card{
    background-color: var(--svc-white);
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(188, 201, 198, 0.3);
    box-shadow: var(--svc-shadow);
    transition: box-shadow 0.3s, transform 0.3s;
}

.svc .svc-card:hover{
    box-shadow: 0px 15px 40px rgba(45, 49, 49, 0.08);
    transform: translateY(-0.25rem);
}

.svc .svc-card-media{
    width: 100%;
    height: 13rem;
    overflow: hidden;
    background-color: var(--svc-sage);
}

/* Portrait photography needs an upright frame; the default landscape panel
   would crop a tall image down to a narrow band. Scoped to the grid that
   opts in, so the other service pages are unaffected. */
.svc .svc-cards--portrait .svc-card-media{
    height: auto;
    aspect-ratio: 4 / 5;
}

.svc .svc-card-media img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.svc .svc-card:hover .svc-card-media img{
    transform: scale(1.04);
}

/* Text-only card: used where a service has many sub-services and no
   dedicated photography of its own. A teal rule replaces the photo. */
.svc .svc-card--text{
    border-top: 4px solid var(--svc-teal);
}

.svc .svc-card-body{
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.svc .svc-card-body h3{
    font-family: var(--svc-serif);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--svc-charcoal);
}

.svc .svc-card-body p{
    font-size: 17px;
    line-height: 1.7;
    color: var(--svc-muted);
    flex-grow: 1;
}

/* --------------------------------------------------------------------------
   Conversion / CTA
   -------------------------------------------------------------------------- */

.svc .svc-cta{
    padding: 48px 20px;
    text-align: center;
}

.svc .svc-cta-inner{
    max-width: 42rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.svc .svc-cta p{
    font-size: 20px;
    line-height: 1.7;
    color: var(--svc-muted);
}

.svc .svc-btn{
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--svc-teal);
    color: var(--svc-white);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 20px 48px;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(43, 177, 164, 0.35);
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.svc .svc-btn:hover{
    background-color: var(--svc-teal-dark);
    color: var(--svc-white);
    transform: translateY(-0.25rem);
    box-shadow: 0 14px 32px rgba(43, 177, 164, 0.4);
}

.svc .svc-btn i{
    font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
   Tablet and up
   -------------------------------------------------------------------------- */

@media (min-width: 768px){

    .svc .svc-container,
    .svc .svc-hero-content,
    .svc .svc-services{
        padding-left: 24px;
        padding-right: 24px;
    }

    .svc .svc-hero{
        height: 650px;
    }

    .svc .svc-hero-title{
        font-size: 48px;
        line-height: 1.2;
        letter-spacing: -0.02em;
        font-weight: 700;
    }

    .svc .svc-h2{
        font-size: 32px;
        line-height: 1.35;
    }

    .svc .svc-split-grid{
        grid-template-columns: repeat(2, 1fr);
        gap: 80px;
    }

    /* Portrait photography reads better in a narrow column: the image fills
       it at roughly its native width, and the FAQ takes the space freed up.
       Browsers without :has() simply keep the equal columns above. */
    .svc .svc-split-grid:has(.svc-carousel--portrait){
        grid-template-columns: 360px 1fr;
        gap: 48px;
    }

    .svc .svc-carousel{
        aspect-ratio: 4 / 3;
    }

    .svc .svc-cards{
        grid-template-columns: repeat(2, 1fr);
    }

    .svc .svc-card-media{
        height: 15rem;
    }

    .svc .svc-cta h2{
        font-size: 48px;
        line-height: 1.2;
        letter-spacing: -0.02em;
        font-weight: 700;
    }
}

/* --------------------------------------------------------------------------
   Desktop
   -------------------------------------------------------------------------- */

/* The card band is allowed to run wider than the reading column: at 1200px
   four cards were only ~270px each, which left them looking pinched. */
@media (min-width: 1200px){

    .svc .svc-container#services{
        max-width: 1440px;
    }
}

@media (min-width: 1024px){

    /* Four across on desktop. Type is dialled back from the tablet sizes
       because each card is only about a quarter of the container wide. */
    .svc .svc-cards{
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    .svc .svc-card-media{
        height: 12rem;
    }

    .svc .svc-card-body{
        padding: 24px;
        gap: 14px;
    }

    .svc .svc-card-body h3{
        font-size: 21px;
        line-height: 1.3;
    }

    .svc .svc-card-body p{
        font-size: 16px;
        line-height: 1.65;
    }
}
