/* =========================================================
   Worplesdon Pre-School — Modern Responsive CSS
   Fully rebuilt with:
   - Mobile-first layout
   - Sticky header support
   - iPhone Safari hamburger menu fixes
   - Brand colour variables
   - Flexbox + Grid
   - Smooth scrolling + scroll-margin
   - Improved hero layout (60/40 + middle-aligned icons)
   ========================================================= */

/* ------------------------------
   CSS Variables (Brand System)
   ------------------------------ */
:root {
  --blue: #1f3c88;
  --yellow: #f7d633;
  --light-blue: #4ea5d9;

  --bg-body: #f7f7f7;
  --bg-hero: #1f3c88;
  --bg-section: #ffffff;
  --bg-section-alt: #f2f4fb;

  --text-main: #333333;
  --text-muted: #555555;
  --text-on-hero: #ffffff;

  --font-family-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                      Roboto, "Helvetica Neue", Arial, sans-serif;

  --max-width: 1100px;
  --radius-card: 10px;
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.12);

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
}

/* ------------------------------
   Base Reset
   ------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
}

/* ------------------------------
   Typography
   ------------------------------ */
h1, h2, h3, h4 {
  margin: 0 0 var(--space-sm);
  font-weight: 700;
  color: var(--blue);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 var(--space-sm); }

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* ------------------------------
   Layout Helpers
   ------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
  background-color: var(--bg-section);
}

.section-alt {
  background-color: var(--bg-section-alt);
}

.section-title {
  font-size: 1.7rem;
  margin-bottom: var(--space-md);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--yellow), var(--light-blue));
  border-radius: 999px;
  margin-top: var(--space-xs);
}

.subheading {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.mt-small { margin-top: var(--space-sm); }

/* ------------------------------
   Sticky Header + Navigation
   ------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  /*  background-color: var(--bg-section-alt);  */
  background-color:  #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
}

.brand-logo {
  height: 70px;
  /* height: 90px; */
  width: auto;
  margin-right: auto;
}

/* Desktop nav */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
   white-space: nowrap;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  /* padding: var(--space-xs) 0; */
  position: relative;
  color: var(--text-main);
  padding: 0.45rem 1rem;                 /* more button-like */
  /* background-color: transparent;     */  /*  default state */
  /* background-color: rgba(255, 255, 255, 0.6); */ /* always visible pill */ 
  background-color:  var(--yellow);   /* brand yellow */
  border-radius: 999px;                  /* pill shape */
  color: #000;                       /* readable on yellow */
  border: 2px solid var(--blue);   /* ← thin blue outline */
  transition: background-color 0.2s ease,
              color 0.2s ease,
              box-shadow 0.2s ease;
			  border-color 0.2s ease;
}

/* Hover + focus state */
.site-nav a:hover,
.site-nav a:focus {
  /* background-color: rgba(255, 255, 255, 0.6); */ /* soft white pill */
  background-color: #ffe34f;         /* slightly brighter yellow */
  color: #000;
  /* color: var(--blue);  */                       /* readable contrast */
  text-decoration: none;                      /* remove underline */
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);     /* subtle lift */
}

/* Active page (optional) */
.site-nav a.active {
  background-color: var(--yellow);
  color: #000;
  font-weight: 600;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: var(--yellow);
  transition: width 0.2s ease-out;
}

.site-nav a:hover::after,
.site-nav a:focus::after {
  width: 100%;
}

/* ------------------------------
   Mobile Navigation
   ------------------------------ */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-xs);
  cursor: pointer;
  position: relative;
  z-index: 10000;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-main);
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* MOBILE ONLY */
@media (max-width: 768px) {
	
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .site-nav ul {
    flex-direction: column;
	white-space: normal; /* allow wrapping in mobile list */
  }

  .site-nav li {
    border-top: 1px solid #eeeeee;
  }

   .site-nav a {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: var(--space-sm) var(--space-md) !important;
    color: var(--text-main) !important;
    font-weight: 500;
    box-shadow: none !important;
  }
  
  .site-nav a:hover,
  .site-nav a:focus {
    background-color: transparent !important;
    box-shadow: none !important;
  }
}

/* When menu is open */
.site-nav.nav-open {
  max-height: 500px;
  overflow: visible;
}	
	
@media (max-width: 768px) {
  .hero-social {
    flex-direction: row;
    justify-content: center;   /* centre social icons on mobile horizontally */
    align-self: center;        /* override the flex-start */
    width: 100%;               /* ensures centring works */
    gap: var(--space-md);      /* optional: nicer spacing */
  }
}
	
