/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* NANOFISHNEST — PLANTED WATER
   Paste into Appearance → Customize → Additional CSS.
   Replace your old article/table CSS and earlier navbar styling.
   Built for your existing GeneratePress menu, logo and sticky navigation.
   No HTML, JavaScript, external fonts or replacement menu required. */

:root {
  --nf-deep: #123e43;
  --nf-water: #1c555a;
  --nf-teal: #17696a;
  --nf-leaf: #d5e7a4;
  --nf-mint: #e9f3ee;
  --nf-paper: #f3f7f4;
  --nf-ink: #263e40;
  --nf-muted: #576e70;
  --nf-line: #dbe6df;
}

/* THE PAGE */
body {
  background: var(--nf-paper);
  color: var(--nf-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.site-content { padding-top: 30px; padding-bottom: 30px; }
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .paging-navigation,
.sidebar .widget {
  background: #fff;
  border: 1px solid var(--nf-line);
  border-radius: 18px;
  box-shadow: 0 8px 26px -22px #123e4340;
}
.inside-article { padding: clamp(22px, 4vw, 48px); }
.sidebar .widget { padding: 24px; }

/* AQUATIC HEADER — preserve GeneratePress open/close and sticky logic */
.main-navigation,
.main-navigation.navigation-stick,
#mobile-header {
  background: linear-gradient(115deg, #123e43, #1c555a);
  border-top: 3px solid var(--nf-leaf);
  border-bottom: 1px solid #ffffff20;
  box-shadow: 0 5px 20px #123e431a;
}
.main-navigation .inside-navigation {
  min-height: 84px;
  padding: 10px 24px;
  gap: 8px;
}
.main-navigation .navigation-branding { margin-right: auto; }
.main-navigation .navigation-branding .site-logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  background: #fff;
  border-radius: 16px;
  line-height: 1;
}
.main-navigation .navigation-branding img,
.main-navigation .sticky-navigation-logo img {
  width: auto;
  height: 52px;
  max-height: 52px;
  padding: 0;
  object-fit: contain;
}
.main-navigation .main-nav > ul > li > a {
  padding: 0 17px;
  border-radius: 999px;
  color: #f5faf6;
  font-size: 14px;
  font-weight: 600;
  line-height: 46px;
  text-decoration: none;
  transition: background-color .18s, color .18s;
}
.main-navigation .main-nav > ul > li:hover > a,
.main-navigation .main-nav > ul > li.sfHover > a,
.main-navigation .main-nav > ul > li:focus-within > a {
  background: #ffffff15 !important;
  color: #fff;
}
.main-navigation .main-nav > ul > li[class*="current-menu-"] > a {
  background: var(--nf-leaf) !important;
  color: var(--nf-deep) !important;
}
.main-navigation .main-nav ul ul {
  width: 260px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--nf-line);
  border-radius: 14px;
  box-shadow: 0 16px 36px -16px #123e434d;
}
.main-navigation .main-nav ul ul li a {
  padding: 13px 15px;
  border-radius: 8px;
  background: transparent;
  color: var(--nf-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
}
.main-navigation .main-nav ul ul li:hover > a,
.main-navigation .main-nav ul ul li:focus-within > a,
.main-navigation .main-nav ul ul li[class*="current-menu-"] > a {
  background: var(--nf-mint) !important;
  color: var(--nf-deep) !important;
}
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items {
  color: #fff;
  background: transparent;
}
.main-navigation .menu-toggle {
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid #ffffff35;
  border-radius: 999px;
  font-size: 14px;
  line-height: 44px;
}
.main-navigation .menu-toggle:hover,
.main-navigation .menu-toggle:focus {
  background: #ffffff15 !important;
  color: #fff;
}
.main-navigation .menu-bar-item > a {
  width: 46px;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  line-height: 46px;
  text-align: center;
}
.main-navigation .menu-bar-item > a:hover {
  background: #ffffff15 !important;
  color: var(--nf-leaf);
}
.main-navigation :is(a, button):focus-visible {
  outline: 2px solid var(--nf-leaf);
  outline-offset: 3px;
}
.main-navigation .sub-menu a:focus-visible {
  outline-color: var(--nf-teal);
}

/* ARTICLE TITLES AND READING RHYTHM */
.entry-title,
.entry-title a,
.widget-title { color: var(--nf-deep); }
.entry-title {
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.035em;
  overflow-wrap: break-word;
}
.single-post .entry-title { font-size: clamp(30px, 4vw, 46px); }
.blog .entry-title,
.archive .entry-title { font-size: clamp(24px, 2.6vw, 32px); }
.entry-title a:hover { color: var(--nf-teal); }
.entry-meta { margin-top: 13px; color: var(--nf-muted); font-size: 13px; }
.entry-meta a { color: var(--nf-teal); }
.single-post .entry-content { font-size: 17px; line-height: 1.85; }
.entry-content > p { margin-bottom: 1.4em; }
.entry-content > :is(ul, ol) { margin-bottom: 1.5em; padding-left: 1.1em; }
.entry-content > :is(ul, ol) > li { margin-bottom: .55em; }
.entry-content > :is(ul, ol) > li::marker { color: var(--nf-teal); }
.entry-content > h2 {
  display: block;
  margin: 2.2em 0 .8em;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--nf-line);
  background: linear-gradient(var(--nf-leaf), var(--nf-leaf)) left bottom / 68px 4px no-repeat;
  color: var(--nf-deep);
  font-size: clamp(25px, 3vw, 33px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
  scroll-margin-top: 110px;
}
.entry-content > h3 {
  margin: 1.8em 0 .65em;
  color: var(--nf-deep);
  font-size: clamp(21px, 2.3vw, 25px);
  font-weight: 650;
  line-height: 1.35;
  scroll-margin-top: 110px;
}

/* TEXT LINKS — exclude image links and common button classes */
.entry-content :is(p, li, td, th, figcaption) a:not(.btn-primary, .button, .wp-element-button, .wp-block-button__link):not(:has(img, svg)) {
  color: var(--nf-teal);
  border-bottom: 0;
  padding-bottom: 0;
  text-decoration: underline;
  text-decoration-color: #7cae9e;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .18s, text-decoration-color .18s;
}
.entry-content :is(p, li, td, th, figcaption) a:not(.btn-primary, .button, .wp-element-button, .wp-block-button__link):not(:has(img, svg)):hover {
  color: #285c36;
  text-decoration-color: currentColor;
}
.entry-content :is(p, li, td, th) a[rel~="sponsored"]:not(.btn-primary, .button, .wp-element-button, .wp-block-button__link):not(:has(img, svg))::after {
  content: "\2197";
  margin-left: .2em;
  color: currentColor;
  font-size: .8em;
}
.entry-content a:focus-visible {
  outline: 2px solid var(--nf-teal);
  outline-offset: 4px;
}

/* AQUARIUM COMPARISON TABLES */
.entry-content .wp-block-table {
  margin: 2em 0;
  overflow-x: auto;
  border: 1px solid var(--nf-line);
  border-radius: 14px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #93b4a5 #edf4ee;
}
.entry-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 2em 0;
  overflow-x: auto;
  border: 1px solid var(--nf-line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--nf-ink);
  font-size: 15px;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: #93b4a5 #edf4ee;
}
.entry-content .wp-block-table table {
  display: table;
  min-width: 540px;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.entry-content table th {
  min-width: 140px;
  padding: 17px 19px;
  border: 0;
  border-bottom: 3px solid var(--nf-leaf);
  background: var(--nf-deep);
  color: #fff;
  font-weight: 600;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}
.entry-content table td {
  min-width: 140px;
  padding: 16px 19px;
  border: 0;
  border-bottom: 1px solid var(--nf-line);
  background: #fff;
  color: var(--nf-ink);
  vertical-align: top;
}
.entry-content table tbody tr:nth-child(even) td { background: #f0f6f1; }
.entry-content table td:first-child { font-weight: 600; color: var(--nf-deep); }
.entry-content table tbody tr:last-child td { border-bottom: 0; }
.entry-content table th a:not(.button) { color: #fff !important; text-decoration-color: var(--nf-leaf); }
.entry-content table th a:not(.button):hover { color: var(--nf-leaf) !important; }
.entry-content .wp-block-table figcaption {
  margin: 0;
  padding: 12px 17px;
  border-top: 1px solid var(--nf-line);
  color: var(--nf-muted);
  font-size: 12px;
  line-height: 1.7;
}

/* PHOTOGRAPHY, QUOTES AND SIDEBAR */
.post-image img,
.featured-image img,
.entry-content > .wp-block-image img {
  border-radius: 14px;
}
.entry-content > blockquote {
  margin: 2em 0;
  padding: 22px 26px;
  border: 0;
  border-left: 4px solid #86ad72;
  border-radius: 0 13px 13px 0;
  background: var(--nf-mint);
  color: var(--nf-deep);
  font-size: 1.02em;
  line-height: 1.8;
}
.entry-content > blockquote p:last-child { margin-bottom: 0; }
.widget-title { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.sidebar .widget a { color: var(--nf-teal); }
.sidebar .widget a:hover { color: #285c36; text-decoration: underline; }
.read-more { color: var(--nf-teal); font-weight: 650; text-underline-offset: 4px; }
.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  margin: 3px;
  padding: 6px 12px;
  border-radius: 9px;
  color: var(--nf-teal);
}
.nav-links .page-numbers.current { background: var(--nf-deep); color: #fff; }
.site-info { background: var(--nf-deep); color: #d8e9df; }
.site-info a { color: #e0ecc3; }
.site-info a:hover { color: #fff; }

/* MATCH YOUR EXISTING GENERATEPRESS MOBILE BREAKPOINT */
@media (min-width: 769px) {
  .main-navigation .main-nav > ul { display: flex; align-items: center; gap: 5px; }
}
@media (max-width: 768px) {
  .main-navigation .inside-navigation { min-height: 72px; padding: 9px 14px; }
  .main-navigation .navigation-branding img { height: 44px; max-height: 44px; }
  .main-navigation .navigation-branding { margin-left: 0; }
  .main-navigation.toggled .main-nav > ul {
    margin: 12px 0 3px;
    padding: 8px;
    border: 1px solid #ffffff25;
    border-radius: 15px;
    background: #10383d;
  }
  .main-navigation .main-nav > ul > li > a { border-radius: 9px; line-height: 48px; }
  .main-navigation .main-nav ul ul {
    width: auto;
    margin: 5px 8px 10px;
    padding: 5px;
    box-shadow: none;
  }
  .main-navigation .main-nav ul ul li a { padding: 13px; }
  .inside-article { padding: 24px 20px; }
  .site-content { padding-top: 20px; padding-bottom: 20px; }
  .single-post .entry-content { font-size: 16px; line-height: 1.8; }
  .entry-content table { font-size: 14px; }
  .entry-content table :is(th, td) { padding: 13px 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .main-navigation .main-nav a,
  .entry-content a { transition: none; }
}
