/* =========================================================
   JANANI YOGA & NATUROPATHY MEDICAL COLLEGE
   Main stylesheet — vanilla CSS, responsive and lightweight.
   ========================================================= */

/* =========================================================
   DESIGN TOKENS
   Official colours and reusable spacing/typography settings.
   ========================================================= */
:root {
    --primary-green: #8fa083;
    --dark-green: #3f5344;
    --terracotta: #dc7633;
    --gold: #c9a15c;
    --cream: #f5efe3;
    --brown: #6c3227;
    --black: #000000;
    --white: #ffffff;
    --ink: #1d241f;
    --muted: #657067;
    --line: #ded8cc;
    --surface: #fbf9f4;
    --shadow: 0 16px 45px rgba(44, 54, 47, .10);
    --radius: 14px;
    --max: 1180px;
}

/* =========================================================
   RESET AND BASE ELEMENTS
   Simple reset prevents browser defaults from creating
   inconsistent spacing across devices.
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: "Lato", Arial, sans-serif;
    line-height: 1.7;
}

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

a { color: inherit; }

button,
input,
select,
textarea { font: inherit; }

button { cursor: pointer; }

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: -60px;
    z-index: 1000;
    background: var(--dark-green);
    color: var(--white);
    padding: 10px 14px;
}
.skip-link:focus { top: 16px; }

/* =========================================================
   TYPOGRAPHY
   Cormorant Infant is the display face; Lato is the body face.
   ========================================================= */
h1, h2, h3, h4 {
    margin: 0 0 .55em;
    font-family: "Cormorant Infant", Georgia, serif;
    line-height: 1.05;
    font-weight: 600;
    color: var(--dark-green);
}
h1 { font-size: clamp(3rem, 7vw, 6.2rem); }
h2 { font-size: clamp(2.3rem, 4vw, 4rem); }
h3 { font-size: clamp(1.55rem, 2vw, 2.2rem); }

.eyebrow {
    margin: 0 0 10px;
    color: var(--terracotta);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.lead {
    font-size: clamp(1.05rem, 1.7vw, 1.25rem);
    color: #475149;
}

.section {
    padding: 100px 0;
}
.section--cream { background: var(--cream); }
.section--dark {
    background: var(--dark-green);
    color: var(--white);
}
.section--dark h2,
.section--dark h3 { color: var(--white); }

.section-heading {
    max-width: 760px;
    margin-bottom: 45px;
}
.section-heading p { max-width: 680px; }

/* =========================================================
   BUTTONS
   Three variants keep the visual system consistent.
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: 12px 21px;
    border: 1px solid transparent;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 900;
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}
.btn--primary { background: var(--dark-green); color: var(--white); }
.btn--primary:hover { background: #304235; }
.btn--secondary { background: var(--terracotta); color: var(--white); }
.btn--outline { border-color: var(--dark-green); color: var(--dark-green); background: transparent; }
.btn--small { min-height: 43px; padding: 9px 15px; }

/* =========================================================
   TOP BAR + HEADER
   Sticky navigation keeps important actions available while
   the user scrolls.
   ========================================================= */
.topbar {
    background: var(--dark-green);
    color: var(--white);
    font-size: .78rem;
}
.topbar__inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
}
.topbar a { color: var(--white); text-decoration: none; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251,249,244,.97);
    border-bottom: 1px solid rgba(63,83,68,.12);
    backdrop-filter: blur(12px);
}
.nav-wrap {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 235px;
}
.brand__mark {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--terracotta);
    color: var(--white);
    font-family: "Cormorant Infant", Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
}
.brand__text { display: grid; line-height: 1.05; }
.brand__text strong {
    color: var(--dark-green);
    font-family: "Cormorant Infant", Georgia, serif;
    font-size: 1.35rem;
}
.brand__text small {
    max-width: 220px;
    color: var(--muted);
    font-size: .66rem;
    line-height: 1.25;
    letter-spacing: .02em;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}
.primary-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.primary-nav a {
    display: block;
    padding: 9px 8px;
    color: var(--ink);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 700;
}
.primary-nav ul a:hover,
.primary-nav ul a.is-active { color: var(--terracotta); }
.menu-toggle { display: none; }

/* =========================================================
   HERO
   Premium editorial composition instead of a generic hospital
   layout. A real campus image can replace the placeholder.
   ========================================================= */
.hero {
    min-height: 680px;
    display: grid;
    align-items: end;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(27,40,31,.88), rgba(27,40,31,.48) 58%, rgba(27,40,31,.10)),
        url("/assets/images/janani-bnys-college-campus.webp") center/cover no-repeat,
        var(--dark-green);
}
.hero__inner {
    width: min(calc(100% - 40px), var(--max));
    margin: 0 auto;
    padding: 105px 0 90px;
    color: var(--white);
}
.hero h1 { max-width: 780px; color: var(--white); }
.hero p { max-width: 720px; color: rgba(255,255,255,.88); }
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}
.hero .btn--outline { border-color: var(--white); color: var(--white); }
.trust-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 55px;
    border-top: 1px solid rgba(255,255,255,.25);
}
.trust-pills div {
    padding: 18px 18px 0 0;
    color: rgba(255,255,255,.86);
    font-size: .78rem;
}
.trust-pills strong { display: block; color: var(--white); font-size: 1rem; }

