/* MacroDivers Blog Colour Scheme */
:root {
  --navy: #061a31;
  --navy2: #092846;
  --teal: #34c6d3;
  --coral: #ff7f6a;
  --white: #fff;
  --soft: #d8e6ec;
  --muted: #93aab5;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(52, 198, 211, 0.12),
      transparent 32rem
    ),
    linear-gradient(180deg, var(--navy), #031222);
  color: var(--soft);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  line-height: 1.7;
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5vw;
  background: rgba(6, 26, 49, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--white);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.nav a {
  color: #d9f4f7;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.container {
  width: min(920px, 90vw);
  margin: 0 auto;
  padding: 64px 0;
}
.post {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.065),
    rgba(255, 255, 255, 0.025)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  padding: clamp(24px, 5vw, 54px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}
.eyebrow,
.meta {
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
  margin-bottom: 14px;
}
h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--white);
  line-height: 1.12;
}
h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0 0 18px;
  line-height: 1.15;
}
h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  margin-top: 40px;
  margin-bottom: 12px;
  line-height: 1.2;
}
h3 {
  font-size: 1.35rem;
  margin-top: 30px;
}
.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #eefaff;
}
ul,
ol {
  padding-left: 1.4rem;
}
li {
  margin: 0.4rem 0;
}
.callout {
  margin: 32px 0;
  padding: 22px;
  border-left: 4px solid var(--coral);
  border-radius: 18px;
  background: rgba(255, 127, 106, 0.08);
}
.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
button,
.btn {
  border: 1px solid rgba(52, 198, 211, 0.7);
  color: var(--white);
  background: rgba(52, 198, 211, 0.12);
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font: inherit;
}
button:hover,
.btn:hover {
  background: rgba(52, 198, 211, 0.22);
  text-decoration: none;
}
.footer {
  padding: 40px 5vw;
  background: #031222;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}
@media (max-width: 700px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .nav {
    gap: 12px;
  }
  .container {
    padding: 36px 0;
  }
  .post {
    border-radius: 20px;
  }
}

/* Typography consistency update */
.post p {
  font-size: 1.05rem;
  margin: 0 0 1rem;
  color: var(--soft);
  line-height: 1.75;
}

.post p:last-child {
  margin-bottom: 0;
}

.post .lead,
.lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #d8e6ec;
  margin-bottom: 1.15rem;
}

.post li {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

.post table {
  margin: 1.3rem 0;
}

.post h2 + p,
.post h3 + p {
  margin-top: 0;
}

@media (max-width: 700px) {
  .post p,
  .post li {
    font-size: 1rem;
    line-height: 1.68;
  }

  .post .lead,
  .lead {
    font-size: 1.06rem;
    line-height: 1.65;
  }
}


/* Dropdown navigation update */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav a,
.nav-dropdown > a {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.nav-dropdown > a {
  text-decoration: none;
  color: #d9f4f7;
  font-size: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  padding: 10px 0;
  background: rgba(6, 26, 49, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  z-index: 100;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: #d9f4f7;
  white-space: nowrap;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.dropdown-menu a:hover {
  background: rgba(52, 198, 211, 0.12);
  color: #fff;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.footer-contact a,
.footer a {
  color: #d9f4f7;
}

@media (max-width: 900px) {
  .dropdown-menu {
    position: static;
    display: block;
    min-width: 0;
    margin-top: 6px;
    padding: 6px 0 6px 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .dropdown-menu a {
    padding: 6px 0;
    font-size: 13px;
  }

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

.footer .wrap { width: min(1180px, 90vw); margin: 0 auto; }


/* Nudibranch education section */
.education-hero {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 130px 6vw 80px;
  background:
    linear-gradient(90deg, rgba(6,26,49,0.96), rgba(6,26,49,0.55), rgba(6,26,49,0.88)),
    var(--education-hero-image) center/cover no-repeat;
}

.education-hero .wrap {
  max-width: 980px;
  text-align: center;
}

.education-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.education-section {
  padding: 90px 6vw;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.education-card {
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.11);
}

.education-card .number {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(52,198,211,0.16);
  border: 1px solid rgba(52,198,211,0.55);
  color: #fff;
  margin-bottom: 12px;
  font-weight: 700;
}

.education-card h3 {
  margin-top: 0;
  color: #fff;
}

.education-card p {
  margin-bottom: 0;
}

.diagram-card {
  margin-top: 32px;
  padding: 30px;
  border-radius: 26px;
  background: rgba(52,198,211,0.08);
  border: 1px solid rgba(52,198,211,0.25);
}

.taxonomy-tree,
.name-diagram,
.lifecycle {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 24px auto 0;
}

.taxonomy-tree span,
.name-diagram span,
.lifecycle span {
  display: block;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  text-align: center;
}

.name-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

.name-box {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.1);
}

.name-box strong {
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.comparison-card {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.1);
}

.comparison-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.comparison-card div {
  padding: 22px;
}

.fact-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .education-grid,
  .comparison-grid,
  .name-split {
    grid-template-columns: 1fr;
  }

  .comparison-card img {
    height: auto;
  }
}


/* Nudibranch anatomy page */
.anatomy-overview {
  margin-top: 32px;
  padding: 28px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.1);
}

.anatomy-overview img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
}

.anatomy-parts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.anatomy-part {
  padding: 24px;
  border-radius: 22px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.09);
}

.anatomy-part h3 {
  margin-top: 0;
  color: #fff;
}

.anatomy-part strong {
  color: var(--teal);
}

.anatomy-note {
  margin-top: 32px;
  padding: 24px;
  border-left: 4px solid var(--teal);
  border-radius: 18px;
  background: rgba(52,198,211,0.08);
}

@media (max-width: 900px) {
  .anatomy-parts-grid {
    grid-template-columns: 1fr;
  }
}


/* Nudibranch life cycle page */
.lifecycle-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.lifecycle-stage {
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.1);
}

.lifecycle-stage h3 {
  margin-top: 0;
  color: #fff;
}

.lifecycle-stage .stage-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(52,198,211,0.16);
  border: 1px solid rgba(52,198,211,0.55);
  color: #fff;
  font-weight: 700;
}

