/* ==========================================================================
   Itajaí Digital — Tema editorial marítimo
   ========================================================================== */

:root {
  --brand: #0f172a;
  --accent: #0369a1;
  --accent-strong: #075985;
  --bg: #fdfdfd;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.2);
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1200px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--brand);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: .75rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 999; }

/* Top bar */
.top-bar {
  border-bottom: 1px solid var(--line);
  padding: .75rem 0;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-weight: 500;
}
.top-bar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.top-bar__live { color: var(--accent); font-weight: 600; }
.top-bar__date { opacity: .6; margin-left: 1.5rem; }
.top-bar__right { display: flex; align-items: center; gap: 1rem; }
.top-bar__sep { width: 1px; height: .75rem; background: var(--line-strong); }
.top-bar__search { background: none; border: 0; cursor: pointer; font: inherit; text-transform: inherit; letter-spacing: inherit; padding: 0; }

/* Brand header */
.site-header {
  padding: 2.5rem 0 2rem;
  text-align: center;
}
.site-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  letter-spacing: -.03em;
  margin: 0;
  line-height: 1;
}
.site-title a { color: inherit; display: inline-flex; align-items: center; gap: 1rem; text-decoration: none; }
.site-title .accent { color: var(--accent); }
.site-icon { height: 1.2em; width: auto; display: block; }
.site-tagline {
  margin: .75rem 0 0;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .3em;
  font-weight: 500;
  opacity: .6;
}
.site-logo img { max-height: 160px; width: auto; height: auto; max-width: 100%; margin: 0 auto; display: block; }

/* Primary nav */
.primary-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 253, 253, .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.primary-nav__list {
  list-style: none; margin: 0; padding: 1rem 1.5rem;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 1.75rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  max-width: var(--container); margin-left: auto; margin-right: auto;
}
.primary-nav__list li.current-menu-item > a,
.primary-nav__list li.current_page_item > a { color: var(--accent); }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .92);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 1.5rem;
}
.search-overlay.is-open { display: flex; }
.search-overlay form { width: 100%; max-width: 640px; }
.search-overlay input[type="search"] {
  width: 100%; background: transparent; border: 0;
  border-bottom: 2px solid rgba(255,255,255,.4);
  color: #fff; font-family: var(--font-serif); font-size: 2rem; padding: 1rem 0;
  outline: none;
}
.search-overlay input[type="search"]::placeholder { color: rgba(255,255,255,.5); }
.search-overlay__close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer;
}

/* Leaderboard */
.leaderboard {
  margin: 2rem 0 3rem;
  display: flex; justify-content: center;
}
.leaderboard__placeholder {
  width: 100%; max-width: 970px; min-height: 90px;
  background: rgba(15,23,42,.04);
  outline: 1px solid rgba(0,0,0,.05); outline-offset: -1px;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; text-transform: uppercase; letter-spacing: .2em;
  color: rgba(15,23,42,.4);
}
.leaderboard img { max-width: 100%; height: auto; }

/* Hero grid */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem;
}
.hero-main { grid-column: span 12; }
.hero-side { grid-column: span 12; display: flex; flex-direction: column; gap: 2rem; }

@media (min-width: 1024px) {
  .hero-main { grid-column: span 8; }
  .hero-side { grid-column: span 4; }
}

.hero-main__thumb {
  aspect-ratio: 16 / 9;
  background: rgba(15,23,42,.05);
  overflow: hidden; margin-bottom: 1.5rem;
  outline: 1px solid rgba(0,0,0,.05); outline-offset: -1px;
}
.hero-main__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-main:hover .hero-main__thumb img { transform: scale(1.03); }

.cat-badge {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: .25rem .55rem;
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
}
.cat-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em;
  color: var(--accent);
}
.post-meta { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
.post-meta__date { font-size: .75rem; color: rgba(15,23,42,.45); }

.hero-main__title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  line-height: 1.1; margin: 0;
}
.hero-main__title a:hover { color: var(--accent); }
.hero-main__excerpt {
  margin-top: 1rem; font-size: 1.1rem;
  color: rgba(15,23,42,.7); line-height: 1.55; max-width: 38rem;
}

.hero-side__item { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.hero-side__item:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-side__thumb {
  aspect-ratio: 16 / 10; background: rgba(15,23,42,.05);
  margin-bottom: 1rem; overflow: hidden;
}
.hero-side__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-side__title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.2rem; line-height: 1.25; margin: .5rem 0 .5rem;
}
.hero-side__title a:hover { text-decoration: underline; }
.hero-side__excerpt { font-size: .9rem; color: rgba(15,23,42,.6); margin: .5rem 0 0; }

/* Section header */
.section-divider {
  margin-top: 4rem; padding-top: 2rem;
  border-top: 1px solid var(--line-strong);
}
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 700;
  font-size: 1.65rem; margin: 0;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 3px; text-underline-offset: 8px;
}
.section-more {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em;
}

/* Card grid */
.card-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }

.card { display: flex; flex-direction: column; gap: .65rem; }
.card__thumb { aspect-ratio: 1 / 1; background: rgba(15,23,42,.05); overflow: hidden; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__thumb img { transform: scale(1.04); }
.card__meta { font-size: .65rem; font-weight: 700; opacity: .45; text-transform: uppercase; letter-spacing: .1em; }
.card__title { font-family: var(--font-serif); font-weight: 700; font-size: 1rem; line-height: 1.25; margin: 0; }

/* Pagination */
.pagination {
  margin: 3rem 0 0; display: flex; justify-content: center; gap: .5rem;
  font-size: .8rem; font-weight: 600;
}
.pagination .page-numbers {
  padding: .5rem .85rem; border: 1px solid var(--line); display: inline-block;
}
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Single post */
.single-article {
  max-width: 720px; margin: 0 auto; padding: 2rem 0 4rem;
}
.single-article__meta { margin-bottom: 1.25rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.single-article__title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 1rem;
}
.single-article__lede { font-size: 1.2rem; color: rgba(15,23,42,.7); line-height: 1.55; margin: 0 0 2rem; }
.single-article__featured { aspect-ratio: 16 / 9; background: rgba(15,23,42,.05); margin: 0 0 2rem; overflow: hidden; }
.single-article__featured img { width: 100%; height: 100%; object-fit: cover; }
.single-article__byline {
  display: flex; gap: 1rem; align-items: center;
  padding: 1rem 0; margin: 0 0 2rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: .85rem;
}
.single-article__byline strong { font-weight: 600; }
.single-article__content {
  font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.75; color: #1e293b;
}
.single-article__content p { margin: 0 0 1.4rem; }
.single-article__content h2 { font-size: 1.65rem; margin: 2.5rem 0 1rem; font-weight: 700; }
.single-article__content h3 { font-size: 1.3rem; margin: 2rem 0 .75rem; font-weight: 700; }
.single-article__content blockquote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0; padding: .5rem 0 .5rem 1.5rem;
  font-style: italic; color: #334155;
}
.single-article__content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.single-article__content img { margin: 1.5rem 0; }
.single-article__content figcaption {
  font-family: var(--font-sans); font-size: .8rem; color: var(--muted);
  text-align: center; margin-top: .5rem;
}

/* Share buttons */
.share {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin: 2.5rem 0; padding: 1.25rem 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.share__label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; opacity: .6; }
.share__list { display: flex; gap: .5rem; }
.share__btn {
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
  background: transparent; cursor: pointer; transition: all .2s ease;
  color: var(--brand);
}
.share__btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.share__btn svg { width: 16px; height: 16px; }

/* Tags */
.entry-tags { margin: 2rem 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.entry-tags a {
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px;
}
.entry-tags a:hover { border-color: var(--accent); color: var(--accent); }

/* Comments */
.comments-area { max-width: 720px; margin: 0 auto; padding: 0 0 4rem; }
.comments-title { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; margin: 0 0 1.5rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { border-bottom: 1px solid var(--line); padding: 1.25rem 0; }
.comment-meta { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }
.comment-form label { display: block; font-size: .8rem; font-weight: 600; margin: 1rem 0 .35rem; text-transform: uppercase; letter-spacing: .1em; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: .75rem; border: 1px solid var(--line); font: inherit; background: #fff;
}
.comment-form textarea { min-height: 140px; }
.comment-form .submit, .form-submit input {
  background: var(--brand); color: #fff; border: 0; padding: .85rem 1.5rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem;
  cursor: pointer; margin-top: 1rem;
}

/* Sidebar / Widgets */
.widget { margin-bottom: 2.5rem; }
.widget-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 700;
  font-size: 1.15rem; margin: 0 0 1rem;
  border-bottom: 2px solid var(--accent); padding-bottom: .5rem;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.widget li:last-child { border-bottom: 0; }

/* 404 / search no results */
.error-404, .no-results {
  max-width: 640px; margin: 0 auto; padding: 4rem 1.5rem; text-align: center;
}
.error-404 h1 { font-family: var(--font-serif); font-size: 5rem; margin: 0; color: var(--accent); }
.error-404 h2 { font-family: var(--font-serif); font-size: 1.5rem; margin: 1rem 0; }
.btn {
  display: inline-block; background: var(--brand); color: #fff;
  padding: .85rem 1.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem;
}
.btn:hover { background: var(--accent); color: #fff; }

/* Search form */
.search-form { display: flex; gap: 0; max-width: 100%; }
.search-form input[type="search"] {
  flex: 1; padding: .75rem 1rem; border: 1px solid var(--line); font: inherit; background: #fff;
}
.search-form button {
  background: var(--brand); color: #fff; border: 0; padding: .75rem 1.25rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; cursor: pointer;
}

/* Footer */
.site-footer-mini {
  margin-top: 5rem; padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}
.site-footer-mini__inner {
  display: flex; flex-direction: column; gap: 1.5rem; align-items: center; justify-content: space-between;
  text-align: center;
}
@media (min-width: 768px) {
  .site-footer-mini__inner { flex-direction: row; text-align: left; }
}
.social-list { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.social-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.social-btn svg { width: 14px; height: 14px; }
.social-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.footer-copy { font-size: .65rem; opacity: .45; text-transform: uppercase; letter-spacing: .2em; }
.footer-links { display: flex; gap: 1.5rem; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; opacity: .65; list-style: none; margin: 0; padding: 0; }

/* WP core required */
.alignleft { float: left; margin: .5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .5rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: .8rem; color: var(--muted); text-align: center; }
.sticky { /* marker */ }
.bypostauthor { /* marker */ }
.screen-reader-text {
  position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px;
  overflow: hidden; word-wrap: normal !important;
}

/* Mobile nav toggle (hidden on desktop) */
.menu-toggle {
  display: none; background: none; border: 0;
  font: inherit; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; font-size: .75rem;
  padding: .5rem 0; cursor: pointer;
}
@media (max-width: 768px) {
  .menu-toggle { display: block; margin: 0 auto; padding: .75rem 1rem; }
  .primary-nav__list { display: none; flex-direction: column; align-items: center; padding-bottom: 1.5rem; }
  .primary-nav__list.is-open { display: flex; }
}
