/*
Theme Name: O Quintal
Theme URI: https://oquintal.com.br
Author: O Quintal - Jornalismo Digital
Author URI: https://oquintal.com.br
Description: Tema personalizado para o portal de jornalismo digital O Quintal. Design elegante com paleta azul profundo e laranja vibrante, focado em cultura, esporte e causas sociais.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oquintal
Tags: news, magazine, custom-logo, custom-menu, featured-images, translation-ready

Onde a notícia encontra as pessoas.
*/

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #1a2744;
  --navy-light: #2a3a5c;
  --navy-dark: #0f1a2e;
  --orange: #e8601c;
  --orange-light: #f47a3e;
  --orange-dark: #c44e15;
  --bg: #fafafa;
  --bg-warm: #fdf8f4;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.3;
}

h1 { font-size: 2.25rem; font-weight: 900; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 600; }

p { margin-bottom: 1rem; }

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
  background: var(--navy-dark);
  color: var(--white);
  padding: 0.5rem 0;
  font-size: 0.75rem;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: var(--white);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.top-bar a:hover { opacity: 1; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.site-logo img {
  height: 48px;
  width: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.main-nav a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s var(--ease-out);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--orange);
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: none;
    padding: 1rem;
  }
  .main-nav.active { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { display: block; padding: 0.75rem 1rem; }
}

/* ============================================
   HERO / HIGHLIGHTS
   ============================================ */
.hero-section {
  padding: 2rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.hero-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 380px;
}

.hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.7s var(--ease-out);
}

.hero-main:hover img { transform: scale(1.03); }

.hero-main .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.hero-main .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  color: var(--white);
}

.hero-main .content h2 {
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.hero-main .content p {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-side-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex: 1;
  min-height: 180px;
}

.hero-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.5s var(--ease-out);
}

.hero-side-item:hover img { transform: scale(1.05); }

.hero-side-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.hero-side-item .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: var(--white);
}

.hero-side-item .content h3 {
  color: var(--white);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { min-height: 250px; }
}

/* ============================================
   BADGES / CATEGORIES
   ============================================ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-geral { background: var(--navy); color: var(--white); }
.badge-cultura { background: #7c3aed; color: var(--white); }
.badge-esporte { background: #16a34a; color: var(--white); }
.badge-social { background: var(--orange); color: var(--white); }
.badge-politica { background: #dc2626; color: var(--white); }
.badge-policia { background: #374151; color: var(--white); }
.badge-economia { background: #2563eb; color: var(--white); }
.badge-educacao { background: #0d9488; color: var(--white); }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.card:hover .card-image img { transform: scale(1.05); }

.card-body {
  padding: 1.25rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover { color: var(--orange); }

.card-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.section-header h2 {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-header h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.25rem;
  background: var(--orange);
  border-radius: 2px;
}

.section-header a {
  font-size: 0.8rem;
  color: var(--orange);
  font-weight: 500;
}

.section-header a:hover { text-decoration: underline; }

/* ============================================
   CAROUSEL
   ============================================ */
.carousel-wrapper {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-track .card {
  flex-shrink: 0;
  width: 280px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--navy);
  transition: all 0.2s;
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

.carousel-btn.prev { left: -12px; }
.carousel-btn.next { right: -12px; }

/* ============================================
   EVENTS CALENDAR
   ============================================ */
.events-section { padding: 3rem 0; }

.event-card {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s;
}

.event-card:hover { box-shadow: var(--shadow-lg); }

.event-date-box {
  background: var(--orange);
  color: var(--white);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 70px;
}

.event-date-box .day { font-size: 1.75rem; font-weight: 700; }
.event-date-box .month { font-size: 0.7rem; text-transform: uppercase; }

.event-info { padding: 1rem 1.25rem; flex: 1; }
.event-info h4 { margin-bottom: 0.25rem; font-size: 0.95rem; }
.event-info p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }

.mini-calendar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.mini-calendar .cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.mini-calendar .cal-header h4 { font-size: 0.9rem; }

