@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;1,6..72,400&family=DM+Sans:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500;600&display=swap');

/* ===================== Theme variables ===================== */
:root {
  --primary: #0f2a44;
  --primary-dark: #0a1e32;
  --primary-light: #e8eef6;
  --accent: #c9a227;
  --accent-light: #fdf6df;
  --bg: #fdfcfa;
  --bg-alt: #f3ede3;
  --surface: #ffffff;
  --soft: #eef2f7;
  --border: #d9e1ec;
  --ink: #0f2a44;
  --ink-soft: #4a5d75;
  --ink-faint: #8a9ab2;
  --on-primary: #ffffff;
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --hero-gradient: linear-gradient(145deg, #0a1e32 0%, #0f2a44 45%, #1e3a5a 100%);
  --hero-overlay: linear-gradient(180deg, rgba(10,30,50,0.35) 0%, rgba(10,30,50,0.65) 100%);
  --hero-text: #fdfcfa;
  --shadow-sm: 0 1px 3px rgba(15,42,68,0.07), 0 4px 12px rgba(15,42,68,0.05);
  --shadow-md: 0 4px 16px rgba(15,42,68,0.09), 0 10px 26px rgba(15,42,68,0.06);
  --shadow-lg: 0 14px 36px rgba(15,42,68,0.14), 0 22px 52px rgba(15,42,68,0.09);
}
html[data-theme="heritage"] {
  --primary: #0f2a44;
  --primary-dark: #0a1e32;
  --primary-light: #e8eef6;
  --accent: #c9a227;
  --accent-light: #fdf6df;
  --bg: #fdfcfa;
  --bg-alt: #f3ede3;
  --surface: #ffffff;
  --soft: #eef2f7;
  --border: #d9e1ec;
  --ink: #0f2a44;
  --ink-soft: #4a5d75;
  --ink-faint: #8a9ab2;
  --on-primary: #ffffff;
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --hero-gradient: linear-gradient(145deg, #0a1e32 0%, #0f2a44 45%, #1e3a5a 100%);
  --hero-overlay: linear-gradient(180deg, rgba(10,30,50,0.35) 0%, rgba(10,30,50,0.65) 100%);
  --hero-text: #fdfcfa;
  --shadow-sm: 0 1px 3px rgba(15,42,68,0.07), 0 4px 12px rgba(15,42,68,0.05);
  --shadow-md: 0 4px 16px rgba(15,42,68,0.09), 0 10px 26px rgba(15,42,68,0.06);
  --shadow-lg: 0 14px 36px rgba(15,42,68,0.14), 0 22px 52px rgba(15,42,68,0.09);
}
html[data-theme="clarity"] {
  --primary: #0e7c6b;
  --primary-dark: #0a5c4f;
  --primary-light: #dff0ec;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --bg: #f8faf9;
  --bg-alt: #eef4f2;
  --surface: #ffffff;
  --soft: #e6f0ee;
  --border: #d1e0dd;
  --ink: #16302c;
  --ink-soft: #4a6661;
  --ink-faint: #8aa8a2;
  --on-primary: #ffffff;
  --font-head: 'Newsreader', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --hero-gradient: linear-gradient(135deg, #0e3a33 0%, #0e7c6b 55%, #14b8a6 100%);
  --hero-overlay: linear-gradient(180deg, rgba(14,58,51,0.28) 0%, rgba(14,58,51,0.62) 100%);
  --hero-text: #f0fdfa;
  --shadow-sm: 0 1px 3px rgba(14,124,107,0.07), 0 4px 12px rgba(14,124,107,0.05);
  --shadow-md: 0 4px 16px rgba(14,124,107,0.09), 0 10px 26px rgba(14,124,107,0.06);
  --shadow-lg: 0 14px 36px rgba(14,124,107,0.14), 0 22px 52px rgba(14,124,107,0.09);
}
html[data-theme="midnight"] {
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --primary-light: #2a2215;
  --accent: #22d3ee;
  --accent-light: #0e2e33;
  --bg: #0f172a;
  --bg-alt: #141e36;
  --surface: #1a2642;
  --soft: #1e2e4a;
  --border: #24365a;
  --ink: #e2e8f0;
  --ink-soft: #94a3b8;
  --ink-faint: #64748b;
  --on-primary: #0f172a;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --hero-gradient: linear-gradient(145deg, #020617 0%, #0f172a 50%, #1e3a5a 100%);
  --hero-overlay: linear-gradient(180deg, rgba(2,6,23,0.45) 0%, rgba(2,6,23,0.78) 100%);
  --hero-text: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 44px rgba(0,0,0,0.6);
}

/* heritage extras */
html[data-theme="heritage"] .brand-name { letter-spacing: 0.03em; }
html[data-theme="heritage"] .hero h1 { font-weight: 700; }
html[data-theme="heritage"] .hero .tagline { color: #c9a227; font-style: normal; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem; }
html[data-theme="heritage"] .section-head .eyebrow { color: var(--primary); letter-spacing: 0.22em; background: var(--primary-light); border-color: transparent; }
html[data-theme="heritage"] .dept-card .code { color: var(--primary); }
html[data-theme="heritage"] .feature-icon { background: var(--primary-light); }
html[data-theme="heritage"] .feature-icon svg { color: var(--primary); }
html[data-theme="heritage"] .program-card .thumb { border-bottom: 3px solid var(--primary-light); }
html[data-theme="heritage"] .badge-dept { background: var(--primary-light); color: var(--primary-dark); }
html[data-theme="heritage"] .site-footer { background: #0a1e32; border-top-color: #c9a227; }

/* clarity extras */
html[data-theme="clarity"] .hero h1 { font-weight: 600; }
html[data-theme="clarity"] .section-head .eyebrow { background: var(--primary-light); color: var(--primary-dark); }
html[data-theme="clarity"] .feature { border-top: 3px solid #0e7c6b; }
html[data-theme="clarity"] .site-footer { background: #0e3a33; border-top-color: #14b8a6; }

/* midnight extras */
html[data-theme="midnight"] .site-header { background: rgba(15,23,42,0.92); }
html[data-theme="midnight"] .brand-name { letter-spacing: .02em; }
html[data-theme="midnight"] .nav-link { color: var(--ink-soft); }
html[data-theme="midnight"] .nav-link.active { color: var(--primary); background: rgba(245,158,11,0.14); }
html[data-theme="midnight"] .hero .tagline { color: #f59e0b; }
html[data-theme="midnight"] .section-head .eyebrow { background: rgba(245,158,11,0.14); color: #f59e0b; border-color: transparent; }
html[data-theme="midnight"] .dept-card, html[data-theme="midnight"] .program-card, html[data-theme="midnight"] .faculty-card, html[data-theme="midnight"] .facility-card, html[data-theme="midnight"] .event-card, html[data-theme="midnight"] .article-card { background: var(--surface); border-color: var(--border); }
html[data-theme="midnight"] .site-footer { background: #020617; border-top-color: #f59e0b; }

/* ===================== Base CSS (from templates.ts) ===================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: #8fa0b8 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #8fa0b8; border-radius: 999px; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
::selection { background: var(--primary); color: var(--on-primary); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; max-width: 1120px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 46px; width: auto; border-radius: var(--radius); }
.brand-name { font-family: var(--font-head); font-size: 1.28rem; font-weight: 700; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-link { color: var(--ink); font-weight: 600; font-size: 0.93rem; padding: 8px 14px; border-radius: 999px; transition: color .15s ease, background .15s ease; }
.nav-link:hover { text-decoration: none; background: var(--soft); }
.nav-link.active { color: var(--primary); background: var(--soft); }
.nav-cta { background: var(--primary); color: var(--on-primary) !important; box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent); }
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px 8px; border-radius: 10px; }
.nav-toggle:hover { background: var(--soft); }
.nav-toggle span { display: block; width: 24px; height: 2.5px; border-radius: 999px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.hero { position: relative; padding: 108px 24px 116px; text-align: center; overflow: hidden; background: var(--hero-gradient); background-size: cover; background-position: center; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 26px 26px; pointer-events: none; }
.hero-content { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; color: var(--hero-text); }
.hero h1 { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; margin-bottom: 14px; letter-spacing: -0.01em; }
.hero .tagline { font-size: clamp(1.02rem, 2vw, 1.28rem); opacity: .94; margin-bottom: 10px; font-style: italic; }
.hero .desc { max-width: 680px; margin: 0 auto 30px; font-size: 1.02rem; opacity: .92; }
.hero-cta { display: inline-block; background: var(--primary); color: var(--on-primary); padding: 14px 34px; border-radius: var(--radius-pill); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.04em; box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 40%, transparent); transition: transform .15s ease, background .15s ease; }
.hero-cta:hover { background: var(--primary-dark); transform: translateY(-2px); text-decoration: none; }
.hero-stats { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-top: 32px; }
.hero-stat { background: rgba(255,255,255,0.12); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.2); border-radius: 14px; padding: 14px 20px; min-width: 130px; }
.hero-stat strong { display: block; font-family: var(--font-head); font-size: 1.5rem; line-height: 1; }
.hero-stat span { font-size: .82rem; opacity: .9; letter-spacing: .04em; }

.hero-carousel { position: relative; overflow: hidden; }
.hero-carousel .hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.hero-carousel .hero-slide.active { opacity: 1; }
.hero-carousel .hero-dots { position: absolute; bottom: 22px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.hero-carousel .hero-dot { width: 10px; height: 10px; border-radius: 50%; border: none; padding: 0; background: rgba(255,255,255,0.5); cursor: pointer; transition: background .2s ease, transform .2s ease; }
.hero-carousel .hero-dot:hover { transform: scale(1.25); }
.hero-carousel .hero-dot.active { background: #fff; }

.page-hero { position: relative; padding: 64px 24px; text-align: center; overflow: hidden; background: var(--hero-gradient); background-size: cover; background-position: center; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.page-hero .container { position: relative; z-index: 2; color: var(--hero-text); }
.page-hero h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 10px; }
.page-hero .sub { font-size: 1.05rem; opacity: 0.92; max-width: 640px; margin: 0 auto; }
.crumbs { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; margin-bottom: 14px; opacity: 0.9; }
.crumbs a { color: inherit; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { opacity: 0.55; font-weight: 400; }

.section { padding: 76px 24px; }
.section-alt { position: relative; overflow: hidden; background: var(--bg-alt); }
.section-alt::before, .section-alt::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.section-alt::before { width: 420px; height: 420px; top: -140px; left: -120px; background: color-mix(in srgb, var(--primary) 10%, transparent); }
.section-alt::after { width: 360px; height: 360px; bottom: -120px; right: -110px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.section-alt .container { position: relative; z-index: 1; }
.section h2 { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.15rem); margin-bottom: 36px; text-align: center; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head .eyebrow { display: inline-block; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--primary); background: var(--surface); border: 1px solid var(--border); padding: 6px 16px; border-radius: 999px; margin-bottom: 14px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--ink-soft); font-size: 1.03rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature h3 { color: var(--primary); margin-bottom: 8px; font-family: var(--font-head); font-size: 1.08rem; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; }
.feature-icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--soft); border-radius: 50%; margin-bottom: 14px; }
.feature-icon svg { width: 26px; height: 26px; color: var(--accent); }

.depts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.dept-card { position: relative; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.dept-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); text-decoration: none; }
.dept-card .thumb { height: 180px; overflow: hidden; background: var(--soft); }
.dept-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.dept-card:hover .thumb img { transform: scale(1.05); }
.dept-card .body { padding: 20px; display: grid; gap: 6px; }
.dept-card .code { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.dept-card h3 { font-family: var(--font-head); font-size: 1.22rem; line-height: 1.3; }
.dept-card p { color: var(--ink-soft); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dept-card .meta { display: flex; gap: 12px; font-size: .82rem; color: var(--ink-faint); margin-top: 4px; }

.programs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.program-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.program-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.program-card .thumb { height: 180px; overflow: hidden; background: var(--soft); position: relative; }
.program-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.program-card:hover .thumb img { transform: scale(1.06); }
.program-card .card-thumb-fallback { display: grid; place-items: center; height: 100%; color: var(--ink-faint); }
.program-card .card-thumb-fallback svg { width: 44px; height: 44px; }
.program-card .body { padding: 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.badge-dept { align-self: flex-start; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; color: var(--accent); background: var(--accent-light); padding: 3px 10px; border-radius: 999px; }
.program-card h3 { font-family: var(--font-head); font-size: 1.12rem; line-height: 1.35; }
.program-card .degree { color: var(--ink-faint); font-size: .82rem; font-weight: 600; }
.program-card .fees { font-weight: 700; color: var(--primary-dark); font-size: 1rem; margin-top: auto; padding-top: 8px; }
.program-card .footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px dashed var(--border); }
.program-card .footer a { font-weight: 600; font-size: 0.92rem; }
.badge-featured { position: absolute; top: 12px; right: 12px; background: var(--primary); color: var(--on-primary); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }

.faculty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.faculty-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.faculty-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.faculty-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 3px solid var(--soft); }
.faculty-card .avatar-fallback { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--soft); color: var(--ink-soft); font-weight: 800; font-size: 1.6rem; }
.faculty-card h3 { font-family: var(--font-head); font-size: 1.08rem; }
.faculty-card .role { color: var(--primary); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.faculty-card .qual { color: var(--ink-faint); font-size: .85rem; margin-top: 6px; }
.faculty-card .bio { color: var(--ink-soft); font-size: .9rem; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.facilities-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.facility-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.facility-card .thumb { height: 180px; overflow: hidden; background: var(--soft); }
.facility-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.facility-card .body { padding: 20px; }
.facility-card .cat { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.facility-card h3 { font-family: var(--font-head); font-size: 1.12rem; margin-top: 4px; }
.facility-card p { color: var(--ink-soft); font-size: .93rem; margin-top: 6px; }

.placements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.placement-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); }
.placement-card img { width: 80px; height: 48px; object-fit: contain; margin: 0 auto 12px; }
.placement-card h3 { font-family: var(--font-head); font-size: 1.05rem; }
.placement-card .year { font-size: .78rem; color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.placement-card .stats { display: flex; justify-content: center; gap: 14px; margin-top: 10px; font-size: .85rem; color: var(--ink-soft); }

.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.event-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .15s ease; }
.event-card:hover { transform: translateY(-4px); }
.event-card .thumb { height: 190px; overflow: hidden; background: var(--soft); }
.event-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-card .body { padding: 20px; display: grid; gap: 8px; }
.event-card .date { font-size: .78rem; font-weight: 700; color: var(--primary); letter-spacing: .06em; text-transform: uppercase; }
.event-card h3 { font-family: var(--font-head); font-size: 1.12rem; }
.event-card p { color: var(--ink-soft); font-size: .93rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gallery-grid figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); position: relative; border: 1px solid var(--border); }
.gallery-grid img { width: 100%; height: 220px; object-fit: cover; transition: transform .35s ease; }
.gallery-grid figure:hover img { transform: scale(1.05); }
.gallery-grid figcaption { font-size: 0.85rem; color: var(--ink-soft); padding: 10px 14px; background: var(--surface); }

.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.testimonial-card .stars { color: var(--accent); font-size: 1.05rem; letter-spacing: 2px; }
.testimonial-card p { color: var(--ink); font-size: 0.98rem; flex: 1; }
.testimonial-card .author { color: var(--ink-soft); font-size: 0.88rem; font-weight: 700; }
.testimonial-card .batch { color: var(--ink-faint); font-size: .82rem; }

.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-list summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; font-size: 1rem; font-family: var(--font-head); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.3rem; color: var(--primary); transition: transform .15s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details .rich { padding: 0 22px 18px; color: var(--ink-soft); font-size: 0.97rem; }

.rich h2, .rich h3 { font-family: var(--font-head); color: var(--ink); margin: 16px 0 8px; line-height: 1.35; }
.rich h2 { font-size: 1.25rem; }
.rich h3 { font-size: 1.08rem; }
.rich p { margin: 0 0 12px; }
.rich ul, .rich ol { margin: 0 0 12px; padding-left: 22px; }
.rich li { margin-bottom: 4px; }
.rich blockquote { border-left: 3px solid var(--primary); padding-left: 14px; color: var(--ink-soft); margin: 0 0 12px; font-style: italic; background: color-mix(in srgb, var(--primary) 6%, transparent); padding: 10px 14px; border-radius: 0 10px 10px 0; }
.rich a { color: var(--primary-dark); font-weight: 600; }

.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-card .thumb { height: 180px; overflow: hidden; background: var(--soft); }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.article-card:hover .thumb img { transform: scale(1.06); }
.article-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-card h3 { font-family: var(--font-head); font-size: 1.1rem; }
.article-card p { color: var(--ink-soft); font-size: 0.93rem; flex: 1; }
.article-meta { font-size: 0.78rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; }
.article-card .footer { margin-top: auto; padding-top: 10px; }
.article-card .footer a { font-weight: 600; }

.article-prose { max-width: 760px; margin: 0 auto; }
.article-prose img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 26px; }
.article-prose h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 10px; }
.article-prose .lede { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 26px; }
.article-prose .body { font-size: 1.05rem; }
.article-prose .body p { margin-bottom: 18px; }
.article-prose .body h2 { font-family: var(--font-head); font-size: 1.4rem; margin: 30px 0 12px; }
.article-prose .body h3 { font-family: var(--font-head); font-size: 1.15rem; margin: 26px 0 10px; }
.article-prose .body ul, .article-prose .body ol { margin: 0 0 18px 24px; }
.article-prose .body li { margin-bottom: 6px; }
.article-prose .body blockquote { border-left: 3px solid var(--primary); padding-left: 16px; color: var(--ink-soft); margin: 0 0 18px; font-style: italic; background: color-mix(in srgb, var(--primary) 6%, transparent); padding: 10px 16px; border-radius: 0 10px 10px 0; }
.article-prose .body a { color: var(--primary-dark); font-weight: 600; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.contact-card h3 { color: var(--primary); margin-bottom: 10px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; }
.contact-card .hours { white-space: pre-line; }

.enquiry-wrap { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: start; }
.enquiry-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); display: grid; gap: 18px; position: sticky; top: 96px; }
.enquiry-info h3 { color: var(--primary); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; margin-bottom: 2px; }
.enquiry-info .hours { white-space: pre-line; }
.enquiry-form { max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-sm); display: grid; gap: 16px; }
.enquiry-form label { font-weight: 600; font-size: 0.95rem; display: grid; gap: 7px; }
.enquiry-form input, .enquiry-form select, .enquiry-form textarea { padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; width: 100%; background: var(--bg); color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease; }
.enquiry-form input:focus, .enquiry-form select:focus, .enquiry-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.enquiry-form textarea { min-height: 96px; resize: vertical; }
.consent-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 0.88rem; color: var(--ink-soft); }
.consent-line input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.success-box { max-width: 580px; margin: 48px auto; text-align: center; background: var(--primary-light); border: 2px solid var(--primary); border-radius: var(--radius-lg); padding: 36px; }
.success-box h3 { font-family: var(--font-head); margin-bottom: 8px; }
.error-box { max-width: 580px; margin: 24px auto; text-align: center; background: #fef2f2; border: 1px solid #fca5a5; border-radius: var(--radius); padding: 20px; color: #b91c1c; }

.detail-wrap { max-width: 860px; margin: 0 auto; }
.detail-hero { display: grid; gap: 18px; margin-bottom: 28px; }
.detail-hero img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.detail-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-soft); }
.detail-meta span { display: inline-flex; gap: 6px; align-items: center; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { color: var(--ink-faint); font-weight: 600; width: 160px; background: var(--bg-alt); }

.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 32px; flex-wrap: wrap; }
.pager-link { display: inline-flex; min-width: 38px; height: 38px; padding: 0 12px; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; font-size: 0.9rem; color: var(--primary); text-decoration: none; }
.pager-link:hover { border-color: var(--primary); }
.pager-link.current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }

.empty-note { text-align: center; color: var(--ink-faint); padding: 32px 0; }
.btn { display: inline-block; background: var(--primary); color: var(--on-primary); border: none; border-radius: var(--radius-pill); padding: 13px 28px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }

.site-footer { background: var(--ink); color: color-mix(in srgb, var(--ink) 35%, #fff); border-top: 4px solid color-mix(in srgb, var(--primary) 60%, transparent); padding: 56px 0 0; margin-top: 48px; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 40px; }
.site-footer h3 { color: #fff; margin-bottom: 14px; font-size: 1rem; font-family: var(--font-head); }
.site-footer a { color: var(--primary); }
.site-footer .brand { color: #fff; }
.site-footer .brand:hover { text-decoration: none; }
.site-footer .footer-desc { color: color-mix(in srgb, var(--ink) 22%, #fff); font-size: 0.92rem; margin-top: 6px; }
.footer-links { display: grid; gap: 4px; }
.footer-links a { color: color-mix(in srgb, var(--ink) 30%, #fff); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-links a.all-link { font-weight: 700; color: var(--primary); margin-top: 6px; }
.footer-col p { margin-bottom: 6px; }
.site-footer .hours { white-space: pre-line; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 44px; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.86rem; color: color-mix(in srgb, var(--ink) 22%, #fff); }
.footer-bottom a { color: color-mix(in srgb, var(--ink) 22%, #fff); font-weight: 600; }
.footer-bottom a:hover { color: #fff; }
.powered-by{opacity:.8}
.powered-by a{color:inherit;text-decoration:none}
.powered-by a:hover{text-decoration:underline;opacity:1}
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; transition: background .15s ease, transform .15s ease; }
.social-link:hover { background: var(--primary); transform: translateY(-2px); text-decoration: none; }
.social-link svg { width: 16px; height: 16px; }
.wa-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.wa-link svg { width: 16px; height: 16px; }
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 999px; background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(37,211,102,.4); transition: transform .15s ease, background .15s ease; }
.wa-float:hover { transform: translateY(-3px) scale(1.04); background: #1ebe5b; text-decoration: none; }
.wa-float svg { width: 30px; height: 30px; }

.notice-ticker { background: var(--primary); color: var(--on-primary); padding: 10px 0; overflow: hidden; }
.notice-ticker-inner { display: flex; gap: 32px; white-space: nowrap; animation: ticker 30s linear infinite; }
.notice-ticker a { color: var(--on-primary); font-weight: 600; font-size: .9rem; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

@media (max-width: 900px) {
  .enquiry-wrap { grid-template-columns: 1fr; }
  .enquiry-info { position: static; }
}
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 20px 16px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav-link { border-radius: 10px; padding: 12px 14px; font-size: 1rem; }
  .hero { padding: 76px 20px 84px; }
  .section { padding: 56px 20px; }
  .page-hero { padding: 48px 20px; }
}
@media (max-width: 520px) {
  .nav-link { padding: 7px 10px; font-size: 0.88rem; }
  .enquiry-form { padding: 24px 20px; }
}

/* ===================== Theme switcher (demo) ===================== */
.theme-btn {
  position: fixed; bottom: 92px; right: 22px; z-index: 110;
  width: 56px; height: 56px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); transition: background .15s, transform .15s;
}
.theme-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }
.theme-btn svg { width: 24px; height: 24px; }
.theme-panel {
  position: fixed; bottom: 156px; right: 22px; z-index: 120;
  width: 300px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 18px;
  display: none; text-align: left;
}
.theme-panel.open { display: block; }
.theme-panel h3 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 4px; color: var(--ink); }
.theme-panel .theme-sub { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 14px; }
.theme-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--soft); border: 2px solid transparent; border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 9px; cursor: pointer;
  font-family: var(--font-body); color: var(--ink); transition: border-color .15s, background .15s;
}
.theme-card:hover { background: color-mix(in srgb, var(--soft) 60%, var(--primary-light)); }
.theme-card.active { border-color: var(--primary); background: var(--primary-light); }
.theme-swatches { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.theme-swatches .sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.12); }
.theme-card .t-name { font-weight: 700; font-size: 0.92rem; }
.theme-card .t-desc { font-size: 0.75rem; color: var(--ink-soft); line-height: 1.35; }
.theme-note { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 0.72rem; color: var(--ink-faint); line-height: 1.45; }
@media (max-width: 640px) {
  .theme-panel { right: 16px; bottom: 148px; }
  .theme-btn { right: 16px; bottom: 88px; }
}
