/* Rose Pharma Education */

:root {
  --rose: #CE1143;        /* logo crimson */
  --rose-deep: #9E0B32;
  --rose-ink: #3A0714;
  --blue: #0979B3;        /* logo capsule arch */
  --blue-deep: #075E8C;
  --ink: #1E1B1C;
  --body: #4A4447;
  --line: #EBDDE1;
  --tint: #FCF3F5;
  --white: #FFFFFF;
  --whatsapp: #128C4B;

  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --text: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --malayalam: 'Anek Malayalam', 'Noto Sans Malayalam', 'Nirmala UI', 'Kartika', sans-serif;

  --wrap: 1120px;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { color: var(--ink); margin: 0; }

h1, h2 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
h3 { font-family: var(--text); font-weight: 700; font-size: 1.1rem; line-height: 1.3; }

p { margin: 0 0 1em; }

a { color: var(--blue-deep); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.eyebrow {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--blue-deep);
  margin: 0 0 14px;
}

/* Icons */
.sprite { position: absolute; }
.ico {
  width: 48px; height: 48px; flex: none;
  fill: none; stroke: var(--blue-deep); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.ico .a, symbol .a { fill: #F9C9D4; stroke: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 10px 20px;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--text);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 54px; padding: 12px 26px; font-size: 1.05rem; }
.btn-primary { background: var(--rose); color: var(--white); }
.btn-primary:hover { background: var(--rose-deep); }
.btn-ghost { background: var(--white); color: var(--blue-deep); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: var(--white); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); width: 100%; }
.btn-whatsapp:hover { background: #0E703C; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand img { width: 104px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--rose); }

/* Language toggle */
.lang {
  display: inline-flex; flex: none; padding: 3px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--white);
}
.lang a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px;
  border-radius: 999px; text-decoration: none;
  font: 700 0.85rem/1 var(--text); color: var(--ink);
}
.lang a[lang="ml"] { font-family: var(--malayalam); font-size: 0.95rem; padding-top: 6px; }
.lang a:hover { color: var(--rose); }
.lang a[aria-current="page"] { background: var(--ink); color: var(--white); }

/* Hero */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 84px) 0 clamp(40px, 6vw, 64px);
  background:
    radial-gradient(900px 480px at 88% 18%, #FDE7EC 0%, rgba(253, 231, 236, 0) 70%),
    var(--white);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.hl { color: var(--rose); }

.ml-line {
  font-family: var(--malayalam);
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--blue-deep);
  margin: 22px 0 0;
  padding-left: 16px;
  border-left: 4px solid var(--rose);
}
.ml-line strong { color: var(--rose); font-weight: 700; }

