/* ==========================================================================
   BM Study Center — design tokens + base styles
   Brand colors retained from the existing logo (navy + warm orange), rebuilt
   into a modern "student success" system: navy for trust/authority, bright
   blue for energy, orange for action, generous white space, rounded cards.
   ========================================================================== */

:root {
  --primary: #0b3d91;         /* deep education blue/navy */
  --primary-dark: #082a66;
  --secondary: #1e88e5;       /* bright academic blue */
  --accent: #ff7a1a;          /* warm orange — matches the existing logo wordmark */
  --accent-dark: #e0670e;
  --background: #f6f8fb;      /* very light grey / off-white */
  --surface: #ffffff;
  --text: #1c2733;            /* dark charcoal/navy */
  --text-light: #5b6b7f;
  --border: #e3e8ef;
  --success: #1c6b3a;
  --success-bg: #e7f7ec;
  --error: #8a1c1c;
  --error-bg: #fdecea;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(11, 61, 145, 0.08);
  --shadow-hover: 0 16px 40px rgba(11, 61, 145, 0.14);
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: var(--text);
  background: var(--background);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  color: var(--primary-dark);
  line-height: 1.25;
  margin: 0 0 .5em;
  font-weight: 700;
}
/* h1 default is the moderate "page title" size used on every internal page (Courses,
   Faculty, Blog, Gallery, Notices, Contact, About, course/article details, 404, etc.) — at
   the old 3.5rem/56px max these looked oversized and heavy for a page sub-header sitting
   right above content, more like a landing-page hero repeated on every page than a refined
   heading. The one genuine hero — the homepage banner — gets its own larger size below. */
h1 { font-size: clamp(1.75rem, 1.6vw + 1.2rem, 2.75rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1vw + 1rem, 1.6rem); }
.hero-copy h1 { font-size: clamp(2.2rem, 3.4vw + 1rem, 3.5rem); }
p { margin: 0 0 1em; color: var(--text); }
a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--alt { background: var(--surface); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head .eyebrow {
  display: inline-block; color: var(--accent); font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; font-size: .8rem; margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 3px solid var(--accent);
}
.section-head h1, .section-head h2 { margin-top: 0; }
.section-head p { color: var(--text-light); margin-top: 10px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .96rem;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(255,122,26,.3); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--surface); color: var(--surface); }
.btn-outline:hover { background: var(--surface); color: var(--primary); }
.btn-secondary { background: var(--primary); color: #fff; }
.btn-secondary:hover { background: var(--primary-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* ---- Announcement bar ---- */
.announcement {
  background: var(--primary-dark); color: #fff; text-align: center; font-size: .88rem;
  padding: 9px 20px; position: relative;
}
.announcement a { color: #fff; text-decoration: underline; font-weight: 600; }
.announcement .close-ann {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; font-size: 1rem;
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--border);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--primary-dark); font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.brand img { height: 56px; width: 56px; border-radius: 50%; flex-shrink: 0; }
/* Tagline is dropped from the header itself at nav-bearing widths — with 9 nav items,
   phone number and a CTA button all competing for the same row, a second line of text
   next to the logo is what was causing the cramped, wrapping "unprofessional" look.
   It still appears in <title>/meta and the footer. */
.brand .tag { display: none; }

.main-nav { display: none; }
.main-nav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 16px; }
.main-nav a { color: var(--text); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--accent); text-decoration: none; }

.header-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-cta .call-link { display: none; color: var(--primary); font-weight: 700; font-size: .85rem; white-space: nowrap; }

.hamburger {
  display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer;
}
.hamburger span, .hamburger span::before, .hamburger span::after {
  content: ''; display: block; width: 20px; height: 2px; background: var(--primary-dark); position: relative;
}
.hamburger span::before { position: absolute; top: -6px; }
.hamburger span::after { position: absolute; top: 6px; }

.mobile-nav { display: none; flex-direction: column; background: #fff; border-top: 1px solid var(--border); padding: 10px 20px 20px; }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--text); }
.mobile-nav .btn { margin-top: 12px; }

/* Raised from 960px: with 9 nav items + a bigger logo + phone number + CTA button all in
   one row, anything narrower than ~1300px was forcing nav labels to wrap mid-word instead
   of showing the clean hamburger menu. Better to switch to the hamburger a bit earlier than
   to show a cramped, wrapping desktop nav. */
@media (min-width: 1300px) {
  .main-nav { display: block; }
  .hamburger { display: none; }
  .header-cta .call-link { display: inline-flex; align-items: center; gap: 6px; }
}

/* ---- Hero ---- */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero .inner { display: grid; gap: 36px; align-items: center; grid-template-columns: 1fr; }
.hero-copy .eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
.hero-copy p.lead { font-size: 1.08rem; color: var(--text-light); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 30px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; padding: 0; list-style: none; margin: 0; }
.trust-row li { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--text-light); }
.trust-row li::before { content: '✓'; color: var(--accent); font-weight: 900; }
.hero-media { position: relative; }
.hero-media .art {
  border-radius: var(--radius); background: linear-gradient(135deg, var(--primary), var(--secondary));
  aspect-ratio: 4/3.2; display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: var(--shadow);
}
@media (min-width: 900px) {
  .hero .inner { grid-template-columns: 1.05fr .95fr; }
}

/* ---- Quick actions ---- */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 700px) { .quick-actions { grid-template-columns: repeat(4, 1fr); } }
.quick-card {
  background: var(--surface); border-radius: var(--radius-sm); padding: 22px 16px; text-align: center;
  box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform .15s, box-shadow .15s;
}
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); text-decoration: none; }
/* Base size so a bare icon() call always renders at a sane size even outside a sized
   container; .quick-card/.feature-card/.hero-fallback-icon below override per context. */
