/* 
=========================================
Main CSS for The Sail
========================================= 
*/

/* Theme variables */


:root {
  --brand: rgb(140, 177, 219);
  --bg: #0174b5;
  --muted: #666;
  --container: 1100px;
}

/* Base and layout stability */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { scrollbar-gutter: stable; }       /* prevents side-to-side shift when scrollbar appears */
/* Fallback if you want, comment out the line above and use this instead:
   html { overflow-y: scroll; } */

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #222;
  background: var(--bg);
}

/* Links */
.brand img {
  display: block;
  height: 70px; /* match your chosen size */
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem;
}

/* Header and nav */
.site-header {
  position: relative;
  z-index: 1000;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between; /* keeps brand left, nav right on every page */
  gap: 1rem;
}

.brand {
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  font-size: 1.25rem;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 1rem;
}

.site-nav a {
  text-decoration: none;
  color: white;
  padding: .5rem;
}

/* Menu toggle, hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.25rem;
  cursor: pointer;
}

.site-nav.show { z-index: 1050; }

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding: 5rem 0;
  text-align: center;
  color: #fff;
  background-image: url("../img/Background_image.JPG");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.15));
  z-index: 1;
}

.hero .container { position: relative; z-index: 2; }
.hero h1 { margin: 0; font-size: 2.25rem; }
.hero p { color: rgba(255,255,255,0.95); }

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.two-column h2 {
  margin-top: 0;
}
.intro h2{
  color: black;
}

.intro p{
  color: black;
}

/* Responsive stack on small screens */
@media (max-width: 768px) {
  .two-column {
    grid-template-columns: 1fr;
  }
}


/* Buttons */
.btn {
  display: inline-block;
  background: var(--brand);
  color: rgb(255, 255, 255);
  border: 0;
  padding: .6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
}

.btn.outline {
  background: transparent;
  border: 1px solid #ccc;
}

/* Sections */
.intro { 
  padding: 2rem 0; 
  color: white;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  color: black;
}

.site-footer {
  padding: 1rem 0;
  border-top: 1px solid #eee;
  margin-top: 2rem;
}

/* Menu page */
.menu-section { margin: 1.25rem 0; }

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-list li {
  padding: .5rem 0;
  border-bottom: 1px dashed #f0f0f0;
}

/* Contact page */
.contact-form form { max-width: 520px; display: grid; gap: 12px }
.contact-form label { display: grid; gap: 6px; font-weight: 600 }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px
}
.contact-form button {
  padding: 10px 16px; border: 0; border-radius: 8px; background:#0b6; color:#fff; font-weight:700; cursor:pointer
}
.contact-form #status { margin-top: 6px; min-height: 1.2em }
.hp { position: absolute; left: -5000px; visibility: hidden }


/* Events page */
.events-list { list-style: none; padding: 0; }
.events-list li { padding: .5rem 0; border-bottom: 1px solid #f3f3f3; }

/* Map embed */
.map-section { padding: 1.5rem 0; }

.map-wrap {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;           /* 16:9 */
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f7f7;
}

.map-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

/* Calendar embed */
.calendar-section { padding: 1.5rem 0; }

.calendar-wrap {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%;               /* taller for calendar view */
  max-width: 1000px;
  margin: 0 auto;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.calendar-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

/* Gallery */
/* Full-width Gallery */
.gallery {
  margin: 0;
  padding: 0;
}

/* Keep this part */
.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 2 across */
  gap: 0; /* no gaps between images */
}
.gallery-grid li { overflow: hidden; }
.gallery-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

/* Lightbox */
#lightbox {
  border: none;
  padding: 0;
  width: min(92vw, 1000px);
  background: transparent;
}
#lightbox::backdrop { background: rgba(0,0,0,.7); }
#lightbox img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}
#lightboxClose {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  border: 0;
  background: rgba(255,255,255,.9);
  font-size: 1.25rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}


/* Mobile nav polish */
@media (max-width: 768px) {
  /* Menu panel */
  .site-nav {
    position: absolute;
    right: 1rem;
    top: 60px;
    background: #ffffff;
    flex-direction: column;
    padding: .75rem;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    display: flex;
    gap: .25rem;
    transition: opacity .25s ease, transform .25s ease;
  }
  .site-nav.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Links, bigger tap targets */
  .site-nav a {
    color: #0f172a;
    padding: .8rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    line-height: 1.2;
  }
  .site-nav a:hover,
  .site-nav a:focus {
    background: #f6f8fb;
    outline: none;
  }
  .site-nav a + a {
    border-top: 1px solid #f1f3f5;
  }

  /* Backdrop when menu is open */
  .site-header::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .site-header.menu-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  /* Nicer hamburger */
  #menuToggle {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.12);
    color: #fff;
    backdrop-filter: blur(6px);
  }
  #menuToggle:focus { outline: 2px solid #94a3b8; outline-offset: 2px; }

  /* Turn the "☰" into an X using font-size swap */
  #menuToggle[data-open="true"] { color: #0f172a; background: #ffffff; border-color: #eaeaea; }
}

/* Subtle desktop tweak so links feel clickable */
@media (min-width: 769px) {
  .site-nav a { border-radius: 8px; }
  .site-nav a:hover, .site-nav a:focus { background: rgba(255,255,255,.12); }
}

/* Responsive tweaks */
@media (max-width: 900px)  { .calendar-wrap { padding-bottom: 66%; } }
@media (max-width: 480px)  { .calendar-wrap { padding-bottom: 80%; } }

@media (max-width: 768px) {
  .container {
                max-width: 410px;
                margin: 0 auto;
                padding: 1rem;
              }
  .menu-toggle { display: block; margin-left: auto; }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr); /* still 2 across */
  }


  .gallery-grid img {
    transform: scale(1);       /* shrink slightly */
    transition: transform 0.3s;  /* smooth resize */
  }
  .site-nav {
    position: absolute;
    right: 1rem;          /* matches .container side padding */
    top: 60px;
    background: #fff;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #eee;

    /* animation friendly defaults */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    /* keep it laid out so it can animate */
    display: flex;
    gap: .5rem;

    transition: opacity .25s ease, transform .25s ease;
  }

  .site-nav.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav a { color: #1e293b; }
  .hero { padding: 3rem 0; }
  .hero h1 { font-size: 1.5rem; }
}

/* Motion preference */
@media (prefers-reduced-motion: reduce) { .site-nav { transition: none; } }

/* Media defaults */
img { max-width: 100%; height: auto; display: block; }

/* Footer social links */
.social-links { display: inline-flex; gap: .5rem; align-items: center; }
.social-links a { display: inline-flex; gap: .5rem; align-items: center; color: inherit; text-decoration: none; }
.social-links a:hover, .social-links a:focus { text-decoration: underline; }
.social-links svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; fill: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* prefer file icons when available */
.social-links img.social-icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }