/* Carousel Hero Styling */
.hero-carousel-section {
    background: linear-gradient(135deg, #a65ce6 0%, #9042d6 100%);
    min-height: 500px;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Decorative Futuristic Elements */
.hero-carousel-section::before,
.hero-carousel-section::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-carousel-section::before {
    top: -100px;
    left: -100px;
    animation: float 15s infinite alternate;
}

.hero-carousel-section::after {
    bottom: -150px;
    right: -100px;
    animation: float 20s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 30px) scale(1.1);
    }
}

#heroCarousel .carousel-item {
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1);
}

/* Content Animations */
#heroCarousel .carousel-item h1,
#heroCarousel .carousel-item p,
#heroCarousel .carousel-item .btn {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#heroCarousel .carousel-item img {
    opacity: 0;
    transform: translateY(100px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#heroCarousel .carousel-item.active h1 {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 5px 15px rgba(0, 0, 0, 0.2);
}

#heroCarousel .carousel-item.active p {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s;
}

#heroCarousel .carousel-item.active .btn {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.7s;
}

#heroCarousel .carousel-item.active img {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.15)) drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* Typography */
.hero-carousel-section h1 {
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: linear-gradient(to right, #fff 20%, #f0f0f0 40%, #fff 60%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-carousel-section .lead {
    font-size: 1.3rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    max-width: 90%;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.carousel-caption-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

/* Image adjustments */
.hero-carousel-section img {
    max-height: 450px;
    width: auto;
    object-fit: contain;
    transition: all 0.5s ease;
}

#heroCarousel .carousel-item.active img {
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Button Styling */
.hero-carousel-section .btn-primary {
    background: linear-gradient(45deg, #FF85A5, #ff6b91);
    border: none;
    font-weight: 600;
    padding: 14px 35px;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(255, 133, 165, 0.4);
    transition: all 0.3s ease;
}

.hero-carousel-section .btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 25px rgba(255, 133, 165, 0.6);
    background: linear-gradient(45deg, #ff6b91, #FF85A5);
}

/* Indicators */
.carousel-indicators {
    bottom: 40px;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    margin: 0 8px !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
}

.carousel-indicators button.active {
    background-color: #fff !important;
    transform: scale(1.3);
    border-color: #fff !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Services (Layanan) Section */
.layanan-section {
    background-color: #9b59b6;
    /* Lighter purple from palette */
    background: linear-gradient(180deg, #a561c2 0%, #8e44ad 100%);
    min-height: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.layanan-img-wrapper {
    overflow: hidden;
    margin-bottom: 0;
    /* Changed to 0 as label is now inside if needed or handled below */
    position: relative;
    border-radius: 8px;
}

.layanan-card {
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.layanan-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.layanan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(34, 197, 94, 0.9);
    /* Green overlay matching theme */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.layanan-card:hover .layanan-overlay {
    opacity: 1;
}

.layanan-desc {
    color: white;
    font-weight: 500;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.layanan-card:hover .layanan-desc {
    transform: translateY(0);
}

.layanan-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s ease;
    z-index: 3;
}

.layanan-card:hover .layanan-label {
    transform: translateY(100%);
}

.layanan-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.layanan-card:hover .layanan-img-wrapper img {
    transform: scale(1.05);
    /* Zoom effect on hover */
}

.layanan-label {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.section-title.text-white {
    font-weight: 700;
}

/* Fade In Animation Styles */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* News (Kilas Berita) Section */
.kilasberita-section {
    background-color: #9b59b6;
    /* Lighter purple from palette */
    background: linear-gradient(180deg, #a561c2 0%, #8e44ad 100%);
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* News (Kegiatan) Section */
.kegiatan-section {
    background-color: #9C70C3;
    /* Lighter purple from palette */
    background: linear-gradient(180deg, #8e44ad 0%, #9C70C3 100%);
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ============================================
   RESPONSIVE BERANDA STYLES
   ============================================ */

/* Mobile Styles (< 600px) */
@media (max-width: 600px) {

    /* Hero Carousel - Mobile */
    .hero-carousel-section {
        min-height: 400px;
        padding: 40px 20px;
    }

    .hero-carousel-section h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem;
    }

    .hero-carousel-section .lead {
        font-size: 0.95rem !important;
        max-width: 100%;
    }

    .hero-carousel-section .btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        margin-top: 1rem;
    }

    .hero-carousel-section img {
        max-height: 200px;
        margin-top: 20px;
    }

    .carousel-indicators {
        bottom: 10px;
    }

    .carousel-indicators button {
        width: 8px !important;
        height: 8px !important;
        margin: 0 4px !important;
    }

    /* Layanan Section - Mobile */
    .layanan-section {
        padding: 20px 15px;
    }

    .layanan-section .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .layanan-card {
        margin-bottom: 1rem;
    }

    .layanan-label {
        font-size: 1rem !important;
        padding: 8px;
    }

    /* Disable hover effects on mobile (use tap instead) */
    .layanan-card:hover {
        transform: none;
    }

    .layanan-card:active .layanan-overlay {
        opacity: 1;
    }

    /* News Section - Mobile */
    .kilasberita-section,
    .kegiatan-section {
        padding: 20px 15px;
    }

    .kilasberita-section .section-title,
    .kegiatan-section .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* Stack news cards vertically */
    .kilasberita-section .card,
    .kegiatan-section .card {
        margin-bottom: 1rem;
    }

    .kilasberita-section .card-title {
        font-size: 1rem !important;
    }

    .kilasberita-section .card-text {
        font-size: 0.85rem !important;
    }

    /* Full width images on mobile */
    .kilasberita-section .col-md-5,
    .kilasberita-section .col-md-7,
    .kilasberita-section .col-4,
    .kilasberita-section .col-8 {
        width: 100% !important;
        max-width: 100% !important;
    }

    .kilasberita-section img {
        height: 180px !important;
        width: 100% !important;
    }

    /* Kegiatan cards */
    .kegiatan-section .card img {
        height: 150px !important;
    }

    .kegiatan-section .card-title {
        font-size: 1rem !important;
    }
}

/* Tablet Styles (601px - 1023px) */
@media (min-width: 601px) and (max-width: 1023px) {

    /* Hero Carousel - Tablet */
    .hero-carousel-section {
        min-height: 450px;
        padding: 60px 40px;
    }

    .hero-carousel-section h1 {
        font-size: 2.25rem !important;
    }

    .hero-carousel-section .lead {
        font-size: 1.05rem !important;
    }

    .hero-carousel-section img {
        max-height: 300px;
    }

    .carousel-indicators {
        bottom: 20px;
    }

    /* Layanan Section - Tablet (2 columns) */
    .layanan-section {
        padding: 30px 25px;
    }

    .layanan-section .section-title {
        font-size: 1.75rem !important;
    }

    .layanan-section .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .layanan-card {
        margin-bottom: 1.5rem;
    }

    /* News Sections - Tablet */
    .kilasberita-section,
    .kegiatan-section {
        padding: 30px 25px;
    }

    .kilasberita-section .section-title,
    .kegiatan-section .section-title {
        font-size: 1.75rem !important;
    }

    /* Kegiatan - 2 columns on tablet */
    .kegiatan-section .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .kegiatan-section .card img {
        height: 170px !important;
    }
}

/* Desktop Styles (1024px+) */
@media (min-width: 1024px) {

    /* Hero Carousel - Desktop */
    .hero-carousel-section {
        min-height: 500px;
        padding: 80px 60px;
    }

    .hero-carousel-section h1 {
        font-size: 3rem !important;
    }

    .hero-carousel-section .lead {
        font-size: 1.1rem !important;
    }

    .hero-carousel-section img {
        max-height: 400px;
    }

    /* Layanan Section - Desktop (3 columns) */
    .layanan-section {
        padding: 40px;
    }

    .layanan-section .section-title {
        font-size: 2rem !important;
    }

    /* News Sections - Desktop */
    .kilasberita-section,
    .kegiatan-section {
        padding: 40px;
    }

    .kilasberita-section .section-title,
    .kegiatan-section .section-title {
        font-size: 2rem !important;
    }

    /* Kegiatan - 3 columns on desktop */
    .kegiatan-section .card img {
        height: 180px !important;
    }
}

/* Large Desktop (1920px+) */
@media (min-width: 1920px) {
    .hero-carousel-section {
        min-height: 600px;
        padding: 100px 80px;
    }

    .hero-carousel-section h1 {
        font-size: 3.5rem !important;
    }

    .hero-carousel-section img {
        max-height: 500px;
    }

    .layanan-section,
    .kilasberita-section,
    .kegiatan-section {
        padding: 50px;
    }
}

/* Landscape Mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-carousel-section {
        min-height: 300px;
        padding: 30px 20px;
    }

    .hero-carousel-section h1 {
        font-size: 1.5rem !important;
    }

    .hero-carousel-section .lead {
        font-size: 0.9rem !important;
    }

    .hero-carousel-section img {
        max-height: 150px;
    }
}

/* Touch optimizations */
@media (max-width: 1023px) {

    .layanan-card,
    .kilasberita-section .card,
    .kegiatan-section .card {
        -webkit-tap-highlight-color: rgba(255, 133, 165, 0.3);
    }
}