.icon-svg { width: 24px; height: 24px; flex-shrink: 0; }

.quick-card .icon { margin-bottom: 8px; display: flex; justify-content: center; color: var(--primary); }
.quick-card .icon .icon-svg { width: 32px; height: 32px; }
.hero-fallback-icon .icon-svg { width: 84px; height: 84px; color: #fff; }
.quick-card strong { display: block; color: var(--primary-dark); font-size: .95rem; }

/* ---- Cards (why-choose / faculty / testimonials) ---- */
.card-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-card .icon {
  width: 52px; height: 52px; border-radius: 14px; background: rgba(30,136,229,.12);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: var(--secondary);
}
.feature-card .icon .icon-svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.feature-card p { color: var(--text-light); font-size: .93rem; margin: 0; }

/* ---- Course cards ---- */
.course-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.course-card .thumb {
  aspect-ratio: 16/10; background: linear-gradient(135deg, var(--secondary), var(--primary));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; font-weight: 800;
}
.course-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.course-card .meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: .78rem; color: var(--text-light); margin-bottom: 10px; }
.course-card .meta span { background: var(--background); border-radius: 999px; padding: 3px 10px; }
.course-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.course-card p { color: var(--text-light); font-size: .92rem; flex: 1; }
.course-card .actions { display: flex; gap: 10px; margin-top: 14px; }

/* ---- Testimonials ---- */
.testimonial-card {
  background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  border: 1px solid var(--border); height: 100%;
}
.testimonial-card .stars { color: var(--accent); margin-bottom: 10px; letter-spacing: 2px; }
.testimonial-card .quote { font-size: .96rem; color: var(--text); }
.testimonial-card .who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.testimonial-card .avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.testimonial-card .who strong { display: block; font-size: .92rem; color: var(--primary-dark); }
.testimonial-card .who span { font-size: .8rem; color: var(--text-light); }

/* ---- Notice list ---- */
.notice-item {
  display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px; box-shadow: var(--shadow);
}
.notice-item .date { min-width: 74px; text-align: center; background: var(--background); border-radius: 10px; padding: 8px 6px; font-weight: 700; color: var(--primary); font-size: .8rem; }
.notice-item h3 { font-size: 1rem; margin-bottom: 4px; }
.notice-item p { margin: 0; color: var(--text-light); font-size: .9rem; }
.pin-badge { display: inline-block; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }

/* ---- FAQ accordion ---- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer; padding: 16px 0; font-weight: 700; color: var(--primary-dark); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--accent); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding-bottom: 16px; color: var(--text-light); }

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: .85rem; color: var(--text-light); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb span { color: var(--primary-dark); font-weight: 600; }

/* ---- Forms ---- */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--primary-dark); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: inherit; background: #fff;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--secondary); outline: none; }
.form-card { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--border); }

.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: .9rem; margin-bottom: 18px; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); }

/* ---- Final CTA ---- */
.final-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
  border-radius: var(--radius); padding: 48px 30px; text-align: center;
}
.final-cta h2 { color: #fff; }
.final-cta p { color: rgba(255,255,255,.85); }

/* ---- Footer ---- */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.85); padding: 56px 0 0; margin-top: 70px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; font-size: .9rem; }
.footer-grid a { color: rgba(255,255,255,.75); }
.footer-grid a:hover { color: #fff; }

/* ---- Footer social icon row ---- */
.social-icons { display: flex; gap: 10px; margin-top: 16px; }
.social-icons a {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.85);
  transition: background .15s, color .15s, transform .15s;
}
.social-icons a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.social-icons a .icon-svg { width: 17px; height: 17px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding: 20px 0; text-align: center;
  font-size: .82rem; color: rgba(255,255,255,.6);
}

/* ---- Floating WhatsApp ---- */
.float-whatsapp {
  position: fixed; right: 18px; bottom: 18px; z-index: 200; width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(0,0,0,.25);
  font-size: 1.6rem; color: #fff;
}
.float-whatsapp:hover { text-decoration: none; transform: scale(1.06); }

/* ---- Blog article content (admin-authored HTML) ---- */
.blog-content h2 { margin-top: 1.6em; }
.blog-content h3 { margin-top: 1.4em; }
.blog-content p { margin-bottom: 1.2em; }
.blog-content img { border-radius: var(--radius-sm); margin: 1.2em 0; max-width: 100%; height: auto; }
.blog-content ul, .blog-content ol { margin-bottom: 1.2em; }
.blog-content li { margin-bottom: .4em; }
.blog-content a { text-decoration: underline; }
.blog-content blockquote {
  border-left: 4px solid var(--accent); margin: 1.4em 0; padding: .6em 1.2em;
  background: var(--background); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-light);
}
.blog-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; display: block; overflow-x: auto; }
.blog-content th, .blog-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.blog-content iframe { max-width: 100%; aspect-ratio: 16/9; width: 100%; height: auto; border-radius: var(--radius-sm); border: 0; }

/* ---- Gallery lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(11,20,33,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(90vw, 1000px); max-height: 76vh; border-radius: 10px; object-fit: contain; }
.lightbox p[data-lightbox-caption] { color: #fff; margin-top: 14px; font-size: .9rem; min-height: 1.2em; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; border: 0; font-size: 1.1rem; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; border: 0; font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-nav:hover, .lightbox-close:hover { background: rgba(255,255,255,.25); }

/* ---- 404 ---- */
.error-page { text-align: center; padding: 100px 20px; }
.error-page .code { font-size: 5rem; font-weight: 900; color: var(--accent); }

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--text-light); }
.tag-pill { display: inline-block; background: var(--background); border-radius: 999px; padding: 4px 12px; font-size: .78rem; font-weight: 600; color: var(--primary); }
