/*
Theme Name: Space Coast Sailing
Theme URI: https://example.com/space-coast-sailing
Author: OpenAI
Author URI: https://openai.com/
Description: A clean, neutral, one-page WordPress theme for Space Coast Sailing with editable homepage sections, responsive navigation, custom logo support, and mobile-friendly layout.
Version: 1.0.9
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: space-coast-sailing
Tags: one-column, custom-logo, custom-menu, featured-images, theme-options, translation-ready, responsive-layout
*/

:root {
  --scs-bg: #f7f5f1;
  --scs-surface: #ffffff;
  --scs-surface-alt: #efebe4;
  --scs-text: #1f2933;
  --scs-muted: #5b6773;
  --scs-line: #d8d2c8;
  --scs-accent: #2c5c77;
  --scs-accent-2: #c99a3c;
  --scs-deep: #0f2231;
  --scs-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  --scs-radius: 18px;
  --scs-max-width: 1180px;
  --scs-logo-width: 180px;
}

html[data-scs-theme='dark'] {
  --scs-bg: #0f1720;
  --scs-surface: #16202b;
  --scs-surface-alt: #1c2836;
  --scs-text: #ebf1f7;
  --scs-muted: #b7c2cf;
  --scs-line: #314253;
  --scs-accent: #7ab6d9;
  --scs-accent-2: #e1ba69;
  --scs-deep: #f5f8fb;
  --scs-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--scs-text);
  background: linear-gradient(180deg, #faf8f4 0%, #f4f1eb 100%);
  line-height: 1.6;
}
html[data-scs-theme='dark'] { color-scheme: dark; }
html[data-scs-theme='dark'] body {
  background: linear-gradient(180deg, #08111a 0%, #0f1720 100%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--scs-accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
.screen-reader-text {
  border: 0;
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  background: #fff;
  color: #000;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  top: 5px;
  width: auto;
  z-index: 100000;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 245, 241, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216, 210, 200, 0.8);
}
html[data-scs-theme='dark'] .site-header {
  background: rgba(8, 17, 26, 0.9);
  border-bottom-color: rgba(49, 66, 83, 0.88);
}

.header-inner,
.section-inner,
.footer-inner {
  width: min(calc(100% - 2rem), var(--scs-max-width));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  min-height: 84px;
}

.theme-toggle {
  appearance: none;
  margin-right: 0.35rem;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--scs-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--scs-deep);
  cursor: pointer;
  box-shadow: var(--scs-shadow);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  text-decoration: none;
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(44, 92, 119, 0.28);
  outline-offset: 4px;
}

.theme-toggle__icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.theme-toggle__icon--sun { display: none; }
html[data-scs-theme='dark'] .theme-toggle {
  background: rgba(22, 32, 43, 0.9);
  border-color: rgba(122, 182, 217, 0.22);
}
html[data-scs-theme='dark'] .theme-toggle__icon--moon { display: none; }
html[data-scs-theme='dark'] .theme-toggle__icon--sun { display: inline-flex; }

.branding {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-right: auto;
}

.custom-logo-link img,
.site-logo-fallback img {
  width: var(--scs-logo-width);
  max-width: 100%;
  height: auto;
}

.site-title-wrap { display: none; }

.main-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  appearance: none;
  background: var(--scs-surface);
  color: var(--scs-deep);
  border: 1px solid var(--scs-line);
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--scs-shadow);
}

.primary-menu {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  display: inline-block;
  padding: 0.7rem 0.95rem;
  color: var(--scs-deep);
  border-radius: 999px;
  font-size: 0.98rem;
}

.primary-menu a:hover,
.primary-menu a:focus {
  background: var(--scs-surface);
  text-decoration: none;
}

