/* =========================================================
   VILLA TEAG CHILDREN'S HOME — GLOBAL STYLES
   Brand: Dark navy blue + warm yellow
   Load after Bootstrap and before each page-specific CSS.
========================================================= */

:root {
  --brand-blue: #102A56;
  --brand-navy-dark: #0A1B36;
  --brand-navy-light: #193D70;
  --brand-yellow: #F4C542;
  --brand-yellow-dark: #D9A91D;
  --brand-green: #F4C542; /* legacy variable used by older page styles */
  --text-dark: #17263D;
  --text-muted: #617086;
  --white: #FFFFFF;
  --page-background: #F6F8FC;
  --border-color: #E2E8F0;
  --header-height: 90px;
  --shadow-soft: 0 8px 25px rgba(16, 42, 86, 0.08);
  --shadow-strong: 0 14px 32px rgba(16, 42, 86, 0.14);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

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

body {
  margin: 0;
  padding-top: var(--header-height);
  overflow-x: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--page-background);
}

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

a {
  overflow-wrap: anywhere;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

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

:focus-visible {
  outline: 3px solid var(--brand-yellow-dark);
  outline-offset: 3px;
}

::selection {
  color: var(--brand-navy-dark);
  background: var(--brand-yellow);
}

/* Bootstrap-compatible content width. Do not add global top padding here. */
.container {
  width: 100%;
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

/* Type defaults: spacing should be controlled by the page sections. */
h1, h2, h3, h4, h5, h6 {
  color: var(--brand-blue);
  line-height: 1.3;
}

p:last-child { margin-bottom: 0; }

/* Main fixed header shared by Home, About, Programmes, Get Involved, Contact. */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 2000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: linear-gradient(110deg, var(--brand-navy-dark), var(--brand-blue), var(--brand-navy-light));
  border-bottom: 3px solid var(--brand-yellow);
  box-shadow: 0 4px 18px rgba(10, 27, 54, .18);
}

.navbar-hub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 10px clamp(14px, 4vw, 48px);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--white) !important;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo:hover { color: var(--brand-yellow) !important; }

.brand-logo .logo-img {
  width: auto;
  height: 48px;
  object-fit: contain;
  border-radius: 5px;
}

/* Main menu. The checkbox must precede the hamburger and menu in the HTML. */
.menu-checkbox,
input#menu-toggle {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
}

.horizontal-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.horizontal-menu li { margin: 0; padding: 0; }

.horizontal-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  color: var(--white);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  text-transform: uppercase;
}

.horizontal-menu a:hover,
.horizontal-menu a.active {
  color: var(--brand-yellow) !important;
  background: rgba(255,255,255,.09);
  border-bottom-color: var(--brand-yellow);
}

.hamburger {
  display: none;
  flex: 0 0 auto;
  width: 31px;
  height: 27px;
  padding: 3px;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  z-index: 2105;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 4px;
  background: var(--white);
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 1120px) {
  .navbar-hub { gap: 12px; }
  .brand-logo { font-size: 1rem; }
  .brand-logo .logo-img { height: 42px; }
  .horizontal-menu a { padding: 7px 8px; font-size: .76rem; }
}

@media (max-width: 1024px) {
  .hamburger { display: flex; }
  .navbar-hub { justify-content: space-between; }
  .horizontal-menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: min(100%, 420px);
    height: calc(100dvh - var(--header-height));
    display: none;
    padding: 12px 0 28px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    overflow-y: auto;
    background: #FFFFFF;
    box-shadow: -10px 12px 30px rgba(10, 27, 54, .16);
  }
  .horizontal-menu li { width: 100%; border-bottom: 1px solid var(--border-color); }
  .horizontal-menu a {
    width: 100%;
    padding: 15px 22px;
    border: 0;
    border-radius: 0;
    color: var(--brand-blue) !important;
    text-align: left;
    font-size: .95rem;
  }
  .horizontal-menu a:hover,
  .horizontal-menu a.active {
    color: var(--brand-navy-dark) !important;
    background: #FFF7D6;
    border-left: 4px solid var(--brand-yellow-dark);
  }
  #menu-toggle:checked ~ .horizontal-menu {
    display: flex;
  }
  #menu-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #menu-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
  #menu-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 480px) {
  :root { --header-height: 78px; }
  .navbar-hub { padding: 8px 12px; }
  .brand-logo { gap: 7px; font-size: .82rem; }
  .brand-logo .logo-img { height: 34px; }
  .hamburger { width: 27px; height: 24px; }
}

/* Policy-page header used by safeguarding.html and privacy.html. */
.vt-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: linear-gradient(110deg, var(--brand-navy-dark), var(--brand-blue));
  border-bottom: 4px solid var(--brand-yellow);
}

