/* =========================================================
   Janta Degree College, Parsaun, Etah — website styles
   Colours taken from the college logo:
   royal blue band, red ribbon, yellow lettering, white field
   ========================================================= */

:root {
  --blue: #1B2A9A;
  --blue-deep: #141C6B;
  --navy: #0E1554;
  --red: #C8161D;
  --red-deep: #9C1016;
  --yellow: #FFD21A;
  --yellow-soft: #FFF3B8;
  --cream: #FFF9E6;
  --ink: #161A3A;
  --muted: #595E7C;
  --line: #E2E4F0;
  --white: #FFFFFF;

  --font-body: "Mukta", "Nirmala UI", "Segoe UI", system-ui, sans-serif;
  --font-display: "Tiro Devanagari Hindi", "Mukta", Georgia, serif;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --container: 1280px;
  --shadow: 0 16px 36px -18px rgba(14, 21, 84, .35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3 { color: var(--blue-deep); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.3rem); }
h2 { font-weight: 800; font-size: clamp(1.45rem, 2.4vw, 2rem); }
h3 { font-weight: 700; font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 3px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.ico { flex-shrink: 0; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--yellow); color: var(--navy); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 999px; border: 2px solid transparent; font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; white-space: nowrap; }
.btn-lg { padding: 14px 28px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: #FFE14D; color: var(--navy); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-deep); color: var(--white); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); color: var(--white); }
.btn-outline-light { border-color: rgba(255,255,255,.6); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--blue-deep); border-color: var(--white); }

/* ---------- Top strip (red, like the logo ribbon) ---------- */
.topstrip { background: var(--red); color: #FFE9EA; font-size: .88rem; }
.topstrip-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topstrip-aff { margin: 0; }
.topstrip-right { display: flex; align-items: center; gap: 16px; }
.topstrip a { color: #FFE9EA; text-decoration: none; }
.topstrip a:hover { color: var(--yellow); }
.topstrip-social { display: inline-flex; gap: 12px; }
.badge-blink { background: var(--yellow); color: var(--navy) !important; font-weight: 700; padding: 2px 12px; border-radius: 999px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255,210,26,.25); } }

/* ---------- Brand bar ---------- */
.brandbar { background: var(--white); border-bottom: 1px solid var(--line); position: relative; }
.brandbar-inner { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; min-width: 0; }
.brand-logo { width: 96px; height: 96px; flex-shrink: 0; filter: drop-shadow(0 4px 8px rgba(14,21,84,.18)); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-hi { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.25rem); color: var(--red); line-height: 1.15; }
.brand-en { font-weight: 800; color: var(--blue-deep); font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.25; margin-top: 2px; }
.brand-motto { font-family: var(--font-display); color: var(--blue); font-size: .98rem; margin-top: 2px; }

.brand-contact { margin-left: auto; display: flex; gap: 14px; }
.contact-chip { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); transition: border-color .2s, background .2s; }
.contact-chip:hover { border-color: var(--blue); background: var(--cream); }
.chip-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: var(--yellow); flex-shrink: 0; }
.chip-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.chip-text small { color: var(--muted); font-size: .8rem; }
.chip-text strong { color: var(--blue-deep); font-size: 1rem; }

/* ---------- Navbar (blue band with yellow edge) ---------- */
.navbar { background: var(--blue); border-bottom: 4px solid var(--yellow); position: sticky; top: 0; z-index: 100; box-shadow: 0 6px 18px -12px rgba(14,21,84,.6); }
.nav-mobile-head, .nav-mobile-contact { display: none; }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; align-items: center; }
.nav-list > li { position: relative; display: flex; align-items: center; }
.nav-list > li > a { display: block; padding: 15px 14px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 1.02rem; white-space: nowrap; }
.nav-list > li.has-sub > a { padding-right: 2px; }
.nav-list > li > .sub-toggle { color: rgba(255,255,255,.8); padding-right: 10px; }
.nav-list > li:hover > a, .nav-list > li.active > a { color: var(--yellow); }
.nav-list > li.active { background: var(--blue-deep); }
.nav-list > li:hover { background: var(--blue-deep); }
.sub-toggle { background: none; border: 0; cursor: pointer; padding: 4px; display: inline-flex; align-items: center; color: var(--muted); border-radius: 4px; }
.sub-toggle .ico { transition: transform .2s; }
.nav-list > li:hover > .sub-toggle .ico, .has-sub.open > .sub-toggle .ico { transform: rotate(180deg); }

