/*
Theme Name: O que fazer em Guapimirim
Theme URI: https://oquefazeremguapimirim.com.br
Author: O que fazer em Guapimirim
Author URI: https://oquefazeremguapimirim.com.br
Description: Tema WordPress de turismo para Guapimirim/RJ. Portal de atrações, trilhas, cachoeiras, gastronomia, eventos e blog, com Custom Post Types, campos personalizados, menus nativos e design moderno inspirado na natureza da Serra dos Órgãos.
Version: 1.0.0
Requires at least: 5.6
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guapimirim
Tags: tourism, travel, custom-post-types, responsive-layout, custom-menu, featured-images, blog, translation-ready
*/

/* =========================================================
   1. Design tokens (mesma paleta do projeto original)
   ========================================================= */
:root {
  --background: 42 45% 95%;
  --foreground: 157 45% 20%;
  --card: 0 0% 100%;
  --card-foreground: 157 45% 20%;
  --primary: 157 42% 29%;
  --primary-foreground: 42 45% 95%;
  --secondary: 157 35% 65%;
  --secondary-foreground: 157 45% 20%;
  --accent: 203 42% 30%;
  --accent-foreground: 42 45% 95%;
  --muted: 42 45% 93%;
  --muted-foreground: 157 20% 40%;
  --tertiary: 25 28% 33%;
  --tertiary-foreground: 42 45% 95%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 210 40% 98%;
  --border: 157 20% 85%;
  --radius: 0.75rem;
  --header-h: 5rem;
  --container: 1400px;
}

/* =========================================================
   2. Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 .75rem;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.875rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: hsl(var(--primary)); text-decoration: none; transition: color .3s ease, opacity .3s ease; }
a:hover { color: hsl(var(--accent)); }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
figure { margin: 0 0 1.5rem; }
blockquote {
  margin: 0 0 1.5rem; padding: 1rem 1.5rem;
  border-left: 4px solid hsl(var(--primary));
  background: hsl(var(--muted)); border-radius: var(--radius);
}
table { width: 100%; border-collapse: collapse; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 9999; width: auto; height: auto;
  clip: auto; background: #fff; padding: .75rem 1rem; border-radius: var(--radius);
}

/* =========================================================
   3. Layout helpers
   ========================================================= */
.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: 1rem;
}
.section { padding: 4rem 0; }
.section--muted { background: hsl(var(--muted) / .45); }
.section--soft { background: linear-gradient(to bottom, hsl(var(--primary) / .06), hsl(var(--background))); }
.section-head { text-align: center; max-width: 46rem; margin: 0 auto 3rem; }
.section-head p { font-size: 1.125rem; color: hsl(var(--muted-foreground)); margin: 0; }
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.text-muted { color: hsl(var(--muted-foreground)); }

/* =========================================================
   4. Botões
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 2rem; border-radius: calc(var(--radius) - 2px);
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .3s ease, opacity .3s ease, background-color .3s ease, color .3s ease;
}
.btn:hover { transform: scale(1.04); }
.btn--primary {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
  color: hsl(var(--primary-foreground));
}
.btn--primary:hover { opacity: .9; color: hsl(var(--primary-foreground)); }
.btn--accent {
  background: linear-gradient(135deg, hsl(var(--accent)) 0%, hsl(var(--primary)) 100%);
  color: hsl(var(--accent-foreground));
}
.btn--accent:hover { color: hsl(var(--accent-foreground)); opacity: .9; }
.btn--outline-light {
  background: rgba(255,255,255,.1); border-color: #fff; color: #fff;
  backdrop-filter: blur(4px);
}
.btn--outline-light:hover { background: #fff; color: hsl(var(--primary)); }
.btn--outline {
  border-color: hsl(var(--border)); background: hsl(var(--card)); color: hsl(var(--foreground));
}
.btn--outline:hover { border-color: hsl(var(--primary)); color: hsl(var(--primary)); }
.btn--sm { padding: .6rem 1.25rem; font-size: .9rem; }
.btn--block { width: 100%; }

/* =========================================================
   5. Header / navegação
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: hsl(var(--background) / .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
  transition: box-shadow .3s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.site-branding { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.site-branding img, .site-branding .custom-logo { height: 3rem; width: auto; }
.site-title { font-size: 1.25rem; margin: 0; }
.site-title a { color: hsl(var(--foreground)); }
.site-description { margin: 0; font-size: .8rem; color: hsl(var(--muted-foreground)); }

.main-navigation ul {
  display: flex; align-items: center; gap: 2rem;
  list-style: none; margin: 0; padding: 0;
}
.main-navigation a {
  color: hsl(var(--foreground)); font-weight: 500; font-size: .95rem;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { color: hsl(var(--primary)); }
.main-navigation li { position: relative; }
.main-navigation .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 12rem;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: .5rem; flex-direction: column;
  gap: .25rem; box-shadow: 0 12px 30px rgba(0,0,0,.1);
}
.main-navigation li:hover > .sub-menu { display: flex; }
.main-navigation .sub-menu a { display: block; padding: .5rem .75rem; border-radius: .5rem; }
.main-navigation .sub-menu a:hover { background: hsl(var(--muted)); }

.menu-toggle {
  display: none; background: transparent; border: 0; cursor: pointer;
  padding: .5rem; color: hsl(var(--foreground)); border-radius: .5rem;
}
.menu-toggle:hover { background: hsl(var(--muted)); }
.menu-toggle svg { width: 1.5rem; height: 1.5rem; }

/* =========================================================
   6. Hero
   ========================================================= */