/* =========================================================
   BREADCRUMBS
   Internal page navigation and semantic context.
   ========================================================= */
.breadcrumbs {
    background: var(--cream);
    border-bottom: 1px solid var(--line);
}
.breadcrumbs .container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 13px 0;
    color: var(--muted);
    font-size: .78rem;
}
.breadcrumbs a { color: var(--dark-green); }

/* =========================================================
   TRUST BAR
   ========================================================= */
.trust-bar {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.trust-bar__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.trust-bar__item {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 20px;
    border-right: 1px solid var(--line);
}
.trust-bar__item:last-child { border-right: 0; }
.trust-bar__item strong { color: var(--dark-green); }

/* =========================================================
   CARDS AND GRIDS
   ========================================================= */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.image-card,
.info-card,
.feature-card,
.person-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 7px 28px rgba(44,54,47,.05);
}
.image-card img,
.person-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.image-card__body,
.info-card,
.feature-card,
.person-card__body { padding: 25px; }
.info-card:hover,
.feature-card:hover,
.image-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    transition: .25s ease;
}
.feature-card__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--cream);
    color: var(--terracotta);
    font-weight: 900;
}
.feature-card p,
.info-card p { color: var(--muted); }

.stat-band {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255,255,255,.2);
}
.stat {
    padding: 30px;
    background: var(--dark-green);
    color: var(--white);
}
.stat strong {
    display: block;
    font-family: "Cormorant Infant", Georgia, serif;
    font-size: 3rem;
    line-height: 1;
}

/* =========================================================
   SPLIT CONTENT
   ========================================================= */
.split {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 65px;
    align-items: center;
}
.split__image img {
    width: 100%;
    aspect-ratio: 5/4;
    object-fit: cover;
    border-radius: 16px;
}
.list-check {
    list-style: none;
    margin: 25px 0;
    padding: 0;
}
.list-check li {
    position: relative;
    padding: 10px 0 10px 31px;
    border-bottom: 1px solid var(--line);
}
.list-check li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--terracotta);
    font-weight: 900;
}

/* =========================================================
   ACADEMIC TIMELINE
   ========================================================= */
.timeline {
    position: relative;
    display: grid;
    gap: 18px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 22px;
    bottom: 22px;
    width: 1px;
    background: var(--gold);
}
.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 45px 1fr;
    gap: 20px;
}
.timeline-marker {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: var(--cream);
    color: var(--dark-green);
    font-weight: 900;
    z-index: 1;
}
.timeline-content {
    padding: 23px 26px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}
.subjects li {
    padding: 5px 9px;
    background: var(--cream);
    border-radius: 5px;
    color: #4c594f;
    font-size: .78rem;
}

/* =========================================================
   PAGE HERO
   ========================================================= */
.page-hero {
    padding: 85px 0 70px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
}
.page-hero p { max-width: 720px; }

/* =========================================================
   CTA BANNER
   ========================================================= */
.cta {
    padding: 70px 0;
    background:
        linear-gradient(90deg, rgba(63,83,68,.96), rgba(63,83,68,.86)),
        url("/assets/images/janani-yoga-meditation-hall.webp") center/cover;
    color: var(--white);
}
.cta h2 { color: var(--white); max-width: 700px; }
.cta p { max-width: 670px; color: rgba(255,255,255,.84); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }

/* =========================================================
   MANAGEMENT / PEOPLE
   ========================================================= */
.person-card__body small {
    display: block;
    margin-bottom: 8px;
    color: var(--terracotta);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
}

/* =========================================================
   ACCORDION
   ========================================================= */
.accordion {
    border-top: 1px solid var(--line);
}
.accordion details {
    border-bottom: 1px solid var(--line);
    background: var(--white);
}
.accordion summary {
    list-style: none;
    padding: 20px 24px;
    color: var(--dark-green);
    font-weight: 900;
    cursor: pointer;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion__content { padding: 0 24px 25px; }

/* =========================================================
   FORMS
   Server-side PHP validation is paired with client-side
   validation in main.js.
   ========================================================= */
.form-card {
    padding: 35px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 900; color: var(--dark-green); }
.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #c9c7bf;
    border-radius: 7px;
    background: var(--white);
    padding: 12px 13px;
    color: var(--ink);
}
.field textarea { min-height: 150px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; }

.notice {
    margin-bottom: 25px;
    padding: 14px 17px;
    border-left: 4px solid var(--terracotta);
    background: var(--cream);
}
.notice--success { border-color: var(--dark-green); }

/* =========================================================
   GALLERY
   Responsive grid + accessible lightbox controlled by JS.
   ========================================================= */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}
