/* =============================================
   SIT Bina Insan Palu - Main Stylesheet
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #3b82f6; --primary-dark: #2563eb; --primary-light: #93c5fd;
  --secondary: #ffffff; --accent: #1e40af;
  --text: #1e293b; --text-light: #64748b; --text-muted: #94a3b8;
  --bg: #ffffff; --bg-light: #f8fafc; --bg-gray: #f1f5f9;
  --border: #e2e8f0; --shadow: 0 4px 6px -1px rgba(0,0,0,.1);
  --shadow-lg: 0 20px 40px -12px rgba(0,0,0,.15);
  --radius: 12px; --radius-lg: 20px;
  --transition: all .3s ease;
}
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: 'Poppins', sans-serif; color: var(--text); line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; border: 3px solid var(--bg-light); transition: var(--transition); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
@supports (scrollbar-width: thin) {
  * { scrollbar-width: thin; scrollbar-color: var(--primary-light) var(--bg-light); }
}

/* --- Global Background Animation --- */
.bg-animated-assets {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background: var(--bg);
}

.asset {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    animation: floatBg 30s infinite linear;
}

.asset-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: 10%;
    left: -150px;
    animation-duration: 40s;
}

.asset-2 {
    width: 400px;
    height: 400px;
    background: rgba(59, 130, 246, 0.08);
    bottom: 5%;
    right: -200px;
    animation-duration: 50s;
    animation-delay: -10s;
}

.asset-3 {
    width: 250px;
    height: 250px;
    background: #e0f2fe;
    top: 50%;
    left: 20%;
    animation-duration: 35s;
    animation-delay: -5s;
    opacity: 0.3;
}

.asset-4 {
    width: 350px;
    height: 350px;
    background: #f1f5f9;
    top: -100px;
    right: 20%;
    animation-duration: 45s;
    animation-delay: -15s;
}

@keyframes floatBg {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(50px, 80px) rotate(120deg) scale(1.1); }
    66% { transform: translate(-30px, 40px) rotate(240deg) scale(0.9); }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

/* --- Loading Screen --- */
#loading-screen { position: fixed; inset: 0; background: linear-gradient(135deg, var(--primary), var(--accent)); z-index: 99999; display: flex; align-items: center; justify-content: center; transition: opacity .5s ease; }
#loading-screen.hidden { opacity: 0; pointer-events: none; }
.loader { text-align: center; color: #fff; }
.loader-circle { width: 50px; height: 50px; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; margin: 0 auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader p { font-size: 14px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }

/* --- Navbar --- */
.navbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 20px 0; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }
.navbar.scrolled, .navbar-solid { background: rgba(255,255,255,0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1); padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.3); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 42px; height: 42px; background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
.brand-name { font-size: 16px; font-weight: 700; color: #fff; display: block; line-height: 1.2; }
.brand-tagline { font-size: 11px; color: rgba(255,255,255,.8); font-weight: 400; }
.brand-logo-large { height: 48px; width: auto; display: block; object-fit: contain; transition: var(--transition); }
.navbar.scrolled .brand-logo-large, .navbar-solid .brand-logo-large { height: 42px; }
.navbar.scrolled .brand-name, .navbar-solid .brand-name { color: var(--text); }
.navbar.scrolled .brand-tagline, .navbar-solid .brand-tagline { color: var(--text-light); }
.navbar-menu { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 16px; color: rgba(255,255,255,.9); font-size: 14px; font-weight: 500; border-radius: 8px; transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.15); }
.navbar.scrolled .nav-link, .navbar-solid .nav-link { color: var(--text); }
.navbar.scrolled .nav-link:hover, .navbar.scrolled .nav-link.active,
.navbar-solid .nav-link:hover, .navbar-solid .nav-link.active { color: var(--primary); background: var(--bg-light); }
.btn-nav { background: var(--primary) !important; color: #fff !important; border-radius: 8px !important; }
.btn-nav:hover { background: var(--primary-dark) !important; transform: translateY(-1px); }

/* Hamburger */
.navbar-toggler { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; z-index: 1001; }
.navbar-toggler span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }
.navbar.scrolled .navbar-toggler span, .navbar-solid .navbar-toggler span { background: var(--text); }
.navbar-toggler.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.navbar-toggler.active span:nth-child(2) { opacity: 0; }
.navbar-toggler.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; border: none; border-radius: 10px; cursor: pointer; transition: var(--transition); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4); position: relative; overflow: hidden; z-index: 1; }
.btn-primary::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: 0.5s; z-index: -1; }
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* --- Section --- */
.section { padding: 100px 0; }
.section-white { background: var(--bg); }
.section-light { background: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-badge { display: inline-block; padding: 6px 20px; background: rgba(59, 130, 246, 0.1); color: var(--primary); font-size: 13px; font-weight: 600; border-radius: 50px; margin-bottom: 16px; letter-spacing: .5px; }
.section-title { font-size: 36px; font-weight: 700; color: var(--text); margin-bottom: 16px; line-height: 1.3; }
.section-subtitle { font-size: 16px; color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* --- Hero Slider Overhaul --- */
.hero-slider { 
    position: relative; 
    height: 85vh; 
    min-height: 650px; 
    overflow: hidden; 
    background: var(--primary); 
}
.hero-track { height: 100%; position: relative; }
.hero-slide { 
    position: absolute; 
    inset: 0; 
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s; 
    background-size: cover; 
    background-position: center; 
    display: flex; 
    align-items: center; 
    z-index: 1; 
    background-color: var(--primary); /* Fallback color */
}

/* Enhanced Overlay for readability */
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 1;
}

.hero-slide.active { opacity: 1; visibility: visible; z-index: 2; }
.hero-bg-particles { 
    position: absolute; 
    inset: 0; 
    z-index: 0; 
    overflow: hidden;
}
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle 20s linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-100vh) translateX(50px) rotate(360deg); opacity: 0; }
}

