/* =========================================================
   COLOR VARIABLES (LIGHT MODE)
   ========================================================= */
:root {
    --bg-light: #f8f9fa;
    --bg-soft: #e9ecef;
    --hero-bg: #1e3a8a;
    --text-color: #212529;
    --text-muted: #6c757d;
    --card-bg: #ffffff;
    --footer-bg: #212529;

    /* Smooth transitions */
    --ease-std: cubic-bezier(0.22, 1, 0.36, 1);
    --trans-fast: 180ms;
    --trans-medium: 360ms;
    --trans-slow: 520ms;
}

/* =========================================================
   BASE STYLING
   ========================================================= */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   NAVBAR
   ========================================================= */
.custom-navbar {
    background-color: var(--card-bg) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: background var(--trans-medium) var(--ease-std),
        box-shadow var(--trans-medium) var(--ease-std);
}

.navbar-logo {
    height: 35px;
    width: auto;
}

.navbar-brand,
.nav-link {
    font-weight: 600;
}

.nav-link:hover {
    color: #0d6efd !important;
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-section {
    background-image: linear-gradient(rgba(15, 151, 56, 0.7), rgba(0, 1, 2, 0.7)), url("images/bg.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-top: 8rem;
    padding-bottom: 6rem;
}

.hero-logo-small {
    height: 70px;
    width: auto;
    transition: transform var(--trans-fast);
}

.hero-logo-small:hover {
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .hero-logo-small {
        height: 50px;
    }
}

/* =========================================================
   PLACEHOLDER IMAGES
   ========================================================= */
.placeholder-img-small {
    background-color: #ced4da;
    min-height: 150px;
    width: 100%;
    border-radius: 8px;
}

.placeholder-img-medium {
    min-height: 220px;
    width: 90%;
    max-width: 450px;
    background-color: #d0d0d0;
    border-radius: 10px;
    margin: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-img-placeholder {
    /* Atur tinggi agar sejajar dengan konten di sebelahnya */
    height: 350px;
    /* Sesuaikan nilai ini sesuai kebutuhan desain Anda */
    overflow: hidden;
    /* Penting! Menyembunyikan bagian gambar yang melebihi batas container */
}

.feature-img-placeholder .feature-image {
    width: 100%;
    /* Pastikan mengisi seluruh lebar container */
    height: 100%;
    /* Pastikan mengisi seluruh tinggi container */
    object-fit: cover;
}

/* =========================================================
   CARDS & CONTENT SECTIONS
   ========================================================= */
.section-title {
    font-weight: 800;
    letter-spacing: -0.5px;
}

.magazine-card {
    border-left: 5px solid var(--hero-bg);
    transition: transform var(--trans-medium), box-shadow var(--trans-medium) var(--ease-std);
}

.magazine-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.magazine-card-accent {
    background-color: var(--bg-soft) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* =========================================================
   TEACHER CARDS (EQUAL HEIGHT + CONSISTENT BODY)
   ========================================================= */

/* Base card styling you already had */
.teacher-card {
    border-radius: 10px;
    transition: transform var(--trans-medium), box-shadow var(--trans-medium);
    overflow: hidden;
    display: flex;
    /* stack photo / body / footer vertically */
    flex-direction: column;
    height: 100%;
    /* allow .h-100 to fill column */
    min-height: 320px;
    /* tweakable minimum so layout is stable */
}

/* Hover lift */
.teacher-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(30, 58, 138, 0.18);
}

/* Photo wrapper: uses padding-top trick for a consistent aspect ratio (fallback-friendly) */
.teacher-photo-wrapper {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, #e9ecef, #f8f9fa);
    flex: 0 0 auto;
    /* keep fixed, don't stretch */
}

/* create a 4:3 box using padding-top */
.teacher-photo-wrapper::before {
    content: "";
    display: block;
    padding-top: 75%;
    /* 4:3 aspect ratio */
}

/* position the image absolutely to fill the wrapper */
.teacher-photo-wrapper img,
.teacher-photo-wrapper .teacher-photo-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    /* crop from top (your request) */
    display: block;
}

/* Optional modern helper (keeps fallback but allows simpler markup) */
.teacher-photo-img {
    width: 100%;
    display: block;
    object-fit: cover;
    object-position: top;
    aspect-ratio: 4/3;
    /* modern browsers will respect this */
    height: auto;
    border-radius: 6px 6px 0 0;
}

/* If you still use teacher-photo-placeholder, keep it compatible */
.teacher-photo-placeholder {
    width: 100%;    
    padding-top: 75%;
    background-color: #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

/* Card body: stretch to take remaining vertical space so all cards align */
.teacher-card .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-bottom: 1rem;
}

/* Name and small meta tweaks */
.teacher-card .card-body h5 {
    margin: 0 0 .25rem 0;
    line-height: 1.1;
    font-size: 1rem;
}

.teacher-card .card-body p {
    margin: 0 0 .5rem 0;
    color: var(--text-muted);
}

/* Push badge to bottom of card-body so it lines up visually across cards */
.teacher-card .card-body .badge {
    margin-top: auto;
    align-self: start;
}

/* Card footer remains fixed (does not grow) */
.teacher-card .card-footer {
    flex: 0 0 auto;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* Small responsive tweak */
@media (max-width: 575.98px) {
    .teacher-card {
        min-height: 300px;
    }

    .teacher-card .card-body h5 {
        font-size: .98rem;
    }
}

/* Responsive calendar-list: label/value layout */
.calendar-list .list-group-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: .65rem;
    padding-bottom: .65rem;
    flex-wrap: nowrap;
    /* keep the value on one line */
    min-height: 48px;
}

/* Label grows and may truncate if too long */
.calendar-list .item-label {
    flex: 1 1 auto;
    min-width: 0;
    /* important for text-truncate to work inside flex */
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.25;
}

/* Value stays compact, doesn't wrap */
.calendar-list .item-value {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.95rem;
}

/* Slightly more compact on small screens */
@media (max-width: 575.98px) {
    .calendar-list .list-group-item {
        padding-top: .5rem;
        padding-bottom: .5rem;
        min-height: 44px;
    }

    .calendar-list .item-label,
    .calendar-list .item-value {
        font-size: 0.9rem;
    }
}


/* =========================================================
   FOOTER
   ========================================================= */
.custom-footer {
    background-color: var(--footer-bg);
    color: white;
}

/* =========================================================
   ANIMATED REVEAL SYSTEM (Animate.css compatible)
   ========================================================= */

/* Hidden starting state */
.reveal,
.reveal-stagger>* {
    opacity: 0;
    transform: translateY(12px);
    will-change: opacity, transform;
}

/* Visible state (after JS adds .is-visible) */
.reveal.is-visible,
.reveal-stagger.is-visible>* {
    opacity: 1;
    transform: none;
}

/* Animate.css GPU optimization */
.animate__animated {
    will-change: opacity, transform;
}

/* Reduced motion fallback */
@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal-stagger>* {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .animate__animated {
        animation: none !important;
    }
}



/* =========================================================
   SMALL NAVBAR BRAND / MOBILE ADJUSTMENTS (keeps your previous tweaks)
   ========================================================= */
.header-text-split .brand-name-top {
    font-size: 0.95rem;
    line-height: 1;
}

.header-text-split .brand-name-bottom {
    font-size: 0.7rem;
    line-height: 1;
}

@media (max-width: 575.98px) {
    .header-text-split .brand-name-top {
        font-size: 0.78rem;
    }

    .header-text-split .brand-name-bottom {
        font-size: 0.64rem;
    }

    /* reduce spacing for brand */
    .navbar-brand {
        gap: 0.5rem;
    }
}


@media (max-width: 767.98px) {

    .reveal,
    .reveal-stagger,
    .reveal-stagger>* {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}