.hero {
  position: relative; min-height: 600px; height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.40), rgba(0,0,0,.30) 50%, rgba(0,0,0,.60));
}
.hero__content {
  position: relative; z-index: 2; text-align: center; color: #fff;
  animation: fadeInUp .8s ease both;
}
.hero__content h1 { color: #fff; margin-bottom: 1.5rem; }
.hero__content p {
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  max-width: 42rem; margin: 0 auto 2rem; color: rgba(255,255,255,.9);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 1.5rem; height: 2.5rem; border: 2px solid rgba(255,255,255,.5);
  border-radius: 999px; display: flex; align-items: flex-start; justify-content: center;
  padding: .5rem; animation: bounce 1.6s infinite;
}
.hero__scroll span { width: 4px; height: .75rem; background: rgba(255,255,255,.5); border-radius: 999px; }

.page-hero { padding: calc(var(--header-h) + 3rem) 0 4rem; text-align: center; }
.page-hero p { font-size: 1.125rem; color: hsl(var(--muted-foreground)); max-width: 48rem; margin: 0 auto; }

/* =========================================================
   7. Cards
   ========================================================= */
.card {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  overflow: hidden; display: block; height: 100%;
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,.12); }
.card__media { position: relative; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.1); }
.card__body { padding: 1.25rem; }
.card__body h3 { font-size: 1.25rem; margin-bottom: .5rem; color: hsl(var(--foreground)); transition: color .3s ease; }
.card:hover .card__body h3 { color: hsl(var(--primary)); }
.card__meta {
  display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem;
  color: hsl(var(--muted-foreground)); align-items: center;
}
.card__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.card__excerpt { color: hsl(var(--muted-foreground)); margin-bottom: 1rem; }

/* Categoria */
.card--categoria .card__media { height: 12rem; }
.card--categoria .card__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
}
.card--categoria .card__overlay {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 2; color: #fff;
  display: flex; align-items: center; gap: .5rem;
}
.card--categoria .card__overlay h3 { color: #fff; margin: 0; font-size: 1.25rem; }

/* Atração */
.card--atracao .card__media { height: 16rem; }
.card--atracao .card__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.2) 50%, transparent);
}
.card--atracao .card__overlay {
  position: absolute; z-index: 2; left: 1rem; right: 1rem; bottom: 1rem; color: #fff;
}
.card--atracao .card__overlay h3 { color: #fff; font-size: 1.5rem; margin-bottom: .5rem; }
.card--atracao .card__meta { color: rgba(255,255,255,.95); }

/* Blog */
.card--post .card__media { height: 12rem; }
.card--post .card__body { padding: 1.5rem; }
.card--post .card__excerpt {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; padding: .25rem .75rem;
  border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
}
.badge--top-right { position: absolute; top: 1rem; right: 1rem; z-index: 3; }
.badge--top-left { position: absolute; top: 1rem; left: 1rem; z-index: 3; }
.badge--primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.badge--secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.badge--accent { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.badge--destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }

/* Restaurante / evento cards com corpo em texto */
.card--info .card__media { height: 12rem; }
.card--info .info-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.card--info .info-list li {
  display: flex; align-items: center; gap: .5rem; font-size: .9rem;
  color: hsl(var(--muted-foreground));
}

/* =========================================================
   8. Instagram / mapa / newsletter
   ========================================================= */
.instagram-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.instagram-grid a { display: block; aspect-ratio: 1/1; overflow: hidden; border-radius: var(--radius); position: relative; }
.instagram-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.instagram-grid a:hover img { transform: scale(1.1); }

.map-embed {
  aspect-ratio: 16/9; width: 100%; max-width: 64rem; margin-inline: auto;
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.12);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.newsletter { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: 4rem 0; }
.newsletter h2 { color: hsl(var(--primary-foreground)); }
.newsletter__inner { max-width: 40rem; margin: 0 auto; text-align: center; }
.newsletter__form { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; margin-top: 1.5rem; }
.newsletter__form input[type="email"] {
  flex: 1 1 18rem; padding: .95rem 1.25rem; border-radius: calc(var(--radius) - 2px);
  border: 0; font-size: 1rem; background: #fff; color: hsl(var(--foreground));
}
.newsletter__note { font-size: .85rem; opacity: .8; margin-top: 1rem; }
.form-message { margin-top: 1rem; font-weight: 600; }

/* WhatsApp flutuante */
.whatsapp-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  width: 3.5rem; height: 3.5rem; border-radius: 999px; background: #25d366;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.25); transition: transform .3s ease;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }
.whatsapp-float svg { width: 1.75rem; height: 1.75rem; fill: currentColor; }

/* =========================================================
   9. Single / conteúdo
   ========================================================= */
.entry-hero { position: relative; min-height: 60vh; display: flex; align-items: flex-end; }
.entry-hero__bg { position: absolute; inset: 0; }
.entry-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.entry-hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,.25)); }
.entry-hero__content { position: relative; z-index: 2; color: #fff; padding: 3rem 0; width: 100%; }
.entry-hero__content h1 { color: #fff; }
.entry-hero__meta { display: flex; flex-wrap: wrap; gap: 1rem; color: rgba(255,255,255,.9); font-size: .95rem; }
.entry-hero__meta span { display: inline-flex; align-items: center; gap: .4rem; }

.entry-layout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 2.5rem; padding: 3rem 0; }
.entry-content { font-size: 1.05rem; line-height: 1.8; }
.entry-content h2 { margin-top: 2rem; }
.entry-content img { border-radius: var(--radius); }
.entry-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid hsl(var(--border)); }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }

.info-panel {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.info-panel + .info-panel { margin-top: 1.5rem; }
.info-panel h3 { font-size: 1.125rem; }
.info-panel dl { margin: 0; display: grid; gap: .85rem; }
.info-panel dt { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: hsl(var(--muted-foreground)); }
.info-panel dd { margin: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }
.gallery-grid img { border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; width: 100%; }

/* Arquivo / paginação / busca */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem;
  border-radius: calc(var(--radius) - 2px); border: 1px solid hsl(var(--border));
  background: hsl(var(--card)); font-weight: 600;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }

.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2.5rem; }
.filter-bar a { padding: .55rem 1.2rem; border-radius: 999px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); font-weight: 600; font-size: .9rem; }
.filter-bar a.is-active, .filter-bar a:hover { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }

.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] {
  flex: 1; padding: .8rem 1rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border)); background: hsl(var(--card)); font-size: 1rem;
  color: hsl(var(--foreground));
}

/* Formulário de contato */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; align-items: start; }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: .8rem 1rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  font-family: inherit; font-size: 1rem; color: hsl(var(--foreground));
}
.form-field input:focus, .form-field textarea:focus {
  outline: 2px solid hsl(var(--primary) / .4); border-color: hsl(var(--primary));
}
.form-field textarea { min-height: 9rem; resize: vertical; }

/* Widgets / rodapé */
.site-footer { background: hsl(var(--tertiary)); color: hsl(var(--tertiary-foreground)); }
.site-footer a { color: hsl(var(--tertiary-foreground) / .8); }
.site-footer a:hover { color: hsl(var(--tertiary-foreground)); }
.site-footer__inner { padding: 3rem 0; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer h3 { color: hsl(var(--tertiary-foreground)); font-size: 1.125rem; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.site-footer li { display: flex; align-items: center; gap: .5rem; }
.site-footer__brand img { height: 4rem; width: auto; margin-bottom: 1rem; }
.site-footer__brand p { color: hsl(var(--tertiary-foreground) / .8); max-width: 28rem; }
.site-footer__bottom {
  border-top: 1px solid hsl(var(--tertiary-foreground) / .2);
  padding: 1.5rem 0; text-align: center; color: hsl(var(--tertiary-foreground) / .6);
  font-size: .9rem;
}
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 1.1rem; margin-bottom: .75rem; }

/* Ícones inline */
.icon { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Animações */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -25%); } }
.reveal { opacity: 0; }
.reveal.is-visible { animation: fadeInUp .6s ease forwards; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}

/* =========================================================
   10. Responsivo
   ========================================================= */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .entry-layout { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: inline-flex; }
  .main-navigation {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: hsl(var(--background)); border-bottom: 1px solid hsl(var(--border));
    display: none; padding: 1rem;
    box-shadow: 0 20px 30px rgba(0,0,0,.08);
  }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .main-navigation a { display: block; padding: .75rem .5rem; }
  .main-navigation .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding-left: 1rem; }
}
@media (max-width: 768px) {
  .section { padding: 3rem 0; }
  .grid--3, .grid--2, .contact-grid { grid-template-columns: 1fr; }
  .instagram-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__inner { grid-template-columns: 1fr; }
  .hero { min-height: 560px; }
  .hero__actions .btn { width: 100%; }
  .page-hero { padding-top: calc(var(--header-h) + 2rem); }
}
@media (max-width: 480px) {
  .grid--4 { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .newsletter__form { flex-direction: column; }
}

/* Alinhamentos padrão do WordPress */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption-text, .wp-block-image figcaption { font-size: .85rem; color: hsl(var(--muted-foreground)); text-align: center; }
.sticky .card { border-color: hsl(var(--primary)); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
