/* ===== LAYANAN ARCHIVE PAGE STYLES ===== */
.rsp-layanan-archive-section {
    padding: 0 0 2rem 0;
    background: #f8fafc;
    min-height: 100vh;
}

.rsp-layanan-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Page Header */
.rsp-page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a755f 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rsp-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,50 1000,100 0,100"/></svg>') bottom center/cover no-repeat;
}

.rsp-page-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.rsp-page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: white;
}

.rsp-page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Layanan Stats */
.rsp-layanan-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.rsp-stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    transition: transform 0.3s ease;
}

.rsp-stat-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.rsp-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
    color: white;
}

.rsp-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== MODERN LAYANAN GRID ===== */
.rsp-layanan-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Modern Layanan Card */
.rsp-layanan-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
    position: relative;
}

.rsp-layanan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Layanan Image */
.rsp-layanan-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-primary-soft);
}

.rsp-layanan-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.rsp-layanan-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.rsp-layanan-card:hover .rsp-layanan-img {
    transform: scale(1.05);
}

/* Overlay */
.rsp-layanan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 1;
}

.rsp-layanan-image-count {
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.rsp-layanan-image-placeholder {
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary-soft), #f8fafc);
    display: grid;
    place-items: center;
    color: var(--color-primary);
}

/* Layanan Categories */
.rsp-layanan-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.rsp-layanan-category {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(31, 138, 112, 0.2);
}

.rsp-layanan-category-more {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
}

/* Layanan Info */
.rsp-layanan-info {
    padding: 1.5rem;
}

.rsp-layanan-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rsp-layanan-excerpt {
    color: var(--color-text-light);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rsp-layanan-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-primary);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
    text-align: center;
    background: transparent;
}

.rsp-layanan-link:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(31, 138, 112, 0.3);
}

.rsp-layanan-link svg {
    transition: transform 0.2s ease;
}

.rsp-layanan-link:hover svg {
    transform: translateX(2px);
}

/* ===== PAGINATION STYLES ===== */
.rsp-pagination {
    margin-top: 3rem;
    text-align: center;
}

.rsp-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.rsp-pagination li {
    margin: 0;
}

.rsp-pagination a,
.rsp-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.rsp-pagination a {
    color: var(--color-text);
    background: white;
}

.rsp-pagination a:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.rsp-pagination .current {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ===== NO LAYANAN MESSAGE ===== */
.rsp-no-layanan-message {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
    max-width: 500px;
    margin: 2rem auto;
}

.rsp-no-layanan-message h3 {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.rsp-no-layanan-message p {
    color: var(--color-text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ===== RESPONSIVE GRID LAYOUT ===== */

/* Mobile First */
.rsp-layanan-grid {
    grid-template-columns: 1fr;
}

/* Tablet */
@media (min-width: 640px) {
    .rsp-layanan-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 768px) {
    .rsp-layanan-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .rsp-page-header h1 {
        font-size: 3.5rem;
    }
}

/* Large Desktop */
@media (min-width: 1024px) {
    .rsp-layanan-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .rsp-page-header {
        padding: 3rem 0;
    }
    
    .rsp-page-header h1 {
        font-size: 2.5rem;
    }
    
    .rsp-page-header p {
        font-size: 1.125rem;
    }
    
    .rsp-layanan-stats {
        gap: 1rem;
    }
    
    .rsp-stat-item {
        min-width: 100px;
        padding: 1rem 0.5rem;
    }
    
    .rsp-stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .rsp-page-header h1 {
        font-size: 2rem;
    }
    
    .rsp-page-header p {
        font-size: 1rem;
    }
    
    .rsp-layanan-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .rsp-stat-item {
        width: 100%;
        max-width: 200px;
    }
    
    .rsp-layanan-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Animation untuk cards */
@keyframes rsp-card-entrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rsp-layanan-card {
    animation: rsp-card-entrance 0.6s ease-out;
}

/* Staggered animation */
.rsp-layanan-card:nth-child(1) { animation-delay: 0.1s; }
.rsp-layanan-card:nth-child(2) { animation-delay: 0.2s; }
.rsp-layanan-card:nth-child(3) { animation-delay: 0.3s; }
.rsp-layanan-card:nth-child(4) { animation-delay: 0.4s; }
.rsp-layanan-card:nth-child(5) { animation-delay: 0.5s; }
.rsp-layanan-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== SINGLE LAYANAN STYLES ===== */
.rsp-single-layanan-section {
    padding: 2rem 0;
    background: #f8fafc;
}

.rsp-single-layanan-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Breadcrumb */
.rsp-layanan-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.rsp-layanan-breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.rsp-layanan-breadcrumb a:hover {
    text-decoration: underline;
    color: #1a755f;
}

.rsp-breadcrumb-separator {
    color: var(--color-border);
}

.rsp-current-page {
    color: var(--color-text);
    font-weight: 500;
}

/* Layanan Header */
.rsp-layanan-header {
    margin-bottom: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
}

.rsp-layanan-categories-single {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rsp-layanan-category-single {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--color-primary);
}

.rsp-layanan-title-single {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* Layanan Content */
.rsp-layanan-content {
    margin-bottom: 4rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
}

.rsp-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.rsp-content-wrapper h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-primary-soft);
    padding-bottom: 0.5rem;
}

.rsp-content-wrapper h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.rsp-content-wrapper p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.rsp-content-wrapper ul,
.rsp-content-wrapper ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.rsp-content-wrapper li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--color-text);
}

.rsp-content-wrapper strong {
    color: var(--color-primary);
}

/* Related Layanan Styles */
.rsp-related-layanan {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
    background: #f8fafc;
    margin-top: 2rem;
}

.rsp-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2rem;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.rsp-section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.rsp-section-header p {
    color: var(--color-text-light);
    font-size: 1.125rem;
}

.rsp-related-layanan-grid {
    display: grid;
    gap: 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.rsp-related-layanan-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rsp-related-layanan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.rsp-related-layanan-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-primary-soft);
}

.rsp-related-image-container {
    width: 100%;
    height: 100%;
}

.rsp-related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.rsp-related-layanan-card:hover .rsp-related-image {
    transform: scale(1.05);
}

.rsp-related-image-placeholder {
    height: 100%;
    background: linear-gradient(45deg, var(--color-primary-soft), #f8fafc);
    display: grid;
    place-items: center;
    color: var(--color-primary);
}

.rsp-related-layanan-info {
    padding: 1.25rem;
}

.rsp-related-layanan-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.rsp-related-layanan-excerpt {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.rsp-related-layanan-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-primary);
    border-radius: 0.5rem;
}

.rsp-related-layanan-link:hover {
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(31, 138, 112, 0.3);
}

.rsp-related-layanan-link svg {
    transition: transform 0.2s ease;
}

.rsp-related-layanan-link:hover svg {
    transform: translateX(2px);
}

/* Mobile Button */
.rsp-related-mobile-actions {
    text-align: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.rsp-btn-full {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* Responsive Grid untuk Related Layanan */
.rsp-related-layanan-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .rsp-related-layanan-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .rsp-related-layanan-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== GALLERY SLIDER STYLES - FIXED ===== */
.rsp-layanan-gallery {
    margin-bottom: 3rem;
    position: relative;
    width: 100%;
}

/* Main Slider Container */
.rsp-gallery-main {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-primary-soft);
    aspect-ratio: 16/9;
    width: 100%;
    max-width: 100%;
}

.rsp-main-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Slide Items - FIXED POSITIONING */
.rsp-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsp-slide-item.rsp-active {
    opacity: 1;
    z-index: 2;
}

.rsp-slide-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
}

.rsp-slide-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain for better image display */
    object-position: center;
    display: block;
}

