/* ========================================
   SMK PGRI 20 Jakarta - Main Stylesheet
   ======================================== */

/* --- 1. CSS VARIABLES & RESET --- */
:root {
    --primary: #0056b3; /* Royal Blue */
    --primary-dark: #003d82;
    --primary-light: #e6f0ff;
    --primary-lighter: #f0f7ff;
    
    --secondary: #1a1a1a;
    --text-dark: #1a1a1a;
    --text-light: #555555;
    --text-muted: #888888;
    
    --bg-light: #f5f6f8;  /* Soft off-white */
    --bg-white: #ffffff;
    --bg-accent: #fafbfc;
    
    --accent-green: #10a251;  /* More sophisticated green */
    --accent-cyan: #0694ca;   /* Cyan accent */
    --accent-purple: #6f42c1; /* Purple for jurusan */
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,86,179,0.12);
    --shadow-lg: 0 12px 32px rgba(0,86,179,0.15);
    
    --radius: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
    font-family: 'book antiqua', 'Times New Roman';
    background: linear-gradient(180deg, #fafbfc 0%, #f5f6f8 50%, #ffffff 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

/* --- 2. FLUID TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 { 
    font-family: 'Playfair Display', serif; 
    font-weight: 700; 
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--secondary);
}

h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
p { font-size: clamp(0.9rem, 2vw, 1rem); color: var(--text-light); margin-bottom: 1rem; }

/* --- 3. ANIMATED TITLES --- */
.section-title {
    text-align: center; 
    margin-bottom: 3rem; 
    position: relative;
    padding-top: 2rem;
}

.section-title h2 {
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 50%, var(--accent-green) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradientFlow 8s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    margin: 15px auto 0;
    transition: width 0.3s ease;
}
.section-title:hover::after { width: 100px; background-color: var(--accent-green); }

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%;
}

/* --- 4. BUTTONS --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Open Sans', sans-serif;
    min-height: 44px;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,86,179,0.2); }
.btn:active { transform: translateY(-1px); }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary { background: rgba(255,255,255,0.1); backdrop-filter: blur(5px); color: white; border: 1px solid rgba(255,255,255,0.5); }
.btn-secondary:hover { background: white; color: var(--primary); border-color: white; }

.btn-outline-dark { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: white; }

.btn-back { background: var(--bg-light); color: var(--text-dark); border: 1px solid #ddd; margin-bottom: 2rem; }
.btn-back:hover { background: #e9ecef; border-color: #ccc; transform: translateX(-5px); }

/* --- 5. NAVBAR --- */
header {
    background: rgba(255,255,255, 0.9); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: fixed;
    width: 100%; top: 0;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    padding: 15px 0;
}

header.shrink { 
    background: rgba(255, 255, 255, 0.98); 
    padding: 10px 0; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }

.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-logo { 
    width: 45px; height: 45px; 
    background: var(--primary); 
    color: white; 
    display: flex; justify-content: center; align-items: center; 
    font-family: 'Playfair Display', serif; 
    font-weight: 700; 
    font-size: 1rem; 
    border-radius: 50%; 
    transition: var(--transition);
    flex-shrink: 0;
}
.brand-logo:hover { background: var(--accent-green); transform: rotate(4deg); }

.brand-text h1 { font-size: 1.2rem; line-height: 1; margin: 0; color: var(--secondary); }
.brand-text p { font-size: 0.7rem; color: var(--primary); margin: 4px 0 0; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

.main-menu { display: flex; gap: 30px; }
.main-menu a { 
    font-weight: 600; 
    color: var(--primary); 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}
.main-menu a:hover { color: var(--accent-cyan); }
.main-menu a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background: var(--accent-green); transition: width 0.3s ease; }
.main-menu a:hover::after { width: 100%; }

.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); z-index: 10001; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }

