/* ==========================================================================
   SERVICE PAGE STYLES (Halaman Layanan Djannatin)
   ========================================================================== */

:root {
    --color-primary: #A4271E;
    --color-primary-hover: #8B1F17;
    --color-bg-light: #F8FAFC;
    --color-text-dark: #333333;
    --color-text-muted: #666666;
    --color-divider: #252525;
    --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
}

.layanan-page {
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    font-family: var(--font-inter);
    width: 100%;
    overflow-x: hidden;
}

.layanan-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --------------------------------------------------------------------------
   1. HERO SECTION (Standardized to match tentang-kami.css)
   -------------------------------------------------------------------------- */
.layanan-header {
    width: 100%;
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: #F8FAFC;
}

.layanan-header-title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 36px;
}

.layanan-header-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 36px;
    line-height: 44px;
    color: #333333;
    margin: 0;
}

.layanan-header-line {
    flex: 1;
    height: 1px;
    background: #252525;
    display: block;
    min-width: 0;
}

.layanan-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    background-color: var(--color-primary);
    color: #FFFFFF;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.layanan-btn-action:hover {
    background-color: var(--color-primary-hover);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(164, 39, 30, 0.2);
}

.layanan-btn-action svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.layanan-btn-action:hover svg {
    transform: translateY(2px);
}

.layanan-header-banner {
    width: 100%;
    height: 380px;
    overflow: hidden;
    flex-shrink: 0;
}

.layanan-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* --------------------------------------------------------------------------
   2. MAIN SECTION (CATEGORIES OR CARDS)
   -------------------------------------------------------------------------- */
.layanan-main-section {
    padding: 80px 0;
    width: 100%;
}

.layanan-section-categories {
    background-color: #F8FAFC;
    background-image: url('/img/background/bg-kategori-produk.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.layanan-section-cards {
    background-color: #F8FAFC;
    background-image: url('/img/background/bg-jasa-kami-sediakan.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.layanan-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 40px;
}

.layanan-section-title-wrap {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.layanan-section-title {
    flex: 0 0 35%;
    font-size: 32px;
    font-weight: 600;
    line-height: 44px;
    color: var(--color-text-dark);
    margin: 0;
}

.layanan-section-desc {
    flex: 1;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: var(--color-text-dark);
    margin: 0;
}

/* TYPE A: PRODUCT CATEGORIES GRID */
.layanan-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 32px;
}

.layanan-category-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-dark);
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.layanan-category-item:hover {
    color: var(--color-primary);
    transform: translateX(4px);
}

.layanan-category-item.active {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: 500;
}

.layanan-category-icon {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

/* TYPE B: SERVICE CARDS GRID */
.layanan-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

/* Handling data ganjil: jika card terakhir ganjil, buat span 2 kolom (1 kolom full) */
.layanan-cards-grid .layanan-card-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.layanan-card-item {
    position: relative;
    height: 350px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
}

.layanan-card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.layanan-card-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.layanan-card-item:hover .layanan-card-bg {
    transform: scale(1.05);
}

.layanan-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    color: #FFFFFF;
    transition: background 0.3s ease;
}

.layanan-card-item:hover .layanan-card-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.95) 100%);
}

.layanan-card-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 30px;
    color: #FFFFFF;
    margin: 0;
    transition: transform 0.3s ease;
}

.layanan-card-desc {
    font-size: 14px;
    line-height: 22px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    opacity: 0;
    max-height: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, max-height 0.3s ease, transform 0.3s ease, margin 0.3s ease;
}

.layanan-card-item:hover .layanan-card-desc {
    opacity: 1;
    max-height: 100px;
    transform: translateY(0);
    margin-top: 8px;
}



/* --------------------------------------------------------------------------
   3. LOCATION & GOOGLE MAPS SECTION
   -------------------------------------------------------------------------- */
.layanan-location-section {
    padding: 80px 0;
    width: 100%;
    background-color: #F2F4F7;
    background-image: url('/img/background/bg-lokasi-kami.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.layanan-location-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

/* Div Wrapper Spec: width: 560; height: 240; opacity: 1; responsive */
.layanan-map-embed-wrapper {
    width: 100%;
    max-width: 560px;
    height: 240px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background-color: #E2E8F0;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.layanan-map-embed-wrapper iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 240px !important;
    border: 0 !important;
    display: block;
}

.layanan-location-info {
    flex: 1;
}

.layanan-location-title {
    font-size: 28px;
    font-weight: 600;
    line-height: 36px;
    color: var(--color-text-dark);
    margin: 0 0 12px 0;
}

.layanan-location-address {
    font-size: 16px;
    line-height: 26px;
    color: var(--color-text-muted);
    margin: 0 0 24px 0;
}

/* --------------------------------------------------------------------------
   4. DOCUMENTATION SECTION
   -------------------------------------------------------------------------- */
.layanan-doc-section {
    padding: 60px 0 80px;
}

.layanan-doc-header {
    text-align: center;
    margin-bottom: 48px;
}

.layanan-doc-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 40px;
    color: var(--color-text-dark);
    margin: 0;
}

.layanan-doc-carousel-wrap {
    position: relative;
}

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

.layanan-doc-card {
    position: relative;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.layanan-doc-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.layanan-doc-card:hover img {
    transform: scale(1.05);
}

.layanan-doc-caption {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   5. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

/* MAC & LAPTOP (1025px - 1440px) */
@media (max-width: 1440px) {
    .layanan-container {
        max-width: 1140px;
    }
}

/* TABLET (768px - 1024px) */
@media (max-width: 1024px) {
    .layanan-header {
        padding-top: 70px;
        gap: 32px;
    }

    .layanan-hero-title {
        font-size: 28px;
    }

    .layanan-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .layanan-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .layanan-location-card {
        flex-direction: column;
        align-items: stretch;
        padding: 28px;
    }

    .layanan-map-embed-wrapper {
        max-width: 100%;
    }

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

/* MOBILE (< 767px) */
@media (max-width: 767px) {
    .layanan-header {
        padding-top: 60px;
        gap: 24px;
    }

    .layanan-header-title-row {
        flex-wrap: wrap;
        gap: 16px;
    }

    .layanan-header-title {
        font-size: 28px;
        line-height: 36px;
    }

    .layanan-header-line {
        display: none;
    }

    .layanan-btn-action {
        width: 100%;
        justify-content: center;
    }

    .layanan-header-banner {
        height: 240px;
    }

    .layanan-main-section {
        padding: 48px 0;
    }

    .layanan-section-header {
        flex-direction: column;
        gap: 16px;
    }

    .layanan-section-title {
        font-size: 24px;
        line-height: 32px;
    }

    .layanan-section-desc {
        font-size: 15px;
        line-height: 24px;
    }

    .layanan-categories-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

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

    .layanan-card-item {
        height: 240px;
    }

    .layanan-location-card {
        padding: 20px;
        gap: 20px;
    }

    .layanan-map-embed-wrapper {
        height: 200px;
    }

    .layanan-doc-title {
        font-size: 24px;
        line-height: 32px;
    }

    .layanan-doc-grid {
        grid-template-columns: 1fr;
    }
}