/* /css/service-detail.css - single-service detail page */

/* Shared eyebrow */
.sd-eyebrow {
    color: var(--sovereign-gold);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 0.75rem;
}

.sd-section-head {
    margin-bottom: 3rem;
}

.sd-section-head.center {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.sd-section-head h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--deep-navy);
}

.sd-section-head.center p {
    margin-top: 1rem;
    color: #555;
    font-size: 1rem;
    line-height: 1.7;
}

/* Shared buttons */
.sd-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.75rem;
    border-radius: 50px;
    background-color: var(--sovereign-gold);
    color: var(--deep-navy);
    border: 1.5px solid var(--sovereign-gold);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.sd-btn-primary:hover {
    background-color: #d8bb63;
}

.sd-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.75rem;
    border-radius: 50px;
    background-color: transparent;
    color: var(--ivory);
    border: 1.5px solid rgba(250, 247, 242, 0.4);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.sd-btn-ghost:hover {
    background-color: rgba(250, 247, 242, 0.08);
    border-color: var(--ivory);
}

.sd-btn-ghost i,
.sd-btn-ghost svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.sd-hero {
    background-color: var(--deep-navy);
    color: var(--ivory);
    margin-top: 65px;
    padding: 5rem 4rem;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.sd-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -8%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.16) 0%, rgba(13, 27, 62, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.sd-hero-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    z-index: 1;
}

.sd-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 620px;
}

.sd-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: rgba(250, 247, 242, 0.6);
    margin-bottom: 2rem;
}

.sd-breadcrumb a {
    color: rgba(250, 247, 242, 0.6);
    transition: color 0.2s ease;
}

.sd-breadcrumb a:hover {
    color: var(--sovereign-gold);
}

.sd-breadcrumb span {
    color: var(--sovereign-gold);
}

.sd-breadcrumb i,
.sd-breadcrumb svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.sd-hero-eyebrow {
    color: var(--sovereign-gold);
    font-size: 1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.sd-hero h1 {
    color: var(--ivory);
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    position: relative;
    font-weight: 600;
}

.sd-hero h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--sovereign-gold);
}

.sd-hero-tagline {
    color: rgba(250, 247, 242, 0.8);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 500px;
}

.sd-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* Hero stats (count up on load) */
.sd-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem 2.5rem;
}

.sd-stat {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
}

.sd-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1.25rem;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.12);
}

.sd-stat-value {
    font-family: 'Inter', sans-serif;
    color: var(--sovereign-gold);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.sd-stat-label {
    color: rgba(250, 247, 242, 0.65);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   BODY (main content + sticky aside)
   ========================================================================== */
.sd-body {
    padding: 5rem 4rem;
    background-color: #ffffff;
}

.sd-body-grid {
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
}

.sd-block {
    margin-bottom: 3.5rem;
}

.sd-block:last-child {
    margin-bottom: 0;
}

.sd-block h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--deep-navy);
    margin-bottom: 1.25rem;
}

.sd-lead {
    font-size: 1rem;
    line-height: 1.5;
    color: #4a4a4a;
}

/* Rich Text Editor Content (Dynamic) */
.rtb-content {
    color: #4a4a4a;
}

.rtb-content img,
.rtb-content video,
.rtb-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: block;
}

.rtb-content h1,
.rtb-content h2,
.rtb-content h3 {
    color: var(--deep-navy);
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.rtb-content h1:first-child,
.rtb-content h2:first-child,
.rtb-content h3:first-child {
    margin-top: 0;
}

.rtb-content h1 { font-size: 2.2rem; }
.rtb-content h2 { font-size: 1.8rem; }
.rtb-content h3 { font-size: 1.4rem; }

.rtb-content p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.rtb-content p:last-child {
    margin-bottom: 0;
}

.rtb-content ul,
.rtb-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.rtb-content ol {
    list-style-type: decimal;
}

.rtb-content ul {
    list-style-type: disc;
}

.rtb-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-size: 1.05rem;
}

.rtb-content li strong {
    color: var(--deep-navy);
    font-weight: 600;
}

.rtb-content li p {
    margin: 0;
    margin-top: 0.25rem;
    font-size: 1rem;
}

/* Checklist */
.sd-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
}

.sd-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1rem;
    color: #444;
    line-height: 1.5;
}

.sd-checklist i,
.sd-checklist svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    padding: 3px;
    border-radius: 50%;
    background-color: rgba(201, 168, 76, 0.15);
    color: var(--sovereign-gold);
    stroke-width: 3;
}

