/* ====================================
   MODERN SECTIONS REDESIGN
   Enhanced styling for Download Dokumen, Statistik, Galeri, Kepuasan
   ==================================== */

/* ====================================
   DOWNLOAD DOKUMEN SECTION - MODERN CARDS
   ==================================== */

/* Modern Category Cards with Glassmorphism */
.dokumen-category-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    position: relative;
}

.dokumen-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.dokumen-category-card:hover::before {
    transform: scaleX(1);
}

.dokumen-category-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Gradient Card Headers */
.card-header.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.card-header.bg-primary::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #feca57 0%, #f39c12 100%) !important;
    border: none;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.card-header.bg-warning::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.card-header.bg-success {
    background: linear-gradient(135deg, #48c774 0%, #00d1b2 100%) !important;
    border: none;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.card-header.bg-success::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.card-header h5 {
    position: relative;
    z-index: 1;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Document List Items */
.card-body .border-bottom {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 18px 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card-body .border-bottom::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-body .border-bottom:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding-left: 16px !important;
    padding-right: 16px !important;
    border-radius: 12px;
    margin: 0 -16px;
    border-bottom: 1px solid transparent !important;
}

.card-body .border-bottom:hover::before {
    transform: scaleY(1);
}

.card-body .border-bottom h6 {
    font-weight: 600;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.card-body .border-bottom:hover h6 {
    color: #667eea;
}

/* Card Footer with Modern Button */
.card-footer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    padding: 20px;
}

.card-footer .btn.rounded-pill {
    border-radius: 50px !important;
    padding: 12px 32px !important;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.card-footer .btn.rounded-pill::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.card-footer .btn.rounded-pill:hover::before {
    width: 300px;
    height: 300px;
}

.card-footer .btn.rounded-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ====================================
   STATISTIK LAYANAN - GLASSMORPHISM CHARTS
   ==================================== */

/* Chart Container with Glass Effect */
.chart-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.chart-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.chart-card h5 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.chart-card h5::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Chart Styling */
#pieChart1, #pieChart2, #areaChart {
    padding: 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
}

/* ====================================
   GALERI FOTO - MODERN CAROUSEL
   ==================================== */

/* Carousel Container Enhancement */
#galeriCarousel {
    border-radius: 24px !important;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    position: relative;
}

#galeriCarousel .carousel-inner {
    border-radius: 24px;
}

#galeriCarousel .carousel-item img {
    border-radius: 24px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#galeriCarousel .carousel-item.active img {
    animation: zoomIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(1.1);
        opacity: 0.8;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modern Carousel Controls */
#galeriCarousel .carousel-control-prev,
#galeriCarousel .carousel-control-next {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

#galeriCarousel:hover .carousel-control-prev,
#galeriCarousel:hover .carousel-control-next {
    opacity: 1;
}

#galeriCarousel .carousel-control-prev {
    left: 24px;
}

#galeriCarousel .carousel-control-next {
    right: 24px;
}

#galeriCarousel .carousel-control-prev:hover,
#galeriCarousel .carousel-control-next:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

#galeriCarousel .carousel-control-prev-icon,
#galeriCarousel .carousel-control-next-icon {
    width: 24px;
    height: 24px;
    background-size: 24px 24px;
    filter: invert(0.4);
    transition: filter 0.3s ease;
}

#galeriCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#galeriCarousel .carousel-control-next:hover .carousel-control-next-icon {
    filter: invert(1);
}

/* Modern Carousel Caption */
#galeriCarousel .carousel-caption {
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.95) 0%,
        rgba(118, 75, 162, 0.95) 100%) !important;
    border-radius: 16px !important;
    padding: 20px 28px !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    bottom: 32px;
    left: 32px;
    right: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#galeriCarousel .carousel-caption h5 {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#galeriCarousel .carousel-caption p {
    font-size: 0.95rem;
    margin-bottom: 0;
    opacity: 0.95;
}

