/* ==========================================================================
   eboatnews — theme.css
   Built on Bootstrap 5 + Bootstrap Icons (loaded via CDN in <head>).
   Structure borrows the mega-menu pattern from Boots5's
   "nav-four-item-two-column" navbar and the magazine layout of the
   Newsers template (ticker bar, hero + top-stories split, tabbed
   category browser, multi-widget footer), re-themed for eboatnews.
   ========================================================================== */

:root {
  --ink:         #101A2E;
  --ink-soft:    #1C2740;
  --bg-page:     #F3F5F9;
  --bg-card:     #FFFFFF;
  --text-body:   #2B3245;
  --text-muted:  #6C7486;
  --line:        #E4E7ED;

  --brand:       #0EA57C;
  --brand-dark:  #0B7D5B;
  --accent-red:  #E2372B;

  --c-boats:      #0B7D5C;
  --c-motors:     #C13A1E;
  --c-batteries:  #E8A317;
  --c-batteries-ink: #9C6B0A;
  --c-charging:   #7A4FB0;
  --c-control:    #3E6690;
  --c-marinas:    #C23E72;

  --f-display: 'Poppins', 'Segoe UI', sans-serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-serif:   'IBM Plex Serif', Georgia, serif;

  --bs-primary: var(--brand);
  --bs-primary-rgb: 14,165,124;
  --bs-link-color: var(--brand-dark);
  --bs-link-hover-color: var(--ink);
  --bs-body-font-family: var(--f-body);
  --bs-body-color: var(--text-body);
  --bs-body-bg: var(--bg-page);
}

/* ==========================================================================
   Base
   ========================================================================== */