/* Sticky aside (booking + good-fit cards) */
.sd-aside {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* "You may be a good fit if…" card */
.sd-fit-card {
    background: linear-gradient(160deg, var(--deep-navy) 0%, var(--midnight-navy) 100%);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 14px;
    padding: 1.75rem;
}

.sd-fit-card .sd-eyebrow {
    margin-bottom: 0.4rem;
}

.sd-fit-card h3 {
    color: var(--ivory);
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.sd-fit-card .sd-checklist {
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.sd-fit-card .sd-checklist li {
    font-size: 0.95rem;
    color: rgba(250, 247, 242, 0.85);
}

.sd-book-card {
    background: linear-gradient(160deg, var(--deep-navy) 0%, var(--midnight-navy) 100%);
    border-radius: 14px;
    padding: 2rem 1.75rem;
    color: var(--ivory);
    border: 1px solid rgba(201, 168, 76, 0.2);
}

.sd-book-card h3 {
    color: var(--ivory);
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.sd-book-card>p {
    color: rgba(250, 247, 242, 0.75);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.sd-book-facts {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sd-book-facts li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.sd-book-facts li span {
    color: rgba(250, 247, 242, 0.6);
}

.sd-book-facts li strong {
    color: var(--ivory);
    font-weight: 600;
}

.sd-book-cta {
    width: 100%;
    margin-bottom: 1rem;
}

.sd-book-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--sovereign-gold);
    font-weight: 600;
    font-size: 0.95rem;
}

.sd-book-call i,
.sd-book-call svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   PROCEDURE STEPPER
   ========================================================================== */
.sd-procedure {
    padding: 5rem 4rem;
    background-color: var(--deep-navy);
    color: var(--ivory);
}

.sd-procedure-inner {
    max-width: 1300px;
    margin: 0 auto;
}

.sd-procedure .sd-section-head {
    text-align: center;
}

.sd-procedure .sd-section-head h2 {
    color: var(--ivory);
}

.sd-procedure .sd-section-head::after {
    content: '';
    display: block;
    width: 70px;
    height: 2px;
    background-color: var(--sovereign-gold);
    margin: 1.25rem auto 0;
}

.sd-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.sd-steps-line {
    position: absolute;
    top: 28px;
    left: 10%;
    right: 10%;
    height: 1px;
    background-color: rgba(201, 168, 76, 0.4);
    z-index: 0;
}

.sd-step {
    position: relative;
    z-index: 1;
    text-align: center;
}

.sd-step-node {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--deep-navy);
    border: 1.5px solid var(--sovereign-gold);
    color: var(--sovereign-gold);
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
}

.sd-step h4 {
    color: var(--ivory);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sd-step p {
    color: rgba(250, 247, 242, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==========================================================================
   BEFORE & AFTER
   ========================================================================== */
.sd-ba {
    padding: 5rem 4rem;
    background-color: var(--ivory);
}

.sd-ba-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.sd-ba .sd-section-head {
    margin-bottom: 0;
}

.sd-ba .sd-section-head::after {
    content: '';
    display: block;
    width: 70px;
    height: 2px;
    background-color: var(--sovereign-gold);
    margin: 1.25rem auto 0;
}

/* Interactive comparison slider */
.ba-compare {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    user-select: none;
    cursor: ew-resize;
    box-shadow: none;
}

.ba-compare-img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.ba-compare-img img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* The "before" layer sits on top and is clipped by width */
.ba-compare-before {
    width: 50%;
    z-index: 2;
    border-right: 2px solid var(--sovereign-gold);
}

/* Keep the before image full-width inside the clipped layer (no squish) */
.ba-compare-before img {
    width: 100vw;
    max-width: 1000px;
}

.ba-compare-after {
    z-index: 1;
}

.ba-compare-tag {
    position: absolute;
    top: 1rem;
    z-index: 3;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ivory);
}

.ba-compare-tag.before {
    left: 1rem;
    background-color: rgba(13, 27, 62, 0.75);
}

.ba-compare-tag.after {
    right: 1rem;
    background-color: rgba(201, 168, 76, 0.9);
    color: var(--deep-navy);
}

.ba-compare-handle {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 0;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba-compare-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--sovereign-gold);
}

.ba-compare-grip {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--sovereign-gold);
    color: var(--deep-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
}

.ba-compare-grip i,
.ba-compare-grip svg {
    width: 22px;
    height: 22px;
}

.ba-compare.is-dragging {
    cursor: ew-resize;
}

/* Manual before/after slider */
.sd-ba-carousel-container {
    margin-top: 2.5rem;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    z-index: 5;
}

.sd-ba-track-wrapper {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0 1rem; /* Slight padding for the track contents so first/last aren't totally flush if not wanted, but 0 is also fine. Let's do 0 */
}

.sd-ba-track-wrapper::-webkit-scrollbar {
    display: none;
}

.sd-ba-track {
    display: flex;
    gap: 1rem;
    width: max-content;
}

.sd-ba-slide {
    position: relative;
    flex: 0 0 auto;
    width: 350px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sd-ba-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--sovereign-gold);
    color: var(--deep-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sd-ba-btn.prev {
    left: 20px;
}

.sd-ba-btn.next {
    right: 20px;
}

.sd-ba-slide img {
    width: 100%;
    aspect-ratio: 6 / 4;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
}

.sd-ba-tag {
    position: absolute;
    top: 0;
    z-index: 2;
    padding: 0.25rem 0.6rem;
    background-color: var(--sovereign-gold);
    color: var(--midnight-navy);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sd-ba-tag.before {
    left: 0;
    border-bottom-right-radius: 6px;
}

.sd-ba-tag.after {
    right: 0;
    border-bottom-left-radius: 6px;
}

@media (max-width: 768px) {
    .sd-ba-slide {
        width: 280px;
    }
    .sd-ba-btn {
        display: none;
    }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.sd-faq {
    padding: 5rem 4rem;
    background-color: var(--deep-navy);
}

.sd-faq-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 4rem;
    align-items: start;
}

.sd-faq-head h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--ivory);
    margin-bottom: 1rem;
}

.sd-faq-head p {
    color: rgba(250, 247, 242, 0.7);
    font-size: 1rem;
    line-height: 1.7;
}

/* Accordion (matches the global .faq-item JS in script.js) */
.sd-faq-list .faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sd-faq-list .faq-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sd-faq-list .faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ivory);
    padding: 1.4rem 2.5rem 1.4rem 0;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.sd-faq-list .faq-question:hover,
.sd-faq-list .faq-item.active .faq-question {
    color: var(--sovereign-gold);
}

.sd-faq-list .faq-question i,
.sd-faq-list .faq-question svg {
    position: absolute;
    right: 0;
    width: 20px;
    height: 20px;
    color: var(--sovereign-gold);
}

.sd-faq-list .faq-icon-minus {
    display: none;
}

.sd-faq-list .faq-item.active .faq-icon-minus {
    display: block;
}

.sd-faq-list .faq-item.active .faq-icon-plus {
    display: none;
}

/* Smooth expand/collapse - animate grid rows 0fr -> 1fr (like the home page) */
.sd-faq-list .faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sd-faq-list .faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

/* The single grid child must be able to collapse fully (min-height: 0) and is
   clipped while collapsed. Padding is applied only when open so the collapsed
   row truly reaches 0 - answers stay completely hidden until expanded. */
.sd-faq-list .faq-answer p {
    min-height: 0;
    overflow: hidden;
    color: rgba(250, 247, 242, 0.75);
    font-size: 0.98rem;
    line-height: 1.75;
}

.sd-faq-list .faq-item.active .faq-answer p {
    padding-bottom: 1.4rem;
}

/* ==========================================================================
   RELATED TREATMENTS
   ========================================================================== */
.sd-related {
    padding: 5rem 4rem;
    background-color: var(--ivory);
}

.sd-related-inner {
    max-width: 1300px;
    margin: 0 auto;
}

.sd-related .sd-section-head {
    text-align: center;
}

.sd-related .sd-section-head::after {
    content: '';
    display: block;
    width: 70px;
    height: 2px;
    background-color: var(--sovereign-gold);
    margin: 1.25rem auto 0;
}

.sd-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.sd-related-card {
    position: relative;
    background-color: #fff;
    border: 1px solid rgba(13, 27, 62, 0.06);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease;
}

.sd-related-card:hover {
    border-color: rgba(201, 168, 76, 0.45);
}

.sd-related-media {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.sd-related-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.sd-related-card:hover .sd-related-media img {
    transform: scale(1.05);
}

.sd-related-badge {
    position: absolute;
    top: 157px;
    /* media is 180px tall; offset by half the 46px badge so it straddles the edge */
    left: 1.25rem;
    z-index: 2;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: var(--sovereign-gold);
    color: var(--deep-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s ease;
}

.sd-related-badge i,
.sd-related-badge svg {
    width: 20px;
    height: 20px;
}

.sd-related-card:hover .sd-related-badge {
    transform: scale(1.1) rotate(-6deg);
}

.sd-related-body {
    padding: 1.75rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.sd-related-body h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--deep-navy);
}

.sd-related-body p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #666;
    flex-grow: 1;
}

.sd-related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    color: var(--sovereign-gold);
    font-size: 0.85rem;
    font-weight: 600;
}

.sd-related-link i,
.sd-related-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

.sd-related-card:hover .sd-related-link i {
    transform: translateX(3px);
}

/* ==========================================================================
   CLOSING CTA
   ========================================================================== */
.sd-cta {
    padding: 5rem 4rem;
    background-color: #fff;
}

.sd-cta-inner {
    margin: 0 auto;
    background: linear-gradient(135deg, var(--deep-navy) 0%, var(--midnight-navy) 100%);
    border-radius: 16px;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sd-cta-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.18) 0%, rgba(13, 27, 62, 0) 70%);
    border-radius: 50%;
}