.sub-menu { list-style: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--white); border-top: 3px solid var(--red); border-radius: 0 0 var(--r-md) var(--r-md); padding: 8px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 60; }
.sub-menu li { position: relative; display: flex; align-items: center; flex-wrap: wrap; }
.sub-menu a { flex: 1; display: block; padding: 9px 12px; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: var(--r-sm); white-space: nowrap; }
.sub-menu a:hover, .sub-menu li.active > a { background: var(--cream); color: var(--blue); }
.sub-menu a[aria-current="page"] { background: var(--yellow-soft); color: var(--blue-deep); font-weight: 700; }
.sub-menu .sub-toggle .ico { transform: rotate(-90deg); }
.sub-menu .sub-menu { top: -11px; left: calc(100% + 8px); border-radius: var(--r-md); }
.nav-list li:hover > .sub-menu, .nav-list li:focus-within > .sub-menu, .nav-list li.open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav-list > li:nth-last-child(-n+3) > .sub-menu { left: auto; right: 0; }
.nav-list > li:nth-last-child(-n+3) .sub-menu .sub-menu { left: auto; right: calc(100% + 8px); }

.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: var(--r-md); border: 0; background: var(--blue); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; flex-shrink: 0; }
.nav-toggle span { width: 22px; height: 2.5px; background: var(--yellow); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-overlay { position: fixed; inset: 0; background: rgba(14,21,84,.55); z-index: 140; }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--white); background: var(--navy) url("../images/hero-default.svg") center bottom / cover no-repeat; }
.hero-has-image { background-image: linear-gradient(95deg, rgba(14,21,84,.94) 0%, rgba(20,28,107,.85) 45%, rgba(20,28,107,.45) 100%), var(--hero-img); background-position: center; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero-motto { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 20px; font-family: var(--font-display); font-size: 1.35rem; color: var(--yellow); }
.hero-motto-en { font-family: var(--font-body); font-size: .92rem; color: #C9D0FF; }
.hero h1 { color: var(--white); max-width: 20ch; margin-bottom: 18px; }
.hero-lead { font-size: 1.15rem; color: #DCE1FF; max-width: 54ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.notice-card { background: var(--white); color: var(--ink); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 60px -28px rgba(0,0,0,.6); }
.notice-card-head { display: flex; justify-content: space-between; align-items: center; background: var(--red); padding: 14px 20px; }
.notice-card-head h2 { color: var(--white); font-size: 1.2rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.notice-card-head a { color: var(--yellow); font-weight: 700; font-size: .92rem; }
.notice-card-head a:hover { color: var(--white); }
.notice-list { list-style: none; }
.notice-card .notice-list { padding: 6px 20px 12px; max-height: 340px; overflow-y: auto; }
.notice-list li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.notice-list li:last-child { border-bottom: 0; }
.notice-list time { display: flex; flex-direction: column; align-items: center; background: var(--cream); border: 1px solid #F3E2A6; border-radius: var(--r-sm); font-size: .75rem; font-weight: 700; color: var(--red); line-height: 1.1; padding: 6px 2px; text-align: center; }
.notice-list time span { font-size: 1.3rem; color: var(--blue-deep); }
.notice-list a { color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.45; }
.notice-list a:hover { color: var(--blue); text-decoration: underline; }
.tag-new { font-style: normal; background: var(--red); color: var(--white); font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; vertical-align: 2px; }
.notice-empty { padding: 20px; margin: 0; color: var(--muted); }
.notice-list-page li { grid-template-columns: 76px 1fr; padding: 16px 0; }

/* ---------- Info strip ---------- */
.info-strip { background: var(--yellow); }
.info-strip-inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.info-strip a, .info-strip p { display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px 20px; color: var(--navy); text-decoration: none; font-weight: 700; border-right: 1px solid rgba(14,21,84,.15); }
.info-strip-inner > :last-child { border-right: 0; }
.info-strip span { display: flex; flex-direction: column; line-height: 1.3; }
.info-strip small { font-weight: 500; font-size: .82rem; color: #4A4300; }
.info-strip a:hover { background: #FFE14D; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-cream { background: var(--cream); }
.section-head { max-width: 660px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.section-title { position: relative; padding-bottom: 14px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--red) 0 50%, var(--yellow) 50% 100%); }

/* ---------- Welcome + principal ---------- */
.welcome { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.welcome-text .content { margin-bottom: 24px; }
.principal-card { margin: 0; background: var(--blue-deep); color: #DCE1FF; border-radius: var(--r-lg); padding: 32px; position: relative; overflow: hidden; }
.principal-card::before { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 30px solid rgba(255,210,26,.12); }
.principal-card img, .principal-avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid var(--yellow); margin-bottom: 18px; }
.principal-avatar { display: grid; place-items: center; background: var(--blue); color: var(--yellow); }
.principal-card blockquote { margin: 0 0 18px; }
.principal-card blockquote p { font-size: 1.12rem; line-height: 1.6; color: var(--white); margin: 0; }
.principal-card figcaption strong { display: block; color: var(--yellow); font-size: 1.1rem; }
.principal-card figcaption span { font-size: .92rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--yellow); font-weight: 700; text-decoration: none; }
.link-arrow:hover { color: var(--white); }

/* ---------- Programmes ---------- */
.prog-groups { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: start; }
.prog-group { background: var(--white); border-radius: var(--r-lg); padding: 26px; border: 1px solid #F0E3B5; }
.prog-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 2px solid var(--blue); padding-bottom: 12px; margin-bottom: 18px; }
.prog-group-head h3 { margin: 0; font-size: 1.35rem; }
.prog-group-head h3 a { color: var(--blue-deep); text-decoration: none; }
.prog-group-head h3 a:hover { color: var(--red); }
.prog-group-head span { font-size: .9rem; font-weight: 700; color: var(--red); }
.subject-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.subject-grid a { display: flex; flex-direction: column; height: 100%; padding: 14px 16px; border-radius: var(--r-md); background: var(--cream); border-left: 4px solid var(--yellow); text-decoration: none; transition: background .2s, border-color .2s; }
.subject-grid a:hover { background: var(--blue); border-left-color: var(--red); }
.subject-grid strong { color: var(--blue-deep); font-size: 1.05rem; }
.subject-grid span { color: var(--red); font-size: .95rem; }
.subject-grid a:hover strong { color: var(--white); }
.subject-grid a:hover span { color: var(--yellow); }

/* ---------- Explore cards ---------- */
.explore-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.explore-card { position: relative; display: flex; flex-direction: column; padding: 26px 24px 24px; border-radius: var(--r-lg); background: var(--white); border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s, box-shadow .2s; overflow: hidden; }
.explore-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--blue); transition: background .2s; }
.explore-card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.explore-card:hover::before { background: var(--red); }
.explore-ico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--yellow-soft); color: var(--blue); margin-bottom: 16px; }
.explore-card h3 { margin-bottom: 6px; }
.explore-card p { color: var(--muted); font-size: .98rem; margin: 0 0 12px; }
.explore-go { margin-top: auto; color: var(--red); }
.explore-card-contact { grid-column: span 2; background: var(--blue); border-color: var(--blue); color: #DCE1FF; }
.explore-card-contact h3 { color: var(--white); }
.explore-card-contact p { color: #DCE1FF; }
.explore-card-contact .explore-ico { background: var(--yellow); color: var(--blue-deep); }
.explore-card-contact .explore-go { color: var(--yellow); }
.explore-card-contact::before { background: var(--yellow); }
.explore-card-contact:hover { color: #DCE1FF; border-color: var(--blue-deep); }

/* ---------- Inner page hero ---------- */
.page-hero { position: relative; background: var(--blue-deep) url("../images/hero-default.svg") center 85% / cover no-repeat; color: #DCE1FF; padding: 54px 0 64px; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,21,84,.92), rgba(14,21,84,.55)); }
.page-hero-img { background-image: var(--hero-img); background-position: center; }
.page-hero .container { position: relative; }
.page-hero h1 { color: var(--white); margin-bottom: 8px; }
.page-hero p { font-size: 1.1rem; max-width: 62ch; margin: 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; margin-bottom: 14px; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 6px; opacity: .6; }
.breadcrumb a { color: var(--yellow); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; color: var(--yellow); }
.preview-bar { background: var(--yellow); color: var(--navy); padding: 10px 24px; text-align: center; font-size: .95rem; }

/* ---------- Page layout ---------- */
.section-page { padding: 56px 0 80px; }
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.page-layout.no-side { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.page-layout .content { max-width: none; }
.page-title { color: var(--blue-deep); }
.side-nav { position: sticky; top: 76px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.side-nav h2 { background: var(--blue); color: var(--white); font-size: 1.1rem; padding: 14px 20px; margin: 0; border-bottom: 3px solid var(--yellow); }
.side-nav ul { list-style: none; padding: 8px; }
.side-nav ul ul { padding: 2px 0 6px 14px; margin-left: 10px; border-left: 2px solid var(--yellow-soft); display: none; }
.side-nav li.open > ul { display: block; }
.side-nav a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 500; }
.side-nav a:hover { background: var(--cream); color: var(--blue); }
.side-nav a[aria-current="page"] { background: var(--yellow-soft); color: var(--blue-deep); font-weight: 700; box-shadow: inset 3px 0 0 var(--red); }
.side-help { margin: 8px; padding: 16px; background: var(--cream); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 6px; font-size: .95rem; }
.side-help strong { color: var(--red); }
.side-help a { display: flex; align-items: center; gap: 8px; color: var(--blue-deep); font-weight: 600; text-decoration: none; word-break: break-word; }

/* ---------- Rich content (HTML editor output) ---------- */
.content { max-width: 78ch; }
.content > *:first-child { margin-top: 0; }
.content h2 { margin-top: 1.5em; font-size: 1.55rem; }
.content h3 { margin-top: 1.3em; }
.content ul, .content ol { padding-left: 1.3em; margin-bottom: 1.1em; }
.content li { margin-bottom: .35em; }
.content img { border-radius: var(--r-md); margin: 1em 0; height: auto; }
.content blockquote { margin: 1.2em 0; padding: 14px 20px; border-left: 4px solid var(--yellow); background: var(--cream); border-radius: 0 var(--r-md) var(--r-md) 0; }
.table-scroll { overflow-x: auto; margin: 1em 0 1.4em; -webkit-overflow-scrolling: touch; }
.content table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .98rem; }
.table-scroll > table { margin: 0; }
.table-scroll > table:has(thead) { min-width: 520px; }
.content th, .content td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.content thead th { background: var(--blue); color: var(--white); border-color: var(--blue); }
.content tbody th { background: var(--cream); color: var(--blue-deep); width: 32%; }
.content tbody tr:nth-child(even) td { background: #FAFBFF; }
.content iframe, .content video { max-width: 100%; border-radius: var(--r-md); }
.subject-links { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.subject-links a { display: flex; flex-direction: column; padding: 14px 16px; background: var(--cream); border-left: 4px solid var(--yellow); border-radius: var(--r-md); text-decoration: none; font-weight: 700; color: var(--blue-deep); }
.subject-links a span { font-weight: 500; color: var(--red); }
.subject-links a:hover { background: var(--blue); color: var(--white); }
.subject-links a:hover span { color: var(--yellow); }
.steps { list-style: none; counter-reset: s; padding: 0 !important; display: grid; gap: 16px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: var(--yellow); font-weight: 800; font-size: 1.2rem; }
.steps strong { color: var(--blue-deep); font-size: 1.08rem; }
.steps span { color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-grid > * { min-width: 0; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
a.contact-card:hover { border-color: var(--blue); background: var(--cream); color: var(--ink); }
.contact-card > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.contact-card small { color: var(--muted); }
.contact-card strong { color: var(--blue-deep); word-break: break-word; }
.contact-card em { font-style: normal; color: var(--blue-deep); font-weight: 600; }
.map-wrap { margin-top: 18px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--cream); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.form-card { background: var(--cream); border: 1px solid #F0E3B5; border-radius: var(--r-lg); padding: 30px; }
.form .field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { font-weight: 600; font-size: .93rem; margin-bottom: 5px; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea { font: inherit; font-size: 1rem; padding: 11px 13px; border: 1.5px solid #DADCEB; border-radius: var(--r-sm); background: var(--white); color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,42,154,.15); }
.has-error input, .form .invalid { border-color: var(--red); }
.err { color: var(--red); font-size: .85rem; margin-top: 4px; }
.alert { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 16px; }
.alert-success { background: #E4F5EA; color: #1B5E36; border: 1px solid #BFE3CC; }
.alert-error { background: #FDECEC; color: var(--red-deep); border: 1px solid #F5C2C4; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #BCC3EE; font-size: .98rem; }
.footer-cta { background: var(--blue); border-bottom: 4px solid var(--yellow); }
.footer-cta-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding-top: 36px; padding-bottom: 36px; }
.footer-cta h2 { color: var(--white); margin: 0 0 4px; }
.footer-cta p { margin: 0; color: #DCE1FF; }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; padding-top: 60px; padding-bottom: 48px; }
.footer-grid > * { min-width: 0; }
.footer-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 16px; }
.footer-brand img { width: 72px; height: 72px; flex-shrink: 0; }
.footer-brand strong { display: block; font-family: var(--font-display); font-weight: 400; color: var(--yellow); font-size: 1.25rem; line-height: 1.25; }
.footer-brand small { color: #DCE1FF; font-size: .92rem; }
.footer-about p { max-width: 42ch; }
.footer-follow { margin: 18px 0 10px; color: var(--white); font-weight: 700; }
.site-footer h3 { color: var(--white); font-size: 1.08rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--red); display: inline-block; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: #BCC3EE; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .btn-yellow, .site-footer .btn-yellow:hover { color: var(--navy); }
.site-footer .btn-outline-light { color: var(--white); }
.site-footer .btn-outline-light:hover { color: var(--blue-deep); }
.footer-contact p { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .ico { color: var(--yellow); margin-top: 4px; }
.footer-contact span { word-break: break-word; }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--white); border: 1px solid rgba(255,255,255,.15); transition: background .2s, border-color .2s; }
.social a:hover { color: var(--white); border-color: transparent; }
.social .social-facebook:hover { background: #1877F2; }
.social .social-instagram:hover { background: #D6249F; }
.social .social-youtube:hover { background: #FF0000; }
.social .social-x:hover { background: #000; }
.social .social-whatsapp:hover { background: #25D366; }
.footer-bottom { background: var(--red); color: #FFE9EA; font-size: .92rem; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; padding-bottom: 14px; }
.footer-bottom p { margin: 0; }
.footer-legal { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; }
.footer-legal li + li::before { content: "·"; margin: 0 10px; color: rgba(255,233,234,.6); }
.site-footer .footer-legal a { color: #FFE9EA; }
.site-footer .footer-legal a:hover { color: var(--yellow); text-decoration: underline; }
.footer-motto { font-family: var(--font-display); color: var(--yellow); font-size: 1.05rem; }

/* ---------- Floating buttons ---------- */
.to-top, .whatsapp-float { position: fixed; right: 18px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; z-index: 90; box-shadow: 0 10px 22px -8px rgba(0,0,0,.45); }
.whatsapp-float { bottom: 18px; background: #25D366; color: var(--white); }
.whatsapp-float:hover { color: var(--white); background: #1EBE5A; }
.to-top { bottom: 80px; background: var(--blue); color: var(--yellow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1240px) {
  .nav-list > li > a { padding-left: 10px; padding-right: 10px; font-size: .98rem; }
  .contact-chip .chip-text small { display: none; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-about { grid-row: span 2; }
}

@media (max-width: 1100px) {
  .brand-contact { display: none; }
}

/* Off-canvas menu on tablet & mobile */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .navbar { position: static; border: 0; box-shadow: none; }
  .brandbar { position: sticky; top: 0; z-index: 100; }
  .main-nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); background: var(--white); z-index: 150; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s; display: flex; flex-direction: column; }
  .main-nav.open { transform: none; visibility: visible; box-shadow: -20px 0 40px -20px rgba(0,0,0,.45); }
  .nav-mobile-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--blue); border-bottom: 4px solid var(--yellow); position: sticky; top: 0; z-index: 2; }
  .nav-mobile-head strong { color: var(--white); font-size: 1.15rem; }
  .nav-close { margin-left: auto; width: 40px; height: 40px; border-radius: var(--r-sm); border: 0; background: rgba(255,255,255,.12); color: var(--white); font-size: 1.7rem; line-height: 1; cursor: pointer; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 8px 12px; }
  .nav-list li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-list li:last-child { border-bottom: 0; }
  .nav-list > li:hover, .nav-list > li.active { background: none; }
  .nav-list > li > a { flex: 1; color: var(--ink); padding: 13px 8px; font-size: 1.05rem; }
  .nav-list > li:hover > a { color: var(--blue); }
  .nav-list > li.active > a { color: var(--red); }
  .nav-list > li > .sub-toggle { color: var(--muted); }
  .sub-toggle { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .nav-list > li:hover > .sub-toggle .ico { transform: none; }
  .has-sub.open > .sub-toggle .ico { transform: rotate(180deg) !important; }
  .sub-menu .sub-toggle .ico { transform: none; }
  .sub-menu, .sub-menu .sub-menu { position: static; display: none; width: 100%; min-width: 0; opacity: 1; visibility: visible; transform: none; transition: none; box-shadow: none; border: 0; border-radius: var(--r-sm); background: var(--cream); padding: 4px 0 6px 10px; margin-bottom: 8px; }
  .nav-list li:hover > .sub-menu, .nav-list li:focus-within > .sub-menu { display: none; }
  .nav-list li.open > .sub-menu { display: block; }
  .sub-menu li { border-bottom: 0; }
  .sub-menu a { white-space: normal; }
  .sub-menu .sub-menu { background: var(--yellow-soft); }
  .nav-mobile-contact { display: flex; flex-direction: column; gap: 8px; margin: 12px 16px 24px; padding: 14px; background: var(--cream); border-radius: var(--r-md); }
  .nav-mobile-contact a { display: flex; align-items: center; gap: 8px; color: var(--blue-deep); font-weight: 600; text-decoration: none; word-break: break-word; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .brand-contact { display: flex; order: 3; width: 100%; margin: 0; gap: 8px; }
  .brandbar-inner { flex-wrap: wrap; row-gap: 10px; }
  .contact-chip { flex: 1; min-width: 0; padding: 6px 12px 6px 6px; }
  .contact-chip .chip-ico { width: 34px; height: 34px; }
  .contact-chip .chip-ico .ico { width: 16px; height: 16px; }
  .chip-text strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-top: 56px; padding-bottom: 64px; gap: 36px; }
  .welcome { grid-template-columns: 1fr; gap: 36px; }
  .prog-groups { grid-template-columns: 1fr; }
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  .page-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .side-nav { position: static; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 1rem; }
  .container { padding: 0 16px; }
  .topstrip-aff { display: none; }
  .topstrip-inner { justify-content: center; }
  .brandbar-inner { padding-top: 10px; padding-bottom: 10px; gap: 12px; }
  .brand { gap: 10px; }
  .brand-logo { width: 60px; height: 60px; }
  .brand-hi { font-size: 1.22rem; }
  .brand-en { font-size: .86rem; }
  .brand-motto { display: none; }
  .nav-toggle { width: 42px; height: 42px; }
  .contact-chip .chip-text small { display: none; }
  .hero-motto { font-size: 1.15rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .info-strip-inner { grid-template-columns: 1fr; }
  .info-strip a, .info-strip p { border-right: 0; border-bottom: 1px solid rgba(14,21,84,.15); padding: 12px 4px; }
  .section { padding: 56px 0; }
  .principal-card { padding: 24px; }
  .prog-group { padding: 18px; }
  .subject-grid { grid-template-columns: 1fr 1fr; }
  .explore-grid { gap: 12px; }
  .explore-card { padding: 18px 16px 16px; }
  .explore-ico { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 12px; }
  .explore-card h3 { font-size: 1.05rem; }
  .explore-card p { font-size: .9rem; }
  .contact-chip { flex: 0 1 auto; }
  .contact-chip:last-child { flex: 1 1 0; }
  .chip-text strong { font-size: .84rem; }
  .contact-cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 22px 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-top: 44px; }
  .footer-about, .footer-contact { grid-column: 1 / -1; grid-row: auto; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .footer-cta-actions .btn { flex: 1 1 auto; }
  .content tbody th { width: 40%; }
}

@media (max-width: 380px) {
  .explore-grid { grid-template-columns: 1fr; }
  .explore-card-contact { grid-column: auto; }
  .subject-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

[hidden] { display: none !important; }
