/* =====================================================
   WINDSOR SECONDARY SCHOOL — SHARED STYLES v10
   Used by all inner pages (about, staff, contact etc.)
   Homepage (index.html) is self-contained.
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ── TOKENS ── */
:root {
  --M:  #5c0a1a;
  --Md: #3d0610;
  --Ml: #7a1228;
  --G:  #c9a84c;
  --Gl: #e8c96a;
  --Gd: #9a7c2a;
  --C:  #fdf6e3;
  --Cd: #f0e6c8;
  --D:  #1a0a0e;
  --W:  #ffffff;
  --T:  #6b5a5e;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--C);
  color: var(--D);
  line-height: 1.6;
}
img, video { max-width: 100%; height: auto; display: block; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--Md); }
::-webkit-scrollbar-thumb { background: var(--G); border-radius: 3px; }

/* ── NAV (shared across inner pages) ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: linear-gradient(180deg, #3d0610, #5c0a1a);
  border-bottom: 2px solid var(--G);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.nav-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.nav-logo  { width: 36px; height: auto; }
.nav-brand span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--G);
  letter-spacing: 0.5px;
}
.nav-brand small {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.48rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(201,168,76,0.45);
}
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-links { display: flex; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 0 0.85rem;
  height: 56px;
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active { color: var(--G); border-bottom-color: var(--G); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0.4rem; }
.hamburger span { width: 22px; height: 2px; background: var(--G); border-radius: 2px; }

/* ── PAGE BANNER (inner pages) ── */
.page-banner {
  background: linear-gradient(135deg, #3d0610 0%, #5c0a1a 50%, #3d0610 100%);
  padding: 2.5rem 2rem 3.5rem;
  text-align: center;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  margin-top: 56px;
  width: 100%;
  box-sizing: border-box;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/* hide the inline watermark imgs — watermark is via ::before pseudo */
.page-banner-watermark { display: none !important; }

/* Gold line at the top of the banner */
.page-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--G) 25%, var(--Gl) 50%, var(--G) 75%, transparent);
  pointer-events: none;
  z-index: 2;
}
.page-banner::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(500px, 90vw);
  height: min(500px, 90vw);
  background: url('../images/logo.png') center/contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 25%, transparent 80%);
}
.page-banner h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--W);
  position: relative;
  z-index: 1;
  line-height: 1.15;
  word-break: break-word;
}
.page-banner h1 em { font-style: normal; color: var(--G); }
.page-banner p {
  color: rgba(255,255,255,0.65);
  margin-top: 0.5rem;
  font-size: clamp(0.72rem, 2vw, 0.85rem);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

/* ── SECTIONS ── */
section { padding: 4.5rem 1.5rem; }
section.alt { background: var(--Cd); }
section.dark { background: var(--M); color: var(--W); }

.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--M);
}
section.dark .section-title h2 { color: var(--G); }
.section-title h2 em { font-style: normal; color: var(--Gd); }
section.dark .section-title h2 em { color: var(--Gl); }
.rule { width: 50px; height: 2px; background: var(--G); margin: 0.6rem auto 0; border-radius: 2px; }
.section-title p { color: var(--T); font-size: 0.88rem; margin-top: 0.6rem; }
section.dark .section-title p { color: rgba(255,255,255,0.6); }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  font-family: 'Outfit', sans-serif;
}
.btn-gold    { background: var(--G);  color: var(--Md); }
.btn-gold:hover    { background: var(--Gl); transform: translateY(-2px); }
.btn-maroon  { background: var(--M);  color: var(--G); }
.btn-maroon:hover  { background: var(--Ml); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--G); border: 1.5px solid rgba(201,168,76,0.5); text-decoration: none !important; }
.btn-outline:hover { border-color: var(--G); background: rgba(201,168,76,0.08); transform: translateY(-2px); }

