/* ============================================
   Blue Skies Horse Farm — site stylesheet
   ============================================ */

:root {
  --navy: #1b3a5b;
  --navy-dark: #142c46;
  --sky: #6fa8cc;
  --sky-light: #eaf3f9;
  --cream: #fbfaf7;
  --green: #4a7c59;
  --text: #2e3540;
  --text-soft: #5a6470;
  --line: #e3e7ec;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
}

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

a { color: var(--navy); }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */

.site-header {
  background: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand img {
  height: 52px;
  width: auto;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  line-height: 1.15;
}

.brand-name small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.site-nav ul {
  display: flex;
  gap: 1.6rem;
  list-style: none;
}

.site-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--navy); border-bottom-color: var(--sky); }

.site-nav a.active { color: var(--navy); border-bottom-color: var(--navy); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--navy);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 44, 70, 0.35) 0%, rgba(20, 44, 70, 0.55) 100%);
}

.hero-content {
  position: relative;
  max-width: 760px;
  padding: 4rem 1.5rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.hero p {
  margin-top: 1rem;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Page banner (subpages) ---------- */

.page-banner {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 44, 70, 0.2) 30%, rgba(20, 44, 70, 0.65) 100%);
}

.page-banner h1 {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 2.2rem;
  width: 100%;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }

.btn-light { background: rgba(255, 255, 255, 0.92); color: var(--navy); }
.btn-light:hover { background: #fff; }

.btn-outline {
  border: 2px solid var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Sections ---------- */

.section { padding: 4.5rem 0; }

.section-alt { background: var(--sky-light); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.section-lead {
  color: var(--text-soft);
  max-width: 640px;
  margin-bottom: 2.4rem;
}

.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sky);
  margin-bottom: 0.6rem;
}

/* ---------- Welcome split ---------- */

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.split-photo img {
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(27, 58, 91, 0.18);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.split p + p { margin-top: 1rem; }

.tagline {
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--navy);
  border-left: 3px solid var(--sky);
  padding-left: 1rem;
}

/* ---------- Feature cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(27, 58, 91, 0.07);
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card-body { padding: 1.4rem 1.5rem 1.7rem; }

.card h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.card p { color: var(--text-soft); font-size: 0.98rem; }

/* ---------- Partner strip ---------- */

.partner-strip {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 2.6rem 1.25rem;
}

.partner-strip p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  max-width: 720px;
  margin: 0 auto;
}

.partner-strip a { color: #bcd9ec; }

/* ---------- Boarding page ---------- */

.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.6rem;
  align-items: center;
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
}

.service-block:last-child { border-bottom: none; }

.service-block.flip .service-photo { order: 2; }

.service-photo img {
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  box-shadow: 0 10px 28px rgba(27, 58, 91, 0.15);
}

.service-text h2 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.7rem;
  margin-bottom: 0.7rem;
}

.service-text ul {
  margin: 0.9rem 0 0 1.2rem;
  color: var(--text-soft);
}

.service-text li { margin-bottom: 0.35rem; }

/* ---------- Gallery ---------- */

.gallery-grid {
  columns: 3;
  column-gap: 1.1rem;
}

.gallery-grid figure {
  break-inside: avoid;
  margin: 0 0 1.1rem;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--navy);
}

.gallery-grid img {
  width: 100%;
  transition: transform 0.3s, opacity 0.3s;
}

.gallery-grid figure:hover img { transform: scale(1.03); opacity: 0.88; }

.gallery-grid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.6rem 0.9rem 0.7rem;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(20, 44, 70, 0.78));
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-grid figure:hover figcaption { opacity: 1; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14, 24, 36, 0.93);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  flex-direction: column;
  padding: 1rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #d8e4ee;
  margin-top: 0.9rem;
  font-size: 1rem;
  text-align: center;
}

.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox button:hover { background: rgba(255, 255, 255, 0.25); }

.lb-close { top: 1.2rem; right: 1.2rem; }
.lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.6rem;
  align-items: start;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.9rem 2rem;
  box-shadow: 0 4px 16px rgba(27, 58, 91, 0.07);
}

.contact-card h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.contact-card + .contact-card { margin-top: 1.3rem; }

.contact-card p { color: var(--text-soft); }

.contact-card a { font-weight: 600; }

.map-frame {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(27, 58, 91, 0.1);
}

.map-wide { height: 440px; min-height: 0; }

/* ---------- Contact form ---------- */

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.9rem 2rem 2.1rem;
  box-shadow: 0 4px 16px rgba(27, 58, 91, 0.07);
}

.contact-form h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: 1.1rem;
}

.form-row { margin-bottom: 1.05rem; }

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.94rem;
  margin-bottom: 0.3rem;
  color: var(--navy);
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  background: #fdfdfc;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(111, 168, 204, 0.25);
}

.form-row textarea { resize: vertical; }

.contact-form .btn { border: none; cursor: pointer; width: 100%; }

.hidden-field { display: none; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: #c9d6e2;
  padding: 3.2rem 0 1.6rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.4rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer h4 {
  font-family: var(--serif);
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

.site-footer a { color: #bcd9ec; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.45rem; }

.footer-bottom {
  text-align: center;
  font-size: 0.88rem;
  padding-top: 1.5rem;
  color: #8fa3b6;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .split,
  .contact-grid,
  .service-block { grid-template-columns: 1fr; }

  .service-block.flip .service-photo { order: 0; }

  .cards { grid-template-columns: 1fr; }

  .gallery-grid { columns: 2; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }

  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .site-nav.open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }

  .site-nav a {
    display: block;
    padding: 0.7rem 0;
    border-bottom: none;
  }

  .map-frame { min-height: 340px; }
}

@media (max-width: 520px) {
  .gallery-grid { columns: 1; }
  .hero { min-height: 64vh; }
}
