/*
Theme Name: Roteiros do MS
Theme URI: https://roteirosdoms.com.br
Author: Roteiros do MS / Multi-Frequência
Description: Tema editorial personalizado para o portal Roteiros do MS, com foco em turismo, cultura, roteiros, SEO e publicidade.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: roteiros-do-ms
*/

:root {
  --rdms-accent: #0D7EA8;
  --rdms-accent-dark: #075E7A;
  --rdms-ink: #111827;
  --rdms-muted: #667085;
  --rdms-border: #E6EAF0;
  --rdms-soft: #F6F8FA;
  --rdms-white: #FFFFFF;
  --rdms-max: 1200px;
  --rdms-content: 780px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--rdms-ink);
  background: var(--rdms-white);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--rdms-accent); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }

.rdms-container { width: min(calc(100% - 40px), var(--rdms-max)); margin-inline: auto; }
.rdms-section { padding: 54px 0; }
.rdms-section + .rdms-section { border-top: 1px solid var(--rdms-border); }

/* Header */
.rdms-site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rdms-border);
}
.admin-bar .rdms-site-header { top: 32px; }
.rdms-header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.rdms-brand { display: flex; align-items: center; min-width: 190px; }
.rdms-brand .custom-logo { max-height: 48px; width: auto; }
.rdms-wordmark { font-size: 25px; font-weight: 800; letter-spacing: -0.04em; }
.rdms-wordmark span { color: var(--rdms-accent); font-weight: 700; }
.rdms-main-nav { justify-self: center; }
.rdms-main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; align-items: center; }
.rdms-main-nav a { font-size: 15px; font-weight: 650; }
.rdms-main-nav .current-menu-item > a,
.rdms-main-nav .current-menu-ancestor > a { color: var(--rdms-accent); }
.rdms-header-actions { display: flex; gap: 10px; align-items: center; }
.rdms-icon-btn {
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: transparent; color: var(--rdms-ink); cursor: pointer;
}
.rdms-icon-btn:hover { background: var(--rdms-soft); }
.rdms-mobile-toggle { display: none; }

/* Search panel */
.rdms-search-panel { display: none; border-top: 1px solid var(--rdms-border); background: #fff; }
.rdms-search-panel.is-open { display: block; }
.rdms-search-panel form { padding: 20px 0; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.rdms-search-panel input[type="search"] { width: 100%; border: 1px solid var(--rdms-border); border-radius: 8px; padding: 13px 15px; outline: none; }
.rdms-search-panel button { border: 0; background: var(--rdms-accent); color: #fff; border-radius: 8px; padding: 0 22px; font-weight: 700; cursor: pointer; }

/* Ads */
.rdms-ad-wrap { padding: 22px 0; }
.rdms-ad-label { display: block; margin-bottom: 7px; text-align: center; color: #98A2B3; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.rdms-ad img { width: 100%; border-radius: 4px; object-fit: cover; background: var(--rdms-soft); }
.rdms-ad--wide img { aspect-ratio: 1200 / 130; }
.rdms-ad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 28px 0 10px; }
.rdms-ad-grid .rdms-ad img { aspect-ratio: 580 / 180; }

/* Hero */
.rdms-home-hero { padding: 28px 0 46px; }
.rdms-hero-card {
  position: relative; overflow: hidden; border-radius: 12px; background: var(--rdms-soft); min-height: 520px;
}
.rdms-hero-card img { width: 100%; height: 100%; min-height: 520px; object-fit: cover; }
.rdms-hero-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5,14,20,.78) 0%, rgba(5,14,20,.28) 45%, rgba(5,14,20,.05) 72%);
}
.rdms-hero-copy { position: absolute; z-index: 2; left: 42px; right: 42px; bottom: 38px; color: #fff; max-width: 860px; }
.rdms-hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.rdms-hero-kicker::before { content: ""; width: 24px; height: 3px; border-radius: 10px; background: var(--rdms-accent); }
.rdms-hero-title { margin: 0; font-size: clamp(34px, 5vw, 62px); line-height: 1.03; letter-spacing: -0.045em; font-weight: 820; text-wrap: balance; }
.rdms-hero-secondary { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rdms-border); }
.rdms-hero-secondary article { padding: 21px 22px 22px 0; margin-right: 22px; border-top: 3px solid var(--rdms-ink); }
.rdms-hero-secondary article:last-child { margin-right: 0; }
.rdms-hero-secondary h3 { margin: 0; font-size: 17px; line-height: 1.35; letter-spacing: -.02em; font-weight: 750; }