/* --- 6. PAGE SECTIONS & ANIMATIONS --- */
.page-section { 
    display: none; 
    padding-top: 100px; 
    min-height: 80vh; 
    animation: fadeInPage 0.5s ease forwards;
    padding-bottom: 50px;
}
.page-section.active { display: block; }

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- 7. HERO SECTION --- */
.hero {
    position: relative; 
    min-height: 90vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    text-align: center;
    background-color: #002a4d;
    background-size: cover; background-position: center;
    margin-top: -80px; 
    padding-top: 80px;
}
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, rgba(0,42,77,0.8), rgba(0,42,77,0.9)); z-index: 1; }

.hero-content { position: relative; z-index: 2; width: 100%; max-width: 900px; padding: 0 20px; }
.hero-content h2 { font-family: 'Playfair Display', serif; font-weight: 700; margin-bottom: 1.5rem; color: white; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.hero-content p { font-size: clamp(1rem, 2.5vw, 1.25rem); margin-bottom: 2.5rem; opacity: 0.95; font-weight: 300; color: #eee; }

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-buttons .btn { min-width: 180px; }

/* --- 8. GRIDS & CARDS --- */
.grid-3 { display: grid; gap: 2rem; grid-template-columns: 1fr; } 
.grid-2 { display: grid; gap: 2rem; grid-template-columns: 1fr; }

.card { background: var(--bg-white); padding: 2rem; border-radius: var(--radius); border: 1px solid rgba(0,0,0,0.05); box-shadow: var(--shadow-sm); transition: var(--transition); height: 100%; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }

@media (min-width: 600px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-2 { grid-template-columns: repeat(2, 1fr); } 
    .mobile-toggle { display: none; }
    .main-menu { display: flex; }
}

/* --- 9. GALLERY COMPONENT (Reused) --- */
.gallery-scroll { 
    display: flex; 
    overflow-x: auto; 
    gap: 1.5rem; 
    padding-bottom: 2rem; 
    padding-left: 4px; 
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; 
}
.gallery-scroll::-webkit-scrollbar { height: 6px; }
.gallery-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.gallery-item { 
    flex: 0 0 auto; 
    width: 85vw; 
    max-width: 300px; 
    height: 250px; 
    border-radius: var(--radius); 
    overflow: hidden; 
    cursor: pointer; 
    position: relative; 
    scroll-snap-align: start; 
    border: 1px solid rgba(0,0,0,0.1); 
}
.gallery-item img { width: 100%; height: 100%; transition: 0.5s; }
.gallery-item:hover img { transform: scale(1.1); }

/* --- 10. DETAIL JURUSAN STYLES --- */
.jurusan-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.jurusan-header h2 { color: white; font-size: clamp(1.8rem, 5vw, 2.5rem); }
.jurusan-header p { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin: 0; }

.detail-block {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.detail-block h3 {
    color: var(--primary);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-list { padding-left: 1.2rem; }
.detail-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
    list-style-type: none;
}
.detail-list li::before {
    content: '•';
    color: var(--accent-green);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media(min-width: 768px) {
    .detail-grid { grid-template-columns: 1fr 1fr; }
}

/* --- 11. OTHER SECTIONS --- */
.sambutan-wrapper { 
    display: flex; gap: 3rem; 
    align-items: center; 
    margin-top: 3rem; 
    background: white; 
    padding: 3rem; 
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}
.kepsek-img { width: 100%; max-width: 300px; border-radius: var(--radius); filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15)); transition: var(--transition); margin: 0 auto; }
.about-highlight { background: var(--secondary); color: white; padding: 2.5rem; border-radius: var(--radius); }
.list-check li { margin-bottom: 1rem; padding-left: 1.5rem; position: relative; border-left: 3px solid var(--accent-green); padding-left: 1rem; font-size: 0.9rem; }
.skill-box { margin-bottom: 1.5rem; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem;}
.skill-bar { height: 6px; background: #e0e0e0; border-radius: 3px; overflow: hidden; }
.skill-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent-green)); width: 0; border-radius: 3px; transition: width 1.5s ease-out; }

