/* ===================================================================
   ഗ്രാമതീരം | Gramatheeram — Auditorium & Swimming Pool, Aroor
   Global stylesheet
   =================================================================== */

:root {
  /* Palette — Kerala greens, temple gold, river cream */
  --green-900: #0d3b29;
  --green-800: #134e35;
  --green-700: #1b6b48;
  --green-600: #2a8a5f;
  --gold:      #d4a02a;
  --gold-soft: #e7c25a;
  --cream:     #fdf8ef;
  --cream-2:   #f5ecd9;
  --ink:       #20271f;
  --ink-soft:  #4a5448;
  --white:     #ffffff;
  --shadow:    0 18px 45px rgba(13, 59, 41, .14);
  --shadow-sm: 0 8px 22px rgba(13, 59, 41, .10);
  --radius:    18px;
  --radius-lg: 28px;
  --maxw:      1160px;
  --head: 'Anek Malayalam', 'Noto Sans Malayalam', system-ui, sans-serif;
  --body: 'Noto Sans Malayalam', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; line-height: 1.25; color: var(--green-900); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.bg-cream2 { background: var(--cream-2); }
.bg-green  { background: var(--green-900); color: var(--cream); }
.bg-green h2, .bg-green h3 { color: var(--white); }
/* Ensure all body text stays light & high-contrast on the green background
   (these elements otherwise inherit dark colours from their base rules). */
.bg-green p,
.bg-green .split-text p,
.bg-green .section-lead,
.bg-green .check-list li,
.bg-green li,
.bg-green strong { color: var(--cream); }
.bg-green .check-list li::before { background: var(--gold); color: var(--green-900); }

/* ---------- Decorative section heading ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--head);
  font-size: .8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212,160,42,.12);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-title { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 14px; }
.section-lead { max-width: 720px; color: var(--ink-soft); font-size: 1.06rem; }
.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* ====================  TOP BAR + NAV  ==================== */
.topbar {
  background: var(--green-900);
  color: var(--cream-2);
  font-size: .85rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topbar a { color: var(--gold-soft); font-weight: 600; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253,248,239,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(13,59,41,.08);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: var(--gold-soft); display: grid; place-items: center;
  font-family: var(--head); font-size: 1.5rem; box-shadow: var(--shadow-sm);
}
.brand-text b { font-family: var(--head); font-size: 1.4rem; color: var(--green-900); display: block; line-height: 1; }
.brand-text small { font-size: .68rem; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links a {
  padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: .98rem;
  color: var(--green-900); transition: background .2s, color .2s;
}
.nav-links a:hover { background: rgba(27,107,72,.10); }
.nav-links a.active { background: var(--green-800); color: var(--cream); }
.nav-links .btn { margin-left: 8px; }

.nav-extra { display: flex; align-items: center; gap: 10px; margin-left: 16px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--green-900); border-radius: 3px; margin: 5px 0; transition: .3s; }

/* ====================  LANGUAGE SWITCH  ==================== */
.lang-switch {
  display: inline-flex; border: 1.5px solid rgba(13,59,41,.20); border-radius: 999px;
  overflow: hidden; background: var(--white); flex: none;
}
.lang-switch button {
  font-family: var(--head); font-weight: 600; font-size: .82rem; letter-spacing: .3px;
  padding: 6px 13px; border: 0; background: transparent; color: var(--green-900);
  cursor: pointer; line-height: 1.4; transition: background .2s, color .2s;
}
.lang-switch button + button { border-left: 1.5px solid rgba(13,59,41,.14); }
.lang-switch button.active { background: var(--green-800); color: var(--cream); }
.topbar .lang-switch { background: transparent; border-color: rgba(255,255,255,.25); }
.topbar .lang-switch button { color: var(--cream-2); }
.topbar .lang-switch button.active { background: var(--gold); color: #2a2000; }

/* Show only the active language; both versions live in the DOM for SEO */
html[data-lang="ml"] [lang="en"] { display: none !important; }
html[data-lang="en"] [lang="ml"] { display: none !important; }

/* ====================  BUTTONS  ==================== */
.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--head); font-weight: 600; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s, box-shadow .2s, background .2s; line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold   { background: var(--gold); color: #2a2000; box-shadow: 0 10px 24px rgba(212,160,42,.4); }
.btn-gold:hover { background: var(--gold-soft); }
.btn-green  { background: var(--green-800); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn-green:hover { background: var(--green-900); }
.btn-ghost  { background: transparent; border-color: var(--green-700); color: var(--green-900); }
.btn-ghost:hover { background: var(--green-800); color: var(--cream); }
.btn-light  { background: var(--cream); color: var(--green-900); }

/* ====================  HERO  ==================== */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center;
  color: var(--cream);
  background: linear-gradient(rgba(8,40,28,.62), rgba(8,40,28,.78)), url('../assets/img/pool-wide.jpg') center/cover fixed;
}
.hero::after {
  content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 90px;
  background: linear-gradient(to top, var(--cream), transparent);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; padding: 70px 0; }
.hero .tagline {
  font-family: var(--head); color: var(--gold-soft); font-size: 1.1rem; letter-spacing: 1px; margin-bottom: 14px;
}
.hero h1 { color: var(--white); font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.05; text-shadow: 0 4px 24px rgba(0,0,0,.4); }
.hero h1 .accent { color: var(--gold-soft); }
.hero p.sub { font-size: clamp(1.05rem, 2.4vw, 1.3rem); margin: 20px 0 8px; max-width: 600px; }
.hero .loc { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gold-soft); margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ====================  STAT STRIP  ==================== */
.stats { background: var(--green-900); color: var(--cream); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 40px 22px; }
.stat { text-align: center; }
.stat b { font-family: var(--head); font-size: 2.4rem; color: var(--gold-soft); display: block; line-height: 1; }
.stat span { font-size: .95rem; color: var(--cream-2); }

/* ====================  FEATURE / FACILITY CARDS  ==================== */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(13,59,41,.06);
  transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 16/11; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 22px 24px 26px; }
.card-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(27,107,72,.10); font-size: 1.6rem; margin-bottom: 14px;
}
.card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: .98rem; }
.tag {
  display: inline-block; font-size: .78rem; font-weight: 700; color: var(--green-700);
  background: rgba(212,160,42,.14); padding: 3px 12px; border-radius: 999px; margin-bottom: 12px;
}