/* Differently sized balls */
.particle:nth-child(1) { width: 80px; height: 80px; left: 10%; bottom: -100px; animation-duration: 15s; }
.particle:nth-child(2) { width: 120px; height: 120px; left: 25%; bottom: -150px; animation-duration: 25s; animation-delay: 2s; }
.particle:nth-child(3) { width: 50px; height: 50px; left: 45%; bottom: -80px; animation-duration: 18s; animation-delay: 5s; }
.particle:nth-child(4) { width: 100px; height: 100px; left: 65%; bottom: -120px; animation-duration: 22s; }
.particle:nth-child(5) { width: 60px; height: 60px; left: 80%; bottom: -90px; animation-duration: 20s; animation-delay: 3s; }
.particle:nth-child(6) { width: 150px; height: 150px; left: 15%; bottom: -200px; animation-duration: 30s; opacity: 0.1; }
.particle:nth-child(7) { width: 40px; height: 40px; left: 55%; bottom: -70px; animation-duration: 12s; animation-delay: 1s; }
.particle:nth-child(8) { width: 90px; height: 90px; left: 85%; bottom: -110px; animation-duration: 24s; animation-delay: 4s; }
.particle:nth-child(9) { width: 110px; height: 110px; left: 35%; bottom: -140px; animation-duration: 28s; }
.particle:nth-child(10) { width: 70px; height: 70px; left: 75%; bottom: -100px; animation-duration: 16s; animation-delay: 6s; }


.hero-content { 
    position: relative; 
    z-index: 10; 
    color: #fff; 
    max-width: 900px; 
    margin: 0 auto; 
    text-align: center; 
    padding-top: 60px; /* Offset for navbar */
    padding-inline: 20px;
}

/* Staggered Animations */
.hero-slide.active .hero-badge { animation: fadeInUp 0.8s ease forwards 0.2s; opacity: 0; }
.hero-slide.active .hero-title { animation: fadeInUp 0.8s ease forwards 0.4s; opacity: 0; }
.hero-slide.active .hero-subtitle { animation: fadeInUp 0.8s ease forwards 0.6s; opacity: 0; }
.hero-slide.active .hero-buttons { animation: fadeInUp 0.8s ease forwards 0.8s; opacity: 0; }

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