.lifecycle-diagram-panel {
  margin-top: 32px;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.1);
}

.lifecycle-diagram-panel img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
}

.lifecycle-flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.lifecycle-flow span {
  padding: 14px 12px;
  border-radius: 18px;
  text-align: center;
  color: #fff;
  background: rgba(52,198,211,0.09);
  border: 1px solid rgba(52,198,211,0.25);
}

@media (max-width: 900px) {
  .lifecycle-stage-grid,
  .lifecycle-flow {
    grid-template-columns: 1fr;
  }
}


/* Nudibranch identification guide */
.id-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.id-guide-card {
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.1);
}

.id-guide-card h3 {
  margin-top: 0;
  color: #fff;
}

.id-guide-card .step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(52,198,211,0.16);
  border: 1px solid rgba(52,198,211,0.55);
  color: #fff;
  font-weight: 700;
}

.identification-checklist {
  margin-top: 32px;
  padding: 28px;
  border-radius: 26px;
  background: rgba(52,198,211,0.08);
  border: 1px solid rgba(52,198,211,0.25);
}

.identification-checklist ul {
  columns: 2;
  gap: 36px;
}

.mistake-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.mistake-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,127,106,0.08);
  border: 1px solid rgba(255,127,106,0.22);
}

.mistake-card h3 {
  margin-top: 0;
  color: #fff;
}

@media (max-width: 900px) {
  .id-guide-grid,
  .mistake-grid {
    grid-template-columns: 1fr;
  }

  .identification-checklist ul {
    columns: 1;
  }
}


/* Final navigation typography alignment fix */
.nav {
  display: flex;
  align-items: center;
}

.nav > a,
.nav-dropdown > a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d9f4f7;
  text-decoration: none;
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown > a::after {
  content: " ▾";
  font-size: 0.85em;
  line-height: 1;
}

.dropdown-menu a {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: none;
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
  }

  .nav > a,
  .nav-dropdown > a {
    min-height: 34px;
  }
}


/* Brand icon and refined home photo intro */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 48px;
  height: 25px;
  background: url("assets/nudibranch-brand-icon.png") center / contain no-repeat;
  flex: 0 0 auto;
}

.home-photo-teaser {
  padding-top: 80px;
  padding-bottom: 80px;
}

.home-photo-teaser .section-intro {
  max-width: 760px;
  margin-bottom: 28px;
}

.home-photo-teaser .section-intro p {
  margin-bottom: 0;
}

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

.photo-mosaic img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}

.home-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

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

  .photo-mosaic img {
    height: 220px;
  }
}

@media (max-width: 580px) {
  .brand::before {
    width: 38px;
    height: 20px;
  }

  .photo-mosaic {
    grid-template-columns: 1fr;
  }

  .photo-mosaic img {
    height: auto;
  }
}


/* Shared header/mobile menu system */
#site-header,
#site-footer {
  display: contents;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 9px 14px;
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 900px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

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

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    right: 5vw;
    left: 5vw;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    background: rgba(6, 26, 49, 0.98);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 18px;
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  }

  .nav.open {
    display: flex;
  }

  .nav-dropdown {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav > a,
  .nav-dropdown > a {
    width: 100%;
    min-height: 34px;
  }

  .dropdown-menu {
    position: static;
    display: none;
    min-width: 0;
    width: 100%;
    margin-top: 4px;
    padding: 6px 0 8px 14px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .nav.open .nav-dropdown:hover .dropdown-menu,
  .nav.open .nav-dropdown:focus-within .dropdown-menu,
  .nav.open .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    padding: 7px 0;
    font-size: 13px;
  }
}


/* Educational tooltip links */
.tooltip-link {
  position: relative;
  color: var(--teal);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: help;
}

.tooltip-link .tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: min(340px, 82vw);
  background: #06233f;
  color: #fff;
  text-align: left;
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.5;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  position: absolute;
  z-index: 9999;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.25s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
}

.tooltip-link:hover .tooltip-text,
.tooltip-link:focus .tooltip-text,
.tooltip-link:focus-within .tooltip-text {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 768px) {
  .tooltip-link .tooltip-text {
    left: 0;
    transform: none;
    bottom: 125%;
  }
}


/* Additional Nudibranch guide pages */
.guide-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.guide-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.guide-card {
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.1);
}

.guide-card h3 {
  margin-top: 0;
  color: #fff;
}

.guide-card .guide-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(52,198,211,0.14);
  border: 1px solid rgba(52,198,211,0.35);
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.guide-photo-card {
  overflow: hidden;
  padding: 0;
}

.guide-photo-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.guide-photo-card div {
  padding: 22px;
}

.hotspot-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
}

.hotspot-table th,
.hotspot-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}

.hotspot-table th {
  color: #fff;
  background: rgba(52,198,211,0.12);
}

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

  .guide-photo-card img {
    height: auto;
  }

  .hotspot-table {
    display: block;
    overflow-x: auto;
  }
}

