/* ============================================
   STRUKTUR ORGANISASI UNES
   Desain untuk Usia 50+ (Readable & Solid)
   ============================================ */

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* WARNA SOLID - Kontras Tinggi */
    --color-primary: #1a365d;      /* Biru Tua Solid */
    --color-primary-dark: #0f2744;
    --color-secondary: #2c5282;    /* Biru Sedang */
    --color-accent: #c53030;       /* Merah Solid */
    --color-gold: #b7791f;         /* Emas */
    --color-green: #276749;        /* Hijau */
    --color-purple: #553c9a;       /* Ungu */
    
    /* Background */
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-gray: #e2e8f0;
    
    /* Teks */
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-light: #718096;
    
    /* Font */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    font-size: 18px; /* Font Base Besar */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
}

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

/* ============================================
   HEADER
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo-section p {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 500;
}

/* SEARCH */
.search-section {
    flex: 1;
    max-width: 500px;
    min-width: 280px;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    background: rgba(255,255,255,0.95);
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: white;
    background: white;
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
}

#searchInput::placeholder {
    color: var(--text-light);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
    padding: 40px 0;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
}

.page-title h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.update-info {
    font-size: 1.1rem;
    color: var(--text-medium);
    background: var(--bg-gray);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-results {
    background: white;
    border: 4px solid var(--color-gold);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.search-results h3 {
    font-size: 1.8rem;
    color: var(--color-gold);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-gold);
}

.result-item {
    background: var(--bg-light);
    border-left: 5px solid var(--color-secondary);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 0 10px 10px 0;
}

.result-item .nama {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
}

.result-item .jabatan {
    font-size: 1.1rem;
    color: var(--color-accent);
    font-weight: 600;
}

.result-item .unit {
    font-size: 1rem;
    color: var(--text-medium);
    margin-top: 5px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-medium);
    font-size: 1.2rem;
}

.btn-clear {
    display: block;
    margin: 20px auto 0;
    padding: 12px 30px;
    font-size: 1.1rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #9b2c2c;
    transform: translateY(-2px);
}

/* ============================================
   ORGANIZATION STRUCTURE
   ============================================ */
.org-structure {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* LEVEL STYLING */
.level {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.level-header {
    padding: 20px 30px;
    color: white;
    text-align: center;
}

.level-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.level-content {
    padding: 30px;
}

/* Level Colors */
.level-1 .level-header { background: var(--color-gold); }
.level-2 .level-header { background: var(--color-primary); }
.level-3 .level-header { background: var(--color-green); }
.level-4 .level-header { background: var(--color-purple); }
.level-5 .level-header { background: var(--color-secondary); }

/* CONNECTOR */
.connector {
    width: 4px;
    height: 30px;
    background: var(--color-secondary);
    margin: 0 auto;
    position: relative;
}

.connector::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -8px;
    width: 20px;
    height: 20px;
    background: var(--color-secondary);
    border-radius: 50%;
}

/* ============================================
   POSITION BOXES (Yayasan & Rektorat)
   ============================================ */
.position-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.position-row:last-child {
    margin-bottom: 0;
}

.position-box {
    background: var(--bg-light);
    border: 3px solid var(--bg-gray);
    border-radius: 12px;
    padding: 20px 25px;
    min-width: 280px;
    max-width: 400px;
    text-align: center;
    transition: all 0.3s ease;
}

.position-box:hover {
    border-color: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.position-box.rektor {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-color: var(--color-primary);
    color: white;
    min-width: 350px;
}

.position-box.rektor .jabatan {
    color: #ffd700;
    font-size: 1.2rem;
}

.position-box.rektor .nama {
    color: #ffd700;
    font-size: 1.4rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.position-box .jabatan {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.position-box .nama {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.position-box .nidn {
    display: block;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* KETUA Special */
.ketua .position-box {
    background: #fffbeb;
    border-color: var(--color-gold);
}

.ketua .position-box .jabatan {
    color: var(--color-gold);
}

/* ============================================
   LEMBAGA CARDS
   ============================================ */
.lembaga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.lembaga-card {
    background: var(--bg-light);
    border: 3px solid var(--bg-gray);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.lembaga-card:hover {
    border-color: var(--color-green);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.lembaga-card h4 {
    font-size: 1.2rem;
    color: var(--color-green);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-gray);
}

.lembaga-card p {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.lembaga-card p strong {
    color: var(--color-primary);
}

/* ============================================
   FAKULTAS CARDS
   ============================================ */
.fakultas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.fakultas-card {
    background: white;
    border: 3px solid var(--bg-gray);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.fakultas-card:hover {
    border-color: var(--color-purple);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.fakultas-header {
    padding: 20px;
    color: white;
}

.fakultas-header h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.fakultas-header .dekan {
    font-size: 1rem;
    opacity: 0.95;
}

.fakultas-header.ekonomi { background: #2f855a; }
.fakultas-header.hukum { background: #c53030; }
.fakultas-header.fisipol { background: #2b6cb0; }
.fakultas-header.pertanian { background: #975a16; }
.fakultas-header.teknik { background: #2d3748; }
.fakultas-header.fkip { background: #6b46c1; }
.fakultas-header.sastra { background: #b83280; }

.prodi-list {
    padding: 20px;
}

.prodi-item {
    background: var(--bg-light);
    border-left: 4px solid var(--color-purple);
    padding: 12px 15px;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
}

.prodi-item:last-child {
    margin-bottom: 0;
}

.prodi-nama {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.kaprodi {
    display: block;
    font-size: 0.95rem;
    color: var(--text-medium);
}

/* ============================================
   UPT SECTION
   ============================================ */
.upt-card {
    background: var(--bg-light);
    border: 3px solid var(--color-secondary);
    border-radius: 12px;
    padding: 25px;
}

.upt-card h4 {
    font-size: 1.4rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-gray);
}

.upt-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.upt-item {
    text-align: center;
    padding: 15px 25px;
    background: white;
    border-radius: 10px;
    min-width: 250px;
}

.upt-item .jabatan {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.upt-item .nama {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ============================================
   STATISTIK
   ============================================ */
.statistik-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.statistik-section h3 {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 30px;
}

.statistik-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--bg-light);
    border: 4px solid var(--bg-gray);
    border-radius: 15px;
    padding: 30px 50px;
    min-width: 200px;
}

.stat-box.total {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-color: var(--color-primary);
    color: white;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-box.total .stat-number {
    color: #ffd700;
}

.stat-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-medium);
}

.stat-box.total .stat-label {
    color: white;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-primary-dark);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    font-size: 1rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

/* ============================================
   HIGHLIGHT (Search Results)
   ============================================ */
.highlight {
    animation: highlightPulse 2s ease;
    border-color: var(--color-gold) !important;
    box-shadow: 0 0 20px rgba(183, 121, 31, 0.5) !important;
}

@keyframes highlightPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .search-section {
        width: 100%;
        max-width: none;
    }
    
    .position-row {
        flex-direction: column;
        align-items: center;
    }
    
    .position-box {
        width: 100%;
        max-width: none;
    }
    
    .fakultas-grid {
        grid-template-columns: 1fr;
    }
    
    .upt-row {
        flex-direction: column;
    }
    
    .statistik-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .page-title h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    
    .level-content {
        padding: 20px;
    }
    
    .lembaga-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header {
        position: static;
    }
    
    .search-section,
    .btn-clear {
        display: none !important;
    }
    
    .level {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