/* Modern Indicators */
#galeriCarousel .carousel-indicators {
    bottom: 16px;
    margin-bottom: 0;
}

#galeriCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

#galeriCarousel .carousel-indicators button.active {
    width: 40px;
    border-radius: 6px;
    background: linear-gradient(90deg, #feca57 0%, #f39c12 100%);
    border-color: white;
    box-shadow: 0 0 20px rgba(254, 202, 87, 0.6);
}

/* Rating Stars Enhancement */
.stars i {
    font-size: 2.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    margin: 0 4px;
}

.stars i:hover {
    transform: scale(1.2) rotate(-10deg);
}

/* ====================================
   LAYANAN KEPUASAN - INTERACTIVE RATING
   ==================================== */

/* Modern Rating Card */
.rating-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 48px;
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rating-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(254, 202, 87, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.rating-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.15);
}

/* Rating Display */
.rating-display {
    position: relative;
    z-index: 1;
}

.rating-display > div:first-child {
    font-size: 5rem !important;
    font-weight: 900 !important;
    background: linear-gradient(135deg, #feca57 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(254, 202, 87, 0.3);
}

.rating-display .stars {
    margin-bottom: 20px;
}

.rating-display .stars i {
    font-size: 2rem;
    color: #feca57;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    margin: 0 3px;
    filter: drop-shadow(0 2px 4px rgba(254, 202, 87, 0.3));
}

.rating-display .stars i:hover {
    transform: scale(1.3) rotate(15deg);
    filter: drop-shadow(0 4px 8px rgba(254, 202, 87, 0.5));
}

.rating-display .text-muted {
    font-size: 1.1rem;
    color: #6b7280 !important;
    font-weight: 500;
}

/* Progress Bars Enhancement */
.progress-bars {
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.progress-bars .d-flex {
    padding: 12px 0;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.progress-bars .d-flex:hover {
    background: rgba(254, 202, 87, 0.05);
    padding-left: 12px;
    padding-right: 12px;
    margin: 0 -12px;
}

.progress-bars .progress {
    height: 12px !important;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bars .progress-bar {
    background: linear-gradient(90deg, #feca57 0%, #f39c12 100%) !important;
    box-shadow: 0 2px 8px rgba(254, 202, 87, 0.4);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bars .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-bars .me-3,
.progress-bars .ms-3 {
    font-weight: 600;
    color: #1f2937;
}

.progress-bars .fa-star {
    color: #feca57;
    filter: drop-shadow(0 1px 2px rgba(254, 202, 87, 0.3));
}

/* ====================================
   RESPONSIVE ENHANCEMENTS
   ==================================== */

@media (max-width: 768px) {
    .chart-card {
        padding: 24px;
    }

    .chart-card h5 {
        font-size: 1.3rem;
    }

    #galeriCarousel .carousel-control-prev,
    #galeriCarousel .carousel-control-next {
        width: 44px;
        height: 44px;
    }

    #galeriCarousel .carousel-caption {
        padding: 16px 20px !important;
        bottom: 16px;
        left: 16px;
        right: 16px;
    }

    .rating-card {
        padding: 32px 24px;
    }

    .rating-display > div:first-child {
        font-size: 4rem !important;
    }

    .rating-display .stars i {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .dokumen-category-card {
        border-radius: 16px;
    }

    .card-header {
        padding: 20px !important;
    }

    .card-header h5 {
        font-size: 18px;
    }

    .chart-card {
        padding: 20px;
        border-radius: 20px;
    }

    #galeriCarousel {
        border-radius: 16px !important;
    }

    #galeriCarousel .carousel-caption {
        border-radius: 12px !important;
    }

    .rating-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .rating-display > div:first-child {
        font-size: 3.5rem !important;
    }
}

/* ====================================
   PERFORMANCE OPTIMIZATIONS
   ==================================== */

.dokumen-category-card,
.chart-card,
.rating-card {
    will-change: transform;
}

.progress-bar {
    will-change: width;
}

#galeriCarousel .carousel-item img {
    will-change: transform;
}