.mini-calendar .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.mini-calendar .cal-day-name {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.25rem;
}

.mini-calendar .cal-day {
  font-size: 0.75rem;
  padding: 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.mini-calendar .cal-day:hover { background: var(--bg-warm); }
.mini-calendar .cal-day.has-event { font-weight: 600; color: var(--navy); }
.mini-calendar .cal-day.has-event::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
  margin: 2px auto 0;
}
.mini-calendar .cal-day.today { background: var(--navy); color: var(--white); border-radius: 50%; }

/* ============================================
   CLASSIFIEDS
   ============================================ */
.classified-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--orange);
  transition: box-shadow 0.3s;
}

.classified-card:hover { box-shadow: var(--shadow-lg); }
.classified-card h4 { margin-bottom: 0.5rem; }
.classified-card p { font-size: 0.85rem; color: var(--text-muted); }
.classified-card .contact { font-size: 0.75rem; color: var(--orange); margin-top: 0.75rem; font-weight: 500; }

/* ============================================
   CAMPAIGNS / SOCIAL
   ============================================ */
.campaign-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out);
}

.campaign-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.campaign-card .campaign-header {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  padding: 1.5rem;
}

.campaign-card .campaign-header h3 { color: var(--white); margin-bottom: 0.25rem; }
.campaign-card .campaign-body { padding: 1.25rem; }
.campaign-card .campaign-body p { font-size: 0.85rem; color: var(--text-muted); }

.campaign-type-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(255,255,255,0.2);
  color: var(--white);
}

/* ============================================
   SUBSCRIBER AREA
   ============================================ */
.subscriber-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.subscriber-hero h1 { color: var(--white); margin-bottom: 1rem; }
.subscriber-hero p { color: rgba(255,255,255,0.7); max-width: 500px; margin: 0 auto 2rem; }

.btn-subscribe {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn-subscribe:hover { background: var(--orange-dark); }

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 3rem 0;
}

.benefit-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.benefit-card .icon {
  width: 48px;
  height: 48px;
  background: var(--bg-warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--orange);
  font-size: 1.5rem;
}

.benefit-card h4 { margin-bottom: 0.5rem; font-size: 0.95rem; }
.benefit-card p { font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 768px) {
  .benefits-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.footer-col h4 {
  color: var(--orange);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   SINGLE ARTICLE
   ============================================ */
.article-header {
  padding: 2rem 0;
}

.article-header .badge { margin-bottom: 1rem; }
.article-header h1 { margin-bottom: 1rem; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0;
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content h2, .article-content h3 { margin-top: 2rem; margin-bottom: 1rem; }
.article-content p { margin-bottom: 1.25rem; }
.article-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-content blockquote {
  border-left: 4px solid var(--orange);
  padding: 1rem 1.5rem;
  background: var(--bg-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
}

/* ============================================
   INSTITUTIONAL PAGES
   ============================================ */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0;
}

.page-hero h1 { color: var(--white); }
.page-hero .breadcrumb { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-bottom: 0.5rem; }
.page-hero .breadcrumb a { color: rgba(255,255,255,0.6); }
.page-hero .breadcrumb a:hover { color: var(--white); }

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page-content h2 { margin-top: 2rem; margin-bottom: 0.75rem; }
.page-content h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.page-content ul, .page-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.page-content li { margin-bottom: 0.5rem; font-size: 0.95rem; }
.page-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.page-content th, .page-content td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.page-content th { background: var(--bg-warm); font-weight: 600; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s var(--ease-out);
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); }

.btn-secondary { background: var(--navy); color: var(--white); }
.btn-secondary:hover { background: var(--navy-light); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 96, 28, 0.1);
}

textarea.form-control { min-height: 120px; resize: vertical; }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.pagination a:hover { border-color: var(--orange); color: var(--orange); }
.pagination .current { background: var(--orange); color: var(--white); border-color: var(--orange); }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar .widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar .widget-title {
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-orange { color: var(--orange); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