.hero-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 24px; 
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(12px); 
    border-radius: 50px; 
    font-size: 14px; 
    font-weight: 600; 
    margin-bottom: 30px; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: float 4s ease-in-out infinite;
}

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

.hero-title { 
    font-size: clamp(36px, 6vw, 64px); 
    font-weight: 900; 
    line-height: 1.1; 
    margin-bottom: 24px; 
    text-shadow: 0 4px 20px rgba(0,0,0,0.5); 
    letter-spacing: -1px;
}

.hero-subtitle { 
    font-size: clamp(17px, 2.5vw, 22px); 
    opacity: 0.95; 
    margin-bottom: 40px; 
    line-height: 1.6; 
    max-width: 750px; 
    margin-inline: auto; 
    font-weight: 400;
}

.hero-buttons { 
    display: flex; 
    gap: 20px; 
    justify-content: center; 
    flex-wrap: wrap; 
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
    border-radius: 12px;
}

.hero-controls { 
    position: absolute; 
    top: 50%; 
    width: 100%; 
    display: flex; 
    justify-content: space-between; 
    padding: 0 40px; 
    transform: translateY(-50%); 
    z-index: 30; 
    pointer-events: none; 
}

.hero-prev, .hero-next { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    background: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(15px); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    color: #fff; 
    cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    pointer-events: auto; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px; 
}

.hero-prev:hover, .hero-next:hover { 
    background: var(--primary); 
    border-color: var(--primary); 
    transform: scale(1.1) rotate(0deg); 
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

.hero-dots { 
    position: absolute; 
    bottom: 60px; 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    gap: 14px; 
    z-index: 30; 
}

.hero-dots .dot { 
    width: 32px; 
    height: 4px; 
    border-radius: 2px; 
    background: rgba(255, 255, 255, 0.2); 
    cursor: pointer; 
    transition: all 0.4s ease; 
}

.hero-dots .dot.active { 
    background: var(--primary); 
    width: 50px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6); 
}

.hero-wave { 
    position: absolute; 
    bottom: -1px; 
    left: 0; 
    width: 100%; 
    z-index: 40; 
    opacity: 1;
}

.hero-wave svg { display: block; width: 100%; height: auto; }

