/* ==========================================================================
   Impeleo Learn 3.1 - front page sections (loaded on the front page only)
   ========================================================================== */

/* Generic section scaffolding */
.section { padding: 80px 0; }
.section-alt { background: var(--light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.eyebrow { color: var(--secondary); font-weight: 700; font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 8px; }
.section-heading { font-size: var(--fs-xl); margin-bottom: 12px; position: relative; padding-bottom: 16px; }
.section-heading::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; height: 4px; margin-left: -28px; background: var(--accent); border-radius: 2px; }
.section-sub { color: var(--muted); font-size: var(--fs-md); margin: 0; }
.section-more { text-align: center; margin: 40px 0 0; }
.admin-hint { background: #fff8e1; border: 1px dashed #b58105; color: #4a3500; border-radius: var(--radius-sm); padding: 10px 16px; margin-top: 16px; margin-bottom: 0; font-size: var(--fs-sm); }
.admin-hint a { color: #4a3500; text-decoration: underline; }

/* Hero slider */
.hero-slider { position: relative; height: clamp(460px, 76vh, 680px); overflow: hidden; background: var(--primary-dark); color: #fff; }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.slide.active { opacity: 1; visibility: visible; z-index: 1; }
.slide-media { position: absolute; inset: 0; }
.slide-media img { width: 100%; height: 100%; object-fit: cover; }
.slide.active .slide-media img { animation: il-zoom 12s ease-out both; }
@keyframes il-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.slide-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 24, 51, .90) 0%, rgba(0, 34, 68, .68) 45%, rgba(0, 34, 68, .25) 100%), linear-gradient(0deg, rgba(0, 20, 40, .55) 0%, rgba(0, 20, 40, 0) 40%); }
.slide-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }
.slide-inner { max-width: 680px; padding-bottom: 40px; }
.kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--accent); font-weight: 700; font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; }
.kicker::before { content: ""; width: 36px; height: 3px; background: var(--accent); border-radius: 2px; }
.slide-title { color: #fff; font-size: var(--fs-2xl); line-height: 1.12; margin: 0 0 16px; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.slide-text { font-size: var(--fs-lg); line-height: 1.5; max-width: 560px; margin: 0 0 28px; color: #f1f5fa; }
.slide-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.slide.active .kicker, .slide.active .slide-title, .slide.active .slide-text, .slide.active .slide-actions { animation: il-rise .8s ease both; }
.slide.active .slide-title { animation-delay: .1s; } .slide.active .slide-text { animation-delay: .2s; } .slide.active .slide-actions { animation-delay: .3s; }
@keyframes il-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.slider-controls { position: absolute; z-index: 3; left: 0; right: 0; top: 50%; display: flex; justify-content: space-between; padding: 0 14px; pointer-events: none; transform: translateY(-50%); }
.slider-btn { pointer-events: auto; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); background: rgba(0, 24, 51, .45); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, border-color .2s; }
.slider-btn:hover { background: var(--secondary); border-color: var(--secondary); }
.slider-dots { position: absolute; z-index: 3; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; }
.slider-dots button { width: 12px; height: 12px; border-radius: 999px; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; transition: width .3s, background .3s; }
.slider-dots button.active { width: 34px; background: var(--accent); border-color: var(--accent); }
.slider-dots .slider-pause { width: 28px; height: 28px; margin-left: 8px; background: rgba(0, 24, 51, .5); display: inline-flex; align-items: center; justify-content: center; color: #fff; border-color: rgba(255, 255, 255, .7); }
.slider-dots .slider-pause.active, .slider-dots .slider-pause:hover { width: 28px; background: var(--secondary); border-color: var(--secondary); }
.slider-dots { bottom: 90px; }

/* Quick links overlapping the hero */
.quick-links { position: relative; z-index: 5; margin-top: -64px; padding-bottom: 20px; }
.ql-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ql-card { background: #fff; color: var(--text); padding: 28px 28px 24px; border-radius: var(--radius); box-shadow: var(--shadow-lg); border-bottom: 4px solid var(--secondary); transition: transform .25s; }
.ql-card:nth-child(2) { border-bottom-color: var(--accent); }
.ql-card:nth-child(3) { border-bottom-color: var(--primary); }
.ql-card:hover { transform: translateY(-5px); }
.ql-title { font-size: var(--fs-lg); margin-bottom: 6px; }
.ql-card p { color: var(--muted); margin-bottom: 14px; }
.ql-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--secondary); }
.ql-link:hover { gap: 10px; }
.ql-link { transition: gap .2s; }

