/* ============================================================
   COMPONENTS.CSS — Shared UI Patterns
   American Diving
   Webvana Standards v5.0 · CSS MODE
   ============================================================ */

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--primary-dark);
  border-bottom: 1px solid rgba(200, 169, 110, 0.2);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 80px;
  width: auto;
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--white);
  line-height: 1.2;
}

.nav-logo-text span {
  display: block;
  font-size: 0.7rem;
  color: var(--accent-color);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-base), border-color var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.nav-cta {
  display: inline-block;
  background: var(--accent-color);
  color: var(--primary-dark) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: var(--radius-sm);
  border-bottom: none !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  transition: background var(--transition-base) !important;
}

.nav-cta:hover {
  background: var(--accent-dark) !important;
  color: var(--primary-dark) !important;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-base), border-color var(--transition-base);
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.icon-chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-base);
}

.nav-dropdown-toggle[aria-expanded="true"] .icon-chevron {
  transform: rotate(180deg);
}

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

/* Desktop: absolute-positioned flyout, closed unless toggled */
@media (min-width: 769px) {
  .nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.75rem;
    background: var(--primary-dark);
    border: 1px solid rgba(200, 169, 110, 0.2);
    border-radius: var(--radius-sm);
    min-width: 200px;
    padding: 0.5rem 0;
  }

  .nav-dropdown-menu.open {
    display: block;
  }

  .nav-dropdown-menu a {
    display: block;
    padding: 0.625rem 1.25rem;
    white-space: nowrap;
    border-bottom: none;
  }
}

/* Mobile: inline accordion, indented under the toggle */
@media (max-width: 768px) {
  .nav-dropdown-toggle {
    width: 100%;
    padding: 1.125rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    display: none;
    padding-left: 1.25rem;
  }

  .nav-dropdown-menu.open {
    display: block;
  }
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--white);
}

.nav-toggle svg {
  width: 30px;
  height: 30px;
  display: block;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 5% 1.5rem;
    border-top: 1px solid rgba(200, 169, 110, 0.2);
  }

  .nav-links li {
    padding: 0.375rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 1.125rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-cta {
    margin-top: 1rem;
    text-align: center;
    border-radius: var(--radius-sm) !important;
  }
}

/* ============================================================
   HERO — IMAGE BACKGROUND
   ============================================================ */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: var(--primary-dark);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Gradient overlay — design decision documented in NOTES.md */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(6, 15, 30, 0.88) 0%,
    rgba(6, 15, 30, 0.65) 50%,
    rgba(6, 15, 30, 0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 4rem 5%;
  color: var(--white);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 0.75rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-description {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.hero-years {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--accent-color);
  border: 1px solid rgba(200, 169, 110, 0.4);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
}

@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
    align-items: flex-end;
  }

  .hero-content {
    padding: 3rem 5%;
  }

  .hero-description {
    font-size: 1rem;
  }
}

/* ============================================================
   HERO — MINIMAL (DARK, CENTERED)
   ============================================================ */
.hero-minimal {
  min-height: 40vh;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 5%;
}

.hero-minimal .hero-content {
  max-width: 800px;
  padding: 0;
}

.hero-minimal h1 {
  color: var(--white);
}

.hero-minimal .hero-description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  margin-bottom: 0.5rem;
}

.section-heading p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 640px;
}

.section-heading-center {
  text-align: center;
}

.section-heading-center p {
  margin: 0 auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.button-primary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--accent-color);
  color: var(--primary-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9375rem;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-base), transform var(--transition-fast);
}

.button-primary:hover {
  background: var(--accent-dark);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.button-primary:active {
  transform: translateY(0);
}

.bg-navy .button-primary,
.bg-mid .button-primary,
.bg-dark .button-primary {
  color: var(--primary-dark);
}

.button-secondary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
}

.button-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

.button-secondary:active {
  transform: translateY(0);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 600px) {
  .button-primary,
  .button-secondary {
    width: 100%;
    text-align: center;
  }

  .cta-buttons {
    flex-direction: column;
  }
}

/* ============================================================
   PULL QUOTE / BLOCKQUOTE
   ============================================================ */
.pull-quote {
  font-family: var(--font-heading);
  font-size: 1.3125rem;
  line-height: 1.55;
  color: var(--accent-color);
  border-left: 3px solid var(--accent-color);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}

blockquote {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--white);
  background: rgba(200, 169, 110, 0.1);
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
}

blockquote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--accent-color);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   TWO-COLUMN LAYOUT
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.two-col-wide {
  grid-template-columns: 3fr 2fr;
}

.two-col-narrow {
  grid-template-columns: 2fr 3fr;
}