.sd-cta-inner>* {
    position: relative;
    z-index: 1;
}

.sd-cta h2 {
    color: var(--ivory);
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.sd-cta p {
    color: rgba(250, 247, 242, 0.8);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 2rem;
}

.sd-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.sd-eyebrow.gold {
    color: var(--sovereign-gold);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .sd-body-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sd-aside {
        position: static;
        max-width: 480px;
    }

    .sd-faq-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .sd-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sd-hero {
        flex-direction: column-reverse;
        padding: 4rem 2rem 0;
        min-height: auto;
    }

    .sd-hero-container {
        max-width: 100%;
        padding-bottom: 3rem;
    }

    .sd-hero-image {
        position: relative;
        width: 100%;
        height: 260px;
    }

    .sd-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1.5rem;
    }

    .sd-steps-line {
        display: none;
    }
}

@media (max-width: 768px) {

    .sd-hero,
    .sd-body,
    .sd-procedure,
    .sd-ba,
    .sd-faq,
    .sd-related,
    .sd-cta {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .sd-hero {
        padding-top: 3rem;
    }

    .sd-benefit-grid,
    .sd-checklist,
    .sd-ba-grid,
    .sd-related-grid {
        grid-template-columns: 1fr;
    }

    /* Vertical timeline: number on the left, content on the right,
       with a connecting line running between the number circles. */
    .sd-steps {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .sd-step {
        display: grid;
        grid-template-columns: 56px 1fr;
        column-gap: 1.25rem;
        text-align: left;
        margin-bottom: 2.5rem;
    }

    .sd-step:last-child {
        margin-bottom: 0;
    }

    .sd-step-node {
        grid-row: 1 / span 2;
        align-self: start;
        margin: 0;
    }

    .sd-step h4 {
        grid-column: 2;
        align-self: center;
        margin-bottom: 0.35rem;
    }

    .sd-step p {
        grid-column: 2;
    }

    /* Connecting line from this node down to the next one */
    .sd-step:not(:last-child)::before {
        content: '';
        position: absolute;
        left: 27px;
        top: 56px;
        bottom: -2.5rem;
        width: 1px;
        background-color: rgba(201, 168, 76, 0.4);
    }

    .ba-compare {
        aspect-ratio: 3 / 4;
    }

    .sd-cta-inner {
        padding: 3rem 1.5rem;
    }

    .sd-hero h1 {
        font-size: 2.2rem !important;
    }

    .sd-section-head h2,
    .sd-block h2,
    .sd-faq-head h2,
    .sd-cta h2 {
        font-size: 1.8rem !important;
    }
}

@media (max-width: 480px) {
    .sd-hero-actions {
        flex-direction: column;
    }

    .sd-hero-actions .sd-btn-primary,
    .sd-hero-actions .sd-btn-ghost {
        width: 100%;
    }
}

/* ==========================================================================
   CUSTOM IMAGE CAROUSEL
   ========================================================================== */
.sd-custom-gallery {
    margin-top: 2rem;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background-color: var(--midnight-navy);
}

.sd-gallery-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.sd-gallery-track img {
    width: 100%;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.sd-gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--deep-navy);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sd-gallery-btn:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.05);
}

.sd-gallery-btn.prev {
    left: 1rem;
}

.sd-gallery-btn.next {
    right: 1rem;
}

.sd-gallery-btn i,
.sd-gallery-btn svg {
    width: 20px;
    height: 20px;
}

.sd-gallery-dots {
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 2;
}

.sd-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sd-gallery-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}