/* ==========================================
   COMPONENTS.CSS - Reusable Components
   Cards, Carousel, Gallery, Sliders, etc
   ========================================== */

/* ==========================================
   CAROUSEL STYLES
   ========================================== */
.hero-carousel {
    margin-top: 24px;
    margin-bottom: 0;
    position: relative;
}

.hero-carousel .carousel-inner {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.carousel-item img {
    width: 100%;
    height: 460px;
    object-fit: cover;
}

.carousel-indicators {
    margin-bottom: 18px;
}

.carousel-indicators button {
    width: 28px;
    height: 4px;
    border-radius: 2px;
    margin: 0 3px;
    background-color: rgba(255,255,255,0.45);
    border: none;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: #f97316;
    width: 44px;
}

/* Modern Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    opacity: 1;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transition: all 0.3s ease;
}

.carousel-control-prev { left: 16px; }
.carousel-control-next { right: 16px; }

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 15px;
    height: 15px;
    background-size: 100%;
    filter: invert(1) brightness(0);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: #f97316;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(249,115,22,0.4);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    filter: brightness(10);
}

/* ==========================================
   SECTION STYLES
   ========================================== */
.news-section        { background: #ffffff; }
.facilities-section  { background: #f8fafc; }
.jurusan-section     { background: #f1f5f9; }
.ekskul-section      { background: #ffffff; }
.achievement-section { background: #f8fafc; }
.alumni-section      { background: #ffffff; }
.welcome-section     { background: #f1f5f9 !important; }

/* ==========================================
   BERITA LIST CARD — polished look
   ========================================== */
.berita-list-card {
    border-left: 4px solid #f97316;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border-radius: 10px !important;
    background: #ffffff;
    overflow: hidden;
}

.berita-list-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.1) !important;
    border-color: #ea580c;
}

.berita-list-card h6 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Image thumbnails inside cards — polished rounded */
.berita-list-card .thumb-wrap {
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

/* ==========================================
   NEWS CARD STYLES
   ========================================== */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.13);
}

.news-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-image img { transform: scale(1.07); }

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 1.05rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.news-excerpt {
    color: #64748b;
    font-size: 0.88rem;
    margin-bottom: 15px;
    flex: 1;
    line-height: 1.6;
}

.news-meta { margin-bottom: 15px; }

/* ==========================================
   BUTTONS
   ========================================== */
.btn-read-more {
    background: #1e293b;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.88rem;
    transition: all 0.3s ease;
    align-self: flex-start;
    font-weight: 600;
}

.btn-read-more:hover {
    background: #f97316;
    color: white;
    transform: translateX(4px);
}

.btn-selengkapnya {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 10px rgba(30,41,59,0.25);
}

.btn-selengkapnya:hover {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(249,115,22,0.35);
}

/* ==========================================
   FACILITY CARD STYLES
   ========================================== */
.facility-card {
    background: white;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    height: 100%;
}

.facility-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.11);
}

.facility-image {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.facility-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.facility-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   TEACHER CARD STYLES
   ========================================== */
.teacher-card {
    background: white;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.11);
}

.teacher-photo {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffedd5;
    box-shadow: 0 4px 14px rgba(249,115,22,0.2);
}

.teacher-photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher-info h5 { color: #1e293b; font-weight: 700; margin-bottom: 5px; }

/* ==========================================
   ACHIEVEMENT CARD STYLES
   ========================================== */
.achievement-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.11);
}

.achievement-image { width: 100%; height: 220px; overflow: hidden; }
.achievement-image img { width: 100%; height: 100%; object-fit: cover; }
.achievement-content { padding: 20px; }
.achievement-content h5 { color: #1e293b; font-weight: 700; margin-bottom: 10px; }

/* ==========================================
   GALLERY STYLES
   ========================================== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay { transform: translateY(0); }

/* ==========================================
   PPDB BANNER STYLES
   ========================================== */
.ppdb-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #334155 100%);
    box-shadow: 0 10px 40px rgba(15,23,42,0.35);
    border-radius: 16px !important;
    border: 1px solid rgba(249,115,22,0.25);
    position: relative;
    overflow: hidden;
}

.ppdb-banner::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(249,115,22,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.ppdb-banner::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(249,115,22,0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.ppdb-banner h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.ppdb-banner p, .ppdb-banner .btn {
    position: relative;
    z-index: 1;
}

.ppdb-banner .btn-light {
    background: #f97316;
    border-color: #f97316;
    color: white;
    font-weight: 700;
    border-radius: 10px;
    padding: 12px 36px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(249,115,22,0.4);
}

.ppdb-banner .btn-light:hover {
    background: white;
    color: #f97316;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ==========================================
   SECTION SLIDER FOR MOBILE & TABLET
   ========================================== */
.section-slider-wrapper {
    position: relative;
    padding: 0 52px; /* space for prev/next buttons */
}

.section-slider {
    overflow: hidden;
    position: relative;
}

.section-slider .row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px; /* prevent card shadow clipping */
}

.section-slider .row::-webkit-scrollbar { display: none; }

.section-slider .col-lg-4,
.section-slider .col-lg-3,
.section-slider .col-md-6 {
    flex: 0 0 auto;
}

/* ── Slider Buttons — always visible on mobile, hidden on desktop ── */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
    z-index: 10;
    cursor: pointer;
    display: none;   /* shown only on mobile via media query below */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #1e293b;
    font-size: 0.85rem;
}

.slider-btn:hover {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 6px 20px rgba(249,115,22,0.4);
    transform: translateY(-50%) scale(1.08);
}

.slider-btn-prev { left: 0; }
.slider-btn-next { right: 0; }

/* Auto-slide indicator dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: #f97316;
    width: 20px;
    border-radius: 4px;
}

/* Show slider controls on mobile and tablet */
@media (max-width: 991px) {
    .slider-btn {
        display: flex;
    }

    .section-slider .col-lg-4,
    .section-slider .col-lg-3 {
        width: 82%;
        max-width: 340px;
    }

    .section-slider .col-md-6 {
        width: 82%;
        max-width: 340px;
    }
}

@media (max-width: 767px) {
    .section-slider-wrapper {
        padding: 0 46px;
    }

    .section-slider .col-lg-4,
    .section-slider .col-lg-3,
    .section-slider .col-md-6 {
        width: 87%;
        max-width: 310px;
    }

    .slider-btn {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }
}

/* ==========================================
   GENERAL CARD STYLES
   ========================================== */
.card {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.75rem rgba(0,0,0,0.12) !important;
}

/* ==========================================
   SECTION WELCOME / TENTANG
   ========================================== */
.welcome-section img {
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
    .carousel-item img { height: 320px; }

    .news-image,
    .achievement-image { height: 180px; }

    .facility-image { height: 150px; }
    .teacher-photo { width: 120px; height: 120px; }
    .gallery-item img { height: 200px; }
}

@media (max-width: 767px) {
    .carousel-item img { height: 220px; }

    .news-image { height: 150px; }
    .achievement-image { height: 150px; }
    .facility-image { height: 120px; }
    .teacher-photo { width: 100px; height: 100px; }
    .gallery-item img { height: 180px; }

    .news-card,
    .facility-card,
    .teacher-card,
    .achievement-card { padding: 15px; }

    .news-content,
    .achievement-content { padding: 15px; }

    .news-title,
    .achievement-content h5,
    .teacher-info h5 { font-size: 0.95rem; }

    .news-excerpt { font-size: 0.85rem; }

    .berita-list-card h6 { font-size: 0.85rem !important; }
    .berita-list-card p  { font-size: 0.78rem !important; }
    .berita-list-card small { font-size: 0.75rem !important; }

    .berita-list-card .d-flex > div[style*="width:100px"] {
        width: 80px !important; height: 70px !important;
    }

    .berita-list-card .d-flex > div[style*="width:70px"] {
        width: 60px !important; height: 60px !important;
    }

    .berita-list-card .d-flex > div[style*="width:80px"] {
        width: 70px !important; height: 60px !important;
    }
}

@media (max-width: 576px) {
    .carousel-item img { height: 180px; }
    .news-image { height: 130px; }
    .achievement-image { height: 130px; }
    .facility-image { height: 100px; }
    .teacher-photo { width: 80px; height: 80px; }
    .gallery-item img { height: 150px; }

    .news-card,
    .facility-card,
    .teacher-card,
    .achievement-card,
    .berita-list-card { padding: 12px !important; }

    .news-content,
    .achievement-content { padding: 12px; }

    .facility-icon { width: 60px; height: 60px; }
    .facility-icon i { font-size: 1.5rem; }

    .news-title,
    .achievement-content h5,
    .teacher-info h5 { font-size: 0.9rem; }

    .news-excerpt { font-size: 0.8rem; }

    .berita-list-card h6 { font-size: 0.8rem !important; line-height: 1.3 !important; }
    .berita-list-card p  { font-size: 0.75rem !important; line-height: 1.4 !important; }
    .berita-list-card small { font-size: 0.7rem !important; }

    .berita-list-card .d-flex > div[style*="width:100px"],
    .berita-list-card .d-flex > div[style*="width:80px"] {
        width: 70px !important; height: 60px !important;
    }

    .berita-list-card .d-flex > div[style*="width:70px"],
    .berita-list-card .d-flex > div[style*="width:60px"] {
        width: 50px !important; height: 50px !important;
    }

    .carousel-control-prev,
    .carousel-control-next { width: 34px; height: 34px; }

    .carousel-control-prev { left: 8px; }
    .carousel-control-next { right: 8px; }

    .carousel-control-prev-icon,
    .carousel-control-next-icon { width: 11px; height: 11px; }

    .ppdb-banner h2 { font-size: 1.35rem; }
    .ppdb-banner .btn-light { padding: 10px 24px; font-size: 0.9rem; }
}