/* ==========================================================================
   guppies.za.net - site.css
   Single responsive stylesheet (replaces main.css + main600.css).
   Visual identity preserved: water background, coral, header image,
   rising bubbles, polaroid cards, gold/bronze/blue heading palette.
   ========================================================================== */

:root {
  --bg:          #031a23;
  --panel:       rgba(14, 66, 80, 0.9);   /* same solid teal as the photo cards */
  --card:        rgba(14, 66, 80, 0.9);
  --text:        #c9c9cb;
  --text-dim:    #a4a4a5;
  --link:        #d1d1d4;
  --gold:        #bf9445;
  --bronze:      #906b26;
  --blue:        #438fd2;
  --edge:        rgba(110, 190, 226, 0.9);
  --header-h:    100px;
  --coral-h:     111px;
  --nav-w:       240px;
  --content-w:   700px;
  --font:        'Baloo Bhaina 2', 'Trebuchet MS', Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
}

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

a { color: var(--link); font-weight: 700; text-decoration: none; }
a:hover, a:focus-visible { color: #fff; text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

h1 { font-size: 1.6rem; line-height: 1.25; color: var(--gold); margin: 0 0 .5rem; }
h2 { font-size: 1.3rem; line-height: 1.3;  color: var(--bronze); margin: 1.75rem 0 .5rem; }
h3 { font-size: 1.1rem; line-height: 1.3;  color: var(--blue); margin: 1.5rem 0 .5rem; }
p  { margin: 0 0 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 14px;
  background: var(--gold); color: #000; border-radius: 4px;
}
.skip-link:focus { top: 8px; }

/* --------------------------------------------------------------------------
   Scenery: water background and coral (decorative, fixed, never shifts layout)
   -------------------------------------------------------------------------- */
.scenery { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.scenery-water {
  position: absolute; top: 0; left: 50%; width: 2000px; height: 100%;
  transform: translateX(-50%);
  background: url('../IMG/BGWater.jpg') top center no-repeat;
}
.scenery-coral-l, .scenery-coral-r {
  position: absolute; bottom: 0; width: 50%; height: 582px; background-repeat: no-repeat;
}
.scenery-coral-l { left: 0;  background-image: url('../IMG/Coral_Left.png');  background-position: bottom left; }
.scenery-coral-r { right: 0; background-image: url('../IMG/Coral_Right.png'); background-position: bottom right; }
.scenery-coral-m {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; width: 100%; height: var(--coral-h);
  pointer-events: none;
  background: url('../IMG/Coral_Middle.png') center bottom no-repeat;
  background-size: 100% 100%;   /* stretch edge to edge at any screen width */
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--header-h);
  background: url('../IMG/topimg.png') center top no-repeat;
}
.site-header .brand {
  display: block; width: 100%; max-width: 960px; height: 100%; margin: 0 auto;
}
.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.site-shell {
  position: relative; z-index: 1;
  width: calc(var(--nav-w) + var(--content-w) + 20px);
  margin: 0 auto;
  padding-top: calc(var(--header-h) + 10px);
  padding-bottom: calc(var(--coral-h) + 20px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: var(--nav-w) var(--content-w);
  column-gap: 20px;
  align-items: start;
}

.site-main { position: relative; min-width: 0; }

/* --------------------------------------------------------------------------
   Navigation (sidebar on desktop, slide-out drawer on mobile)
   -------------------------------------------------------------------------- */
.site-nav {
  position: sticky; top: calc(var(--header-h) + 10px);
  max-height: calc(100vh - var(--header-h) - var(--coral-h) - 20px);
  overflow-y: auto;
  padding: 10px 8px;
  background: var(--panel);
  border-radius: 8px;
  scrollbar-width: thin;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 3px 5px; border-radius: 4px;
  font-size: .9rem; line-height: 1.35; text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus-visible { background: rgba(255,255,255,.06); text-decoration: none; }
.site-nav .nav-l1 > li > a              { color: var(--link); }
.site-nav .nav-l2 > li > a              { color: var(--gold);   font-weight: 400; padding-left: 15px; }
.site-nav .nav-l3 > li > a              { color: var(--bronze); font-weight: 400; padding-left: 25px; }
.site-nav a[aria-current="page"]        { color: #fff; background: rgba(191,148,69,.18); }
.site-nav .nav-sep { height: 1px; margin: 8px 5px; background: rgba(255,255,255,.08); }

/* --------------------------------------------------------------------------
   Search
   -------------------------------------------------------------------------- */
.site-search {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 14px; margin: 0 0 1.25rem;
}
.site-search label { color: var(--text-dim); }
.site-search input[type="search"] {
  width: 220px; padding: 5px 10px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(3,16,22,.75); color: #fff;
  font: inherit;
}
.site-search button {
  padding: 5px 14px; border-radius: 4px; border: 0; cursor: pointer;
  background: var(--gold); color: #000; font: inherit; font-weight: 700;
}

/* --------------------------------------------------------------------------
   Content
   -------------------------------------------------------------------------- */
.page-content { position: relative; z-index: 1; }
.page-intro { color: var(--text); }

.breadcrumbs { font-size: .85rem; margin: 0 0 .75rem; color: var(--text-dim); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "\203A"; margin-right: 4px; color: var(--text-dim); }
.breadcrumbs a { font-weight: 400; color: var(--text-dim); }

/* Facts list (species data): label / value grid */
.facts {
  display: grid; grid-template-columns: 200px 1fr; gap: 6px 14px;
  margin: 0 0 1rem; padding: 12px 14px; background: var(--panel); border-radius: 8px;
}
.facts dt { font-weight: 700; color: var(--link); }
.facts dd { margin: 0; }

/* --------------------------------------------------------------------------
   Polaroid cards (fish listings)
   -------------------------------------------------------------------------- */
.fish-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem; margin: 1.5rem 0; padding: 0 1rem; list-style: none;
}
.fish-card { transform: scale(.9) rotate(5deg); transition: transform .35s ease; }
.fish-card:nth-child(4n+2) { transform: scale(.9) rotate(-5deg); }
.fish-card:nth-child(4n+3) { transform: scale(.9) rotate(-3deg); }
.fish-card:nth-child(4n+4) { transform: scale(.9) rotate(3deg); }
.fish-card:hover, .fish-card:focus-within { transform: scale(1) rotate(0deg); }

.polaroid {
  display: block; padding: 1rem; background: var(--card);
  box-shadow: 0 .2rem 1.2rem rgba(0,0,0,.35); text-align: center; text-decoration: none;
}
.polaroid:hover { text-decoration: none; }
.polaroid-img {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 2; background: rgba(3,16,22,.35); overflow: hidden;
}
.polaroid-img img { width: 100%; height: 100%; object-fit: contain; }

/* No usable photo: the brand guppy (same geometry as the favicon), softened, on deep water.
   Inline SVG data URI: no extra request, and the fixed 3:2 box means no layout shift. */
.polaroid-img.no-photo {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cdefs%3E%3ClinearGradient id='t' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23d6ae62'/%3E%3Cstop offset='1' stop-color='%23c9562e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg opacity='.55'%3E%3Cpath fill='url(%23t)' d='M276 266C338 205 399 113 461 123C497 205 497 328 461 410C399 420 338 328 276 266Z'/%3E%3Cpath fill='%23d6ae62' d='M154 225L236 154L256 230Z'/%3E%3Cellipse cx='184' cy='266' rx='123' ry='61' fill='%23bf9445'/%3E%3Ccircle cx='116' cy='257' r='14' fill='%23031a23'/%3E%3C/g%3E%3C/svg%3E") center / 45% auto no-repeat,
    linear-gradient(180deg, rgba(14,66,80,.55), rgba(3,26,35,.75));
}
.polaroid-caption {
  display: block; margin-top: .6rem; font-size: 1.05rem; line-height: 1.25; color: var(--text-dim);
}
.polaroid-caption em { display: block; font-size: .85rem; font-weight: 400; }

/* Single large polaroid (species hero) */
.polaroid-hero {
  max-width: 500px; margin: 0 auto 1.25rem; padding: 1rem; background: var(--card);
  box-shadow: 0 .2rem 1.2rem rgba(0,0,0,.35); transform: rotate(-2deg);
}
.polaroid-hero img { display: block; width: 100%; height: auto; }
.polaroid-hero figcaption { margin-top: .5rem; font-size: .8rem; text-align: center; color: var(--text-dim); }

/* --------------------------------------------------------------------------
   Home page
   -------------------------------------------------------------------------- */
.section-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.section-tile { padding: .9rem 1rem; background: var(--panel); border-radius: 8px; }

/* Every solid panel shares the photo cards' depth. */
.section-tile, .site-nav, .facts, .table-wrap, .area-feature, .notes blockquote, .notes-own {
  box-shadow: 0 .2rem 1.2rem rgba(0,0,0,.35);
}

/* Text and link lists that would otherwise sit straight on the busy background:
   home guides, encyclopedia class blocks, taxonomy order/family lists, area regions,
   and the /guides index list. (Family species grids are excluded on purpose: the
   polaroid cards already are the panels there.) */
.home-guides,
.taxon-class,
.area-region,
.species .sources,
.species-head,
.species .species-summary,
.species .care,
.species .facts-section,
.species .notes:not(.notes-own),
.taxon section[aria-labelledby="ch-h"],
.content-page .content-body,
.content-page.contact,
.compare-picker,
.compare-groups,
.browse > .page-intro,
.home-head {
  margin-top: 1.25rem; padding: .9rem 1.1rem;
  background: var(--panel); border-radius: 8px;
  box-shadow: 0 .2rem 1.2rem rgba(0,0,0,.35);
}
.home-guides > h2:first-child,
.taxon-class > h2:first-child,
.area-region > h2:first-child,
.species .sources > h2:first-child,
.species .care > h2:first-child,
.species .facts-section > h2:first-child,
.species .notes > h2:first-child,
.taxon section[aria-labelledby="ch-h"] > h2:first-child { margin-top: 0; }
.home-guides > :last-child,
.taxon-class > :last-child,
.area-region > :last-child,
.species-head > :last-child,
.species .care > :last-child,
.species .facts-section > :last-child,
.species .notes > :last-child,
.species .sources > :last-child { margin-bottom: 0; }

/* Inside a section panel the table and quote lose their own box (no box-in-a-box). */
.species .care .facts,
.species .facts-section .facts { background: none; box-shadow: none; padding: 0; margin: 0; }
.species .notes:not(.notes-own) blockquote { background: rgba(3,26,35,.35); box-shadow: none; }
.species-head { margin-bottom: 1.25rem; }
.species-head .sci-line { margin-bottom: 0; }
.species-head .byline { margin: .35rem 0 0; }
.species .species-summary { margin: 0 0 1.25rem; }
.content-page .content-body > .guide-list { padding-left: 1.2rem; }
.home-head .page-intro { background: none; box-shadow: none; padding: 0; margin-top: 0; }
.home-head > :last-child { margin-bottom: 0; }
.content-page .content-body > :first-child { margin-top: 0; }
.content-page .content-body > :last-child { margin-bottom: 0; }
.section-tile h3 { margin: 0 0 .15rem; text-align: left; }
.section-tile .tile-count { margin: 0 0 .5rem; font-size: .8rem; color: var(--text-dim); }
.section-tile ul { list-style: none; margin: 0; padding: 0; }
.section-tile li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: .9rem; }
.section-tile li a { font-weight: 400; color: var(--gold); }
.section-tile .tile-n { color: var(--text-dim); font-size: .8rem; }
.guide-list { columns: 2; column-gap: 2rem; padding-left: 1.1rem; }
.guide-list li { margin-bottom: .3rem; }
@media (max-width: 1000px) { .guide-list { columns: 1; } }

/* --------------------------------------------------------------------------
   Browse pages (sections, groups, taxonomy, encyclopedia)
   -------------------------------------------------------------------------- */
.fish-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1rem; padding: 0; }
.fish-grid-4 .polaroid { padding: .6rem; }
.fish-grid-4 .polaroid-caption { font-size: .9rem; }
.group-block { margin-top: 1.75rem; }
.group-block h2 a { color: inherit; }
.group-count, .page-no { font-size: .8rem; font-weight: 400; color: var(--text-dim); }

.table-wrap { overflow-x: auto; margin: 0 0 1rem; border-radius: 8px; background: var(--panel); }
table.compare { width: 100%; border-collapse: collapse; font-size: .85rem; }
.compare th, .compare td { padding: 6px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255,255,255,.07); }
.compare thead th { color: var(--gold); font-weight: 700; white-space: nowrap; }
.compare tbody th { font-weight: 400; }
.compare tbody th em { display: block; font-size: .75rem; color: var(--text-dim); }
.compare td { white-space: nowrap; }
.compare .na { color: var(--text-dim); }

.pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 1.5rem 0; }
.pager a, .pager span { display: inline-block; min-width: 2.2rem; padding: 4px 10px; text-align: center; border-radius: 4px; background: var(--panel); }
.pager span[aria-current] { background: var(--gold); color: #000; font-weight: 700; }
.pager .gap { padding: 4px 2px; color: var(--text-dim); }

.taxon-list { list-style: none; margin: 0; padding: 0; }
.taxon-list li { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.taxon-list .n { font-size: .8rem; color: var(--text-dim); }
.taxon-cols { columns: 2; column-gap: 2rem; }
.taxon-cols li { break-inside: avoid; }

/* --------------------------------------------------------------------------
   Contact form, notices, area hub
   -------------------------------------------------------------------------- */
.contact-form { max-width: 520px; }
.contact-form .field { margin-bottom: 1rem; }
.contact-form label { display: block; margin-bottom: 4px; font-weight: 700; color: var(--link); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%; padding: 8px 10px; border-radius: 4px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(3,16,22,.75); color: #fff; font: inherit;
}
.contact-form textarea { resize: vertical; min-height: 160px; }
/* Honeypot: off-screen, not display:none (some bots skip display:none fields). */
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn-send {
  padding: 8px 22px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--gold); color: #000; font: inherit; font-weight: 700;
}
.form-small { margin-top: .75rem; font-size: .8rem; color: var(--text-dim); }
.form-notice { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 8px; border-left: 3px solid; }
.form-notice-ok { background: rgba(74,222,128,.08); border-color: #4ade80; }
.form-notice-error { background: rgba(248,113,113,.08); border-color: #f87171; }
.area-feature { padding: .75rem 1rem; background: var(--panel); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; }

/* --------------------------------------------------------------------------
   Species page
   -------------------------------------------------------------------------- */
.species-head h1 { margin-bottom: .25rem; }
.species-head .sci { font-size: .8em; font-weight: 400; color: var(--text-dim); }
.sci-line { margin: 0 0 1rem; font-size: .85rem; color: var(--text-dim); }
.byline { margin: -.6rem 0 1rem; font-size: .8rem; color: var(--text-dim); }
.verdict { border-left: 4px solid #4ade80; }
.verdict-caution { border-left-color: #fbbf24; }
.verdict-no { border-left-color: #f87171; }
.verdict ul { margin: 0; padding-left: 1.2rem; }
.compare-picker h2, .compare-groups h2 { margin-top: 0; }
.compare-groups .guide-list { margin: 0; padding-left: 1.2rem; }
.picker-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.picker-row input { flex: 1 1 200px; padding: 7px 10px; border-radius: 4px; border: 1px solid rgba(255,255,255,.18); background: rgba(3,16,22,.75); color: #fff; font: inherit; }
.picker-vs { color: var(--text-dim); }
.byline a { font-weight: 700; color: var(--gold); }
.species-summary { font-size: 1.05rem; line-height: 1.6; }
.species section, .content-page section { margin-top: 1.5rem; }
.notes blockquote {
  margin: 0 0 .5rem; padding: .75rem 1rem; border-left: 3px solid var(--bronze);
  background: var(--panel); border-radius: 0 8px 8px 0;
}
.notes blockquote p { margin: 0; }
.notes-own { padding: .25rem 1rem .5rem; background: var(--panel); border: 1px solid rgba(191,148,69,.35); border-radius: 8px; }
.source-note, .updated { font-size: .8rem; color: var(--text-dim); }
.sources p { font-size: .85rem; }
.more-link { text-align: right; margin-top: -.5rem; }
.site-nav a.is-active { color: #fff; background: rgba(191,148,69,.10); }

/* Migrated CMS content: keep legacy HTML inside the column. !important is deliberate:
   the old CMS HTML carries inline width/height styles and attributes. */
.content-body { overflow-wrap: anywhere; }
.content-body img, .content-body iframe, .content-body video, .content-body object, .content-body embed,
.content-body table, .content-body div, .content-body p, .content-body span {
  max-width: 100% !important; box-sizing: border-box;
}
.content-body img { height: auto !important; }
.content-body td, .content-body th { width: auto !important; }
.content-body img { max-width: 100%; height: auto; }

/* Photo gallery pages (e.g. the 250L community aquarium) */
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; margin: 1.25rem 0; }
.gallery-item { margin: 0; padding: .75rem .75rem .5rem; background: var(--card); box-shadow: 0 .2rem 1.2rem rgba(0,0,0,.35); }
.gallery-item img { display: block; width: 100%; height: auto; }
.gallery-item figcaption { margin-top: .4rem; text-align: center; font-size: .9rem; color: var(--text-dim); }
@media (max-width: 1000px) { .gallery-grid { grid-template-columns: 1fr; } }
.content-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.content-body td, .content-body th { padding: 4px 8px; vertical-align: top; }

/* --------------------------------------------------------------------------
   Ads: every slot reserves its height up front so it can never shift content
   -------------------------------------------------------------------------- */
.ad-slot { display: block; min-height: 100px; margin: 1.25rem 0; text-align: center; }
.ad-slot .ad-label {
  display: block; margin-bottom: 2px; font-size: .65rem; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
}
.ad-slot ins { display: block; min-height: 90px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  /* Fixed over the middle coral strip (z-index above .scenery-coral-m), so it never
     scrolls with the content. .site-shell's bottom padding keeps content clear of it. */
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: .4rem 1rem calc(.45rem + env(safe-area-inset-bottom, 0px));
  text-align: center; font-size: .8rem; color: var(--text-dim);
  background: rgba(3,16,22,.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(191,148,69,.35);
}
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; margin-bottom: .15rem; }
.site-footer p { margin: 0; }
.site-footer a { font-weight: 400; color: var(--link); }

/* --------------------------------------------------------------------------
   Bubbles (decorative)
   -------------------------------------------------------------------------- */
.bubbles-container {
  position: fixed; top: var(--header-h); left: 50%; z-index: 0;
  width: 15rem; height: calc(100vh - var(--header-h));
  transform: translateX(-50%); opacity: .75; overflow: visible; pointer-events: none;
}
.bubbles { width: 100%; height: auto; overflow: visible; }
.bubbles-large > g, .bubbles-small > g { transform: translateY(2048px); opacity: 0; will-change: transform, opacity; }
.bubbles-small g circle { transform: scale(0); }

.bubbles-large g:nth-of-type(1)  { animation: up 30.5s infinite; }
.bubbles-large g:nth-of-type(2)  { animation: up 25.25s 250ms infinite; }
.bubbles-large g:nth-of-type(3)  { animation: up 15s 750ms infinite; }
.bubbles-large g:nth-of-type(4)  { animation: up 25.5s 1.5s infinite; }
.bubbles-large g:nth-of-type(5)  { animation: up 15.5s 4s infinite; }
.bubbles-large g:nth-of-type(1) g { transform: translateX(350px); }
.bubbles-large g:nth-of-type(2) g { transform: translateX(450px); }
.bubbles-large g:nth-of-type(3) g { transform: translateX(700px); }
.bubbles-large g:nth-of-type(4) g { transform: translateX(500px); }
.bubbles-large g:nth-of-type(5) g { transform: translateX(675px); }
.bubbles-large circle { animation: wobble 15s infinite ease-in-out; }

.bubbles-small g:nth-of-type(1)  { animation: up 10.25s infinite; }
.bubbles-small g:nth-of-type(2)  { animation: up 25.75s infinite; }
.bubbles-small g:nth-of-type(3)  { animation: up 25.25s 250ms infinite; }
.bubbles-small g:nth-of-type(4)  { animation: up 25.75s 325ms infinite; }
.bubbles-small g:nth-of-type(5)  { animation: up 60s 125ms infinite; }
.bubbles-small g:nth-of-type(6)  { animation: up 25.13s 250ms infinite; }
.bubbles-small g:nth-of-type(7)  { animation: up 30.25s 350ms infinite; }
.bubbles-small g:nth-of-type(8)  { animation: up 35s 200ms infinite; }
.bubbles-small g:nth-of-type(9)  { animation: up 30.25s 233ms infinite; }
.bubbles-small g:nth-of-type(10) { animation: up 30s 900ms infinite; }
.bubbles-small g:nth-of-type(1) g  { transform: translateX(350px); }
.bubbles-small g:nth-of-type(2) g  { transform: translateX(750px); }
.bubbles-small g:nth-of-type(3) g  { transform: translateX(350px); }
.bubbles-small g:nth-of-type(4) g  { transform: translateX(180px); }
.bubbles-small g:nth-of-type(5) g  { transform: translateX(350px); }
.bubbles-small g:nth-of-type(6) g  { transform: translateX(650px); }
.bubbles-small g:nth-of-type(7) g  { transform: translateX(480px); }
.bubbles-small g:nth-of-type(8) g  { transform: translateX(330px); }
.bubbles-small g:nth-of-type(9) g  { transform: translateX(230px); }
.bubbles-small g:nth-of-type(10) g { transform: translateX(730px); }
.bubbles-small circle { animation: wobble 30s infinite ease-in-out; }

@keyframes wobble {
  33% { transform: translateX(-150px); }
  66% { transform: translateX(150px); }
}
@keyframes up {
  0%      { opacity: 0; }
  10%, 90%{ opacity: 1; }
  100%    { opacity: 0; transform: translateY(-1024px); }
}

@media (prefers-reduced-motion: reduce) {
  .bubbles-container { display: none; }
  .fish-card, .fish-card:nth-child(n) { transition: none; }
}

/* --------------------------------------------------------------------------
   Mobile (<= 1000px): single column, nav becomes a drawer
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  :root { --coral-h: 101px; }

  .scenery-water {
    width: 100%; left: 0; transform: none;
    background-image: url('../IMG/BGWaterm.jpg');
  }
  .scenery-coral-l, .scenery-coral-r { display: none; }
  .scenery-coral-m { background-image: url('../IMG/Coral_Middlem.png'); }
  .site-header { background-image: url('../IMG/topimgm.png'); }

  .site-shell {
    width: 100%; display: block;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    /* Clear the coral strip AND the fixed footer, which can be taller on phones. */
    padding-bottom: calc(var(--coral-h) + 3rem + env(safe-area-inset-bottom, 0px));
  }

  /* Compact footer: one short copyright line, tighter links. */
  .site-footer { font-size: .72rem; padding-top: .3rem; }
  .site-footer nav { gap: 0 12px; }
  .site-footer .ft-tag { display: none; }

  .nav-toggle {
    display: block; position: fixed; top: calc(var(--header-h) + 8px); left: 0; z-index: 41;
    width: 34px; height: 44px; border: 1px solid var(--edge); border-left: 0;
    border-radius: 0 8px 8px 0; cursor: pointer;
    background: rgb(3,16,22) url('../IMG/menuicon.png') center no-repeat;
  }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; bottom: 0; z-index: 40;
    width: 280px; max-height: none; border-radius: 0 8px 8px 0;
    border: 1px solid var(--edge); border-left: 0;
    background: rgb(3,16,22);
    transform: translateX(-100%); transition: transform .3s ease-in-out;
  }
  .site-nav.is-open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.5); }
  .nav-toggle[aria-expanded="true"] { left: 280px; }
  .site-nav a { font-size: 1.05rem; padding: 6px 8px; }

  .facts { grid-template-columns: 1fr; gap: 0 0; }
  .facts dt { margin-top: .5rem; }
  .fish-grid { grid-template-columns: 1fr; padding: 0; }
  .fish-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .taxon-cols { columns: 1; }
  .polaroid-hero { max-width: 100%; transform: none; }
}