/* Stats */
.stats { background: linear-gradient(135deg, var(--secondary-dark), var(--secondary)); color: #fff; padding: 56px 0; margin-top: 40px; position: relative; overflow: hidden; }
.stats::before { content: ""; position: absolute; left: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.stats-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px; text-align: center; position: relative; }
.stat .num { display: block; font-family: var(--font-head); font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.4rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .label { display: block; margin-top: 6px; font-size: var(--fs-sm); letter-spacing: .08em; text-transform: uppercase; color: #fbe9c0; font-weight: 600; }

/* About */
.about-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.about-media { position: relative; }
.about-media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about-media::before { content: ""; position: absolute; left: -16px; top: -16px; right: 16px; bottom: 16px; border: 3px solid var(--accent); border-radius: var(--radius); z-index: -1; }
.about-body .section-heading { padding-bottom: 14px; }
.about-body .section-heading::after { left: 0; margin-left: 0; }
.about-body .lead { margin-bottom: 18px; }

/* Mission / Vision / Values tabs */
.tabs { max-width: 900px; margin: 0 auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tablist { display: flex; flex-wrap: wrap; background: var(--primary); }
.tab { flex: 1 1 140px; padding: 16px 18px; background: transparent; border: 0; color: #e5edf6; font: inherit; font-weight: 700; cursor: pointer; border-bottom: 4px solid transparent; transition: background .2s, color .2s; }
.tab:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.tab[aria-selected="true"] { background: #fff; color: var(--secondary); border-bottom-color: var(--secondary); }
.tab:focus-visible { outline-offset: -4px; outline-color: var(--accent); }
.tabpanel { padding: 34px 38px; display: none; }
.tabpanel.is-active { display: block; }
.js .tabpanel { display: none; }
.js .tabpanel.is-active { display: block; }
.panel-title { margin-top: 0; }
.panel-text { font-family: var(--font-head); font-size: var(--fs-lg); line-height: 1.55; color: var(--primary); margin: 0; }
.values-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; }
.values-list li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-md); font-weight: 600; color: var(--primary); }
.values-list .icon { color: var(--secondary); margin-top: 4px; }

/* Admissions banner */
.admissions { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.admissions::after { content: ""; position: absolute; right: -90px; top: -90px; width: 340px; height: 340px; border-radius: 50%; background: rgba(218, 165, 32, .12); }
.admissions-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.admissions .section-heading { color: #fff; padding-bottom: 14px; }
.admissions .section-heading::after { left: 0; margin-left: 0; }
.admissions-copy p { font-size: var(--fs-md); color: #e5edf6; }
.contact-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.person { display: flex; gap: 16px; align-items: flex-start; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius); padding: 16px 20px; backdrop-filter: blur(2px); }
.person-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #1a1a1a; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; }
.person-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.person-name { font-size: var(--fs-md); }
.person-role { color: #f5d98a; font-size: var(--fs-sm); }
.person-info a { color: #fff; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); word-break: break-word; }
.person-info a:hover { color: var(--accent); }

/* Departments */
.dept-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.dept-card { background: #fff; border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.dept-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--secondary); }
.dept-num { position: absolute; right: 16px; top: 6px; font-family: var(--font-head); font-size: 3.4rem; font-weight: 700; color: #eef1f5; line-height: 1; }
.dept-title { position: relative; font-size: var(--fs-md); margin-bottom: 6px; }
.dept-title a { color: var(--primary); }
.dept-card p { position: relative; color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* Gallery */
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item a { position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4 / 3; background: var(--line); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item a:hover img { transform: scale(1.08); }
.gallery-zoom { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: #fff; background: rgba(0, 34, 68, .5); opacity: 0; transition: opacity .25s; }
.gallery-item a:hover .gallery-zoom, .gallery-item a:focus-visible .gallery-zoom { opacity: 1; }

/* Lightbox (created by home.js) */
.lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(5, 12, 22, .92); display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 50px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #fff; margin-top: 12px; text-align: center; font-size: var(--fs-sm); }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); background: rgba(0, 0, 0, .4); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lb-btn:hover { background: var(--secondary); border-color: var(--secondary); }
.lb-close { top: 14px; right: 14px; } .lb-prev { left: 10px; top: 50%; margin-top: -24px; } .lb-next { right: 10px; top: 50%; margin-top: -24px; }
body.lb-open { overflow: hidden; }

/* Testimonials */
.testimonials { background: linear-gradient(180deg, #fff 0%, var(--light) 100%); }
.testi-slider { max-width: 820px; margin: 0 auto; text-align: center; }
.testi-track { position: relative; display: grid; }
.testi { grid-area: 1 / 1; margin: 0; padding: 36px 40px 28px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; border-top: 4px solid var(--accent); }
.testi.active { opacity: 1; visibility: visible; }
.testi-quote-icon { color: var(--secondary); opacity: .25; display: block; margin-bottom: 4px; }
.testi blockquote { margin: 0 0 20px; font-family: var(--font-head); font-size: var(--fs-lg); line-height: 1.55; color: var(--primary); }
.testi blockquote p:last-child { margin-bottom: 0; }
.testi figcaption { display: inline-flex; align-items: center; gap: 14px; text-align: left; }
.testi-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin: 0; font-size: 1.3rem; box-shadow: none; border: 0; }
.testi-role { display: block; color: var(--muted); font-size: var(--fs-sm); }
.testi-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.testi-nav .slider-btn { width: 42px; height: 42px; border-color: var(--primary); color: var(--primary); background: transparent; }
.testi-nav .slider-btn:hover { color: #fff; background: var(--primary); }
.testi-dots { display: flex; gap: 8px; }
.testi-dots button { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--primary); background: transparent; padding: 0; cursor: pointer; }
.testi-dots button.active { background: var(--secondary); border-color: var(--secondary); }

/* CTA band */
.cta { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; text-align: center; padding: 72px 0; position: relative; overflow: hidden; }
.cta::before, .cta::after { content: ""; position: absolute; border-radius: 50%; background: rgba(218, 165, 32, .1); }
.cta::before { width: 280px; height: 280px; left: -80px; top: -100px; } .cta::after { width: 220px; height: 220px; right: -60px; bottom: -90px; }
.cta .container { position: relative; z-index: 1; }
.cta-title { color: #fff; font-size: var(--fs-xl); }
.cta p { font-size: var(--fs-md); color: #e5edf6; max-width: 620px; margin: 0 auto 26px; }

/* Responsive */
@media (max-width: 1000px) {
	.gallery-grid, .gallery-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
	.section { padding: 56px 0; }
	.about-wrap, .admissions-wrap { grid-template-columns: 1fr; gap: 32px; }
	.about-media::before { display: none; }
	.ql-grid { grid-template-columns: 1fr; }
	.quick-links { margin-top: -40px; }
	.slider-controls { display: none; }
	.slider-dots { bottom: 64px; }
	.tabpanel { padding: 24px 22px; }
	.testi { padding: 28px 22px 22px; }
	.lightbox { padding: 56px 12px; }
}
@media (max-width: 520px) {
	.hero-slider { height: 520px; }
	.slide-text { font-size: var(--fs-md); }
	.slide-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.slide { transition: none; }
	.slide.active .slide-media img, .slide.active .kicker, .slide.active .slide-title, .slide.active .slide-text, .slide.active .slide-actions { animation: none; }
}

.programs .prog-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.programs .prog-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .programs .prog-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .programs .prog-grid, .programs .prog-grid:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; } }
.slides, .testi-slider { touch-action: pan-y; }

/* ---------- v3.2: home about teaser (original three-card layout) ---------- */
.about .lead { max-width: 820px; margin: 0 auto; color: var(--muted); font-size: var(--fs-md); }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.about-card { background: #fff; border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); border-top: 4px solid var(--secondary); transition: transform .25s, box-shadow .25s; }
.about-card:nth-child(2) { border-top-color: var(--accent); } .about-card:nth-child(3) { border-top-color: var(--primary); }
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.about-card h3 { color: var(--primary); font-size: var(--fs-md); margin-bottom: 8px; }
.about-card p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- v3.2: dedicated page sections ---------- */
.page-rich .page-header { margin-bottom: 0; }
.narrow-intro { max-width: 820px; margin-left: auto; margin-right: auto; }
.page-intro { padding: 56px 0 8px; } .page-intro .lead { font-size: var(--fs-md); color: var(--text); }
.about-page .about-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.timeline { list-style: none; max-width: 760px; margin: 0 auto; padding: 0 0 0 34px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 3px; background: var(--line); border-radius: 2px; }
.timeline-item { position: relative; padding: 0 0 26px; }
.timeline-item::before { content: ""; position: absolute; left: -34px; top: 5px; width: 17px; height: 17px; border-radius: 50%; background: var(--secondary); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--secondary); }
.timeline-year { display: inline-block; font-family: var(--font-head); font-weight: 700; color: var(--secondary); font-size: var(--fs-lg); }
.timeline-item p { margin: 2px 0 0; }
.step-list { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; display: grid; gap: 14px; counter-reset: step; }
.step { display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-sm); }
.step-num { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--secondary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-head); }
.find-list { display: inline-block; text-align: left; list-style: none; padding: 0; margin: 12px 0 8px; }
.find-list a { color: var(--primary); text-decoration: underline; }
.find-us .section-more .btn + .btn { margin-left: 10px; }
.campus-shop .section-sub { margin-bottom: 0; }
.faculty-archive { padding-top: 48px; padding-bottom: 56px; }
.faculty-grid.rich { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.faculty-card.is-rich { padding: 34px 26px 28px; border-top: 4px solid var(--secondary); }
.faculty-card.is-rich .faculty-avatar img, .faculty-card.is-rich .avatar-placeholder { width: 140px; height: 140px; }
.faculty-dept { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; }
.faculty-card.is-rich .text-link { margin-top: auto; padding-top: 12px; }
@media (max-width: 900px) { .about-page .about-wrap { grid-template-columns: 1fr; gap: 32px; } .step { align-items: flex-start; } }

/* ---------- v3.2: news carousel ---------- */
.news-carousel { position: relative; display: flex; align-items: center; gap: 12px; }
.news-track { flex: 1; min-width: 0; display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 4px 18px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.news-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.news-track > .news-card { flex: 0 0 calc((100% - 44px) / 3); scroll-snap-align: start; min-width: 260px; }
.news-carousel .slider-btn { flex: none; position: static; border-color: var(--primary); color: var(--primary); background: #fff; box-shadow: var(--shadow-sm); }
.news-carousel .slider-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.news-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; min-height: 46px; }
.news-pause { background: none; border: 0; color: var(--muted); font: inherit; font-size: var(--fs-xs); text-decoration: underline; cursor: pointer; padding: 6px 4px; }
.news-pause:hover { color: var(--primary); }
.news-all { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s, background .2s, color .2s; pointer-events: none; }
.news:hover .news-all, .news:focus-within .news-all { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: none) { .news-all { opacity: 1; transform: none; pointer-events: auto; } }
@media (max-width: 900px) { .news-track > .news-card { flex-basis: calc((100% - 22px) / 2); } }
@media (max-width: 600px) { .news-track > .news-card { flex-basis: 86%; } .news-carousel .slider-btn { display: none; } }
@media (prefers-reduced-motion: reduce) { .news-track { scroll-behavior: auto; } .news-all { transition: none; } }