.lead { font-size: 1.12rem; max-width: 34em; margin: 22px 0 0; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Capsule: echoes the pill in the logo's "O" */
.capsule-stage { position: relative; display: grid; place-items: center; padding: 12px 0; }
.capsule {
  width: min(100%, 290px);
  border-radius: 999px;
  display: grid; grid-template-rows: 1fr 1fr;
  box-shadow: 0 30px 60px -28px rgba(158, 11, 50, .45);
  transform: rotate(4deg);
}
.capsule-half {
  min-height: 250px; padding: 30px 30px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.capsule-top {
  background: var(--white);
  border: 7px solid var(--blue); border-bottom: 0;
  border-radius: 999px 999px 0 0;
  padding-top: 44px;
}
.capsule-top img { width: 56px; margin-bottom: 8px; }
.capsule-bottom {
  background: var(--rose); color: var(--white);
  border-radius: 0 0 999px 999px;
  padding-bottom: 54px;
}
.capsule-label {
  font-family: var(--display); font-weight: 600;
  font-size: 2.2rem; line-height: 1; margin: 0 0 10px;
}
.capsule-top .capsule-label { color: var(--blue-deep); }
.capsule-text { font-size: 0.95rem; line-height: 1.45; font-weight: 600; margin: 0; max-width: 12.5em; }
.capsule-top .capsule-text { color: var(--ink); }

.plus { position: absolute; width: 34px; height: 34px; opacity: .9; }
.plus::before, .plus::after { content: ''; position: absolute; background: #F6CBD5; border-radius: 3px; }
.plus::before { inset: 0 38%; }
.plus::after { inset: 38% 0; }
.p1 { top: 4%; left: 6%; }
.p2 { bottom: 12%; right: 2%; width: 46px; height: 46px; }
.p3 { bottom: 2%; left: 14%; width: 22px; height: 22px; }
.p2::before, .p2::after { background: #CFE6F2; }
.deco { position: absolute; }
.deco-ring { width: 120px; top: -6%; right: -4%; fill: none; stroke: #CFE6F2; stroke-width: 3; z-index: 0; }
.deco-ring circle { fill: #CFE6F2; stroke: none; }
.deco-pill { width: 46px; height: 20px; border-radius: 999px; background: linear-gradient(90deg, var(--blue) 50%, #CFE6F2 50%); }
.dp1 { left: -2%; top: 46%; rotate: -28deg; }
.dp2 { right: 4%; top: 40%; rotate: 40deg; background: linear-gradient(90deg, var(--rose) 50%, #F6CBD5 50%); width: 36px; height: 16px; }
.capsule { position: relative; z-index: 1; }

.facts {
  list-style: none; margin: clamp(36px, 6vw, 64px) 0 0; padding: 22px 0 0;
  display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 16px 24px;
  border-top: 1px solid var(--line);
}
.facts li { display: flex; align-items: center; gap: 12px; }
.facts .ico { width: 36px; height: 36px; }
.facts strong { font-weight: 700; color: var(--ink); line-height: 1.3; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 40em; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 + p { margin: 16px 0 0; font-size: 1.08rem; }

/* Courses */
.course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.course {
  padding: 26px 24px 24px; border-radius: var(--radius); background: var(--tint);
}
.course-alt { background: #EEF6FA; }
.course .ico { width: 64px; height: 64px; margin-bottom: 18px; }
.course-alt .ico .a { fill: #BFE0EF; }
.course h3 { font-family: var(--display); font-weight: 600; font-size: 1.75rem; line-height: 1.15; }
.course-span { font-weight: 700; color: var(--blue-deep); font-size: 0.95rem; margin: 6px 0 0; }

.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.track { padding: 24px 28px; border-radius: var(--radius); border: 1px solid var(--line); }
.track h3 { font-size: 1.2rem; margin-bottom: 8px; }
.track p { margin: 0; }

/* Method */
.method-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.method-grid li {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px 22px; border-radius: var(--radius); background: var(--white);
}
.method-grid .ico { width: 52px; height: 52px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-grid h2 { margin-bottom: 22px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 28px 68px; min-height: 76px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0; width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 3px solid var(--blue); border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--blue-deep);
  background: var(--white);
}
.steps li:not(:last-child)::after {
  content: ''; position: absolute; left: 22px; top: 50px; bottom: 4px; width: 2px; background: var(--line);
}
.steps h3 { padding-top: 9px; margin-bottom: 4px; }
.steps p { margin: 0; font-size: 0.97rem; }

.sem { margin: 30px 0 0; }
.sem-track { display: flex; align-items: center; max-width: 460px; }
.sem-track span {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 999px; background: var(--tint); color: var(--rose-deep);
  font: 600 1rem/1 'Oswald', sans-serif;
}
.sem-track span + span { margin-left: auto; }
.sem-track { background: linear-gradient(var(--line), var(--line)) center / 100% 2px no-repeat; }
.sem-track span:first-child { background: var(--white); border: 3px solid var(--blue); color: var(--blue-deep); }
.sem-track span:last-child { background: var(--rose); color: var(--white); }
.sem figcaption { margin-top: 12px; font-weight: 700; color: var(--ink); font-size: 0.97rem; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq details { border-bottom: 1px solid #EBCFD6; }
.faq details:first-child { border-top: 1px solid #EBCFD6; }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 20px 44px 20px 0; font-weight: 700; color: var(--ink); font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 6px; top: 50%; translate: 0 -50%;
  font: 500 1.7rem/1 var(--text); color: var(--rose);
}
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 20px; max-width: 38em; }

/* Contact */
.section-dark { background: var(--rose-ink); color: #F3DDE2; }
.section-dark h2 { color: var(--white); }
.section-dark .eyebrow { color: #F7A9BB; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-lead { margin: 18px 0 0; font-size: 1.08rem; max-width: 30em; }
.contact-list { list-style: none; margin: 34px 0 0; padding: 0; }
.contact-list li {
  display: grid; grid-template-columns: 110px 1fr; gap: 4px 16px;
  padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .16);
}
.contact-k { font-size: 0.92rem; font-weight: 700; color: #F7A9BB; padding-top: 5px; }
.contact-list a { color: var(--white); font-weight: 700; font-size: 1.12rem; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; }
.contact-list address { font-style: normal; color: var(--white); line-height: 1.55; }
.contact-list .map-link { grid-column: 2; font-size: 0.97rem; text-decoration: underline; text-underline-offset: 3px; margin-top: 6px; }
.section-dark :focus-visible { outline-color: var(--white); }

.enquiry {
  background: var(--white); color: var(--body);
  border-radius: 22px; padding: clamp(22px, 3.4vw, 34px);
}
.enquiry h3 { font-size: 1.3rem; }
.form-note { font-size: 0.93rem; margin: 6px 0 20px; }
.enquiry label, .enquiry legend { display: block; font-weight: 700; font-size: 0.92rem; color: var(--ink); margin-bottom: 6px; padding: 0; }
.optional { font-weight: 500; color: var(--body); }
.enquiry input[type="text"], .enquiry select, .enquiry textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; margin-bottom: 16px;
  border: 1.5px solid #CDBFC3; border-radius: 10px; background: var(--white);
  font: 500 1rem/1.4 var(--text); color: var(--ink);
}
.enquiry textarea { resize: vertical; }
.enquiry input:focus-visible, .enquiry select:focus-visible, .enquiry textarea:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue);
}
.enquiry input[aria-invalid="true"] { border-color: var(--rose); margin-bottom: 6px; }
.field-error { color: var(--rose-deep); font-size: 0.9rem; font-weight: 600; margin: 0 0 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.enquiry fieldset { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.enquiry fieldset legend { width: 100%; float: left; }
.choice { position: relative; margin: 0 !important; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px;
  border: 1.5px solid #CDBFC3; border-radius: 999px; font-weight: 600; color: var(--ink);
}
.choice input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.map { grid-column: 1 / -1; border-radius: 22px; overflow: hidden; background: #52202B; }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

/* Footer */
.site-footer { padding: 36px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.footer-row { display: flex; align-items: center; gap: 28px; }
.footer-row img { width: 96px; flex: none; }
.footer-row p { margin: 0; }
.copyright { margin-left: auto !important; white-space: nowrap; }

/* Mobile action bar */
.action-bar { display: none; }

/* Responsive */
@media (max-width: 960px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .course-grid { grid-template-columns: 1fr 1fr; }
  .method-grid { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; justify-content: start; }
  .faq-wrap, .contact-grid, .about-grid { grid-template-columns: 1fr; }
  .faq-wrap .section-head { margin-bottom: 0; }
}

@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 68px; }
  html { scroll-padding-top: 72px; }
  .header-row { min-height: 62px; }
  .brand img { width: 88px; }
  .header-call { display: none; } /* the bottom bar carries Call on phones */

  .hero-grid { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 100%; }

  /* Capsule lies on its side on small screens */
  .capsule { width: 100%; grid-template-rows: none; grid-template-columns: 1fr 1fr; transform: none; }
  .capsule-half { min-height: 0; padding: 22px 14px; }
  .capsule-top { border: 5px solid var(--blue); border-right: 0; border-radius: 999px 0 0 999px; padding: 22px 10px 22px 26px; }
  .capsule-bottom { border-radius: 0 999px 999px 0; padding: 22px 26px 22px 10px; }
  .capsule-top img { display: none; }
  .capsule-label { font-size: 1.5rem; margin-bottom: 6px; }
  .capsule-text { font-size: 0.82rem; }
  .plus { display: none; }

  .facts { gap: 14px 12px; }
  .facts .ico { width: 30px; height: 30px; }
  .facts strong { font-size: 0.93rem; }

  .tracks { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .method-grid li { padding: 18px 16px; gap: 12px; }
  .method-grid .ico { width: 42px; height: 42px; }
  .deco { display: none; }
  .sem-track span { width: 32px; height: 32px; font-size: 0.9rem; }
  .map iframe { height: 300px; }
  .contact-list li { grid-template-columns: 1fr; }
  .contact-list .map-link { grid-column: 1; }
  .contact-k { padding-top: 0; }

  .footer-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .copyright { margin-left: 0 !important; }

  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr;
    box-shadow: 0 -6px 20px rgba(30, 27, 28, .14);
  }
  .action-bar a {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 58px; padding-bottom: env(safe-area-inset-bottom);
    color: var(--white); font-weight: 700; text-decoration: none;
  }
  .action-bar svg { width: 20px; height: 20px; fill: currentColor; }
  .action-call { background: var(--rose); }
  .action-wa { background: var(--whatsapp); }
}

@media (max-width: 460px) {
  .course { padding: 20px 16px; }
  .course .ico { width: 52px; height: 52px; margin-bottom: 12px; }
  .course h3 { font-size: 1.4rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* Malayalam page: Malayalam script needs its own face, more leading and no tracking */
html[lang="ml"] {
  --display: 'Anek Malayalam', 'Noto Sans Malayalam', 'Nirmala UI', sans-serif;
  --text: 'Anek Malayalam', 'Noto Sans Malayalam', 'Nirmala UI', system-ui, sans-serif;
}
html[lang="ml"] body { line-height: 1.75; }
html[lang="ml"] h1, html[lang="ml"] h2,
html[lang="ml"] .course h3, html[lang="ml"] .capsule-label {
  font-weight: 700; font-stretch: 80%; letter-spacing: 0; line-height: 1.3;
}
html[lang="ml"] h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
html[lang="ml"] h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
html[lang="ml"] h3 { line-height: 1.45; }
html[lang="ml"] .capsule-label { font-size: 1.9rem; }
html[lang="ml"] .capsule-text { line-height: 1.55; }
html[lang="ml"] .facts strong { font-weight: 600; font-stretch: 100%; }
html[lang="ml"] .btn { line-height: 1.3; padding-top: 12px; }
html[lang="ml"] .course h3 { font-size: 1.45rem; }
html[lang="ml"] .lang a[lang="en"] { font-family: 'Manrope', system-ui, sans-serif; }
@media (max-width: 760px) {
  html[lang="ml"] .capsule-label { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
