/* ==========================================================================
   FishingCommunities.net — site-wide layout and base styles
   (replaces the Divi theme). Page-specific table/chart styles are in legacy.css.
   ========================================================================== */

:root {
  --blue-light: #98c1d9;
  --blue-mid: #457b9d;
  --blue-dark: #045070;
  --link: #046b99;
  --gold: #fdb81e;
  --text: #333;
  --muted: #666;
  --content-width: 900px;
  --wide-width: 1200px;
  --font: 'Source Sans Pro', 'Source Sans 3', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}

img, video, iframe { max-width: 100%; }
img { height: auto; }

a { color: var(--link); }
a:hover { color: var(--blue-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: #222;
  font-weight: 500;
  line-height: 1.2;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #fff; padding: 8px 12px; z-index: 2000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.review-banner {
  background: #ffff00;
  text-align: center;
  font-size: 14px;
  line-height: 1.3;
  padding: 8px 12px;
}
.review-banner strong { text-transform: uppercase; }
.review-banner a { color: #000; }

.site-bar { background: var(--blue-light); text-align: center; padding: 8px 12px 6px; }
.site-name {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 16px;
  text-transform: uppercase; letter-spacing: 2px;
}
.site-name:hover { text-decoration: underline; color: #fff; }

.main-nav { background: var(--blue-dark); position: relative; z-index: 1000; }
.main-nav > ul {
  list-style: none; margin: 0 auto; padding: 0 12px; max-width: var(--wide-width);
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 28px;
}
.main-nav > ul > li { position: relative; }
.main-nav a, .main-nav button {
  display: block; color: #fff; text-decoration: none; font: inherit; font-size: 15px;
  text-transform: uppercase; letter-spacing: 1px; padding: 12px 4px;
  background: none; border: 0; cursor: pointer;
}
.main-nav a:hover, .main-nav button:hover, .main-nav a[aria-current] { color: var(--gold); }
.main-nav button:focus-visible, .main-nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.ports-menu {
  position: absolute; left: 50%; transform: translateX(-50%); top: 100%;
  list-style: none; margin: 0; padding: 10px 0; min-width: 240px;
  background: #fff; border-top: 3px solid var(--gold);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  columns: 2; column-gap: 0; width: 440px;
}
.ports-menu[hidden] { display: none; }
.ports-menu li { break-inside: avoid; }
.ports-menu a { color: var(--blue-dark); text-transform: none; letter-spacing: 0; font-size: 16px; padding: 6px 20px; }
.ports-menu a:hover, .ports-menu a[aria-current] { background: #eef5f9; color: var(--blue-dark); }
@media (max-width: 520px) {
  .ports-menu { width: 92vw; columns: 1; }
}

/* ---------- Hero ---------- */
.page-hero {
  position: relative; width: 100%; overflow: hidden;
  border-bottom: 3px solid var(--gold); background: #1d3b4f;
}
.hero-video { height: 70vh; min-height: 400px; display: flex; align-items: center; justify-content: center; }
.hero-video video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-title {
  position: relative; z-index: 1; padding: 0 20px; text-align: center;
  color: rgba(255,255,255,.92); font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; line-height: 1em; font-size: clamp(2.5rem, 10vw, 6rem);
  text-shadow: 0 0 10px rgba(0,0,0,.5);
}
.hero-home .hero-title { font-size: clamp(2rem, 6vw, 4.5rem); }
.hero-kicker {
  display: block; font-weight: 300; letter-spacing: 7px; font-size: .7em; padding-bottom: .3em;
}
.hero-pause {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7);
  background: rgba(0,0,0,.35); color: #fff; font-size: 13px; cursor: pointer;
}
.hero-pause:hover, .hero-pause:focus-visible { background: rgba(0,0,0,.6); }
.hero-image { height: 35vh; min-height: 300px; background-size: cover; background-position: 50% 50%; }

/* ---------- Page heading ---------- */
.page-head { max-width: var(--content-width); width: 94%; margin: 0 auto; padding-top: 18px; }
.page-head h1 { font-size: 2.4rem; margin: 6px 0 20px; color: #222; }
.breadcrumbs { font-size: 1rem; color: var(--muted); margin: 0; }
.breadcrumbs a { color: var(--link); }
.breadcrumbs-divider { color: #bbb; padding: 0 6px; }

/* ---------- Main content ---------- */
.entry-content {
  max-width: var(--content-width); width: 94%; margin: 0 auto 40px;
}
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content p { margin: 0 0 1em; }
.entry-content h2 { margin-top: 2rem; }
.entry-content h3 { margin-top: 2rem; }
.current-issues h2 { padding-top: 20px; }

/* Wide content blocks (charts and tables) may extend past the text column */
.entry-content .by-the-numbers-row,
.entry-content .chapter-body,
.entry-content .table-wrap { max-width: 100%; }

/* Divi two/three-column rows */
.cols { display: flex; flex-wrap: wrap; gap: 30px; margin: 20px 0; }
.cols > .col { flex: 1 1 280px; min-width: 0; }
.cols > .col-2_3 { flex-grow: 2; }

figure { margin: 1.2em 0; }
figure img { display: block; width: 100%; }
figure.image { border: 0; background: none; }
.photo { margin: 1.2em auto; }

iframe { border: 0; }
.video-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; }

/* Data tables (formerly Ninja Tables) */
.table-wrap { overflow-x: auto; margin: 0 auto 40px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.data-table th, .data-table td { padding: 8px 10px; border-bottom: 1px solid #dde6ec; text-align: left; vertical-align: top; font-family: var(--font); }
.data-table thead th { background: var(--blue-mid); color: #fff; font-weight: 600; font-size: .95rem; }
.data-table tbody tr:nth-child(even) { background: #f5f9fb; }

/* Toggles (formerly Divi toggle modules) */
details.toggle {
  border: 1px solid #d9e4ea; border-radius: 4px; margin: 0 0 1.2em; background: #fafcfd;
}
details.toggle > summary {
  cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 1.15rem; color: var(--blue-dark);
  list-style: none; position: relative; padding-right: 40px;
}
details.toggle > summary::-webkit-details-marker { display: none; }
details.toggle > summary::after {
  content: "+"; position: absolute; right: 16px; top: 8px; font-size: 1.5rem; color: var(--blue-mid);
}
details.toggle[open] > summary::after { content: "–"; }
details.toggle > :not(summary) { padding: 0 16px; }
details.toggle[open] { padding-bottom: 8px; }

/* Port table of contents (floats right of the text) */
nav.port-toc {
  float: right; width: 340px; max-width: 100%; margin: 4px 0 25px 30px; padding: 16px 18px;
  background: #f6f9fb; border-radius: 10px; border-left: 3px solid var(--gold); line-height: 1.4;
}
@media (max-width: 640px) { nav.port-toc { float: none; width: 100%; margin: 0 0 25px; } }
nav.port-toc ol { padding-left: 22px; margin: 4px 0 0; }

/* Previous / next links at the bottom of port pages */
.port-pager {
  max-width: var(--content-width); width: 94%; margin: 0 auto 50px;
  display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #e3e3e3; padding-top: 18px;
}
.port-pager a { text-decoration: none; max-width: 48%; font-size: 1.05rem; line-height: 1.3; }
.port-pager a span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.port-pager .pager-next { text-align: right; margin-left: auto; }

.page-credit {
  text-align: center; color: #888; font-size: .85rem; max-width: var(--content-width);
  width: 94%; margin: 0 auto 20px;
}

/* ---------- Home page ---------- */
.home-top {
  max-width: 1150px; width: 92%; margin: 40px auto 10px;
  display: grid; grid-template-columns: 1fr 300px; gap: 40px 70px; align-items: center;
}
.home-intro { text-align: center; }
.home-intro h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 400; line-height: 1.4; margin: 0; color: #373d47; }
.last-updated-subhead { color: #767676; font-size: 1.4rem; margin: 20px 0 0; }

/* Expandable list of ports (one open at a time) */
.port-accordion { border-top: 1px solid #d8d8d8; }
.port-accordion details { border-bottom: 1px solid #d8d8d8; }
.port-accordion summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 16px 40px 16px 20px; text-align: center;
  color: #275170; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .3px;
}
.port-accordion summary::-webkit-details-marker { display: none; }
.port-accordion summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px;
  border-radius: 50%; background: #275170 no-repeat center / 9px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform .2s;
}
.port-accordion details[open] > summary::after { transform: rotate(180deg); }
.port-accordion summary:hover { color: var(--blue-dark); background: #f7fafc; }
.port-accordion summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.port-accordion ul { list-style: none; margin: 0; padding: 0 18px 18px; }
.port-accordion li { margin: 0 0 10px; line-height: 1.3; }
.port-accordion li a { color: #46769f; font-size: 1rem; }
.port-accordion li a:hover { color: var(--blue-dark); }

@media (max-width: 860px) {
  .home-top { grid-template-columns: 1fr; }
  .port-accordion { max-width: 420px; width: 100%; margin: 0 auto; }
}
.section-heading {
  text-align: center; text-transform: uppercase; letter-spacing: 1px; font-size: 1.4rem; margin: 50px 0 24px; color: var(--blue-dark);
}
.section-heading a { color: inherit; }

/* Statewide Overview band */
.home-statewide { background: #dbe7f1; padding: 40px 4% 30px; margin-top: 40px; }
.statewide-images {
  max-width: 1000px; margin: 0 auto; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px 9%;
}
.statewide-images img { display: block; width: 100%; border: 4px solid #f2b71f; }
.statewide-link { text-align: center; margin: 24px 0 0; font-size: 1.35rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.statewide-link a { color: #46769f; text-underline-offset: 3px; }
.statewide-link a:hover { color: var(--blue-dark); }

/* Port carousel */
.port-carousel {
  position: relative; max-width: 1150px; width: 92%; margin: 40px auto 10px;
  display: flex; align-items: center; gap: 12px;
}
.carousel-viewport { flex: 1; min-width: 0; overflow: hidden; }
.carousel-track {
  list-style: none; margin: 0; padding: 6px 8px 22px; scroll-padding: 0 8px;
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.port-card {
  flex: 0 0 calc((100% - 36px) / 3); scroll-snap-align: start;
  background: #fff; box-shadow: inset 0 0 20px rgba(0,0,0,.08);
  display: flex; flex-direction: column; text-align: center; padding-bottom: 22px;
}
.port-card-image img { display: block; width: 100%; aspect-ratio: 1.9 / 1; object-fit: cover; background: #cfdde6; }
.port-card-title { margin: 16px 20px 6px; font-size: 1.3rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.port-card-title a { color: #275170; text-decoration: none; }
.port-card-title a:hover { text-decoration: underline; }
.port-card p.port-card-blurb { margin: 0 22px 14px; padding: 0; text-align: left; font-size: .98rem; line-height: 1.35; color: #363636; }
.port-card-link {
  align-self: center; display: inline-block; padding: 7px 22px; border-radius: 999px;
  background: #275170; color: #fff; text-decoration: none; font-size: 1rem; font-weight: 600; letter-spacing: .2px;
  transition: background .15s;
}
.port-card-link:hover { background: var(--blue-dark); color: #fff; }
.port-card-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.carousel-btn {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: #9fbfd8; position: relative; transition: background .15s;
}
.carousel-btn:hover, .carousel-btn:focus-visible { background: var(--blue-mid); }
.carousel-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.carousel-btn::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 0; height: 0;
  border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.carousel-prev::after { border-right: 13px solid #fff; transform: translate(-60%, -50%); }
.carousel-next::after { border-left: 13px solid #fff; transform: translate(-40%, -50%); }

@media (max-width: 980px) { .port-card { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 640px) {
  .port-card { flex-basis: 100%; }
  .port-carousel { width: 96%; gap: 6px; }
  .carousel-btn { width: 36px; height: 36px; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.home-about { margin-top: 50px; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue-mid) 100%);
  color: #fff; text-align: center; padding: 70px 20px 50px; margin-top: 30px; position: relative;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 36px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1280 140' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0 0v51.4c62.4 20.8 125.6 36.8 192 35.9 98.7-1.4 172.6-43.3 269-52.5 106.5-10.2 203.3 34.5 309.9 41.6C875.6 83.4 973 41 1080 28.9c70.4-8 140.6 1.2 200 22.5V0z'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}
.footer-inner { max-width: 650px; margin: 0 auto; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-links { margin-top: 16px; }

@media (max-width: 700px) {
  body { font-size: 16px; }
  .page-head h1 { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video video { display: none; }
}

@media print {
  .site-top, .page-hero, .site-footer, .port-pager, .hero-pause { display: none; }
}