@media (max-width: 900px) {
  .two-col,
  .two-col-wide,
  .two-col-narrow {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ============================================================
   PHOTO GRID
   ============================================================ */
.photo-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.photo-grid img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}

.photo-grid-2 img {
  height: 320px;
}

figcaption {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

@media (max-width: 600px) {
  .photo-grid-2,
  .photo-grid-3 {
    grid-template-columns: 1fr;
  }

  .photo-grid img,
  .photo-grid-2 img {
    height: 240px;
  }
}


/* ============================================================
   IMAGE STACK
   One full-width hero image over a 2-up pair of smaller images.
   Used as the image side of a .two-col layout.
   ============================================================ */
.image-stack {
  display: grid;
  gap: 1rem;
}

.image-stack__hero {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.image-stack__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.image-stack__pair img {
  width: 100%;
  height: 224px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

@media (max-width: 600px) {
  .image-stack__hero {
    height: 220px;
  }

  .image-stack__pair img {
    height: 160px;
  }
}

/* ============================================================
   WRECK / DIVE SITE CARDS
   ============================================================ */
.dive-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.dive-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border-top: 3px solid var(--accent-color);
}

.dive-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.dive-card-meta span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dive-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.625rem;
}

.dive-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.65;
}

/* On dark backgrounds */
.bg-navy .dive-card,
.bg-mid .dive-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(200, 169, 110, 0.2);
}

.bg-navy .dive-card h3,
.bg-mid .dive-card h3 {
  color: var(--accent-color);
}

.bg-navy .dive-card p,
.bg-mid .dive-card p {
  color: rgba(255, 255, 255, 0.75);
}

.bg-navy .dive-card-meta span,
.bg-mid .dive-card-meta span {
  color: rgba(200, 169, 110, 0.7);
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0;
  width: 2px;
  background: var(--accent-color);
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-color);
}

.timeline-year {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.timeline-item h3 {
  font-size: 1.125rem;
  color: var(--white);
  margin-bottom: 0.375rem;
}

.timeline-item p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  text-align: center;
  padding: 5rem 5%;
}

.cta-band h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.cta-band p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 580px;
  margin: 0 auto 2rem;
}

.cta-band .cta-buttons {
  justify-content: center;
}

/* ============================================================
   STATS ROW
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
  line-height: 1;
  margin-bottom: 0.375rem;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   PHOTO CAPTION CREDIT
   ============================================================ */
.photo-credit {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.75rem;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--primary-dark);
  padding: 3rem 5%;
  border-top: 1px solid rgba(200, 169, 110, 0.2);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-brand img {
  height: 150px;
  width: auto;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
}

.footer-brand a {
  color: var(--accent-color);
}

.footer-brand .footer-years {
  font-size: 0.8125rem;
  color: var(--accent-color);
  font-style: italic;
}

.footer-nav h3 {
  color: var(--accent-color);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-nav a:hover {
  color: var(--accent-color);
}

.icon-external {
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.35em;
  vertical-align: middle;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8125rem;
}

.footer-bottom a:hover {
  color: var(--accent-color);
}

.footer-photo-credit {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand img {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ============================================================
   COMPOSED MODIFIERS & UTILITIES
   Added in the v5 CSS-Mode refactor to remove inline styles.
   Small, intentional helpers plus a few component classes.
   ============================================================ */

/* Rounded, responsive media */
.media-rounded {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

/* Intentional spacing helpers */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Eyebrow gold on light backgrounds — AA-contrast gold, covers any
   .hero-eyebrow inside a light section (with or without .on-light) */
.hero-eyebrow.on-light,
.bg-white .hero-eyebrow,
.bg-subtle .hero-eyebrow { color: var(--accent-text); }
.divider.on-light { background: var(--accent-dark); }

/* figcaptions on dark sections stay light for AA contrast */
.bg-navy figcaption,
.bg-mid figcaption,
.bg-dark figcaption { color: rgba(255, 255, 255, 0.72); }

/* Inline "read more" link inside cards */
.card-link {
  display: inline-block;
  margin-top: 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* Keep pull-quote gold on dark sections (beats .bg-navy p color) */
.bg-navy .pull-quote,
.bg-mid .pull-quote,
.bg-dark .pull-quote { color: var(--accent-color); }

.bg-white .pull-quote,
.bg-subtle .pull-quote { color: var(--accent-text); }

/* Centered gallery photo credit */
.photo-credit.center { text-align: center; }

/* "The Shop" contact block */
.shop-contact { text-align: center; margin-top: 2.5rem; }
.shop-contact p { margin-bottom: 0.75rem; }
.shop-contact p:last-child { margin-bottom: 0; }
.shop-contact__note { font-size: 0.875rem; color: var(--text-light); }

/* Second footer-nav heading spacing (no markup hook needed) */
.footer-nav h3 ~ h3 { margin-top: 1.5rem; }

/* Spec box — trip/dive specs panel on dark sections */
.spec-box {
  padding: 1.75rem 2rem;
  background: rgba(200, 169, 110, 0.1);
  border-left: 3px solid var(--accent-color);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.spec-box .spec-box__label {
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-color);
}
.spec-box p { color: rgba(255, 255, 255, 0.88); margin-bottom: 0.5rem; }
.spec-box p:last-child { margin-bottom: 0; }

/* ============================================================
   FAQ (native details/summary — keyboard accessible)
   ============================================================ */
.faq { max-width: 760px; margin: 2.5rem auto 0; }

.faq details {
  border-bottom: 1px solid var(--border-color);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 1.125rem 1.75rem 1.125rem 0;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--primary-color);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 1.125rem;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--accent-dark);
}

.faq details[open] summary::after { content: '\2212'; }

.faq details p {
  margin: 0;
  padding: 0 0 1.25rem;
  color: var(--text-muted);
}