.hero {
  padding: 5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.hero-copy,
.card,
.gallery-grid img,
.rates-box,
.contact-box {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(216, 210, 200, 0.9);
  box-shadow: var(--scs-shadow);
}

.hero-copy {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: calc(var(--scs-radius) + 6px);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--scs-accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1,
.section-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08;
  color: var(--scs-deep);
  margin: 0 0 1rem;
}

.hero p,
.section-intro {
  font-size: 1.08rem;
  color: var(--scs-muted);
  margin: 0 0 1.4rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.3rem;
  background: var(--scs-accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.button-link.secondary {
  background: transparent;
  color: var(--scs-deep);
  border: 1px solid var(--scs-line);
}

.button-link:hover,
.button-link:focus {
  text-decoration: none;
  opacity: 0.95;
}

.hero-art {
  position: relative;
  border-radius: calc(var(--scs-radius) + 10px);
  overflow: hidden;
  min-height: 320px;
  background: radial-gradient(circle at 50% 80%, rgba(201,154,60,0.22), transparent 35%), linear-gradient(180deg, #f4efe7 0%, #e9e4dc 100%);
  border: 1px solid rgba(216, 210, 200, 0.9);
  box-shadow: var(--scs-shadow);
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.25rem;
}

.page-section { padding: 1.5rem 0 2rem; }
.page-section:last-of-type { padding-bottom: 4rem; }
.section-shell {
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: calc(var(--scs-radius) + 4px);
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(216, 210, 200, 0.85);
}

.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.card {
  border-radius: var(--scs-radius);
  padding: 1.4rem;
}

.captain-photo {
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--scs-radius) - 4px);
  overflow: hidden;
  background: linear-gradient(180deg, #efe9df 0%, #dfd8ce 100%);
  border: 1px solid var(--scs-line);
}
.captain-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.placeholder-photo {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--scs-muted);
  padding: 1.5rem;
}

.content-block h3 {
  font-size: 1.5rem;
  margin-top: 0;
  color: var(--scs-deep);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.gallery-grid figure {
  margin: 0;
}
.gallery-grid img,
.gallery-grid .gallery-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--scs-radius);
  overflow: hidden;
}
.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--scs-muted);
}

.rates-box,
.contact-box {
  padding: 1.5rem;
  border-radius: var(--scs-radius);
}
.rates-box table {
  width: 100%;
  border-collapse: collapse;
}
.rates-box th,
.rates-box td {
  text-align: left;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--scs-line);
}
.rates-box tr:last-child th,
.rates-box tr:last-child td { border-bottom: 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1.25rem;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list li + li { margin-top: 0.8rem; }
.contact-form-wrap form,
.contact-form-wrap .wpforms-container,
.contact-form-wrap .wpcf7,
.contact-form-wrap .gform_wrapper {
  max-width: 100%;
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(216, 210, 200, 0.8);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--scs-muted);
  font-size: 0.95rem;
}

html[data-scs-theme='dark'] .hero-copy,
html[data-scs-theme='dark'] .card,
html[data-scs-theme='dark'] .gallery-grid img,
html[data-scs-theme='dark'] .gallery-grid .gallery-placeholder,
html[data-scs-theme='dark'] .rates-box,
html[data-scs-theme='dark'] .contact-box {
  background: rgba(22, 32, 43, 0.9);
  border-color: rgba(49, 66, 83, 0.95);
}

html[data-scs-theme='dark'] .section-shell {
  background: rgba(22, 32, 43, 0.58);
  border-color: rgba(49, 66, 83, 0.82);
}

