/* ==================== VARIABLES ==================== */
:root {
    --primary-color: #1a5f3a;
    --primary-dark: #0f3d22;
    --primary-light: #2d8659;
    --secondary-color: #f39c12;
    --secondary-light: #f5b041;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #ecf0f1;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== HERO SECTION ==================== */
.hero-struktur {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--primary-light) 100%);
    padding: clamp(60px, 10vw, 100px) 20px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-struktur::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero-struktur::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-30px) translateX(20px);
    }
}

.hero-struktur-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    animation: slideInUp 0.8s ease-out;
}

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

.hero-struktur h1 {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero-struktur p {
    font-size: clamp(14px, 2vw, 20px);
    opacity: 0.95;
    line-height: 1.8;
    font-weight: 300;
}

/* ==================== CONTENT SECTION ==================== */
.struktur-content-section {
    padding: clamp(60px, 10vw, 100px) 20px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

/* ==================== STRUKTUR BAGAN BOX ==================== */
.struktur-bagan-box {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: clamp(50px, 8vw, 80px);
    animation: fadeInUp 0.8s ease-out;
}

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

.struktur-bagan-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: clamp(35px, 5vw, 50px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.struktur-bagan-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent);
}

.struktur-bagan-header i {
    font-size: clamp(40px, 6vw, 60px);
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: scaleIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.struktur-bagan-header h3 {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.struktur-bagan-header p {
    font-size: clamp(13px, 1.5vw, 15px);
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ==================== STRUKTUR BAGAN IMAGE ==================== */
.struktur-bagan-image {
    position: relative;
    overflow: hidden;
    padding: clamp(25px, 4vw, 40px);
    cursor: pointer;
}

.struktur-bagan-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: var(--transition);
}

.struktur-bagan-image:hover img {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.zoom-indicator {
    position: absolute;
    bottom: 50px;
    right: 50px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: clamp(12px, 1.5vw, 14px);
    font-weight: 600;
    pointer-events: none;
    transition: var(--transition);
}

.struktur-bagan-image:hover .zoom-indicator {
    background: var(--primary-color);
    transform: scale(1.05);
}

/* ==================== IMAGE MODAL ==================== */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    text-align: center;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--primary-color);
    color: white;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-info {
    margin-top: 20px;
    color: white;
    font-size: clamp(13px, 1.5vw, 15px);
    font-weight: 600;
}

/* ==================== INFO GRID ==================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(25px, 4vw, 35px);
    margin-bottom: clamp(60px, 10vw, 100px);
}

/* ==================== INFO CARD ==================== */
.info-card {
    background: white;
    padding: clamp(30px, 5vw, 40px);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid var(--border-color);
    animation: fadeInUp 0.6s ease-out backwards;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.info-icon {
    width: clamp(60px, 8vw, 75px);
    height: clamp(60px, 8vw, 75px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(28px, 4vw, 35px);
    color: white;
    margin-bottom: 20px;
    transition: var(--transition);
}

.info-icon.kepemimpinan {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.info-icon.koordinasi {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    box-shadow: 0 8px 16px rgba(245, 87, 108, 0.3);
}

.info-icon.transparansi {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    box-shadow: 0 8px 16px rgba(79, 172, 254, 0.3);
}

.info-card:hover .info-icon {
    transform: rotateY(360deg);
}

.info-card h4 {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.info-card p {
    font-size: clamp(13px, 1.5vw, 15px);
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

/* ==================== EMPTY STRUKTUR ==================== */
.empty-struktur {
    background: white;
    padding: clamp(60px, 10vw, 100px) 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: clamp(60px, 10vw, 100px);
}

.empty-struktur i {
    font-size: clamp(60px, 10vw, 100px);
    color: #cbd5e0;
    margin-bottom: 25px;
    display: block;
}

.empty-struktur h3 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.empty-struktur p {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-light);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== GURU SECTION ==================== */
.guru-section {
    margin-top: clamp(60px, 10vw, 100px);
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto clamp(40px, 8vw, 60px);
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-intro h2 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-intro h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--secondary-light));
    border-radius: 2px;
}

.section-intro p {
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-light);
    line-height: 1.8;
    margin-top: 30px;
}

/* ==================== FILTER MAPEL ==================== */
.filter-mapel {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 60px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.filter-btn {
    padding: clamp(10px, 1.5vw, 14px) clamp(20px, 3vw, 30px);
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(13px, 1.5vw, 15px);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.filter-btn i {
    font-size: clamp(14px, 1.8vw, 16px);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 95, 58, 0.35);
}

/* ==================== GURU GRID ==================== */
.guru-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: clamp(25px, 4vw, 35px);
    margin-bottom: clamp(60px, 10vw, 100px);
}

/* ==================== GURU CARD ==================== */
.guru-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out backwards;
    border: 2px solid transparent;
}

.guru-card:nth-child(1) { animation-delay: 0.1s; }
.guru-card:nth-child(2) { animation-delay: 0.2s; }
.guru-card:nth-child(3) { animation-delay: 0.3s; }
.guru-card:nth-child(4) { animation-delay: 0.4s; }
.guru-card:nth-child(5) { animation-delay: 0.5s; }
.guru-card:nth-child(6) { animation-delay: 0.6s; }

.guru-card.hide {
    display: none;
}

.guru-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* ==================== GURU IMAGE ==================== */
.guru-image {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.guru-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.guru-card:hover .guru-image img {
    transform: scale(1.12);
}

.guru-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.guru-image-placeholder i {
    font-size: 120px;
    color: rgba(255, 255, 255, 0.3);
}

.guru-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 25px 20px 18px;
}

.guru-badge span {
    background: var(--secondary-color);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: clamp(11px, 1.3vw, 13px);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==================== GURU INFO ==================== */
.guru-info {
    padding: clamp(20px, 3vw, 25px);
}

.guru-info h4 {
    font-size: clamp(17px, 2.5vw, 20px);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.guru-jabatan {
    color: #666;
    font-size: clamp(13px, 1.5vw, 15px);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guru-jabatan i {
    color: var(--secondary-color);
}

.guru-nip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 18px;
}

.guru-nip i {
    color: var(--primary-color);
    font-size: clamp(13px, 1.5vw, 15px);
}

.guru-nip code {
    color: #666;
    font-size: clamp(11px, 1.3vw, 13px);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.guru-actions {
    margin-top: 20px;
}

.guru-email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: #f5f5f5;
    color: var(--primary-color);
    border-radius: 10px;
    text-decoration: none;
    font-size: clamp(12px, 1.5vw, 14px);
    font-weight: 600;
    transition: var(--transition);
}

.guru-email-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 58, 0.25);
}

/* ==================== STATS SUMMARY ==================== */
.stats-summary {
    background: white;
    padding: clamp(40px, 6vw, 60px);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    margin-bottom: clamp(40px, 6vw, 60px);
}

.stats-header {
    text-align: center;
    margin-bottom: clamp(30px, 5vw, 50px);
}

.stats-header h3 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stats-header p {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(20px, 3vw, 30px);
}

.stat-card {
    text-align: center;
    padding: clamp(25px, 4vw, 35px);
    border-radius: 15px;
    transition: var(--transition);
}

.stat-card.total {
    background: linear-gradient(135deg, #f8f9fa, #e8f5e9);
}

.stat-card.pendidikan {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
}

.stat-card.sertifikat {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-card.total .stat-number {
    color: var(--primary-color);
}

.stat-card.pendidikan .stat-number {
    color: #e65100;
}

.stat-card.sertifikat .stat-number {
    color: #6a1b9a;
}

.stat-label {
    font-size: clamp(12px, 1.5vw, 14px);
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== EMPTY GURU ==================== */
.empty-guru {
    background: white;
    padding: clamp(60px, 10vw, 100px) 40px;
    border-radius: 18px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.empty-guru i {
    font-size: clamp(60px, 10vw, 100px);
    color: #cbd5e0;
    margin-bottom: 25px;
    display: block;
}

.empty-guru h3 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.empty-guru p {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-light);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 30px;
}

.empty-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-empty-primary,
.btn-empty-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: clamp(12px, 2vw, 16px) clamp(24px, 3vw, 32px);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(13px, 1.5vw, 15px);
    transition: var(--transition);
}

.btn-empty-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 95, 58, 0.25);
}

.btn-empty-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 95, 58, 0.35);
}

.btn-empty-secondary {
    background: #f8f9fa;
    color: var(--text-dark);
}

.btn-empty-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .guru-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-struktur {
        min-height: auto;
        padding: 50px 20px;
    }

    .guru-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 25px;
    }

    .filter-mapel {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .zoom-indicator {
        bottom: 35px;
        right: 35px;
        font-size: 11px;
        padding: 8px 14px;
    }

    .modal-close {
        top: -45px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .struktur-content-section {
        padding: 40px 15px;
    }

    .guru-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .empty-actions {
        flex-direction: column;
    }

    .btn-empty-primary,
    .btn-empty-secondary {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 360px) {
    .hero-struktur h1 {
        font-size: 22px;
    }

    .guru-image {
        height: 250px;
    }
}

/* ==================== ANIMATIONS ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}