/* --- About --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-content h3 { font-size: 28px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.about-content p { color: var(--text-light); margin-bottom: 16px; }
.about-features { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.about-feature { display: flex; gap: 16px; align-items: flex-start; }
.about-feature-icon { width: 48px; height: 48px; min-width: 48px; background: rgba(59, 130, 246, 0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 18px; }
.about-feature h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.about-feature p { font-size: 13px; margin: 0; }
.about-image-wrapper { position: relative; }
.about-image-placeholder { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--bg-light), var(--bg-gray)); border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--primary); font-size: 64px; gap: 12px; }
.about-image-placeholder span { font-size: 16px; font-weight: 600; color: var(--text-light); }
.about-image-decoration { position: absolute; bottom: -16px; right: -16px; width: 120px; height: 120px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: var(--radius-lg); z-index: -1; opacity: .2; }

/* --- Visi Misi --- */
.visimisi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.visimisi-card { background: var(--bg); padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); transition: var(--transition); }
.visimisi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.visimisi-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 20px; }
.visi-card .visimisi-icon { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.misi-card .visimisi-icon { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.visimisi-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.visimisi-card p { color: var(--text-light); font-style: italic; font-size: 15px; }
.visimisi-card ul { display: flex; flex-direction: column; gap: 12px; }
.visimisi-card li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-light); font-size: 14px; }
.visimisi-card li i { color: #10b981; margin-top: 4px; font-size: 14px; }

/* --- Jenjang --- */
.jenjang-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.jenjang-card { background: var(--bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }
.jenjang-card:hover { transform: translateY(-12px) scale(1.02); box-shadow: 0 30px 60px -12px rgba(0,0,0,0.15); border-color: var(--primary-light); }
.jenjang-card-header { padding: 28px 24px; color: #fff; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.jenjang-icon { width: 64px; height: 64px; background: rgba(255,255,255,.2); backdrop-filter: blur(8px); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.jenjang-badge { padding: 4px 14px; background: rgba(255,255,255,.25); backdrop-filter: blur(8px); border-radius: 50px; font-size: 13px; font-weight: 600; }
.jenjang-usia { font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.jenjang-card-body { padding: 24px; }
.jenjang-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.jenjang-desc { font-size: 13px; color: var(--text-light); line-height: 1.7; margin-bottom: 16px; }
.jenjang-keunggulan { margin-bottom: 20px; }
.jenjang-keunggulan h4 { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; color: var(--text); }
.jenjang-keunggulan h4 i { font-size: 12px; color: #f59e0b; }
.jenjang-keunggulan ul { display: flex; flex-direction: column; gap: 6px; }
.jenjang-keunggulan li { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text-light); line-height: 1.5; }
.jenjang-keunggulan li i { margin-top: 3px; font-size: 11px; flex-shrink: 0; }
.btn-jenjang { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; color: #fff; font-size: 13px; font-weight: 600; border-radius: 8px; transition: var(--transition); }
.btn-jenjang:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.2); color: #fff; }

/* --- Programs --- */
.programs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.program-card { background: var(--bg); padding: 36px 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); text-align: center; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }
.program-card:hover { transform: translateY(-10px) scale(1.03); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1); border-color: var(--primary-light); }
.program-icon { width: 72px; height: 72px; background: rgba(0, 210, 255, 0.1); border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 28px; color: var(--primary); transition: var(--transition); }
.program-card:hover .program-icon { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.program-title { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.program-desc { font-size: 13px; color: var(--text-light); line-height: 1.7; }

/* --- Facilities --- */
.facilities-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.facility-card { background: var(--bg); padding: 28px 20px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); transition: var(--transition); }
.facility-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.facility-icon { width: 56px; height: 56px; background: rgba(0, 210, 255, 0.1); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 22px; color: var(--primary); }
.facility-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.facility-card p { font-size: 12px; color: var(--text-light); }

/* --- Gallery --- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; }
.gallery-image { position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; }
.gallery-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg-gray), var(--border)); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); font-size: 36px; gap: 8px; }
.gallery-placeholder span { font-size: 12px; font-weight: 500; }
.gallery-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; color: #fff; opacity: 0; transition: var(--transition); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-image img { transform: scale(1.1); }
.gallery-overlay h4 { font-size: 14px; font-weight: 600; }
.gallery-category { font-size: 12px; opacity: .8; }

/* --- News --- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: var(--bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }
.news-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1); border-color: var(--primary-light); }
.news-image { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-gray); }
.news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .news-image img { transform: scale(1.05); }
.news-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 36px; background: linear-gradient(135deg, var(--bg-gray), var(--border)); }
.news-category { position: absolute; top: 12px; left: 12px; padding: 4px 14px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; border-radius: 6px; }
.news-body { padding: 20px; }
.news-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.news-meta i { margin-right: 4px; }
.news-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2; /* Standard property */
  height: calc(1.4em * 2); /* Fallback for non-webkit browsers */
}
.news-excerpt {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2; /* Standard property */
  line-height: 1.7; /* Ensure line-height is defined for height calculation */
  height: calc(1.7em * 2); /* Fallback for non-webkit browsers */
}
.news-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--primary); }
.news-link:hover { gap: 10px; }

