/* Reset & Base */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Open Sans', sans-serif;
  color: #333;
  background: #fdfcf7;
  line-height: 1.7;
}
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: #3a5a00; /* dark sage – visible on light backgrounds */
}

/* White headings on dark backgrounds */
header h1, header h2, header h3,
.hero h1, .hero h2, .hero h3,
.trust-bar h1, .trust-bar h2, .trust-bar h3,
footer h1, footer h2, footer h3 {
  color: #ffffff;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Colors */
:root {
  --primary: #5a7d1a;     /* sage green */
  --accent: #8b5a2b;      /* terracotta */
  --light-bg: #f8f6f0;    /* cream */
  --gray-bg: #e8f0e0;     /* pale green */
  --dark: #2c3e50;
  --text-muted: #555;
}

/* Header & Hamburger Menu */
header {
  background: var(--primary);
  color: white;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo span { font-size: 1.7rem; font-weight: bold; }

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  transition: max-height 0.4s ease;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 0;
}

.cta-button {
  background: white;
  color: var(--primary);
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

/* Hamburger menu for mobile */
.hamburger {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--primary);
    position: absolute;
    top: 100%;
    left: 0;
    padding: 20px 0;
    max-height: 0;
    overflow: hidden;
  }
  .nav-links.active { display: flex; max-height: 500px; }
  .nav-links a { padding: 14px 25px; font-size: 1.1rem; }
  .cta-button { margin: 16px 25px; display: block; text-align: center; }
}

/* Back button & Page intro */
.back-btn {
  display: inline-block;
  margin: 20px 0 30px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
}
.back-btn:hover { background: #4a6a14; }

.page-intro {
  text-align: center;
  padding: 60px 0 40px;
  background: var(--light-bg);
}
.page-intro h1 { font-size: 2.8rem; margin-bottom: 16px; }
.page-intro p { font-size: 1.15rem; max-width: 800px; margin: 0 auto; color: var(--text-muted); }

/* Hero */
.hero {
  background: url('images/banner.jpg') center/cover;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 20px; }
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; line-height: 1.1; }
.hero p { font-size: 1.3rem; margin-bottom: 2rem; }

/* Values bar */
.values-bar {
  background: var(--light-bg);
  padding: 60px 0;
  text-align: center;
}
.values-grid {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}
.value-item { max-width: 280px; }
.value-item .icon { font-size: 3.8rem; margin-bottom: 1rem; color: var(--accent); }
.value-item h3 { font-size: 1.35rem; color: var(--primary); margin-bottom: 0.8rem; }

/* Trust bar */
.trust-bar {
  background: var(--primary);
  color: white;
  padding: 30px 0;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
}

/* Difference cards */
.difference {
  padding: 80px 0;
  background: white;
}
.difference h2 { text-align: center; font-size: 2.8rem; margin-bottom: 60px; color: var(--dark); }
.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 45px;
}
.diff-card {
  background: var(--gray-bg);
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.diff-card h3 { color: var(--accent); font-size: 1.55rem; margin-bottom: 1rem; }

/* Card layouts */
.philosophy-grid, .room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 40px;
}
.philosophy-card, .room-card {
  background: var(--gray-bg);
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
}
.philosophy-card h3, .room-card h2 { color: var(--accent); margin-bottom: 16px; }

/* Gallery */
.gallery-intro { padding: 60px 0 40px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 10px;
  grid-auto-flow: dense;
  gap: 20px;
  padding: 30px 0 80px;
}
.gallery-item {
  grid-row-end: span var(--span, 22);
  break-inside: avoid;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  loading: lazy;
}
.gallery-item:hover img { transform: scale(1.04); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.gallery-caption {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* Forms */
.form-group { margin-bottom: 24px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.98rem; }
input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(90,125,26,0.15);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Footer */
footer {
  background: var(--dark);
  color: #ddd;
  text-align: center;
  padding: 70px 0 40px;
}
footer a { color: var(--primary); }
footer p { margin: 10px 0; font-size: 0.95rem; }

/* Force responsive behavior for the Ofsted banner */
.ofsted-banner,
.ofsted-banner img {  /* target the img directly if wrapped */
  width: 100%;
  max-width: 650px;          /* ← Adjust this: 500–700px is ideal for desktop balance */
  height: auto !important;   /* prevents distortion */
  display: block;
  margin: 1.5rem auto;       /* centers with breathing room */
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1); /* optional polish */
}

/* Extra strong constraint for mobile */
@media (max-width: 768px) {
  .ofsted-banner,
  .ofsted-banner img {
    max-width: 90%;          /* or 100% if you want full-width on phones */
    margin: 1rem auto;
  }
}

/* If it's inside .hero or a specific parent, constrain the container too */
.hero .ofsted-banner-wrapper,
.page-intro .ofsted-banner-wrapper {  /* adjust selector to match your HTML */
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}



/* Mobile optimizations */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; width: 100%; background: var(--primary); position: absolute; top: 100%; left: 0; padding: 20px 0; }
  .nav-links.active { display: flex; }
  .hamburger { display: block; font-size: 2rem; background: none; border: none; color: white; cursor: pointer; }
  .page-intro { padding: 60px 0 40px; }
  .page-intro h1 { font-size: 2.4rem; }
  .hero { height: 60vh; min-height: 400px; }
  .hero h1 { font-size: 2.8rem; }
  .hero p { font-size: 1.2rem; }
  .values-grid { gap: 40px; flex-direction: column; align-items: center; }
  .difference h2 { font-size: 2.4rem; }
  .diff-grid { gap: 40px; }
  .grid-2 { grid-template-columns: 1fr; gap: 20px; }
  .gallery { grid-template-columns: 1fr; }
}