/* Navigation Arrows */
.rsp-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rsp-slider-nav:hover {
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-50%) scale(1.05);
}

.rsp-slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.rsp-slider-prev {
    left: 16px;
}

.rsp-slider-next {
    right: 16px;
}

.rsp-slider-nav svg {
    width: 20px;
    height: 20px;
    color: var(--color-text);
}

.rsp-slider-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rsp-slider-nav:disabled:hover {
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
}

/* Slide Counter */
.rsp-slide-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 3;
    backdrop-filter: blur(8px);
    line-height: 1;
}

/* Thumbnail Navigation */
.rsp-gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
    justify-content: center;
    flex-wrap: wrap;
}

.rsp-gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.rsp-gallery-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.rsp-gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

.rsp-thumb-item {
    flex: 0 0 auto;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.rsp-thumb-item:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.rsp-thumb-item.rsp-active {
    border-color: var(--color-primary);
    opacity: 1;
    transform: scale(1.05);
}

.rsp-thumb-image-container {
    width: 100%;
    height: 100%;
}

.rsp-thumb-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* No Gallery Message */
.rsp-no-gallery-message {
    background: var(--color-primary-soft);
    border: 2px dashed var(--color-border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.rsp-placeholder-image {
    color: var(--color-text-light);
}

.rsp-placeholder-image .icon-image {
    margin: 0 auto 1rem;
    color: var(--color-border);
}

.rsp-placeholder-image p {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text-light);
}

/* Responsive Adjustments untuk Gallery */
@media (max-width: 768px) {
    .rsp-gallery-main {
        aspect-ratio: 4/3;
    }
    
    .rsp-slider-nav {
        width: 40px;
        height: 40px;
    }
    
    .rsp-slider-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .rsp-slider-prev {
        left: 8px;
    }
    
    .rsp-slider-next {
        right: 8px;
    }
    
    .rsp-thumb-item {
        width: 60px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .rsp-gallery-main {
        aspect-ratio: 1/1;
    }
    
    .rsp-thumb-item {
        width: 50px;
        height: 40px;
    }
    
    .rsp-slider-nav {
        width: 36px;
        height: 36px;
    }
    
    .rsp-slider-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* Fix untuk gambar yang tidak proporsional */
.rsp-slide-image-container.fixed-ratio {
    position: relative;
    width: 100%;
    height: 100%;
}

.rsp-slide-image.contain-fit {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.rsp-slide-image.cover-fit {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Loading state untuk gambar */
.rsp-slide-image {
    transition: opacity 0.3s ease;
}

.rsp-slide-image.loading {
    opacity: 0.5;
}

.rsp-slide-image.loaded {
    opacity: 1;
}