/*
Theme Name: VERIDIA Farm Blog
Theme URI: https://blog.veridiafarm.com
Author: Veridia Farm
Author URI: https://veridia.farm
Description: Tema personalizado para el blog de VERIDIA Farm. Replica el diseno de la web principal.
Version: 1.0.0
Text Domain: veridia
*/

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

:root {
  --veridia-green: #2f5d50;
  --veridia-green-dark: #1e3d35;
  --veridia-green-light: #3d7a68;
  --veridia-teal: #278a73;
  --veridia-cream: #f8f7f4;
  --veridia-cream-dark: #f0eeeb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --radius: 0.5rem;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.06);
  --max-width: 1200px;
  --content-width: 700px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--veridia-green);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--veridia-green-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--veridia-green);
  line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo a {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--veridia-green);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-logo .logo-accent {
  font-weight: 400;
  color: var(--veridia-green-light);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav .menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.header-nav .menu li a {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #2B3D38;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.header-nav .menu li a:hover,
.header-nav .menu li.current-menu-item a,
.header-nav .menu li.current_page_item a {
  color: var(--veridia-green);
  background: rgba(47,93,80,0.08);
}

.back-link {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--veridia-green);
}

.btn-contact {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff !important;
  background: var(--veridia-green);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  transition: background 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-contact:hover {
  background: var(--veridia-green-light);
  color: #fff !important;
}

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--veridia-green);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== MAIN CONTENT ===== */
.site-main {
  min-height: 60vh;
}

.section-cream {
  background: var(--veridia-cream);
}

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

/* ===== BLOG LISTING (index) ===== */
.blog-header {
  padding: 3rem 0 2rem;
  text-align: center;
}

.blog-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.blog-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto;
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 1rem 0 4rem;
}

.post-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

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

.post-card__image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.post-card__image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--veridia-cream) 0%, var(--veridia-cream-dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--veridia-green);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.post-card__image-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.post-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.post-card__title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.post-card__title a {
  color: var(--text-primary);
  transition: color 0.2s;
}

.post-card__title a:hover {
  color: var(--veridia-green);
}

.post-card__excerpt {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-badge {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--veridia-green);
  background: rgba(47,93,80,0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tag-badge:hover {
  background: rgba(47,93,80,0.15);
}

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

.pagination .page-numbers {
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
}

.pagination .page-numbers:hover {
  background: var(--veridia-cream);
  color: var(--veridia-green);
}

.pagination .page-numbers.current {
  background: var(--veridia-green);
  color: #fff;
}

/* ===== SINGLE POST ===== */
.single-hero {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 0;
}

.single-content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.single-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--veridia-cream-dark);
}

.single-meta .tag-badge {
  font-size: 0.65rem;
}

/* Post content typography */
.post-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--veridia-green);
}

.post-content h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--veridia-teal);
  background: var(--veridia-cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.post-content th {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  text-align: left;
  background: var(--veridia-cream);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--veridia-cream-dark);
  color: var(--veridia-green);
}

.post-content td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--veridia-cream-dark);
}

.post-content pre {
  background: var(--veridia-green-dark);
  color: #e5e7eb;
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.post-content code {
  font-family: "Fira Code", monospace;
  font-size: 0.9em;
  background: var(--veridia-cream);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content a {
  color: var(--veridia-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: var(--veridia-green);
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--veridia-green);
  margin-top: 3rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  background: var(--veridia-cream);
  transition: background 0.2s;
}

.post-back-link:hover {
  background: var(--veridia-cream-dark);
  color: var(--veridia-green);
}

/* ===== PAGE ===== */
.page-content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--veridia-green-dark);
  color: rgba(255,255,255,0.85);
  padding: 3.5rem 1.25rem 2rem;
  text-align: center;
}

.footer-logo {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.footer-logo .logo-accent {
  font-weight: 400;
  color: var(--veridia-teal);
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.footer-contact a {
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-social {
  margin-bottom: 2rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  transition: background 0.2s;
}

.footer-social a:hover {
  background: rgba(255,255,255,0.2);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
}

/* ===== NO POSTS ===== */
.no-posts {
  text-align: center;
  padding: 4rem 1.25rem;
}

.no-posts h2 {
  margin-bottom: 0.5rem;
}

.no-posts p {
  color: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .single-hero {
    max-height: 450px;
  }

  .single-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  h1 { font-size: 2.5rem; }

  .header-inner {
    height: 72px;
  }

  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .single-hero {
    max-height: 500px;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .single-title {
    font-size: 2.5rem;
  }

  .single-content-wrap,
  .page-content-wrap {
    padding-top: 3rem;
  }

  .blog-header {
    padding: 4rem 0 2.5rem;
  }

  .blog-header h1 {
    font-size: 2.5rem;
  }
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--veridia-cream-dark);
    padding: 1rem 1.25rem;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav .menu {
    flex-direction: column;
    width: 100%;
  }

  .header-nav .menu li {
    width: 100%;
  }

  .header-nav .menu li a {
    display: block;
    padding: 0.6rem 0.75rem;
  }

  .back-link-desktop {
    display: none;
  }

  .back-link-mobile {
    display: block;
    padding: 0.6rem 0;
    border-top: 1px solid var(--veridia-cream-dark);
    margin-top: 0.5rem;
  }
}

@media (min-width: 768px) {
  .back-link-mobile {
    display: none;
  }
}

/* ===== WP ALIGNMENT CLASSES ===== */
.aligncenter {
  display: block;
  margin: 1.5rem auto;
}

.alignleft {
  float: left;
  margin: 0.5rem 1.5rem 0.5rem 0;
}

.alignright {
  float: right;
  margin: 0.5rem 0 0.5rem 1.5rem;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.5rem;
}