.news-scroll { display: flex; overflow-x: auto; gap: 1.5rem; padding-bottom: 1.5rem; padding-left: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.news-scroll::-webkit-scrollbar { height: 6px; }
.news-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.news-card { flex: 0 0 auto; width: 85vw; max-width: 320px; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); scroll-snap-align: start; }
.news-thumb { height: 200px; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; transition: 0.6s; }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-content { padding: 1.5rem; text-align: left; }

.stats-section { background: white; padding: 3rem 0; margin-top: 3rem; border-top: 4px solid var(--primary); }
.stat-item { text-align: center; padding: 1rem; }
.stat-item h3 { font-size: clamp(2.5rem, 6vw, 3.5rem); color: var(--primary); margin: 0; font-weight: 700; font-family: 'Playfair Display', serif; }
.stat-item p { margin: 10px 0 0; color: var(--text-dark); font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; }

/* Tabs */
.program-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 2rem; }
.program-nav button { padding: 10px 20px; border: none; background: white; color: var(--text-light); cursor: pointer; transition: var(--transition); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; border-radius: 50px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.program-nav button.active-tab { background: var(--primary); color: white; box-shadow: 0 4px 10px rgba(0,86,179,0.3); }
.program-content { display: none; }
.program-content.active-content { display: block; animation: fadeInPage 0.4s ease; }

.table-responsive { width: 100%; overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.data-table { width: 100%; min-width: 600px; border-collapse: collapse; background: white; font-size: 0.9rem; }
.data-table th { background: var(--secondary); color: white; padding: 12px 15px; text-align: left; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 12px 15px; border-bottom: 1px solid #eee; }
.data-table tr:hover td { background: #f0f7ff; color: var(--primary); }

.testi-item { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 2rem; background: white; padding: 1.5rem; border-radius: var(--radius); border-left: 4px solid var(--accent-green); box-shadow: var(--shadow-sm); }
.testi-avatar { width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--bg-light); }

.lightbox { display: none; position: fixed; z-index: 2000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; padding: 20px; }
.lightbox.active { display: flex; opacity: 1; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 4px; box-shadow: 0 0 30px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 20px; right: 20px; color: white; font-size: 40px; cursor: pointer; background: rgba(255,255,255,0.1); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.spg-widget { position: fixed; bottom: 20px; right: 20px; z-index: 999; }
.spg-btn { width: 55px; height: 55px; background: #25D366; color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 28px; box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35); transition: var(--transition); }
.spg-btn:hover { transform: scale(1.12) translateY(-2px); background: #1fa85a; box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45); }

.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--secondary); color: white; padding: 12px 24px; border-radius: 50px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); font-size: 0.9rem; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 10001; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .main-menu { position: fixed; top: 0; right: 0; width: 80%; max-width: 300px; height: 100vh; background: white; flex-direction: column; padding: 80px 20px 20px; justify-content: flex-start; box-shadow: -5px 0 20px rgba(0,0,0,0.1); transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1); z-index: 10000; overflow-y: auto; }
    .main-menu.mobile-active { transform: translateX(0); }
    .main-menu::before { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: -1; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
    .main-menu.mobile-active::before { opacity: 1; pointer-events: auto; }
    .main-menu a { display: block; text-align: left; font-size: 1.1rem; width: 100%; padding: 15px 0; border-bottom: 1px solid #eee; color: var(--secondary); background: none !important; -webkit-text-fill-color: initial !important; animation: none !important; }
    .main-menu a:hover { color: var(--primary); padding-left: 10px; }
    .main-menu a::after { display: none; }
    .mobile-toggle { display: flex; } 
    .sambutan-wrapper { flex-direction: column; text-align: center; padding: 2rem; }
    .hero { margin-top: -60px; padding-top: 60px; min-height: 80vh; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
}