html[data-scs-theme='dark'] .hero-art {
  background: radial-gradient(circle at 50% 80%, rgba(225, 186, 105, 0.18), transparent 35%), linear-gradient(180deg, #16202b 0%, #0f1720 100%);
  border-color: rgba(49, 66, 83, 0.95);
}

html[data-scs-theme='dark'] .captain-photo {
  background: linear-gradient(180deg, #203040 0%, #16202b 100%);
}

html[data-scs-theme='dark'] .site-footer {
  border-top-color: rgba(49, 66, 83, 0.88);
}

html[data-scs-theme='dark'] .button-link.secondary {
  color: var(--scs-deep);
  border-color: var(--scs-line);
  background: rgba(255, 255, 255, 0.02);
}

html[data-scs-theme='dark'] .scs-lightbox__figure {
  background: rgba(22, 32, 43, 0.98);
}

html[data-scs-theme='dark'] .scs-lightbox__image {
  background: #0f1720;
}

html[data-scs-theme='dark'] .menu-toggle,
html[data-scs-theme='dark'] .main-navigation .menu-wrap {
  background: rgba(22, 32, 43, 0.98);
}

@media (max-width: 960px) {
  .hero-grid,
  .two-col,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-navigation {
    position: relative;
  }

  .main-navigation .menu-wrap {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: min(300px, calc(100vw - 2rem));
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--scs-line);
    border-radius: 18px;
    box-shadow: var(--scs-shadow);
    padding: 0.5rem;
    display: none;
  }

  .main-navigation.toggled .menu-wrap { display: block; }

  .primary-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .primary-menu a {
    display: block;
    border-radius: 12px;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .section-inner,
  .footer-inner {
    width: min(calc(100% - 1rem), var(--scs-max-width));
  }

  .theme-toggle {
    width: 48px;
    height: 48px;
  }

  .theme-toggle__icon {
    width: 22px;
    height: 22px;
  }

  .hero {
    padding-top: 3.75rem;
  }

  .hero h1,
  .section-title {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}


section[id] {
  scroll-margin-top: 96px;
}



.gallery-lightbox-trigger {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: var(--scs-radius);
  overflow: hidden;
  box-shadow: var(--scs-shadow);
  cursor: zoom-in;
}
.gallery-lightbox-trigger img {
  width: 100%;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.gallery-lightbox-trigger:hover img,
.gallery-lightbox-trigger:focus img {
  transform: scale(1.03);
  opacity: 0.94;
}
.gallery-lightbox-trigger:focus-visible {
  outline: 3px solid rgba(44, 92, 119, 0.28);
  outline-offset: 4px;
}

body.scs-lightbox-open {
  overflow: hidden;
}

.scs-lightbox {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.scs-lightbox[hidden] {
  display: none !important;
}
.scs-lightbox.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.scs-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 27, 0.82);
  backdrop-filter: blur(4px);
}
.scs-lightbox__viewport {
  position: relative;
  z-index: 1;
  width: min(100%, 1220px);
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 1rem);
}
.scs-lightbox__figure {
  margin: 0;
  width: 100%;
  background: rgba(255,255,255,0.98);
  border-radius: calc(var(--scs-radius) + 4px);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,0.28);
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}
.scs-lightbox__image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: min(78vh, 920px);
  object-fit: contain;
  background: #f5f2ec;
  pointer-events: none;
}
.scs-lightbox__caption {
  display: none !important;
}
.scs-lightbox__close,
.scs-lightbox__nav {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(15, 34, 49, 0.82);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--scs-shadow);
}
.scs-lightbox__close {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  z-index: 2;
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
}
.scs-lightbox__nav {
  width: 54px;
  height: 54px;
  font-size: 1.5rem;
}
.scs-lightbox__close:hover,
.scs-lightbox__close:focus,
.scs-lightbox__nav:hover,
.scs-lightbox__nav:focus {
  background: rgba(15, 34, 49, 0.95);
}

@media (max-width: 960px) {
  .scs-lightbox__viewport {
    width: min(100%, 900px);
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .scs-lightbox__figure {
    order: 1;
  }

  .scs-lightbox__close {
    top: 0.65rem;
    right: 0.65rem;
  }

  .scs-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .scs-lightbox__nav--prev {
    left: 0.5rem;
  }

  .scs-lightbox__nav--next {
    right: 0.5rem;
  }
}

@media (max-width: 640px) {
  .scs-lightbox {
    padding: 0.5rem;
  }

  .scs-lightbox__viewport {
    max-height: calc(100vh - 1rem);
  }

  .scs-lightbox__figure {
    border-radius: 20px;
  }

  .scs-lightbox__image {
    max-height: 72vh;
  }

  .scs-lightbox__close {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
    top: 0.5rem;
    right: 0.5rem;
  }

  .scs-lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .scs-lightbox__nav--prev {
    left: 0.35rem;
  }

  .scs-lightbox__nav--next {
    right: 0.35rem;
  }
}
