/* Custom CSS for SPMB Pekalongan 2026/2027 Landing Page */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Floating animation for hero image */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Batik Kawung Pattern Background for Hero (Pekalongan Theme) */
.hero-batik-pattern {
    background-color: #0f2d5e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='0.035'%3E%3Cpath d='M40 0 C 40 22, 22 40, 0 40 C 22 40, 40 58, 40 80 C 40 58, 58 40, 80 40 C 58 40, 40 22, 40 0 Z'/%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3Ccircle cx='0' cy='0' r='6'/%3E%3Ccircle cx='80' cy='0' r='6'/%3E%3Ccircle cx='0' cy='80' r='6'/%3E%3Ccircle cx='80' cy='80' r='6'/%3E%3Cpath d='M0 0 C 0 20, 20 0, 40 0 C 20 0, 0 20, 0 40 C 0 20, -20 0, -40 0 C -20 0, 0 -20, 0 -40 Z' transform='translate(0, 0)'/%3E%3Cpath d='M80 0 C 80 20, 100 0, 120 0 C 100 0, 80 20, 80 40 C 80 20, 60 0, 40 0 C 60 0, 80 -20, 80 -40 Z' transform='translate(0, 0)'/%3E%3Cpath d='M0 80 C 0 100, 20 80, 40 80 C 20 80, 0 100, 0 120 C 0 100, -20 80, -40 80 C -20 80, 0 60, 0 40 Z' transform='translate(0, 0)'/%3E%3Cpath d='M80 80 C 80 100, 100 80, 120 80 C 100 80, 80 100, 80 120 C 80 100, 60 80, 40 80 C 60 80, 80 60, 80 40 Z' transform='translate(0, 0)'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
}

/* Navbar Transition */
.navbar-transition {
    transition: all 0.3s ease-in-out;
}

/* Vertical Timeline Redesign */
.vertical-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* Garis tengah vertical */
.vertical-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, rgba(37, 99, 235, 0.5), rgba(245, 158, 11, 0.5));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    z-index: 0;
}

/* Container untuk item */
.timeline-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    z-index: 10;
}

/* Bulatan di tengah garis */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: #0f2d5e;
    border: 4px solid #3b82f6; /* blue-500 */
    border-radius: 50%;
    top: 24px;
    z-index: 20;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

/* Kiri-kanan positioning */
.timeline-left {
    left: 0;
}

.timeline-right {
    left: 50%;
}

/* Sesuaikan bulatan untuk sebelah kanan */
.timeline-right::after {
    left: -10px;
}

.timeline-container:hover::after {
    background-color: #2563eb;
    transform: scale(1.2);
}

/* Responsif Mobile (di bawah 768px) */
@media screen and (max-width: 768px) {
    .vertical-timeline::after {
        left: 31px;
    }
    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
        padding-top: 6px;
        padding-bottom: 6px;
    }
    .timeline-container::after {
        left: 21px;
        right: auto;
    }
    .timeline-left, .timeline-right {
        left: 0;
    }
}

/* Accordion Smooth Height Transition */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Tab active styles */
.tab-btn.active {
    border-color: #2563eb;
    color: #2563eb;
    background-color: #eff6ff;
}

.school-tab-btn {
    background-color: rgba(241, 245, 249, 0.6) !important;
    color: #334155 !important;
    transition: all 0.2s ease;
}

.school-tab-btn:hover {
    background-color: rgba(226, 232, 240, 0.8) !important;
    color: #0f172a !important;
}

.school-tab-btn.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.15), 0 2px 4px -1px rgba(37, 99, 235, 0.1) !important;
}

/* Carousel Brosur */
.brochure-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.brochure-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.brochure-slide {
    flex: 0 0 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Pagination Buttons Styles */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page-btn.active-sd {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.page-btn.active-smp {
    background-color: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
}

/* Mobile Menu Smooth Height and Opacity Transition */
#mobile-menu {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0.95);
    transform-origin: top;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease-out, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 550px; /* Cukup tinggi untuk menampung seluruh link navigasi dan tombol CTA portal */
    opacity: 1;
    transform: scaleY(1);
}

/* Glassmorphism Overrides for Accordion FAQ, Timeline, and Carousel */
.accordion-item {
    background-color: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    transition: all 0.25s ease-in-out;
}
.accordion-item:hover {
    background-color: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

.vertical-timeline .timeline-container > div {
    background-color: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.vertical-timeline .timeline-container > div:hover {
    background-color: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(37, 99, 235, 0.5) !important;
    box-shadow: 0 8px 32px 0 rgba(37, 99, 235, 0.2) !important;
    transform: translateY(-3px) scale(1.01);
}

.brochure-carousel {
    background-color: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

.contact-card-glass {
    background-color: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    transition: all 0.25s ease-in-out;
}
.contact-card-glass:hover {
    background-color: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

/* --- Skeleton Loading & Lazy Load Transitions --- */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #e2e8f0;
}

/* Efek Shimmer Kilau Menyapu */
.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer-swipe 1.6s infinite ease-in-out;
}

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

/* Transisi Halus Lazy Load */
.lazy-image {
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: opacity, transform;
}

.lazy-image.loaded {
    opacity: 1;
    transform: scale(1);
}

/* --- Announcement Bar & Mobile Marquee --- */
.animate-marquee {
    display: inline-block;
    animation: marquee-scroll 25s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}