.vt-brand {
  flex: 0 0 auto;
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.vt-header .horizontal-menu {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.vt-header .horizontal-menu li { width: auto; border: 0; }
.vt-header .horizontal-menu a { color: #FFFFFF !important; text-align: center; padding: 8px 9px; font-size: .78rem; }
.vt-header .horizontal-menu a:hover,
.vt-header .horizontal-menu a.active { color: var(--brand-yellow) !important; background: rgba(255,255,255,.09); border-bottom: 2px solid var(--brand-yellow) !important; border-left: 0; }

@media (max-width: 1024px) {
  .vt-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .vt-header .horizontal-menu { position: static; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .vt-header .horizontal-menu li { width: auto; }
  .vt-header .horizontal-menu a { width: auto; padding: 8px 9px; text-align: left; }
}

/* Shared page headers and headings. */
.page-header,
.page-header-banner {
  position: relative;
  padding: 42px 20px;
  color: #FFFFFF;
  text-align: center;
  background: linear-gradient(120deg, var(--brand-navy-dark), var(--brand-blue));
  border-bottom: 4px solid var(--brand-yellow);
}

.page-header h1,
.page-header-banner h1 { color: #FFFFFF; margin: 0 0 10px; }
.page-header p,
.page-header-banner p:not(.location-info) { max-width: 780px; margin: 0 auto; color: #E8EEF8; }

.section-title,
.section-heading { color: var(--brand-blue); }

/* Reusable cards and common links. */
.hub-card,
.story-card,
.program-card,
.placement-card,
.stat-card,
.life-card,
.info-card,
.donation-card,
.impact-card-pro,
.support-card,
.volunteer-card,
.mission-card,
.vision-card,
.Broad-goal,
.value-card,
.staff-card {
  border-color: var(--border-color);
}

.btn-primary,
a.btn-primary {
  color: #FFFFFF !important;
  background: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
}
.btn-primary:hover,
a.btn-primary:hover { background: var(--brand-navy-dark) !important; border-color: var(--brand-yellow) !important; }
.btn-warning,
.btn-yellow { color: var(--brand-navy-dark) !important; background: var(--brand-yellow) !important; border-color: var(--brand-yellow) !important; font-weight: 700; }

/* Floating WhatsApp button. */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 17px;
  border-radius: 999px;
  color: #FFFFFF;
  background: #25D366;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}
.whatsapp-float i { font-size: 1.35rem; }
.whatsapp-float:hover { color: #FFFFFF; transform: translateY(-3px); }

@media (max-width: 576px) {
  .whatsapp-float { right: 14px; bottom: 14px; padding: 13px; border-radius: 50%; }
  .whatsapp-float span { display: none; }
}

/* Back-to-top component, if present. */
#backToTop {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--brand-yellow);
  border-radius: 50%;
  color: var(--brand-yellow);
  background: var(--brand-blue);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
#backToTop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Shared footer. */
.site-footer {
  display: block;
  width: 100%;
  margin: 0;
  padding: 20px 0 0;
  color: #E8EEF8;
  background: linear-gradient(135deg, var(--brand-navy-dark), var(--brand-blue));
  border-top: 4px solid var(--brand-yellow);
  font-size: .9rem;
}

.site-footer .container { max-width: 1200px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding: 36px 15px;
}
.footer-section { min-width: 0; text-align: left; }
.footer-title { margin: 0 0 14px; color: var(--brand-yellow); font-size: 1.05rem; font-weight: 800; }
.footer-text { margin: 0 0 9px; color: #E8EEF8; font-size: .93rem; line-height: 1.65; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0 0 8px; }
.footer-links a { color: #E8EEF8; text-decoration: none; font-size: .93rem; }
.footer-links a:hover { color: var(--brand-yellow); text-decoration: underline; }
.footer-social-wrapper { display: flex; justify-content: center; width: 100%; margin-top: 8px; padding: 20px 12px; border-top: 1px solid rgba(255,255,255,.18); }
.footer-social { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-social a { color: #FFFFFF; font-size: 1.45rem; }
.footer-social a:hover { color: var(--brand-yellow); transform: translateY(-2px); }
.footer-bottom { padding: 14px 15px; text-align: center; color: #E8EEF8; background: rgba(0,0,0,.16); font-size: .82rem; }
.footer-policy-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 24px; padding: 18px; border-top: 1px solid rgba(255,255,255,.18); }
.footer-policy-links a { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--brand-yellow); text-underline-offset: 4px; }
.footer-policy-links a:hover { color: var(--brand-yellow); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; padding: 26px 15px; }
  .footer-section { padding: 12px 0; text-align: center; border-bottom: 1px solid rgba(255,255,255,.14); }
  .footer-section:last-child { border-bottom: 0; }
  .page-header, .page-header-banner { padding: 32px 16px; }
}

/* Global forms: visual defaults only; page-specific files may refine these. */
input, select, textarea { max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-blue); }

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