/*
 * Tema DecifraOfertas - CSS Principal
 * Design moderno focado em conversão e Core Web Vitals
 */

:root {
  /* Colors */
  --do-brand: #2563eb;       /* Tailwind blue-600 */
  --do-brand-dark: #1d4ed8;  /* Tailwind blue-700 */
  --do-brand-light: #eff6ff; /* Tailwind blue-50 */
  
  --do-accent: #f59e0b;      /* Amazon-like Orange for CTA */
  --do-accent-hover: #d97706;

  --do-text-main: #1e293b;   /* Slate-800 */
  --do-text-muted: #64748b;  /* Slate-500 */
  --do-bg: #f8fafc;          /* Slate-50 - Background */
  --do-surface: #ffffff;     /* White card bg */
  
  --do-border: #e2e8f0;

  /* Typography */
  --do-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --do-font-heading: 'Poppins', var(--do-font-sans);
  
  /* Layout */
  --do-max-width: 1200px;
  --do-radius: 12px;
  --do-radius-sm: 8px;
  
  /* Shadows */
  --do-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --do-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --do-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Reset Genérico */
*, *::before, *::after {
  box-sizing: border-box;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--do-font-heading);
  margin-top: 0;
  line-height: 1.2;
  color: var(--do-text-main);
}

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

a:hover {
  color: var(--do-brand-dark);
}

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

.wrapper {
  max-width: var(--do-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Screen Reader Text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* --- Header --- */
.decifra-header {
  background: var(--do-surface);
  border-bottom: 1px solid var(--do-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--do-shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.site-branding .site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-branding a {
  color: var(--do-text-main);
}

.decifra-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.decifra-nav a {
  color: var(--do-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.decifra-nav a:hover,
.decifra-nav .current-menu-item > a {
  color: var(--do-brand);
}

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

.icon-bar {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--do-text-main);
  margin: 5px 0;
  border-radius: 3px;
  transition: 0.3s;
}

/* --- Hero Section --- */
.decifra-hero {
  background: linear-gradient(135deg, var(--do-brand-light) 0%, var(--do-surface) 100%);
  padding: 80px 0;
  text-align: center;
  border-bottom: 1px solid var(--do-border);
}

.hero-inner {
  max-width: 800px;
}

.hero-tag {
  display: inline-block;
  background: var(--do-brand);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-title strong {
  color: var(--do-brand);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--do-text-muted);
  margin-bottom: 2.5rem;
}

.hero-search-form {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
}

.hero-search-form input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 1px solid var(--do-border);
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  box-shadow: var(--do-shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hero-search-form input:focus {
  outline: none;
  border-color: var(--do-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.hero-search-form button {
  background: var(--do-brand);
  color: #fff;
  border: none;
  padding: 0 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.hero-search-form button:hover {
  background: var(--do-brand-dark);
  transform: translateY(-1px);
}

/* --- Card Grid --- */
.decifra-latest {
  padding: 60px 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 4px;
  background: var(--do-brand);
  border-radius: 2px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.decifra-card {
  background: var(--do-surface);
  border-radius: var(--do-radius);
  overflow: hidden;
  box-shadow: var(--do-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.card-image-link {
  display: block;
  height: 220px;
  overflow: hidden;
}

.card-image, .placeholder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.placeholder-img {
  background: #cbd5e1;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--do-brand);
  margin-bottom: 10px;
  display: block;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card-title a {
  color: var(--do-text-main);
}

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

.card-excerpt {
  color: var(--do-text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex: 1;
}

.card-btn-read {
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
}

/* --- Single Post (Reviews) --- */
.single-content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 40px 0;
}

@media (max-width: 900px) {
  .single-content-wrap {
    grid-template-columns: 1fr;
  }
}

.entry-header-single {
  margin-bottom: 30px;
}

.entry-title-single {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

.entry-meta {
  color: var(--do-text-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #334155;
}

.entry-content h2 {
  font-size: 1.8rem;
  margin-top: 40px;
  margin-bottom: 20px;
}

.entry-content img {
  border-radius: var(--do-radius);
  margin: 30px 0;
}

/* Affiliate Styling inside Content */
.product-cta-box {
  background: var(--do-surface);
  border: 1px solid var(--do-border);
  border-radius: var(--do-radius);
  padding: 24px;
  margin: 30px 0;
  box-shadow: var(--do-shadow-sm);
  border-left: 5px solid var(--do-brand);
}

.btn-affiliate {
  display: inline-block;
  background: var(--do-accent);
  color: #fff !important;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--do-radius-sm);
  text-align: center;
  transition: background 0.2s;
  box-shadow: var(--do-shadow-sm);
  text-decoration: none;
}

.btn-affiliate:hover {
  background: var(--do-accent-hover);
}

/* --- Footer --- */
.decifra-footer {
  background: var(--do-text-main);
  color: #94a3b8;
  padding: 60px 0 20px;
  margin-top: 60px;
}

.footer-widgets {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
  padding-bottom: 40px;
  margin-bottom: 20px;
}

.footer-title {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.footer-desc {
  max-width: 300px;
  font-size: 0.95rem;
}

.site-info {
  text-align: center;
  font-size: 0.85rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .decifra-nav ul {
    display: none; /* Hide menu by default on mobile. Toggled via JS */
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--do-surface);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: var(--do-shadow);
    border-top: 1px solid var(--do-border);
  }
  
  .decifra-nav.toggled ul {
    display: flex;
  }

  .footer-widgets {
    flex-direction: column;
    gap: 30px;
  }
  
  .hero-search-form {
    flex-direction: column;
  }
  
  .hero-search-form button {
    padding: 1rem;
  }
}
