/* ===================================
   SERVICES PAGE - PREMIUM REDESIGN
   =================================== */

/* Hero Section */
.services-page-hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 120px; /* match taller global header */
    padding-top: 3rem;
}

.services-page-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.services-page-hero .hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.services-page-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: none;
    z-index: 2;
}

.services-page-hero .container {
    position: relative;
    z-index: 3;
}

.services-page-hero .page-header-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 2.25rem 1.5rem 2.75rem;
}

.services-page-hero .page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    color: #FFF1EF;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.services-page-hero .page-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: #FFF1EF;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* TOC in hero */
.hero-toc { margin-top: 1.25rem; display:flex; flex-wrap: wrap; gap: .625rem; justify-content: center; }
.hero-toc .toc-btn { background: rgba(255,255,255,.9); color: var(--deep-sage); border: 2px solid rgba(255,255,255,.7); padding: .5rem 1rem; border-radius: 999px; font-weight: 700; text-decoration: none; backdrop-filter: blur(6px); }
.hero-toc .toc-btn:hover { background: #fff; border-color: #fff; transform: translateY(-2px); }

/* Services Main Section */
.services-main {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #F7F3EF 0%, #ffffff 50%, #F7F3EF 100%);
    overflow-x: hidden; /* guard against accidental horizontal scroll */
}

/* Services Intro */
/* Services Grid (vertical stack) */
.services-grid { max-width: 1200px; margin: 0 auto 4rem; display: grid; gap: 3.5rem; grid-template-columns: 1fr; margin-top: 2rem; }
.services-main .services-grid { grid-template-columns: 1fr; }

/* Clean Panel */
.service-panel { background: #fff; border-radius: 20px; box-shadow: 0 8px 28px rgba(59,95,86,.1); overflow: hidden; }
.service-panel .panel-inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; gap: 0; }
.service-panel.reverse .panel-inner { grid-template-columns: 1fr 1.1fr; }

.panel-media { position: relative; margin: 0; overflow:hidden; border-radius: 20px 0 0 20px; }
.service-panel.reverse .panel-media { border-radius: 0 20px 20px 0; }
.panel-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.service-panel:hover .panel-media img { transform: scale(1.04); }
.media-more {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(59,95,86,.9);
    color: #fff;
    padding: .75rem 1.1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    min-height: 44px; /* better tap target */
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    border: 2px solid rgba(255,255,255,.85);
    max-width: calc(100% - 2rem);
    white-space: normal; /* allow wrapping on small screens */
    overflow-wrap: anywhere;
    text-align: center;
    font-family: 'Arapey', serif;
}
.media-more:active { transform: translateY(1px); }

.panel-content { background: #F5F0EB; padding: 2.25rem; display: flex; flex-direction: column; border-radius: 0 20px 20px 0; }
.service-panel.reverse .panel-content { border-radius: 20px 0 0 20px; }
.panel-header { display:flex; flex-direction: column; align-items: center; gap: .75rem; }
.chips { display:flex; gap:.5rem; align-items:center; justify-content: center; }
.chip { display:inline-flex; align-items:center; padding:.45rem 1.1rem; border-radius:999px; font-weight:700; font-size:.95rem; box-shadow:0 2px 8px rgba(0,0,0,.08); }
.chip.duration { background:#fff; color:var(--deep-sage); border:2px solid rgba(59,95,86,.2); font-weight:600; }
.chip.price { background:var(--gold-accent); color:#fff; border:2px solid var(--gold-accent); }
.title-row { display:flex; align-items:center; gap:1rem; width:100%; justify-content:center; padding: 1rem 0; }
.title-row .title-line { height:1px; background:var(--deep-sage); width:96px; flex-shrink:0; }
.title { margin:0; color: var(--deep-sage); font-size: 2rem; line-height:1.15; text-align:center; padding: .25rem 0 0.5rem; }
.panel-sep { display: none; }
.summary { color:#5a5a5a; line-height:1.7; font-size:1.05rem; text-align:center; margin: 0 0 1.25rem; }
.benefits { 
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
    margin: 0 auto 1.5rem; /* center block */
    list-style: none; /* remove default bullets */
    padding-left: 0;  /* remove left indent */
}
.benefit {
    background: #fff;
    border-left: 4px solid var(--gold-accent);
    border-radius: 12px;
    padding: .85rem 1rem;
    color: #2b2b2b;
}
.cta-row { display:flex; gap:.75rem; flex-wrap:wrap; justify-content: center; }

/* Panel Overlay */
.panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; padding: 2rem; z-index: 3000; }
.panel-overlay.open { display: flex; }
.overlay-card { background: #fff; border-radius: 16px; max-width: 780px; width: 100%; padding: 2rem; box-shadow: 0 12px 40px rgba(0,0,0,.3); position: relative; max-height: 90vh; overflow: auto; -webkit-overflow-scrolling: touch; }
.overlay-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--deep-sage); color: #fff; font-size: 1.25rem; display: grid; place-items: center; cursor: pointer; }
.overlay-title { margin: 0 0 1rem; color: var(--deep-sage); font-size: 1.5rem; }
.overlay-body p { color: #444; line-height: 1.7; margin-bottom: 1rem; }
.overlay-benefits h5 { color: var(--deep-sage); margin: 1rem 0 .75rem; font-size: 1.35rem; font-weight: 700; letter-spacing: .01em; }
.overlay-benefits ul { margin: 0; padding-left: 0; list-style: none; }
.overlay-benefits li { position: relative; margin-bottom: .5rem; padding-left: 2rem; }
.overlay-benefits li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .3rem;
    width: 16px;
    height: 16px;
    background-image: url('../assets/images/logo_dark_bullet.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.9;
}

@media (max-width: 1024px) {
  .service-panel .panel-inner, .service-panel.reverse .panel-inner { grid-template-columns: 1fr; }
  .panel-media { max-height: 340px; }
    .title { font-size: 1.75rem; padding: .25rem 0 .5rem; }
}

.service-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.service-separator-line {
    height: 1px;
    background: var(--deep-sage);
    width: 100%;
    max-width: 520px;
    margin: 1.25rem 0 1.25rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    color: var(--deep-sage);
    padding: 0.5rem 1.125rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.meta-chip.duration {
    border: 2px solid rgba(59, 95, 86, 0.2);
}

.meta-chip.price {
    background: var(--gold-accent);
    color: #ffffff;
    border: 2px solid var(--gold-accent);
    font-weight: 700;
    font-size: 1rem;
}

.service-summary {
    font-size: 1.05rem;
    color: #5a5a5a;
    line-height: 1.7;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

/* Service Image Section */

/* Benefits Inline */
.benefits-inline { display: none !important; }

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #333;
    line-height: 1.7;
    padding: 1.25rem 1.75rem;
    padding-left: 2rem;
    border-left: 4px solid var(--gold-accent);
    background: #fafafa;
    border-radius: 50px;
}

.benefit-item:last-child {
    margin-bottom: 0;
}

/* Service Tags */
.service-tags {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.tags-title {
    font-size: 0.75rem;
    color: var(--deep-sage);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.helps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.helps-list li {
    background: transparent;
    color: #5a5a5a;
    padding: 0;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 400;
    border: none;
    line-height: 1.6;
    transition: all 0.2s ease;
}

.helps-list li:hover {
    color: var(--deep-sage);
    transform: translateX(4px);
}

/* Service Actions (Buttons) */
.service-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
}

.service-actions .btn {
    width: 100%;
    padding: 1rem 2rem;
    text-align: center;
    font-size: 1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.service-actions .btn-primary {
    background: var(--deep-sage);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(59, 95, 86, 0.25);
    border: 2px solid var(--deep-sage);
}

.service-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 95, 86, 0.35);
    background: #2E4A43;
}

.service-actions .btn-outline {
    background: #ffffff;
    border: 2px solid var(--deep-sage);
    color: var(--deep-sage);
}

.service-actions .btn-outline:hover {
    background: var(--deep-sage);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Services CTA */
.services-cta {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(59, 95, 86, 0.1);
    border: 2px solid #A8C0B0;
}

.services-cta h3 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: #3B5F56;
    margin-bottom: 1rem;
}

.services-cta p {
    font-size: 1.125rem;
    color: #5a5a5a;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.services-cta .btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 968px) {
    .service-card,
    .service-card:nth-child(even) {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .service-image {
        height: 320px;
        min-height: 320px;
        order: 0 !important;
    }
    
    .service-content {
        order: 1 !important;
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 1200px) {
    .service-card {
        grid-template-columns: 1fr;
        direction: ltr !important;
        min-height: auto;
    }
    
    .service-card:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .service-image {
        min-height: 400px;
        order: -1;
    }
    
    .service-content {
        margin: 1.5rem;
    }
}

@media (max-width: 768px) {
    .services-page-hero {
        min-height: 45vh;
        margin-top: 64px;
    }
    
    .services-main {
        padding: 3rem 0;
    }
    
    .services-intro,
    .services-toc {
        margin-bottom: 2.5rem;
    }
    
    .services-grid {
        gap: 3rem;
        margin-bottom: 3rem;
    }
    
    .panel-content { align-items: center; text-align: center; }
    /* Remove margins on grid children to avoid horizontal overflow */
    .service-content { padding: 1.75rem 1rem; margin: 0; }
    .benefit { text-align: left; } /* keep readability for list items */
    
    .service-image { min-height: 350px; margin: 0; }
    
    .title { font-size: 1.6rem; word-break: break-word; }
    .title-row .title-line { width: 64px; }
    .summary { padding: 0 .25rem; }
    
    .service-meta {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .service-separator-line {
        max-width: 100%;
    }
    
    .services-cta {
        padding: 2rem 1.5rem;
    }
    
    .services-cta .btn-group {
        flex-direction: column;
    }
    
    .overlay-card { padding: 1.5rem; margin: 0 0.5rem; }
    
    /* Center CTA buttons and constrain width */
    .cta-row { justify-content: center; }
    .cta-row .btn { width: 100%; max-width: 320px; }
}

@media (max-width: 480px) {
    .services-toc {
        flex-direction: column;
    }
    
    .services-toc .toc-btn {
        width: 100%;
        text-align: center;
    }
    
    .service-meta {
        flex-wrap: wrap;
        gap: 0.625rem;
    }
    
    .service-image { min-height: 280px; }
    
    .service-content { padding: 1.5rem 1rem; margin: 0; }
    .title { font-size: 1.45rem; }
    .title-row .title-line { width: 48px; }
    
    .benefits-inline,
    .service-tags {
        padding: 1.5rem 1.25rem;
    }
    
    .benefit-item {
        padding: 1rem 1.25rem;
        padding-left: 1.5rem;
        font-size: 0.95rem;
    }
    .media-more {
        bottom: .75rem;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        padding: .7rem 1rem;
        font-size: .95rem;
        max-width: calc(100% - 1.5rem);
    }
    .overlay-card { padding: 1.25rem; margin: 0 .5rem; }
}