/* ====================  SPLIT (text + image)  ==================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split-text h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 16px; }
.split-text p { color: var(--ink-soft); margin-bottom: 14px; }
.check-list { list-style: none; margin: 18px 0; }
.check-list li { position: relative; padding-left: 34px; margin-bottom: 12px; color: var(--ink); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-700); color: #fff;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}

/* ====================  EDITABLE NOTICE BOARD  ==================== */
.board-wrap { position: relative; }
.board {
  background: linear-gradient(160deg, #fffaf0, #fdf3df);
  border: 2px dashed var(--gold); border-radius: var(--radius-lg);
  padding: 38px 40px; box-shadow: var(--shadow-sm); position: relative;
}
.board::before {
  content: "📌"; position: absolute; top: -18px; left: 32px; font-size: 1.8rem;
  background: var(--cream); padding: 0 6px;
}
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.board-head h3 { font-size: 1.5rem; color: var(--green-900); }
#boardContent { font-size: 1.08rem; color: var(--ink); outline: none; }
#boardContent h4 { color: var(--green-800); margin: 14px 0 6px; }
#boardContent ul { margin: 8px 0 8px 22px; }
#boardContent[contenteditable="true"] {
  background: #fffdf7; border: 1px solid var(--gold-soft); border-radius: 12px; padding: 14px 16px;
  min-height: 90px;
}
.board-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.board-note { font-size: .85rem; color: var(--ink-soft); margin-top: 16px; }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.hidden { display: none !important; }
.saved-flash {
  font-size: .9rem; color: var(--green-700); font-weight: 700; opacity: 0; transition: opacity .3s;
}
.saved-flash.show { opacity: 1; }

