/* =========================================
   CSS VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #2563eb; 
    --primary-hover: #1d4ed8; 
    --bg-color: #ffffff; 
    --bg-light: #f8fafc; 
    --text-main: #0f172a; 
    --text-muted: #64748b; 
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

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

.text-black {
    color: #0f172a;
}

.fw-500 {
    font-weight: 500;
}

.mt-1 {
    margin-top: 1rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-main);
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* =========================================
   NAVBAR & LOGO WEBSITE
   ========================================= */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Website */
.logo-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.logo-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.3px;
}

.logo-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}

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

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.hero {
    margin-top: 60px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.hero-img {
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    object-fit: cover;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.student-count {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 8px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; 
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background-color: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f8fafc;
}

tr:hover {
    background-color: #f1f5f9;
}

/* =========================================
   CARD DAFTAR SISWA (5 per baris desktop)
   ========================================= */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.card {
    background-color: white;
    padding: 24px 16px 20px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    min-width: 0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.student-img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 3px solid var(--bg-light);
    flex-shrink: 0;
    max-width: 100%;
}

.card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-word;
}

.card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Tablet */
@media screen and (max-width: 768px) {
    .grid-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .student-img {
        width: 85px;
        height: 85px;
        margin-bottom: 10px;
    }

    .card {
        padding: 16px 10px 14px 10px;
    }

    .card h3 {
        font-size: 0.9rem;
    }
}

/* Mobile */
@media screen and (max-width: 480px) {
    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .student-img {
        width: 75px;
        height: 75px;
        margin-bottom: 8px;
    }

    .card {
        padding: 14px 8px 12px 8px;
    }

    .card h3 {
        font-size: 0.85rem;
    }

    .card p {
        font-size: 0.8rem;
    }
}

/* =========================================
   STRUKTUR ORGANISASI
   ========================================= */
.org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.org-row {
    display: grid;
    gap: 24px;
    width: 100%;
    justify-items: center;
}

.org-row-1 {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
}

.org-row-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    margin: 0 auto;
}

.org-row-4 {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1100px;
    margin: 0 auto;
}

.org-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    font-weight: 600;
    cursor: default;
    position: relative;
    transition: all 0.18s ease;
    width: 100%;
    min-width: 0;
}

.node-title {
    display: inline-block;
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: var(--shadow);
    font-size: 0.95rem;
    white-space: nowrap;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.org-node .popup-card {
    position: static;
    transform: none;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    padding: 20px 16px 18px 16px;
    width: 100%;
    max-width: 240px;
    text-align: center;
    opacity: 1;
    visibility: visible;
    margin-top: 14px;
    z-index: 10;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.org-node .popup-card::before {
    display: none;
}

.popup-card img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 3px solid var(--bg-light);
    flex-shrink: 0;
    max-width: 100%;
}

.popup-card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.popup-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Tablet */
@media screen and (max-width: 768px) {
    .org-row-4 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 520px;
    }

    .org-row-2 {
        max-width: 100%;
    }

    .org-node .popup-card {
        max-width: 210px;
        padding: 18px 14px 16px 14px;
    }

    .popup-card img {
        width: 90px;
        height: 90px;
        margin-bottom: 12px;
    }

    .popup-card h3 {
        font-size: 0.95rem;
    }

    .popup-card p {
        font-size: 0.85rem;
    }

    .node-title {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .org-row {
        gap: 20px;
    }

    .org-tree {
        gap: 30px;
    }
}

/* Mobile */
@media screen and (max-width: 480px) {
    .org-row-1,
    .org-row-2,
    .org-row-4 {
        max-width: 100%;
    }

    .org-row-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .org-node .popup-card {
        max-width: 100%;
        padding: 14px 10px 12px 10px;
        margin-top: 10px;
    }

    .popup-card img {
        width: 70px;
        height: 70px;
        margin-bottom: 10px;
    }

    .popup-card h3 {
        font-size: 0.85rem;
    }

    .popup-card p {
        font-size: 0.78rem;
    }

    .node-title {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .org-row {
        gap: 12px;
    }

    .org-tree {
        gap: 24px;
    }
}

/* Extra small mobile */
@media screen and (max-width: 360px) {
    .org-row-4 {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .popup-card img {
        width: 60px;
        height: 60px;
    }

    .node-title {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

.ig-card {
    max-width: 500px;
    margin: 0 auto;
    background-color: white;
    padding: 40px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.ig-card svg {
    margin-bottom: 15px;
}

.ig-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.ig-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

footer {
    background-color: var(--text-main);
    color: white;
    padding: 25px 0;
    margin-top: 40px;
}

/* =========================================
   RESPONSIVE NAVBAR & LOGO
   ========================================= */
@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 60px;
        right: -100%;
        background-color: white;
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 0;
        transition: 0.3s ease;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        padding: 15px 0;
        border-bottom: 1px solid #f1f5f9;
    }

    /* Responsive Logo */
    .logo-img {
        width: 64px;
        height: 64px;
    }

    .logo-title {
        font-size: 1.45rem;
    }

    .logo-subtitle {
        font-size: 0.88rem;
    }

    .logo-link {
        gap: 12px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section-padding {
        padding: 50px 0;
    }
}

@media screen and (max-width: 480px) {
    /* Responsive Logo - Mobile */
    .logo-img {
        width: 56px;
        height: 56px;
    }

    .logo-title {
        font-size: 1.3rem;
    }

    .logo-subtitle {
        font-size: 0.82rem;
    }

    .logo-link {
        gap: 10px;
    }

    .nav-container {
        padding: 12px 16px;
    }
}

.hero-slider{
    position:relative;
    width:100%;
    max-width:600px;
    aspect-ratio:16/9;
    margin:auto;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 8px 20px rgba(0,0,0,.15);
}

.slide{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    opacity:0;
    visibility:hidden;
    transition: opacity .7s ease, visibility .7s;
}

.slide.active{
    opacity:1;
    visibility:visible;
}

.slider-btn{
    display:none;
}

.prev{
    left:15px;
}

.next{
    right:15px;
}

.slider-dots{
    position:absolute;
    left:50%;
    bottom:15px;
    transform:translateX(-50%);
    display:flex;
    gap:8px;
    z-index:10;
}

.slider-dots span{
    width:8px;
    height:8px;
    border-radius:50%;
    background:rgba(255,255,255,.5);
    transition:.3s;
}

.slider-dots span.active{
    width:24px;
    border-radius:999px;
    background:#fff;
}