* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* ================= LIGHT MODE ONLY ================= */
:root {
    --bg-primary: #f4f6f9;
    --bg-secondary: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --topbar-bg: #0b4da2;
    --nav-bg: #1f5fbf;
    --card-shadow: rgba(0,0,0,0.08);
    --card-shadow-hover: rgba(0,0,0,0.15);
    --hero-overlay: rgba(0,0,0,0.65);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ================= TOPBAR ================= */
.topbar {
    background: var(--topbar-bg);
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.school-logo {
    height: 50px;
    margin-right: 12px;
}

.topbar .logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.topbar .contact a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.topbar .contact a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0%;
    height: 2px;
    background: orange;
    transition: width 0.3s ease;
}

.topbar .contact a:hover::after {
    width: 100%;
}

.topbar .contact a:hover {
    color: #ffd700;
}

/* ================= RUNNING TEXT NEWS TICKER ================= */
.running-text-container {
    background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    border-bottom: 3px solid #0b4da2;
}

.running-text-content {
    display: inline-flex;
    white-space: nowrap;
    animation: scroll-left 40s linear infinite;
    gap: 80px;
}

.news-item {
    color: white;
    font-weight: 600;
    font-size: 15px;
    padding: 0 20px;
    display: inline-block;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ================= NAVIGATION ================= */
nav {
    background: var(--nav-bg);
    padding: 12px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 25px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease, transform 0.2s ease;
}

nav a:hover {
    color: orange;
    transform: translateY(-2px);
}

/* ================= HERO CAROUSEL ================= */
.hero-carousel {
    position: relative;
    height: 420px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-slide:nth-child(1) {
    background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxRmxXkQJvt_8VPrMXLsTf9znm9br6q4xcTvBUbaatLXG5lnDzJEUNICcefUe8j6jcJ_dJY3LB_b496kwk_ZwsVGMPjSwHOjvig2s_xXUOqXa_wViNF9pJ9zY3-1dvsJKB38prcAMvIXgo/s1600/D9.jpg') center center/cover no-repeat;
}

.hero-slide:nth-child(2) {
    background: url('cover 2.jpg') center center/cover no-repeat;
}

.hero-slide:nth-child(3) {
    background: url('cover 3.jpg') center center/cover no-repeat;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-overlay);
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero-text h2 {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ffffff, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    animation: fadeSlide 1.2s ease;
}

.hero-text p {
    font-size: 18px;
    margin-top: 15px;
    letter-spacing: 1px;
    opacity: 0.95;
    animation: fadeSlide 1.8s ease;
}

.hero-text button {
    margin-top: 20px;
    padding: 14px 35px;
    background: linear-gradient(45deg, orange, #ff8c00);
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.hero-text button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* ================= CONTENT GRID ================= */
.content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    padding: 40px;
    align-items: stretch;
}

.kolom-kiri {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kolom-kiri .profil-card {
    flex: 1.2;
    min-height: 250px;
}

.kolom-tengah {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kolom-kanan {
    display: flex;
    flex-direction: column;
}

/* ================= CARD ================= */
.card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 3px 12px var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--card-shadow-hover);
}

.card h3 {
    margin-bottom: 15px;
    color: #0b4da2;
    flex-shrink: 0;
}

.card ul {
    list-style: none;
    margin-bottom: 15px;
}

.card ul li {
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* ================= BUTTON ORANGE ================= */
.btn-orange {
    background: linear-gradient(45deg, orange, #ff8c00);
    border: none;
    padding: 12px 22px;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 10px rgba(255,140,0,0.3);
    flex-shrink: 0;
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
}

.btn-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255,140,0,0.4);
}

/* ================= PROFIL SECTION ================= */
.profil-card {
    position: relative;
    overflow: hidden;
}

.profil-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding-top: 15px;
}

.profil-item {
    text-align: center;
    transition: transform 0.2s ease;
    cursor: pointer;
    padding: 12px 8px;
    border-radius: 12px;
    background: rgba(11,77,162,0.04);
}

.profil-item:hover {
    transform: translateY(-4px);
    background: rgba(11,77,162,0.08);
}

.profil-icon-wrapper {
    width: 55px;
    height: 55px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(11,77,162,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profil-item:hover .profil-icon-wrapper {
    transform: scale(1.08);
    box-shadow: 0 5px 15px rgba(11,77,162,0.3);
}

.profil-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profil-label {
    font-size: 14px;
    font-weight: 700;
    color: #0b4da2;
    margin-bottom: 4px;
}

.profil-desc {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.3;
}

/* ================= KARYA ILMIAH - COMPACT VERSION ================= */
.karya-ilmiah-card {
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.folder-section-inner-compact {
    display: flex;
    gap: 12px;
    flex-grow: 1;
    justify-content: space-between;
}

.folder-compact {
    flex: 1;
    padding: 20px 15px;
    font-size: 16px;
    text-decoration: none;
    color: white;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.folder-compact.ipa {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.folder-compact.ips {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
}

/* ================= TESTIMONI ALUMNI - CAROUSEL ================= */
.testimoni-card {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.testimoni-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex: 1;
}

.testimoni-viewport {
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
    min-width: 0;
}

.testimoni-track {
    display: flex;
    transition: transform 0.45s ease;
    /* width dihitung otomatis dari slide */
}

.testimoni-slide {
    min-width: 100%;
    text-align: center;
    padding: 20px 15px;
    background: rgba(11,77,162,0.04);
    border-radius: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.testimoni-nav {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #0b4da2;
    background: white;
    color: #0b4da2;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.testimoni-nav:hover {
    background: #0b4da2;
    color: white;
}

.testimoni-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
}
.t-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}
.t-dot.active {
    background: #0b4da2;
    width: 22px;
    border-radius: 4px;
}

.testimoni-photo {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(11,77,162,0.2);
}

.testimoni-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimoni-name {
    font-weight: 700;
    color: #0b4da2;
    font-size: 14px;
    margin-bottom: 3px;
}

.testimoni-year {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.testimoni-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
    font-style: italic;
}


/* ================= KALENDER ================= */
.kalender-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.kalender-card h3 {
    margin-bottom: 10px;
}

.kalender-card p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.calendar-embed {
    margin-top: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--card-shadow);
    background: var(--bg-secondary);
    flex-grow: 1;
    display: flex;
}

.calendar-embed iframe {
    border-radius: 12px;
    background: transparent;
    width: 100%;
}

/* ================= PARTNERSHIP CAROUSEL ================= */
.partnership-section {
    padding: 50px 40px;
    background: var(--bg-secondary);
    text-align: center;
}

.partnership-section h3 {
    color: #0b4da2;
    margin-bottom: 30px;
    font-size: 28px;
}

.partnership-carousel {
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.partnership-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll-partnership 30s linear infinite;
}

.partnership-track:hover {
    animation-play-state: paused;
}

.partnership-item {
    flex-shrink: 0;
    width: 200px;
    height: 100px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partnership-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--card-shadow-hover);
}

.partnership-item img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

@keyframes scroll-partnership {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ================= GALERI ================= */
.galeri {
    padding: 50px 40px;
    text-align: center;
}

.galeri h3 {
    color: var(--text-primary);
}

.galeri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.galeri-item {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 3px 12px var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    color: var(--text-primary);
}

.galeri-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--card-shadow-hover);
}

/* ================= FOOTER ================= */
footer {
    background: var(--topbar-bg);
    color: white;
    text-align: center;
    padding: 25px;
    margin-top: 50px;
}

/* ================= ANIMATIONS ================= */
section, .card {
    animation: fadeUp 0.8s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* --- Tablet landscape (max 1200px) --- */
@media (max-width: 1200px) {
    .content {
        grid-template-columns: 1fr 1fr;
        padding: 30px;
    }
    .kolom-kanan {
        grid-column: 1 / -1;
    }
    .hero-text h2 {
        font-size: 42px;
    }
}

/* --- Tablet portrait (max 900px) --- */
@media (max-width: 900px) {
    .topbar {
        padding: 12px 20px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .topbar .logo {
        font-size: 15px;
        justify-content: center;
    }
    .school-logo {
        height: 40px;
    }

    .navbar {
        padding: 0 15px;
        overflow-x: auto;
    }
    .menu {
        gap: 0;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .menu > li > a {
        padding: 12px 10px;
        font-size: 13px;
    }
    .submenu {
        width: 220px;
    }

    .hero-carousel {
        height: 300px;
    }
    .hero-text h2 {
        font-size: 28px;
        letter-spacing: 1px;
    }
    .hero-text p {
        font-size: 14px;
    }
    .hero-text button {
        padding: 10px 24px;
        font-size: 14px;
    }

    .content {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 16px;
    }
    .kolom-kanan {
        grid-column: unset;
    }

    .calendar-embed iframe {
        height: 320px;
    }

    .partnership-section {
        padding: 30px 15px;
    }
    .partnership-section h3 {
        font-size: 20px;
    }
    .partnership-item {
        width: 140px;
        height: 75px;
    }

    .galeri {
        padding: 30px 20px;
    }
    .galeri-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }
    .galeri-item {
        padding: 25px 10px;
        font-size: 14px;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 20px;
    }
    .kepala-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .kepala-foto img {
        width: 130px;
        height: 160px;
    }
}

/* --- HP (max 600px) --- */
@media (max-width: 600px) {
    .topbar {
        padding: 10px 15px;
    }
    .topbar .logo {
        font-size: 13px;
    }
    .topbar .logo span {
        display: none;
    }
    .topbar .contact {
        display: none;
    }
    .school-logo {
        height: 36px;
        margin-right: 0;
    }

    .navbar {
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .menu {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0 10px;
        gap: 0;
    }
    .menu > li > a {
        padding: 11px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .running-text-container {
        padding: 8px 0;
    }
    .news-item {
        font-size: 12px;
    }

    .hero-carousel {
        height: 220px;
    }
    .hero-text h2 {
        font-size: 20px;
        letter-spacing: 0;
    }
    .hero-text p {
        font-size: 12px;
        margin-top: 8px;
    }
    .hero-text button {
        padding: 9px 18px;
        font-size: 13px;
        margin-top: 12px;
    }

    .content {
        padding: 15px;
        gap: 14px;
    }
    .card {
        padding: 18px;
    }
    .card h3 {
        font-size: 15px;
    }

    .profil-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .profil-icon-wrapper {
        width: 44px;
        height: 44px;
    }
    .profil-label {
        font-size: 12px;
    }
    .profil-desc {
        font-size: 10px;
    }

    .folder-section-inner-compact {
        gap: 8px;
    }
    .folder-compact {
        padding: 15px 10px;
        font-size: 14px;
    }

    .testimoni-nav {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    .testimoni-slide {
        padding: 15px 10px;
    }
    .testimoni-photo {
        width: 65px;
        height: 65px;
    }

    .calendar-embed iframe {
        height: 280px;
    }

    .partnership-section {
        padding: 25px 10px;
    }
    .partnership-section h3 {
        font-size: 17px;
        margin-bottom: 20px;
    }
    .partnership-item {
        width: 110px;
        height: 60px;
    }
    .partnership-track {
        gap: 15px;
    }

    .galeri {
        padding: 25px 15px;
    }
    .galeri h3 {
        font-size: 17px;
    }
    .galeri-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .galeri-item {
        padding: 20px 8px;
        font-size: 13px;
        border-radius: 10px;
    }

    footer {
        padding: 18px 15px;
        font-size: 12px;
        margin-top: 30px;
    }

    .modal-content {
        width: 94%;
        margin: 5% auto;
        padding: 18px;
    }
    .kepala-foto img {
        width: 100px;
        height: 130px;
    }
}


/* Garis bawah aktif */
.menu > li > a:hover {
    border-bottom: 3px solid #ffd700;
}

/* ================= SUBMENU PUTIH ================= */
.submenu {
    display: none;
    position: absolute;
    top: 55px;
    left: 0;
    width: 260px;
    background: #f3f3f3;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    z-index: 999;
}

.submenu li a {
    display: block;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: 0.2s;
}

.submenu li a:hover {
    background: #e0e0e0;
}

/* Tampilkan saat aktif */
.menu-item.active .submenu {
    display: block;
}

/* ================= NAVBAR DROPDOWN CLICK ================= */

/* Struktur utama */
.navbar {
    background: var(--nav-bg);
    padding: 0 40px;
    display: flex;
    justify-content: center;
}

.menu {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 0;
    margin: 0;
}

.menu > li {
    position: relative;
}

.menu > li > a {
    display: block;
    padding: 16px 5px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s ease;
}

.menu > li > a:hover {
    border-bottom: 3px solid #ffd700;
}

/* ===== DROPDOWN BOX PUTIH ===== */
.submenu {
    position: absolute;
    top: 60px;
    left: 0;
    width: 280px;
    background: #f3f3f3;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 5px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.25s ease;
    z-index: 9999;
}

/* Isi dropdown */
.submenu li a {
    display: block;
    padding: 16px 22px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: 0.2s ease;
}

.submenu li a:hover {
    background: #e6e6e6;
}

/* Ketika aktif */
.menu-item.active .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ================= MODAL STYLE ================= */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    background: white;
    margin: 8% auto;
    padding: 30px;
    width: 60%;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
    max-height: 80vh;   /* Tambahkan ini */
    overflow-y: auto;   /* Tambahkan ini */
}

.modal-content h2 {
    margin-bottom: 10px;
    color: #0b4da2;
}

.modal-content p,
.modal-content ul {
    margin-bottom: 15px;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 25px;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ================= KEPALA SEKOLAH MODAL ================= */

.kepala-wrapper {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 20px;
}

.kepala-foto img {
    width: 180px;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.kepala-info {
    flex: 1;
}

.kepala-info p {
    margin-bottom: 15px;
    line-height: 1.6;
}