/* ── CARDS ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}
.card {
  background: var(--W);
  border: 1px solid var(--Cd);
  border-left: 4px solid var(--G);
  box-shadow: 0 2px 14px rgba(92,10,26,0.07);
  transition: transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(92,10,26,0.14); }
.card-icon { background: var(--M); color: var(--G); font-size: 2rem; text-align: center; padding: 1.5rem; }
.card-body { padding: 1.25rem; }
.card-body h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; color: var(--M); margin-bottom: 0.4rem; font-weight: 700; }
.card-body p  { color: var(--T); font-size: 0.87rem; line-height: 1.65; }

/* ── NEWS ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}
.news-card { background: var(--W); border: 1px solid var(--Cd); overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(92,10,26,0.12); }
.news-card .news-date { background: var(--M); color: var(--G); padding: 0.4rem 1rem; font-size: 0.67rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.news-card .news-body { padding: 1.25rem; }
.news-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1rem; color: var(--M); margin-bottom: 0.4rem; font-weight: 700; }
.news-card p  { color: var(--T); font-size: 0.87rem; line-height: 1.6; }

/* ── GALLERY ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
  max-width: 1200px;
  margin: 0 auto;
}
.gallery-item { position: relative; overflow: hidden; aspect-ratio: 4/3; background: var(--M); cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; display: block; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .overlay { position: absolute; inset: 0; background: rgba(61,6,16,0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; color: var(--G); font-size: 1.5rem; }
.gallery-item:hover .overlay { opacity: 1; }
.gallery-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(201,168,76,0.35); font-size: 0.82rem; gap: 0.5rem; }

/* ── STAFF TABLE ── */
.staff-table-wrap { max-width: 1200px; margin: 0 auto; overflow-x: auto; border: 1px solid var(--Cd); box-shadow: 0 4px 20px rgba(92,10,26,0.08); }
.staff-table { width: 100%; border-collapse: collapse; background: var(--W); font-size: 0.87rem; }
.staff-table thead tr { background: var(--M); }
.staff-table th { padding: 0.9rem 1.1rem; text-align: left; font-weight: 700; white-space: nowrap; font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase; color: var(--G); }
.staff-table td { padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--Cd); color: var(--D); white-space: nowrap; }
.staff-table tbody tr:nth-child(even) { background: #fdf8f0; }
.staff-table tbody tr:hover { background: #f8ede8; }
.badge { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 2px; font-size: 0.65rem; font-weight: 700; white-space: nowrap; letter-spacing: 0.5px; text-transform: uppercase; }
.badge-principal { background: var(--M); color: var(--G); }
.badge-deputy    { background: var(--Ml); color: var(--Gl); }
.badge-hod       { background: #fff3cc; color: #7a5a00; border: 1px solid var(--Gd); }
.badge-educator  { background: var(--Cd); color: var(--T); }
.badge-staff     { background: #e8f5e8; color: #2a6a2a; }
.gender-m { color: #1a4a9a; font-weight: 700; }
.gender-f { color: #8a1a4a; font-weight: 700; }

/* ── FORMS ── */
.form-container { max-width: 700px; margin: 0 auto; background: var(--W); padding: 2.5rem; border: 1px solid var(--Cd); box-shadow: 0 4px 20px rgba(92,10,26,0.08); }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 700; color: var(--M); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; padding: 0.72rem 1rem; border: 1.5px solid var(--Cd); font-size: 0.9rem; font-family: inherit; transition: border-color 0.2s; background: var(--W); color: var(--D); border-radius: 2px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--Gd); }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-submit { background: var(--M); color: var(--G); padding: 0.9rem 2.5rem; border: none; font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: all 0.2s; width: 100%; font-family: 'Outfit', sans-serif; letter-spacing: 2px; text-transform: uppercase; }
.btn-submit:hover { background: var(--Ml); transform: translateY(-2px); }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; max-width: 1000px; margin: 0 auto; }
.contact-info h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; color: var(--M); margin-bottom: 1.25rem; font-weight: 700; }
.contact-item { display: flex; gap: 0.85rem; margin-bottom: 1.25rem; align-items: flex-start; }
.contact-item .icon { font-size: 1.2rem; color: var(--Gd); min-width: 2rem; margin-top: 2px; }
.contact-item p { color: var(--T); line-height: 1.7; font-size: 0.9rem; }
.contact-item strong { color: var(--D); display: block; margin-bottom: 0.15rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }

/* ── ABOUT ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; max-width: 1000px; margin: 0 auto; align-items: center; }
.about-img { overflow: hidden; border-left: 4px solid var(--G); box-shadow: 0 8px 32px rgba(92,10,26,0.12); }
.about-img img { width: 100%; display: block; }
.about-img .img-placeholder { background: var(--M); height: 360px; display: flex; align-items: center; justify-content: center; color: var(--G); font-size: 5rem; }
.about-text h2 { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--M); margin-bottom: 1rem; font-weight: 700; }
.about-text p  { color: var(--T); line-height: 1.8; margin-bottom: 0.9rem; font-size: 0.93rem; }
.values-list { list-style: none; margin-top: 1rem; }
.values-list li { padding: 0.55rem 0; color: var(--T); display: flex; align-items: center; gap: 0.7rem; border-bottom: 1px solid var(--Cd); font-size: 0.9rem; }
.values-list li::before { content: '◆'; color: var(--G); font-size: 0.5rem; flex-shrink: 0; }

/* ── EMIS HEADER ── */
.emis-header { background: var(--Md); border-bottom: 1px solid rgba(201,168,76,0.2); color: rgba(255,255,255,0.5); padding: 0.65rem 1.5rem; font-size: 0.72rem; display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; letter-spacing: 1px; text-transform: uppercase; }
.emis-header strong { color: var(--G); }

/* ── SEARCH ── */
.search-bar { max-width: 420px; margin: 0 auto 1.5rem; }
.search-bar input { width: 100%; padding: 0.78rem 1.25rem; border: 1.5px solid var(--Cd); font-size: 0.9rem; font-family: inherit; background: var(--W); color: var(--D); }
.search-bar input:focus { outline: none; border-color: var(--Gd); }

/* ── LEGEND ── */
.legend { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-bottom: 1.5rem; }

/* ── NOTE BOX ── */
.note-box { background: #fffbf0; border-left: 3px solid var(--G); padding: 0.9rem 1.2rem; font-size: 0.85rem; color: var(--T); margin-bottom: 1.4rem; line-height: 1.7; }
.note-box strong { color: var(--M); }

/* ── DOC LIST ── */
.doc-list { list-style: none; padding: 0; }
.doc-list li { padding: 0.4rem 0; font-size: 0.87rem; color: var(--T); border-bottom: 1px solid var(--Cd); }
.doc-list li::before { content: '◆ '; color: var(--Gd); font-size: 0.55rem; }

/* ── SUCCESS MSG ── */
.success-msg { display: none; background: #f0fff4; color: #1a6a3a; border: 1px solid #90c0a0; padding: 0.9rem; margin-bottom: 1rem; text-align: center; font-weight: 600; }

/* ── SOCIAL LINKS ── */
.social-links { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
.social-link { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.9rem; border: 1px solid rgba(201,168,76,0.25); color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.75rem; font-weight: 600; transition: all 0.2s; border-radius: 2px; }
.social-link:hover { border-color: var(--G); color: var(--G); background: rgba(201,168,76,0.07); }

/* ── FOOTER ── */
footer {
  background: linear-gradient(180deg, #3d0610, #1a0a0e);
  border-top: 3px solid var(--Gd);
  color: rgba(255,255,255,0.55);
  padding: 4rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  bottom: -50px; right: -50px;
  width: 300px; height: 300px;
  background: url('../images/logo.png') center/contain no-repeat;
  opacity: 0.05;
  pointer-events: none;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; max-width: 1100px; margin: 0 auto 2.5rem; position: relative; z-index: 1; }
.footer-brand p { font-size: 0.87rem; line-height: 1.8; }
footer h4 { font-family: 'Cormorant Garamond', serif; color: var(--G); margin-bottom: 1rem; font-size: 1rem; border-bottom: 1px solid rgba(201,168,76,0.15); padding-bottom: 0.5rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.83rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--G); }
.footer-bottom { border-top: 1px solid rgba(201,168,76,0.1); padding-top: 1.25rem; text-align: center; font-size: 0.75rem; max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

/* ── CALENDAR ── */
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.cal-day-header { background: var(--M); color: var(--G); text-align: center; padding: 0.5rem; font-size: 0.65rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.cal-cell { background: var(--W); border: 1px solid var(--Cd); min-height: 90px; padding: 0.4rem; }
.cal-cell.empty { background: #faf5ec; }
.cal-cell.today { border: 2px solid var(--M); }
.day-num { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 700; color: var(--M); line-height: 1; margin-bottom: 0.25rem; }
.cal-cell.empty .day-num { color: #ccc; }
.ev { display: block; font-size: 0.58rem; font-weight: 700; padding: 0.13rem 0.4rem; border-radius: 2px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-school  { background: #3d0610; color: #e8c96a; }
.ev-smt     { background: #5c0a1a; color: #e8c96a; }
.ev-exam    { background: #1a2a5a; color: #90a8e0; }
.ev-sport   { background: #1a4a1a; color: #90d090; }
.ev-parent  { background: #4a3a00; color: #d0b040; }
.ev-culture { background: #3a1a4a; color: #c090d0; }
.ev-multi   { background: var(--Cd); color: var(--M); }

/* ── LIGHTBOX ── */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9999; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border: 1px solid var(--Gd); }
.lightbox-close { position: absolute; top: 1.5rem; right: 2rem; color: var(--G); font-size: 2rem; cursor: pointer; }

/* ── DIVIDER ── */
.divider { height: 28px; display: flex; align-items: center; justify-content: center; position: relative; }
.divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, var(--G) 30%, var(--G) 70%, transparent); }
.divider::after { content: '◆  ◆  ◆'; position: relative; z-index: 1; color: var(--G); font-size: 0.56rem; letter-spacing: 8px; background: var(--C); padding: 0 1.25rem; }
.divider-maroon, .divider-gold { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  nav { padding: 0 1.25rem; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: rgba(61,6,16,0.98); padding: 1rem; overflow-y: auto; border-top: 1px solid rgba(201,168,76,0.15); }
  .nav-links.open { display: flex; }
  .nav-links a { height: auto; padding: 0.85rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08) !important; font-size: 0.85rem; border-right: none; }
  .hamburger { display: flex; }
  .page-banner {
    padding: 2rem 1.5rem 2rem;
    clip-path: none;
    min-height: 120px;
  }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .nav-logo { width: 30px; }
}

@media (max-width: 600px) {
  section { padding: 3rem 1rem; }
  .section-title h2 { font-size: 1.8rem; }
  .cards { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .staff-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-cell { min-height: 50px; }
  .ev { font-size: 0.5rem; }
  footer { padding: 3rem 1rem 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