/* ====================  GALLERY  ==================== */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery a { display: block; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); position: relative; aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery a:hover img { transform: scale(1.08); }
.gallery a::after {
  content: "🔍"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(13,59,41,.45); color: #fff; font-size: 1.6rem; opacity: 0; transition: opacity .3s;
}
.gallery a:hover::after { opacity: 1; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(8,30,20,.92); display: none; place-items: center; z-index: 200; padding: 24px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .lb-close { position: absolute; top: 20px; right: 26px; font-size: 2.4rem; color: #fff; cursor: pointer; line-height: 1; }

/* ====================  VIDEO  ==================== */
.video-frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-frame video { width: 100%; display: block; }

/* ====================  CONTACT  ==================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.info-card {
  background: var(--white); border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow-sm);
  border: 1px solid rgba(13,59,41,.06);
}
.info-row { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid rgba(13,59,41,.07); }
.info-row:last-child { border-bottom: 0; }
.info-row .ic { width: 46px; height: 46px; flex: none; border-radius: 12px; background: rgba(27,107,72,.10); display: grid; place-items: center; font-size: 1.3rem; }
.info-row b { display: block; color: var(--green-900); font-family: var(--head); }
.info-row span, .info-row a { color: var(--ink-soft); }
.info-row a:hover { color: var(--green-700); }

.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--green-900); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid rgba(13,59,41,.18);
  font-family: var(--body); font-size: 1rem; background: var(--white); color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-color: var(--green-600); }

.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 0; width: 100%; height: 320px; }

/* ====================  PAGE HEADER  ==================== */
.page-head {
  background: linear-gradient(rgba(8,40,28,.74), rgba(8,40,28,.82)), url('../assets/img/entrance.jpg') center/cover;
  color: var(--cream); padding: 90px 0 70px; text-align: center;
}
.page-head h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.page-head p { color: var(--cream-2); max-width: 620px; margin: 12px auto 0; }
.crumbs { font-size: .9rem; color: var(--gold-soft); margin-bottom: 8px; }

/* ====================  WHATSAPP FLOAT  ==================== */
.wa-float {
  position: fixed; right: 20px; bottom: 22px; z-index: 80;
  width: 60px; height: 60px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; font-size: 1.9rem; box-shadow: 0 10px 30px rgba(37,211,102,.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1);} 50% { transform: scale(1.08);} }

/* ====================  FOOTER  ==================== */
.footer { background: var(--green-900); color: var(--cream-2); padding: 64px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer h4 { color: var(--gold-soft); margin-bottom: 16px; font-size: 1.15rem; }
.footer a { color: var(--cream-2); display: block; padding: 4px 0; }
.footer a:hover { color: var(--gold-soft); }
.footer .brand-text b { color: #fff; }
.footer p { color: rgba(245,236,217,.8); font-size: .95rem; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; text-align: center; font-size: .85rem; color: rgba(245,236,217,.65); }
.foot-bottom a { display: inline; color: var(--gold-soft); }

/* ====================  SCROLL REVEAL  ==================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ====================  RESPONSIVE  ==================== */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { background-attachment: scroll; }
}
/* Use the hamburger menu on tablets too — the full bilingual nav is too
   wide to sit inline below ~1024px. */
@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--cream); padding: 14px 22px 22px; gap: 4px; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; }
  .nav-links .btn { margin: 8px 0 0; justify-content: center; }
}
@media (max-width: 760px) {
  .nav .container { padding-left: 16px; padding-right: 16px; }
  .nav-extra { margin-left: 10px; gap: 8px; }
  .lang-switch button { padding: 6px 10px; font-size: .78rem; }
  .brand-mark { width: 40px; height: 40px; font-size: 1.25rem; }
  .brand-text b { font-size: 1.2rem; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .split.reverse .split-media { order: 0; }
  .stats .container { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 60px 0; }
  .topbar { display: none; }
}
@media (max-width: 460px) {
  .gallery { grid-template-columns: 1fr; }
  .board { padding: 30px 22px; }
}
@media (max-width: 400px) {
  .brand-text small { display: none; }
  .brand { gap: 9px; }
  .brand-mark { width: 38px; height: 38px; }
  .nav-extra { margin-left: 8px; gap: 7px; }
  .lang-switch button { padding: 6px 9px; }
}