body { background: var(--bg-page); color: var(--text-body); }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-display); font-weight: 600; color: var(--ink); }
a { text-decoration: none; }
::selection { background: var(--brand); color: #fff; }

:focus-visible { outline: 3px solid var(--c-charging); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline-brand { border-color: var(--brand); color: var(--brand); }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.text-brand { color: var(--brand) !important; }
.section-title { position: relative; padding-bottom: .6rem; margin-bottom: 1.75rem; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 3px; background: var(--brand); border-radius: 2px; }
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }

/* ==========================================================================
   Category colour mapping — applied via .cat-* utility classes
   ========================================================================== */
.cat-boats     { --cat: var(--c-boats);     --cat-soft:#E4F5EF; }
.cat-motors    { --cat: var(--c-motors);    --cat-soft:#FBE7E1; }
.cat-batteries { --cat: var(--c-batteries); --cat-soft:#FBF0DC; --cat-text: var(--ink); --cat-ink: var(--c-batteries-ink); }
.cat-charging  { --cat: var(--c-charging);  --cat-soft:#EEE7F7; }
.cat-control   { --cat: var(--c-control);   --cat-soft:#E4EBF2; }
.cat-marinas   { --cat: var(--c-marinas);   --cat-soft:#F9E7EF; }

.cat-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--cat, var(--ink)); color: var(--cat-text, #fff);
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: .3rem .6rem; border-radius: 30px;
}
.cat-badge .bi { font-size: .85rem; }
.cat-text { color: var(--cat-ink, var(--cat, var(--brand))); }

/* ==========================================================================
   Top utility bar (Newsers-style ticker)
   ========================================================================== */
.topbar { background: var(--ink); color: rgba(255,255,255,.85); font-size: .82rem; padding: .45rem 0; }
.topbar .trending-label { color: var(--brand); font-weight: 700; margin-right: .5rem; white-space: nowrap; }
.topbar a.trending-link { color: #fff; }
.topbar a.trending-link:hover { color: var(--brand); }
.topbar .social-rail a { color: rgba(255,255,255,.65); margin-left: .85rem; }
.topbar .social-rail a:hover { color: #fff; }
.topbar .topbar-date { color: rgba(255,255,255,.5); margin-left: 1rem; padding-left: 1rem; border-left: 1px solid rgba(255,255,255,.2); }

/* ==========================================================================
   Header + brand row
   ========================================================================== */
.brand-row { padding: 1.1rem 0; }
.brand-logo { height: 34px; }
.port-conditions {
  display: flex; align-items: center; gap: .6rem;
  font-size: .82rem; color: var(--text-muted);
  border-left: 1px solid var(--line); padding-left: 1rem;
}
.port-conditions .bi { font-size: 1.3rem; color: var(--brand); }
.port-conditions strong { color: var(--ink); font-family: var(--f-display); font-size: .95rem; }

.header-search { position: relative; }
.header-search input {
  border-radius: 30px; border: 1px solid var(--line);
  padding: .5rem 1rem .5rem 2.3rem; font-size: .88rem; background: var(--bg-page);
}
.header-search .bi { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* ==========================================================================
   Navbar + mega-menu (Boots5 "four item, two column" pattern → 6 categories)
   ========================================================================== */
.site-navbar { background: #fff; border-bottom: 1px solid var(--line); position: relative; }
.site-navbar .nav-link { color: var(--ink-soft); font-weight: 600; font-size: .95rem; padding: 1rem .9rem; }
.site-navbar .nav-link:hover, .site-navbar .nav-link.active { color: var(--brand); }
.site-navbar .dropdown-toggle::after { vertical-align: .1em; }

.mega-menu {
  width: min(700px, 92vw);
  left: 50%;
  transform: translateX(-50%);
  margin-top: .4rem;
  border: none;
  border-radius: .9rem;
  box-shadow: 0 24px 50px rgba(16,26,46,.18);
  padding: 1.1rem;
}
.mega-item {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .6rem; border-radius: .6rem; color: var(--text-body);
}
.mega-item:hover { background: var(--bg-page); }
.mega-thumb { width: 54px; height: 54px; flex-shrink: 0; border-radius: .5rem; overflow: hidden; border: 1px solid var(--line); position: relative; }
.mega-thumb .art-panel { width: 100%; height: 100%; border: none; aspect-ratio: auto; }
.mega-item h6 { margin: 0 0 2px; font-size: .92rem; font-family: var(--f-display); color: var(--ink); }
.mega-item p { margin: 0; font-size: .78rem; color: var(--text-muted); line-height: 1.35; }
.mega-item .bi { color: var(--cat-ink, var(--cat, var(--brand))); margin-right: .3rem; }

/* ==========================================================================
   Category strip
   ========================================================================== */
.cat-strip-card {
  background: var(--bg-card); border-radius: .75rem; overflow: hidden;
  border: 1px solid var(--line); height: 100%; transition: box-shadow .15s ease;
}
.cat-strip-card:hover { box-shadow: 0 10px 24px rgba(16,26,46,.08); }
.cat-strip-card .art-panel { --art-ratio: 16/9; border: none; border-radius: 0; }
.cat-strip-card .cat-strip-body { padding: .9rem 1rem; }
.cat-strip-card h6 { font-size: .92rem; margin-bottom: .25rem; }
.cat-strip-card p { font-size: .8rem; color: var(--text-muted); margin: 0; }

/* ==========================================================================
   Hero: featured + top stories
   ========================================================================== */
.hero-feature { background: var(--bg-card); border-radius: 1rem; overflow: hidden; border: 1px solid var(--line); }
.hero-feature .art-panel { --art-ratio: 16/10; border: none; border-radius: 0; }
.hero-feature-body { padding: 1.5rem; }
.hero-feature h1, .hero-feature h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; }
.hero-feature h1 a, .hero-feature h2 a { color: var(--ink); }
.hero-feature h1 a:hover, .hero-feature h2 a:hover { color: var(--cat-ink, var(--cat, var(--brand))); }

.stat-row { display: flex; flex-wrap: wrap; gap: .95rem; font-size: .8rem; color: var(--text-muted); }
.stat-row span { display: inline-flex; align-items: center; gap: .3rem; }
.stat-row .bi { color: var(--cat-ink, var(--cat, var(--brand))); }

.top-story-list { background: var(--bg-card); border-radius: 1rem; border: 1px solid var(--line); padding: 1.2rem; height: 100%; }
.top-story-item { display: flex; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.top-story-item:last-child { border-bottom: none; padding-bottom: 0; }
.top-story-item:first-child { padding-top: 0; }
.top-story-num { font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; color: var(--line); flex-shrink: 0; width: 28px; }
.top-story-item h6 { font-size: .92rem; margin-bottom: .3rem; line-height: 1.35; }
.top-story-item h6 a { color: var(--ink); }
.top-story-item h6 a:hover { color: var(--cat-ink, var(--cat, var(--brand))); }
.top-story-item small { color: var(--text-muted); font-size: .76rem; }

/* ==========================================================================
   Newsletter CTA band
   ========================================================================== */
.newsletter-band { background: linear-gradient(120deg, var(--ink), var(--ink-soft)); border-radius: 1rem; color: #fff; overflow: hidden; position: relative; }
.newsletter-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: radial-gradient(circle, var(--brand) 0%, transparent 70%); opacity: .35;
}
.newsletter-band h3 { color: #fff; }
.newsletter-band p { color: rgba(255,255,255,.7); }
.newsletter-band .form-control { border-radius: 30px 0 0 30px; border: none; padding: .75rem 1.1rem; }
.newsletter-band .btn { border-radius: 0 30px 30px 0; padding: .75rem 1.4rem; }
.newsletter-note { font-size: .82rem; color: #9FE8CE; min-height: 1.2em; margin-top: .6rem; }

/* ==========================================================================
   Article cards (latest news, category tabs, most viewed)
   ========================================================================== */
.news-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; height: 100%; transition: box-shadow .15s ease; }
.news-card:hover { box-shadow: 0 12px 28px rgba(16,26,46,.1); }
.news-card .art-panel { --art-ratio: 16/10; border: none; border-radius: 0; }
.news-card .news-card-body { padding: 1rem; }
.news-card h6 { font-size: .95rem; line-height: 1.35; margin-bottom: .4rem; }
.news-card h6 a { color: var(--ink); }
.news-card h6 a:hover { color: var(--cat-ink, var(--cat, var(--brand))); }
.news-card .byline { font-size: .78rem; color: var(--text-muted); }
.news-card p.dek { font-size: .85rem; color: var(--text-muted); margin: .4rem 0; }

.news-row-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.news-row-item:last-child { border-bottom: none; }
.news-row-item .art-panel { width: 96px; height: 72px; flex-shrink: 0; border-radius: .5rem; overflow: hidden; border: none; aspect-ratio: auto; }
.news-row-item .rank { font-family: var(--f-display); font-weight: 700; font-size: 1.6rem; color: var(--line); width: 30px; flex-shrink: 0; }
.news-row-item h6 { font-size: .92rem; margin-bottom: .25rem; }
.news-row-item h6 a { color: var(--ink); }
.news-row-item h6 a:hover { color: var(--cat-ink, var(--cat, var(--brand))); }

/* ==========================================================================
   Category tabs ("Explore by Category")
   ========================================================================== */
.cat-tabs .nav-link { border: none; border-radius: 30px; color: var(--text-muted); font-weight: 600; font-size: .88rem; padding: .5rem 1.05rem; }
.cat-tabs .nav-link.active { background: var(--brand); color: #fff; }
.cat-tabs .nav-link:not(.active):hover { background: var(--bg-page); color: var(--ink); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); }
.site-footer h6 { color: #fff; font-family: var(--f-display); font-size: .9rem; margin-bottom: 1.1rem; }
.site-footer a { color: rgba(255,255,255,.65); }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: .88rem; line-height: 1.65; }
.footer-logo { height: 26px; filter: brightness(0) invert(1); margin-bottom: .9rem; }
.social-pill { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.06); border-radius: 30px; padding: .35rem .75rem; font-size: .78rem; margin: 0 .3rem .5rem 0; }
.social-pill .bi { color: var(--brand); }
.footer-post { display: flex; gap: .7rem; margin-bottom: 1rem; }
.footer-post .art-panel { width: 58px; height: 58px; flex-shrink: 0; border-radius: .4rem; overflow: hidden; border: none; aspect-ratio: auto; }
.footer-post h6 { font-size: .85rem; margin-bottom: .2rem; line-height: 1.3; }
.footer-post h6 a { color: #fff; }
.footer-post h6 a:hover { color: var(--brand); }
.footer-post small { color: rgba(255,255,255,.5); font-size: .74rem; }
.tag-pill { display: inline-block; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.75); border-radius: 30px; padding: .3rem .8rem; font-size: .78rem; margin: 0 .35rem .5rem 0; }
.tag-pill:hover { border-color: var(--brand); color: var(--brand); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; color: rgba(255,255,255,.5); padding: 1rem 0; }

/* ==========================================================================
   Art panels — category-specific geometric compositions (original, no photos)
   ========================================================================== */
.art-panel { position: relative; overflow: hidden; background: #fff; aspect-ratio: var(--art-ratio, 4/3); }
.art-panel .shape { position: absolute; }
img.art-panel { display: block; width: 100%; height: 100%; object-fit: cover; }

.art-boats { background: #E4F2EC; }
.art-boats .arc { left: 50%; bottom: 0; transform: translateX(-50%); border-radius: 50% 50% 0 0; }
.art-boats .arc1 { width: 128%; height: 92%; background: var(--c-boats); }
.art-boats .arc2 { width: 96%;  height: 68%; background: #3FBE95; }
.art-boats .arc3 { width: 64%;  height: 45%; background: #93DDC0; }
.art-boats .arc4 { width: 32%;  height: 22%; background: #F7FBF9; }

.art-motors { background: #FBE7E0; }
.art-motors .ring { left: 50%; top: 54%; transform: translate(-50%,-50%); border-radius: 50%; }
.art-motors .ring1 { width: 92%; height: 92%; background: var(--c-motors); }
.art-motors .ring2 { width: 68%; height: 68%; background: #EA7A3F; }
.art-motors .ring3 { width: 44%; height: 44%; background: #F3B24C; }
.art-motors .ring4 { width: 20%; height: 20%; background: #FBF6EE; }
.art-motors .tick { left: 50%; top: 4%; width: 3px; height: 14%; background: var(--ink); transform: translateX(-50%); }

.art-batteries {
  background: repeating-linear-gradient(-45deg, var(--c-batteries) 0 26px, #F6D98A 26px 44px, var(--ink) 44px 50px, #F6D98A 50px 68px);
}

.art-charging { background: #EBE1F5; }
.art-charging .bolt {
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 46%; height: 82%;
  background: linear-gradient(160deg, var(--c-batteries), var(--c-charging) 65%);
  clip-path: polygon(58% 0%, 8% 56%, 42% 56%, 30% 100%, 92% 40%, 54% 40%);
}

.art-control { background: #E4EBF1; }
.art-control .disc-a { left: 8%; bottom: -6%; width: 78%; height: 78%; border-radius: 50%; background: #9FB7CC; }
.art-control .disc-b { right: 6%; top: 8%; width: 42%; height: 42%; border-radius: 50%; background: var(--c-control); }
.art-control .lever { right: 26%; top: 12%; width: 4px; height: 16%; background: #fff; }

.art-marinas { background: #F7E3EC; }
.art-marinas .ripple { left: 50%; top: 55%; transform: translate(-50%,-50%); border-radius: 50%; border-style: solid; border-color: var(--c-marinas); background: transparent; }
.art-marinas .ripple1 { width: 96%; height: 96%; border-width: 3px; opacity: .35; }
.art-marinas .ripple2 { width: 70%; height: 70%; border-width: 5px; opacity: .6; }
.art-marinas .ripple3 { width: 42%; height: 42%; border-width: 7px; opacity: .9; }
.art-marinas .core { left: 50%; top: 55%; transform: translate(-50%,-50%); width: 16%; height: 16%; border-radius: 50%; background: var(--ink); }

/* ==========================================================================
   Article page
   ========================================================================== */
.breadcrumb-bar { font-size: .85rem; padding: 1rem 0 0; }
.article-header { padding: 1rem 0 1.5rem; max-width: 900px; }
.article-header h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.22; margin: .9rem 0 .8rem; }
.article-dek { font-size: 1.1rem; color: var(--text-muted); max-width: 65ch; }
.article-byline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.author-chip { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink); font-size: .9rem; }
.author-chip .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--cat, var(--brand)); color: var(--cat-text, #fff); display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: .85rem; }

.toolbar { position: sticky; top: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .7rem 0; margin-bottom: 2rem; }
.toolbar-btn { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; padding: .45rem .85rem; border: 1.5px solid var(--line); border-radius: 30px; color: var(--ink-soft); background: #fff; }
.toolbar-btn:hover { border-color: var(--brand); color: var(--brand); }
.toolbar-btn[data-active="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.font-controls { display: none; align-items: center; gap: 0; }
.font-controls.visible { display: inline-flex; }
.font-controls button { width: 32px; height: 32px; border: 1.5px solid var(--line); background: #fff; font-family: var(--f-body); font-size: .8rem; }
.font-controls button:first-child { border-radius: 30px 0 0 30px; }
.font-controls button:last-child { border-radius: 0 30px 30px 0; border-left: none; }
.font-controls button:hover { background: var(--bg-page); }

.article-banner { --art-ratio: 21/8; border-radius: 1rem; margin-bottom: 2rem; }

.article-body { font-size: 1.08rem; color: var(--text-body); max-width: 68ch; }
.article-body p { margin-bottom: 1.3rem; }
.article-body h2 { font-size: 1.4rem; margin: 2.2rem 0 1rem; scroll-margin-top: 90px; }
.article-body strong { color: var(--ink); }

.pullquote { border-left: 4px solid var(--cat-ink, var(--cat, var(--brand))); padding: .2rem 0 .2rem 1.3rem; margin: 1.7rem 0; font-family: var(--f-display); font-size: 1.3rem; line-height: 1.35; color: var(--ink); }

.stat-box { display: flex; gap: 1.2rem; align-items: baseline; border: 1px solid var(--line); border-radius: .8rem; padding: 1.1rem 1.3rem; margin: 1.7rem 0; background: var(--bg-page); }
.stat-number { font-family: var(--f-display); font-size: 2rem; font-weight: 700; color: var(--cat-ink, var(--cat, var(--brand))); }
.stat-label { font-size: .92rem; color: var(--text-muted); max-width: 32ch; }

.tag-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.tag-footer .label { color: var(--text-muted); font-size: .82rem; }
.tag-footer .tag { border: 1px solid var(--line); padding: .3rem .7rem; border-radius: 30px; color: var(--ink-soft); font-size: .82rem; }
.tag-footer .tag:hover { border-color: var(--brand); color: var(--brand); }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.prev-next a { border: 1px solid var(--line); border-radius: .8rem; padding: 1rem 1.15rem; display: block; background: #fff; }
.prev-next a:hover { border-color: var(--brand); }
.prev-next .pn-label { font-size: .74rem; color: var(--text-muted); display: block; margin-bottom: .35rem; }
.prev-next .pn-next { text-align: right; }

.sidebar-card { background: #fff; border: 1px solid var(--line); border-radius: .9rem; padding: 1.2rem; margin-bottom: 1.5rem; }
.sidebar-card h6 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 1rem; }
.related-item { display: flex; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-item:first-child { padding-top: 0; }
.related-item .art-panel { width: 58px; height: 58px; flex-shrink: 0; border-radius: .5rem; overflow: hidden; border: none; aspect-ratio: auto; }
.related-item h6 { font-size: .86rem; line-height: 1.3; margin-bottom: 0; }
.related-item h6 a { color: var(--ink); }
.related-item h6 a:hover { color: var(--cat-ink, var(--cat, var(--brand))); }

.toc-box { display: none; }
#relatedBottomWrap { display: none; }
.hidden-item { display: none !important; }

.discussion-card { background: #fff; border: 1px solid var(--line); border-radius: .9rem; padding: 1.4rem; margin-top: 2rem; }
.sample-comment { display: flex; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.sample-comment:last-of-type { border-bottom: none; }
.sample-comment .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-page); color: var(--ink); display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.sample-comment strong { font-size: .88rem; color: var(--ink); }
.sample-comment p { font-size: .88rem; color: var(--text-body); margin: .2rem 0 0; }
.sample-comment small { color: var(--text-muted); font-size: .74rem; }

@media (max-width: 767.98px) {
  .prev-next { grid-template-columns: 1fr; }
  .port-conditions { display: none; }
}

@media (max-width: 991.98px) {
  .mega-menu { position: static; width: 100%; left: 0; transform: none; box-shadow: none; border: 1px solid var(--line); }
}