/* --- Testimonials --- */
.testimonials-wrapper { max-width: 900px; margin: 0 auto; overflow: hidden; }
.testimonials-track { display: flex; transition: transform .5s ease; }
.testimonial-card { min-width: 100%; padding: 40px; background: var(--bg-light); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.testimonial-stars { color: #f59e0b; font-size: 16px; margin-bottom: 16px; display: flex; gap: 4px; }
.testimonial-text { font-size: 16px; color: var(--text-light); line-height: 1.8; margin-bottom: 24px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.testimonial-avatar { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; }
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; border-radius: 50%; }
.testimonial-author h4 { font-size: 15px; font-weight: 600; }
.testimonial-author span { font-size: 13px; color: var(--text-muted); }
.testimonials-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }
.testimonial-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); color: var(--text); }
.testimonial-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.testimonials-dots { display: flex; gap: 8px; }
.testimonials-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); cursor: pointer; transition: var(--transition); }
.testimonials-dots .dot.active { background: var(--primary); width: 28px; border-radius: 5px; }

/* Testimonial Rating Summary */
.rating-summary-box { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; background: #fff; border-radius: 20px; padding: 40px; box-shadow: var(--shadow); max-width: 800px; margin: 0 auto 50px; border: 1px solid var(--border); align-items: center; }
.rating-average-card { text-align: center; border-right: 1px solid var(--border); padding-right: 40px; }
.rating-number { font-size: 64px; font-weight: 800; color: var(--text-dark); line-height: 1; margin-bottom: 10px; }
.rating-stars { font-size: 18px; color: #f59e0b; margin-bottom: 10px; }
.rating-count { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.rating-distribution { display: flex; flex-direction: column; gap: 10px; }
.dist-row { display: flex; align-items: center; gap: 15px; }
.dist-label { font-size: 13px; font-weight: 600; color: var(--text); min-width: 35px; }
.dist-label i { font-size: 10px; color: #f59e0b; }
.dist-bar-wrapper { flex: 1; height: 8px; background: var(--bg-light); border-radius: 10px; overflow: hidden; }
.dist-bar-fill { height: 100%; background: linear-gradient(to right, #f59e0b, #fbbf24); border-radius: 10px; transition: width 1s ease-in-out; }
.dist-count { font-size: 13px; color: var(--text-muted); min-width: 20px; text-align: right; }

@media (max-width: 768px) {
    .rating-summary-box { grid-template-columns: 1fr; gap: 30px; padding: 30px 20px; }
    .rating-average-card { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 30px; }
}


/* Accreditation & Progress */
.accreditation-info {
    margin: 20px 0;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
}
.acc-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}
.gold-star {
    color: #fbbf24;
    font-size: 14px;
}
.acc-status {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}
.acc-progress-wrapper {
    margin-top: 10px;
}
.acc-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.acc-progress-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}
.acc-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1.5s ease;
}

/* --- Stats --- */
.section-stats { background: linear-gradient(135deg, #1e3a8a, var(--primary), #0ea5e9); padding: 80px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat-card { text-align: center; color: #fff; padding: 24px; }
.stat-icon { font-size: 36px; margin-bottom: 12px; opacity: .9; }
.stat-number { font-size: 48px; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 14px; opacity: .85; margin-top: 4px; }

/* --- CTA --- */
.section-cta { background: linear-gradient(135deg, var(--primary), var(--accent)); padding: 80px 0; }
.cta-content { text-align: center; color: #fff; max-width: 680px; margin: 0 auto; }
.cta-content h2 { font-size: 36px; font-weight: 700; margin-bottom: 16px; }
.cta-content p { font-size: 16px; opacity: .9; margin-bottom: 32px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- Contact --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.contact-info h3, .contact-form-wrapper h3 { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 20px; }
.contact-icon { width: 48px; height: 48px; min-width: 48px; background: rgba(59, 130, 246, 0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 18px; }
.contact-item h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.contact-item p { font-size: 13px; color: var(--text-light); }
.contact-socials { display: flex; gap: 12px; margin-top: 24px; }
.social-link { width: 42px; height: 42px; border-radius: 10px; background: var(--bg-light); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 16px; transition: var(--transition); }
.social-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.required { color: #ef4444; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; font-family: 'Poppins', sans-serif; font-size: 14px; transition: var(--transition); background: var(--bg); color: var(--text); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.form-group textarea { resize: vertical; min-height: 120px; }
.map-wrapper { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }

/* --- Alert --- */
.alert { padding: 14px 20px; border-radius: 10px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* --- Footer --- */
.footer { background: #0f172a; color: #94a3b8; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid #1e293b; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tagline { color: #64748b; }
.footer-about p { font-size: 13px; line-height: 1.7; margin-bottom: 20px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials .social-link { background: #1e293b; border-color: #334155; color: #94a3b8; }
.footer-socials .social-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.footer-links h4, .footer-contact h4 { color: #fff; font-size: 16px; margin-bottom: 20px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 13px; color: #94a3b8; transition: var(--transition); }
.footer-links a:hover { color: var(--primary-light); padding-left: 4px; }
.footer-contact-item { display: flex; gap: 10px; margin-bottom: 14px; font-size: 13px; }
.footer-contact-item i { color: var(--primary); margin-top: 3px; }
.footer-bottom { text-align: center; padding: 24px 0; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* --- Back to Top --- */
.back-to-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition); z-index: 99; box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4); }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-2px); }

/* --- Single Article --- */
.single-article { padding: 120px 0 60px; }
.article-header { max-width: 800px; margin: 0 auto 30px; }
.article-back { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.article-back:hover { gap: 10px; }
.article-header h1 { font-size: 32px; font-weight: 700; margin: 12px 0 16px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 13px; color: var(--text-muted); }
.article-meta i { margin-right: 4px; }
.article-image { max-width: 800px; margin: 0 auto 30px; border-radius: var(--radius-lg); overflow: hidden; }
.article-image img { width: 100%; }
.article-content { max-width: 800px; margin: 0 auto; font-size: 16px; line-height: 1.8; color: var(--text-light); }
.article-share { max-width: 800px; margin: 30px auto 0; padding-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.share-btn { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; transition: var(--transition); }
.share-btn.whatsapp { background: #25d366; }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn:hover { transform: translateY(-2px); }

/* --- Scroll Reveal --- */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Floating WhatsApp Button */
.floating-wa-btn {
    position: fixed;
    bottom: 90px;
    right: 25px;
    background: #25d366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 998;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-wa-btn span { display: none; }

.floating-wa-btn i { font-size: 30px; }
.floating-wa-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: #128c7e;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    color: #fff;
}

.floating-wa-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #25d366;
    border-radius: 50px;
    z-index: -1;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .programs-grid { grid-template-columns: repeat(2, 1fr); }
  .facilities-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .jenjang-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-title { font-size: 28px; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 15px; }
  .hero-stats { gap: 24px; }
  .hero-stat-number { font-size: 28px; }
  .navbar-toggler { display: flex; }
  .navbar-menu { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: #fff; flex-direction: column; padding: 80px 24px 24px; box-shadow: var(--shadow-lg); transition: right .3s ease; }
  .navbar-menu.active { right: 0; }
  .navbar-menu .nav-link { color: var(--text) !important; width: 100%; padding: 12px 16px; }
  .navbar-menu .nav-link:hover { background: var(--bg-light); color: var(--primary) !important; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-image { order: -1; }
  .visimisi-grid { grid-template-columns: 1fr; }
  
  /* 2 Column Mobile Request */
  .programs-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .jenjang-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  
  .program-card { padding: 20px 12px; }
  .program-icon { width: 50px; height: 50px; font-size: 20px; margin-bottom: 12px; }
  .program-title { font-size: 14px; margin-bottom: 6px; }
  .program-desc { font-size: 11px; }
  .program-desc { font-size: 11px; }

  .floating-wa-btn { width: 50px; height: 50px; bottom: 85px; right: 20px; }
  .floating-wa-btn i { font-size: 25px; }

  .news-body { padding: 12px; }
  .news-title { font-size: 13px; height: calc(1.4em * 2); }
  .news-excerpt { font-size: 11px; height: calc(1.7em * 2); }
  .news-meta { gap: 8px; font-size: 10px; }
  
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stat-number { font-size: 36px; }
  .cta-content h2 { font-size: 28px; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .facilities-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* --- Registration Modal --- */
.reg-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s ease; padding: 20px; }
.reg-modal.active { opacity: 1; visibility: visible; }
.reg-modal-content { background: #fff; width: 100%; max-width: 600px; border-radius: 24px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); transform: translateY(30px) scale(0.95); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); max-height: 90vh; display: flex; flex-direction: column; }
.reg-modal.active .reg-modal-content { transform: translateY(0) scale(1); }
.reg-modal-header { padding: 30px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.reg-badge { padding: 4px 14px; background: rgba(255,255,255,0.2); border-radius: 50px; font-size: 13px; font-weight: 600; margin-bottom: 8px; display: inline-block; }
.reg-modal-header h3 { font-size: 20px; font-weight: 700; }
.reg-modal-close { background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; line-height: 1; opacity: 0.7; transition: 0.3s; }
.reg-modal-close:hover { opacity: 1; transform: scale(1.1); }
.reg-modal-body { padding: 30px; overflow-y: auto; }
.reg-banner-wrapper { margin-bottom: 24px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.reg-banner-wrapper img { width: 100%; display: block; }
.reg-info-text { font-size: 15px; color: var(--text-light); line-height: 1.8; }
.reg-modal-footer { padding: 24px 30px; border-top: 1px solid var(--border); text-align: center; }
.btn-reg-cta { display: inline-flex; align-items: center; gap: 10px; padding: 14px 40px; color: #fff; font-weight: 700; border-radius: 50px; text-decoration: none; transition: 0.3s; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.btn-reg-cta:hover { transform: translateY(-3px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }

@media (max-width: 480px) {
    .reg-modal-header { padding: 18px 24px; }
    .reg-modal-body { padding: 24px; }
    .reg-modal-header h3 { font-size: 18px; }
    .reg-info-text { font-size: 14px; }
}

/* --- About Gallery & Slider --- */
.clickable-gallery { cursor: pointer; position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); transition: var(--transition); }
.clickable-gallery:hover { transform: translateY(-5px); }
.clickable-gallery img { width: 100%; transition: transform 0.5s ease; }
.clickable-gallery:hover img { transform: scale(1.05); }

.about-gallery-overlay { position: absolute; inset: 0; background: rgba(59, 130, 246, 0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); color: #fff; text-align: center; padding: 20px; }
.clickable-gallery:hover .about-gallery-overlay { opacity: 1; }
.overlay-content i { font-size: 40px; margin-bottom: 12px; transform: scale(0.5); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.clickable-gallery:hover .overlay-content i { transform: scale(1); }
.overlay-content span { display: block; font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.photo-title { margin-top: 8px; font-size: 14px; opacity: 0.9; font-weight: 400; }

.gallery-slider-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.95); z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.3s; }
.gallery-slider-modal.active { opacity: 1; visibility: visible; }
.slider-container { width: 100%; max-width: 1000px; padding: 40px; display: flex; align-items: center; gap: 20px; position: relative; }
.slider-content { flex: 1; position: relative; text-align: center; }
.slider-content img { max-width: 100%; max-height: 70vh; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.5); transition: opacity 0.3s ease; }
.slider-caption { margin-top: 20px; color: #fff; }
.slider-caption h4 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.slider-counter { font-size: 14px; color: rgba(255,255,255,0.6); }
.slider-nav { background: rgba(255,255,255,0.1); border: none; color: #fff; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: 0.3s; }
.slider-nav:hover { background: var(--primary); transform: scale(1.1); }
.slider-close { position: absolute; top: 30px; right: 30px; background: none; border: none; color: #fff; font-size: 40px; cursor: pointer; z-index: 10001; opacity: 0.7; }
.slider-close:hover { opacity: 1; transform: rotate(90deg); }

@media (max-width: 768px) {
    .slider-container { padding: 20px; }
    .slider-nav { position: absolute; bottom: -80px; width: 44px; height: 44px; }
    .slider-nav.prev { left: 30%; }
    .slider-nav.next { right: 30%; }
    .slider-caption h4 { font-size: 16px; }
}