.filter-btn {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--white);
    padding: 8px 13px;
    color: var(--dark-green);
}
.filter-btn.is-active,
.filter-btn:hover { background: var(--dark-green); color: var(--white); }
.gallery-grid {
    columns: 3 280px;
    column-gap: 16px;
}
.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
}
.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform .3s ease;
}
.gallery-item:hover img { transform: scale(1.025); }
.gallery-item figcaption {
    padding: 10px 12px;
    font-size: .78rem;
}

/* =========================================================
   LIGHTBOX
   Keyboard-friendly modal gallery.
   ========================================================= */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    place-items: center;
    padding: 25px;
    background: rgba(0,0,0,.86);
}
.lightbox.is-open { display: grid; }
.lightbox__figure { max-width: min(1000px, 95vw); margin: 0; }
.lightbox__figure img { max-height: 78vh; width: auto; margin: auto; }
.lightbox__caption { color: var(--white); text-align: center; margin-top: 10px; }
.lightbox__close {
    position: absolute;
    top: 20px;
    right: 25px;
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: 2rem;
}

/* =========================================================
   CONTACT + MAP PLACEHOLDER
   ========================================================= */
.contact-list {
    display: grid;
    gap: 12px;
    margin: 25px 0;
}
.contact-list a { color: var(--dark-green); font-weight: 900; }
.map-placeholder {
    min-height: 330px;
    display: grid;
    place-items: center;
    padding: 30px;
    border: 1px dashed var(--primary-green);
    border-radius: 12px;
    background: var(--cream);
    text-align: center;
    color: var(--muted);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: #27362c;
    color: rgba(255,255,255,.78);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 70px 0;
}
.brand--footer .brand__text strong { color: var(--white); }
.brand--footer .brand__text small { color: rgba(255,255,255,.6); }
.site-footer p { color: rgba(255,255,255,.68); }
.footer-title {
    color: var(--white);
    font-family: "Lato", Arial, sans-serif;
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.footer-links {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.footer-links a,
.site-footer a { text-decoration: none; }
.footer-links a:hover,
.site-footer a:hover { color: var(--white); }
.site-footer address { font-style: normal; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.social-links a {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 4px;
    font-size: .75rem;
}
.text-link { color: var(--white); font-weight: 900; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom__inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 0;
    font-size: .76rem;
}

/* =========================================================
   WHATSAPP BUTTON
   Fixed but sized to avoid obstructing mobile controls.
   ========================================================= */
.whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #198754;
    color: var(--white);
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
    font-size: .68rem;
    font-weight: 900;
}
.whatsapp-float:hover { transform: translateY(-2px); }

/* =========================================================
   404 / EMPTY CONTENT
   ========================================================= */
.empty-state {
    padding: 60px 25px;
    border: 1px dashed var(--primary-green);
    background: var(--cream);
    text-align: center;
}
.error-page { text-align: center; padding: 110px 0; }

/* =========================================================
   RESPONSIVE BREAKPOINTS
   Layouts adapt for tablet and mobile widths.
   ========================================================= */
@media (max-width: 1050px) {
    .primary-nav ul { display: none; }
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 20px;
        right: 20px;
        display: none;
        padding: 15px;
        background: var(--white);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        align-items: stretch;
    }
    .primary-nav.is-open { display: grid; }
    .primary-nav ul { display: grid; }
    .primary-nav a { padding: 11px 10px; }
    .nav-cta { width: 100%; }
    .menu-toggle {
        display: grid;
        gap: 5px;
        width: 44px;
        height: 44px;
        place-content: center;
        border: 1px solid var(--line);
        background: var(--white);
        border-radius: 6px;
    }
    .menu-toggle span:not(.sr-only) {
        width: 22px;
        height: 2px;
        background: var(--dark-green);
    }
    .trust-pills,
    .trust-bar__grid { grid-template-columns: repeat(2, 1fr); }
    .trust-bar__item:nth-child(2) { border-right: 0; }
    .trust-bar__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .container { width: min(calc(100% - 28px), var(--max)); }
    .topbar__inner { justify-content: center; text-align: center; }
    .topbar__inner > span { display: none; }
    .hero { min-height: 650px; }
    .hero__inner { width: min(calc(100% - 28px), var(--max)); padding: 80px 0 55px; }
    .hero h1 { font-size: clamp(2.8rem, 15vw, 4.6rem); }
    .trust-pills,
    .trust-bar__grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .stat-band,
    .form-grid,
    .footer-grid,
    .split { grid-template-columns: 1fr; }
    .trust-pills div { border-bottom: 1px solid rgba(255,255,255,.18); }
    .trust-bar__item { border-right: 0; border-bottom: 1px solid var(--line); }
    .trust-bar__item:last-child { border-bottom: 0; }
    .section { padding: 72px 0; }
    .split { gap: 30px; }
    .footer-bottom__inner { flex-direction: column; gap: 4px; }
    .page-hero { padding: 65px 0 55px; }
    .form-card { padding: 23px; }
}

@media (max-width: 425px) {
    .brand__text small { max-width: 175px; }
    .hero__actions,
    .cta__actions { display: grid; }
    .hero__actions .btn,
    .cta__actions .btn { width: 100%; }
}

/* =========================================================
   REDUCED MOTION
   Users who request less motion get static interactions.
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