/* Editorial sections */
.rdms-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.rdms-section-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 30px; line-height: 1; letter-spacing: -.035em; }
.rdms-section-title::before { content: ""; width: 5px; height: 29px; border-radius: 8px; background: var(--rdms-accent); }
.rdms-section-link { font-size: 13px; font-weight: 750; color: var(--rdms-accent); }
.rdms-editorial-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .95fr); gap: 34px; align-items: start; }
.rdms-feature-card .rdms-thumb { border-radius: 10px; overflow: hidden; background: var(--rdms-soft); aspect-ratio: 16 / 9; }
.rdms-feature-card .rdms-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.rdms-feature-card:hover .rdms-thumb img { transform: scale(1.018); }
.rdms-feature-card h3 { margin: 17px 0 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -.04em; font-weight: 800; }
.rdms-feature-card .rdms-excerpt { margin: 12px 0 0; color: var(--rdms-muted); font-size: 16px; }
.rdms-mini-list { border-top: 1px solid var(--rdms-border); }
.rdms-mini-card { display: grid; grid-template-columns: 116px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rdms-border); align-items: center; }
.rdms-mini-thumb { width: 116px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 7px; background: var(--rdms-soft); }
.rdms-mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rdms-mini-card h4 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.015em; font-weight: 750; }
.rdms-mini-card time { display: block; margin-top: 7px; color: #98A2B3; font-size: 11px; font-weight: 650; }

/* Archives */
.rdms-archive-head { padding: 52px 0 24px; border-bottom: 1px solid var(--rdms-border); }
.rdms-eyebrow { color: var(--rdms-accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.rdms-page-title { margin: 8px 0 0; font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.05em; }
.rdms-archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 26px; padding: 38px 0 64px; }
.rdms-archive-card .rdms-thumb { aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; background: var(--rdms-soft); }
.rdms-archive-card .rdms-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rdms-archive-card h2 { margin: 13px 0 7px; font-size: 22px; line-height: 1.18; letter-spacing: -.03em; }
.rdms-archive-card p { margin: 0; color: var(--rdms-muted); font-size: 14px; }
.rdms-pagination { margin: 0 0 70px; }
.rdms-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.rdms-pagination a, .rdms-pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--rdms-border); border-radius: 7px; font-weight: 700; }
.rdms-pagination .current { background: var(--rdms-accent); color: #fff; border-color: var(--rdms-accent); }

/* Single */
.rdms-single-head { padding: 54px 0 28px; }
.rdms-single-head-inner { width: min(calc(100% - 40px), 980px); margin-inline: auto; }
.rdms-single-category { color: var(--rdms-accent); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.rdms-single-title { margin: 10px 0 16px; font-size: clamp(40px, 6.2vw, 70px); line-height: 1.01; letter-spacing: -.055em; font-weight: 820; text-wrap: balance; }
.rdms-single-excerpt { max-width: 850px; margin: 0 0 20px; color: #475467; font-size: 20px; line-height: 1.5; }
.rdms-single-meta { color: #7A8493; font-size: 13px; font-weight: 600; }
.rdms-single-feature { width: min(calc(100% - 40px), 1120px); margin: 10px auto 42px; border-radius: 12px; overflow: hidden; background: var(--rdms-soft); }
.rdms-single-feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.rdms-article-content { width: min(calc(100% - 40px), var(--rdms-content)); margin-inline: auto; font-size: 18.5px; line-height: 1.82; }
.rdms-article-content > *:first-child { margin-top: 0; }
.rdms-article-content h2 { margin: 46px 0 14px; font-size: 31px; line-height: 1.15; letter-spacing: -.035em; }
.rdms-article-content h3 { margin: 34px 0 12px; font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.rdms-article-content p { margin: 0 0 24px; }
.rdms-article-content ul, .rdms-article-content ol { margin: 0 0 26px; padding-left: 26px; }
.rdms-article-content blockquote { margin: 36px 0; padding: 8px 0 8px 24px; border-left: 4px solid var(--rdms-accent); font-size: 22px; line-height: 1.45; font-weight: 650; }
.rdms-article-content a { color: var(--rdms-accent); text-decoration: underline; text-underline-offset: 3px; }
.rdms-article-content img { border-radius: 8px; }
.rdms-inline-ad { width: min(calc(100% - 40px), 980px); margin: 42px auto; }
.rdms-cta { width: min(calc(100% - 40px), var(--rdms-content)); margin: 42px auto 0; padding: 26px; border: 1px solid var(--rdms-border); border-radius: 12px; background: var(--rdms-soft); display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.rdms-cta strong { font-size: 20px; }
.rdms-cta a { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 8px; color: #fff; background: var(--rdms-accent); font-weight: 750; white-space: nowrap; }
.rdms-related { padding: 64px 0 74px; margin-top: 64px; border-top: 1px solid var(--rdms-border); }
.rdms-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rdms-related h2 { margin: 0 0 22px; font-size: 28px; letter-spacing: -.03em; }

/* Generic page */
.rdms-page { padding: 56px 0 76px; }
.rdms-page-inner { width: min(calc(100% - 40px), 900px); margin-inline: auto; }
.rdms-page h1 { margin: 0 0 28px; font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -.05em; }

/* Footer */
.rdms-footer { margin-top: 30px; border-top: 1px solid var(--rdms-border); background: #0E141B; color: #D6DCE3; }
.rdms-footer-main { padding: 56px 0 40px; display: grid; grid-template-columns: 1.25fr .8fr .9fr; gap: 54px; }
.rdms-footer-brand { color: #fff; font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.rdms-footer-brand span { color: #58B8D7; }
.rdms-footer p { color: #98A4B2; max-width: 390px; margin: 14px 0 0; font-size: 14px; }
.rdms-footer h3 { margin: 0 0 15px; color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.rdms-footer ul { list-style: none; padding: 0; margin: 0; }
.rdms-footer li + li { margin-top: 9px; }
.rdms-footer a:hover { color: #58B8D7; }
.rdms-footer-bottom { border-top: 1px solid rgba(255,255,255,.09); padding: 20px 0; display: flex; justify-content: space-between; gap: 20px; color: #8995A3; font-size: 12px; }
.rdms-footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* Empty states */
.rdms-empty { padding: 36px; border: 1px dashed var(--rdms-border); border-radius: 10px; color: var(--rdms-muted); background: var(--rdms-soft); }

/* Responsive */
@media (max-width: 980px) {
  .rdms-main-nav { display: none; position: absolute; left: 0; right: 0; top: 78px; background: #fff; border-bottom: 1px solid var(--rdms-border); }
  .rdms-main-nav.is-open { display: block; }
  .rdms-main-nav ul { padding: 18px 20px 24px; display: block; }
  .rdms-main-nav li + li { margin-top: 10px; }
  .rdms-main-nav a { display: block; padding: 9px 0; font-size: 17px; }
  .rdms-mobile-toggle { display: grid; }
  .rdms-header-inner { grid-template-columns: 1fr auto; }
  .rdms-header-actions { justify-self: end; }
  .rdms-hero-card, .rdms-hero-card img { min-height: 460px; }
  .rdms-hero-secondary { grid-template-columns: 1fr 1fr; }
  .rdms-hero-secondary article:nth-child(2n) { margin-right: 0; }
  .rdms-editorial-grid { grid-template-columns: 1fr; }
  .rdms-mini-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .rdms-archive-grid { grid-template-columns: 1fr 1fr; }
  .rdms-footer-main { grid-template-columns: 1fr 1fr; }
  .rdms-footer-main > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .admin-bar .rdms-site-header { top: 46px; }
  .rdms-container { width: min(calc(100% - 28px), var(--rdms-max)); }
  .rdms-header-inner { min-height: 68px; }
  .rdms-main-nav { top: 68px; }
  .rdms-wordmark { font-size: 22px; }
  .rdms-icon-btn { width: 40px; height: 40px; }
  .rdms-ad-wrap { padding: 14px 0; }
  .rdms-ad--wide img { aspect-ratio: auto; min-height: 92px; object-fit: cover; }
  .rdms-ad-grid { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
  .rdms-home-hero { padding: 18px 0 34px; }
  .rdms-hero-card, .rdms-hero-card img { min-height: 420px; }
  .rdms-hero-copy { left: 22px; right: 22px; bottom: 23px; }
  .rdms-hero-title { font-size: 36px; }
  .rdms-hero-secondary { grid-template-columns: 1fr; }
  .rdms-hero-secondary article { margin-right: 0; padding: 16px 0 17px; border-top-width: 1px; }
  .rdms-section { padding: 38px 0; }
  .rdms-section-head { margin-bottom: 18px; }
  .rdms-section-title { font-size: 26px; }
  .rdms-section-title::before { height: 25px; }
  .rdms-mini-list { display: block; }
  .rdms-mini-card { grid-template-columns: 98px 1fr; }
  .rdms-mini-thumb { width: 98px; }
  .rdms-archive-grid { grid-template-columns: 1fr; }
  .rdms-single-head { padding-top: 38px; }
  .rdms-single-title { font-size: 42px; }
  .rdms-single-excerpt { font-size: 18px; }
  .rdms-article-content { font-size: 17px; line-height: 1.78; }
  .rdms-cta { display: block; }
  .rdms-cta a { margin-top: 18px; width: 100%; }
  .rdms-related-grid { grid-template-columns: 1fr; }
  .rdms-footer-main { grid-template-columns: 1fr; gap: 32px; }
  .rdms-footer-main > :first-child { grid-column: auto; }
  .rdms-footer-bottom { display: block; }
  .rdms-footer-legal { margin-top: 10px; }
}