@media (max-width: 768px) {
  .hero-inner {
    align-items: center;   /* centre all hero content horizontally */
    text-align: center;    /* centre the text too (optional but recommended) */
  }

  .hero-logo {
    width: 100%;           /* ensures centring works cleanly */
    display: flex;
    justify-content: center;
  }
}
	
	
/* ------------------------------
   Hero Section (60/40 layout)
   ------------------------------ */
.hero {
  background: var(--bg-hero);
  color: var(--text-on-hero);
  /* padding: calc(var(--space-xl) + 70px) 0 var(--space-xl); */ /* original */
  padding: var(--space-xl) 0 var(--space-xl);
  scroll-margin-top: 140px; /* slightly larger than other sections */
}

.hero-inner {
  display: flex;
  align-items: center;       /* vertically align logo + text */
  justify-content: space-between;
  gap: var(--space-lg);
}

.hero-logo img {
  height: 100%;              /* match text height */
  max-height: 170px;         /* prevents it from getting too big */
  width: auto;
}

.hero-text {
  flex: 0 0 60%;
  max-width: 600px; /* Option A */
}

.hero-text h1 {
  color: var(--text-on-hero);
}

.hero-text p {
  color: rgba(255, 255, 255, 0.9);
}

.hero-cta {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Social icons aligned middle */
.hero-social {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-self: center; /* middle alignment */
}

.social-icon {
  height: 40px;
  width: 40px;
}

@media (max-width: 768px) {
  .hero-social {
    flex-direction: row;
    justify-content: center;   /* centres the mobile icons horizontally */
    gap: var(--space-md);      /* optional: increases spacing */
  }

/* size of the social media icons on the mobile */
  .hero .social-icon {
    width: 80px;   /* choose your preferred size */
    height: 80px;
  }
}

/* size of the social media icons on the desktop */
@media (min-width: 769px) {
  .hero .social-icon {
    width: 70px;
    height: 70px;
  }
}

/* ------------------------------
   Buttons
   ------------------------------ */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--yellow);
  color: #000;
}

.btn-primary:hover {
  background-color: #ffd94f;
}

.btn-secondary {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover {
  border-color: #ffffff;
}

/* ------------------------------
   Two-column Layout
   ------------------------------ */
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: flex-start;
}

.image-column {
  display: flex;
  justify-content: center;
}

.image-column.center {
  flex-direction: column;
  align-items: center;
}

/* ------------------------------
   Images
   ------------------------------ */
.responsive-image {
  max-width: 100%;
  height: auto;
}

.bordered {
  border: 1px solid #dddddd;
}

/* ------------------------------
   Cards
   ------------------------------ */
.card {
  background-color: #ffffff;
  border-radius: var(--radius-card);
  padding: var(--space-md);
  box-shadow: var(--shadow-soft);
}

.ofsted-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.ofsted-text {
  font-size: 1.2rem;
  color: #250e62;
}

.ofsted-badge {
  width: 100px;
}

/* ------------------------------
   Vision List
   ------------------------------ */
.vision-list {
  list-style: none;
  padding: 0;
}

.vision-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: var(--space-xs);
}

.vision-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

/* ------------------------------
   Calendar
   ------------------------------ */
.calendar-group {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-card);
  background-color: #ffffff;
  box-shadow: var(--shadow-soft);
}

/* ------------------------------
   Useful Links
   ------------------------------ */
.useful-links {
  list-style: none;
  padding: 0;
}

.useful-links li {
  margin-bottom: var(--space-xs);
}

.external-links-note {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ------------------------------
   Footer
   ------------------------------ */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
  padding: var(--space-md) 0;
}

.footer-inner {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ------------------------------
   Scroll-margin for sticky header
   ------------------------------ */
section[id],
main[id] {
  scroll-margin-top: 90px;
}

/* ------------------------------
   Responsive Breakpoints
   ------------------------------ */
@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-logo img {
    max-height: 120px;
  }
  
  .hero-social {
    flex-direction: row;
    align-self: flex-start;
  }

  .two-column {
    grid-template-columns: 1fr;
 }

  .ofsted-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .brand-logo {
    height: 50px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .site-nav li {
    border-top: 1px solid #eeeeee;
  }

  .site-nav a {
    padding: var(--space-sm) var(--space-md);
  }

  section[id],
  main[id] {
    scroll-margin-top: 68px;
  }
}



@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .section { padding: var(--space-lg) 0; }
  .hero { padding: calc(var(--space-lg) + 40px) 0 var(--space-xl); }
  section[id],
  main[id] { scroll-margin-top: 100px; }
}