/* =========================
   Yorkshire Bays Ltd — unified style.css
   Compatible with:
    - index.html (hero with <img class="hero-img"> + .hero-overlay + .hero-content)
    - gallery.php (automatic gallery + lightbox)
    - contact.html (form)
   ========================= */

/* -------- Reset & Base -------- */
* { box-sizing: border-box; margin:0; padding:0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: #0b2540;
  background: #f6f7f9;
  line-height: 1.5;
  -webkit-font-smoothing:antialiased;
}
img { display:block; max-width:100%; height:auto; }
.container { width: min(1200px, 94%); margin: 0 auto; }

/* -------- Header / Nav -------- */
.site-header {
  background: #fff;
  box-shadow: 0 1px 6px rgba(10,20,40,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:0.7rem 0;
}
.brand { display:flex; align-items:center; text-decoration:none; }
.logo { height:48px; width:auto; display:block; }

.site-nav { display:flex; align-items:center; gap:1rem; }
.nav-links { list-style:none; display:flex; gap:0.75rem; margin:0; padding:0; align-items:center; }
.nav-links li a {
  text-decoration:none; color:#0b2540; font-weight:600;
  padding:0.35rem 0.7rem; border-radius:8px;
}
.nav-links li a:hover { background: rgba(0,64,128,0.06); }
.nav-links li a.active { background:#0062ff; color:#fff; }

/* hamburger for small screens */
.nav-toggle {
  display:none; background:none; border:0; font-size:1.25rem; cursor:pointer;
}

/* -------- Buttons -------- */
.btn {
  display:inline-block; text-decoration:none;
  padding:0.6rem 1rem; border-radius:8px; font-weight:700;
  transition:transform .12s ease, box-shadow .12s ease;
}
.btn.primary { background:#0062ff; color:#fff; box-shadow: 0 8px 20px rgba(0,98,255,0.12); }
.btn.primary:hover { transform:translateY(-2px); }
.btn.ghost { background:transparent; color:#0062ff; border:2px solid rgba(0,98,255,0.12); }

/* -------- HERO (uses <img class="hero-img"> + overlay + hero-content) -------- */
.hero {
  position: relative;
  min-height: 60vh;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-bottom:1px solid #e9eef6;
  margin-bottom:1rem;
}

.hero-img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  display:block; filter: brightness(0.55) contrast(1.02);
  -webkit-filter: brightness(0.55);
}

.hero-overlay {
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,64,128,0.18), rgba(0,20,40,0.45));
  mix-blend-mode:multiply;
}

.hero-content {
  position:relative; z-index:2;
  text-align:center; color:#fff; padding:2.25rem 1rem;
  width:100%; max-width:980px;
}

.hero-content h1 {
  font-size: clamp(1.6rem, 3.8vw, 2.6rem);
  margin-bottom:0.6rem; line-height:1.03;
}

.lead {
  color: rgba(255,255,255,0.95);
  font-size: 1.05rem;
  margin-bottom:1rem;
  max-width: 76ch; margin-left:auto; margin-right:auto;
}

.hero-ctas { display:flex; gap:0.6rem; justify-content:center; margin-top:0.85rem; flex-wrap:wrap; }

.hero-highlights {
  display:flex; gap:0.8rem; justify-content:center; margin-top:1rem; flex-wrap:wrap;
}
.highlight {
  background: rgba(255,255,255,0.06);
  padding:0.45rem 0.9rem; border-radius:999px; color:#fff; min-width:110px;
  display:flex; flex-direction:column; align-items:center;
}
.highlight strong { font-size:1rem; }

/* -------- Services (Landing) -------- */
.services { padding: 2rem 0 3rem; background: #fff; }
.services h2 { text-align:center; margin-bottom: 0.6rem; }
.section-intro { text-align:center; color:#475569; margin-bottom:1rem; }
.services-grid {
  display:grid; gap:1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* card-like service */
.service-card {
  background:#fff; padding:1.1rem; border-radius:12px;
  box-shadow:0 6px 20px rgba(12,24,40,0.04);
  display:flex; flex-direction:column; gap:0.6rem; transition:transform .18s ease, box-shadow .18s ease;
}
.service-card:hover { transform:translateY(-6px); box-shadow:0 18px 40px rgba(12,24,40,0.06); }
.service-card h3 { margin:0; color:#0b2540; }
.service-card p { margin:0; color:#475569; font-size:0.95rem; }

/* icon container */
.icon { width:56px; height:56px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:10px; background: rgba(0,64,128,0.06); color:#004080; }

/* -------- Gallery Section & Items -------- */
.gallery-section { padding:2rem 0; background:#f8fafc; }
.gallery-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:1rem;
}
.gallery-item {
  background:#fff; border-radius:10px; overflow:hidden;
  box-shadow:0 6px 18px rgba(12,24,40,0.04);
  display:flex; flex-direction:column;
}
.gallery-item img {
  width:100%; height:170px; object-fit:cover; cursor:zoom-in;
  transition:transform .25s ease;
}
.gallery-item:hover img { transform:scale(1.03); }
.gallery-item figcaption { padding:0.6rem; font-size:0.95rem; color:#344054; border-top:1px solid #f0f3f6; }

/* -------- Improved Gallery Hero (used on gallery.php) -------- */
.hero-gallery { padding:2rem 0; background:linear-gradient(180deg,#f7fbff,#ffffff); border-bottom:1px solid #eef3f8; margin-bottom:1rem; }
.hero-row { display:flex; gap:1.25rem; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.hero-left { flex:1 1 520px; min-width:240px; }
.hero-right { flex:0 0 320px; min-width:220px; display:flex; flex-direction:column; gap:0.75rem; align-items:flex-end; }
.hero-lead { font-size:1.15rem; margin:0.25rem 0 0.5rem; color:#0b2540; }
.hero-sub { margin:0 0 0.5rem; color:#475569; max-width:60ch; }
.hero-meta { font-size:0.9rem; color:#6b7280; margin-top:0.45rem; }
.hero-actions { display:flex; gap:0.6rem; }
.hero-note { font-size:0.9rem; color:#334155; background:#fff; padding:0.6rem; border-radius:8px; border:1px solid #e6eef8; box-shadow:0 4px 14px rgba(12,24,40,0.03); text-align:right; }

/* -------- Lightbox Modal -------- */
.lightbox { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,0.8); opacity:0; pointer-events:none; transition:opacity .2s ease; z-index:2200; }
.lightbox.open { opacity:1; pointer-events:auto; }
.lightbox-content { max-width:92%; max-height:86%; display:flex; flex-direction:column; align-items:center; gap:0.75rem; }
.lightbox img { max-width:100%; max-height:72vh; border-radius:6px; box-shadow:0 18px 40px rgba(0,0,0,0.6); }
.lightbox p { color:#fff; margin:0; font-size:0.95rem; text-align:center; }
.lightbox-close, .lightbox-prev, .lightbox-next { position:fixed; background:transparent; border:none; color:#fff; font-size:2rem; cursor:pointer; z-index:2300; padding:0.25rem; }
.lightbox-close { top:18px; right:18px; font-size:2.4rem; }
.lightbox-prev { left:16px; top:50%; transform:translateY(-50%); }
.lightbox-next { right:16px; top:50%; transform:translateY(-50%); }

/* -------- Contact / Form -------- */
.contact-form { padding:2rem 0; }
.contact-grid { display:grid; grid-template-columns: 1fr 320px; gap:1.25rem; align-items:start; }
.form-card { background:#fff; padding:1rem; border-radius:10px; box-shadow:0 8px 24px rgba(12,24,40,0.04); display:flex; flex-direction:column; gap:0.6rem; }
.form-card label { font-weight:600; font-size:0.9rem; color:#213146; }
.form-card input, .form-card textarea, .form-card select { width:100%; padding:0.6rem; border-radius:8px; border:1px solid #dbe6ee; font-size:0.95rem; color:#233043; }
.form-actions { display:flex; gap:0.75rem; margin-top:0.25rem; align-items:center; }
.card { background:#fff; padding:1rem; border-radius:10px; box-shadow:0 8px 24px rgba(12,24,40,0.04); color:#213146; }

/* -------- Footer -------- */
.site-footer { background:#0b2540; color:#cbd5e1; padding:1.5rem 0; margin-top:2rem; }
.footer-inner { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }

/* -------- Utilities & Responsiveness -------- */
.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.muted { color:#64748b; font-size:0.95rem; }

@media (max-width: 980px) {
  .hero { min-height: 50vh; }
  .hero-content { padding:1.6rem 0; }
  .services { padding: 2rem 0; }
}

@media (max-width: 760px) {
  .header-inner { padding:0.5rem 0; }
  .logo { height:40px; }
  .nav-toggle { display:inline-block; color:#0b2540; background:#fff; border-radius:8px; padding:0.35rem 0.6rem; border:1px solid rgba(12,24,40,0.06); }
  .nav-links { display:none; position:absolute; right:1rem; top:62px; background:#fff; border-radius:8px; box-shadow:0 8px 30px rgba(12,24,40,0.08); padding:0.5rem; flex-direction:column; width:220px; }
  .nav-links.active { display:flex; }
  .nav-links li { text-align:center; }
  .hero { min-height: 40vh; }
  .hero-highlights { gap:0.6rem; justify-content:center; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-gallery .hero-right { align-items:flex-start; width:100%; }
  .hero-note { text-align:left; }
  .gallery-item img { height:160px; object-fit:cover; }
}

/* Small screens extra */
@media (max-width: 420px) {
  .hero-content h1 { font-size:1.4rem; }
  .lead { font-size:0.95rem; }
  .gallery-item img { height:140px; }
}
