/* ==========================================================
   GUAPACHO THEME - APP.CSS UNIFICADO
   Incluye: fonts.css + base.css + components.css + pages.css
========================================================== */

/* ==========================================================
   1) FUENTES
========================================================== */
@font-face {
  font-family: "InterVariable";
  src: url("../fonts/Inter-Variable.woff2") format("woff2-variations"),
       url("../fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "InterVariable", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-green: #16a34a;
  --color-green-dark: #15803d;
  --color-blue: #2563eb;
  --color-border: #e5e7eb;
  --radius-md: 0.5rem;
  --radius-lg: 0.9rem;
}

/* ==========================================================
   2) BASE GLOBAL
========================================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background: #ffffff;
}

img,
iframe,
video {
  max-width: 100%;
}

/* ==========================================================
   3) CONTENIDO DE ENTRADAS
========================================================== */
.post-content {
  font-size: 1.25rem;
  line-height: 2rem;
  color: #1a202c;
}

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

.post-content a {
  color: var(--color-green);
  font-weight: 600;
  text-decoration: underline;
}

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

/* Imagen destacada del post */
.post-thumbnail img,
.single-post .wp-post-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Videos embebidos responsive */
.single-post .wp-block-embed,
.single-post .wp-block-embed__wrapper {
  width: 100%;
}

.single-post .wp-block-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 400px;
  border-radius: 12px;
  display: block;
}

@media (max-width: 640px) {
  .post-content {
    font-size: 1.08rem;
    line-height: 1.85rem;
  }

  .single-post .wp-block-embed iframe {
    min-height: auto;
  }
}

/* ==========================================================
   4) PÁGINAS ESTÁTICAS
========================================================== */
.page article {
  max-width: 768px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.9;
  color: #1a202c;
}

.page article h1,
.page article h2,
.page article h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 800;
  color: var(--color-text);
}

.page article h1 { font-size: 2rem; }
.page article h2 { font-size: 1.5rem; }
.page article h3 { font-size: 1.25rem; }

.page article p {
  margin-bottom: 1.5rem;
}

.page article a {
  color: var(--color-green);
  font-weight: 600;
  text-decoration: underline;
}

.page article ul,
.page article ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.page article ul li,
.page article ol li {
  margin-bottom: 0.75rem;
}

/* ==========================================================
   5) BLOCKQUOTE EDITORIAL
========================================================== */
.prose blockquote p::before,
.prose blockquote p::after {
  content: none !important;
}

.prose blockquote {
  border-left: 4px solid #22c55e;
  background-color: #f9fafb;
  padding: 1rem;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  font-size: 1.125rem;
  font-style: italic;
  color: #1f2937;
}

/* ==========================================================
   6) GALERÍA ESTILO PINTEREST
========================================================== */
.prose .wp-block-gallery {
  column-count: 2;
  column-gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .prose .wp-block-gallery {
    column-count: 3;
  }
}

.prose .wp-block-gallery figure {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.prose .wp-block-gallery img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.prose .wp-block-gallery img:hover {
  transform: scale(1.03);
}

.prose .wp-block-gallery a {
  display: block;
  cursor: zoom-in;
}

.prose .wp-block-gallery a:focus {
  outline: none;
}

/* ==========================================================
   7) COMENTARIOS
========================================================== */
.comment-author .avatar {
  border-radius: 9999px;
  margin-right: 0.75rem;
}

.comment-content {
  font-size: 1rem;
  line-height: 1.75;
  color: #1f2937;
}

.comment-author {
  font-weight: 600;
  color: var(--color-green);
}

/* ==========================================================
   8) CONTACT FORM 7
========================================================== */
.wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wpcf7-form p {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.wpcf7-form label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 1rem;
  line-height: 1.5;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form textarea:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.wpcf7-form textarea {
  resize: vertical;
  min-height: 140px;
}

.wpcf7-submit {
  background: var(--color-green);
  color: #ffffff;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border: 0;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.wpcf7-submit:hover {
  background: var(--color-green-dark);
}

.wpcf7-response-output {
  margin-top: 1rem;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  border: 1px solid;
  border-radius: 0.375rem;
}

.wpcf7-mail-sent-ok,
.wpcf7 form.sent .wpcf7-response-output {
  background: #dcfce7;
  border-color: #4ade80;
  color: #166534;
}

.wpcf7-validation-errors,
.wpcf7-not-valid-tip,
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

.wpcf7-not-valid-tip {
  display: block;
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.875rem;
}

/* ==========================================================
   9) PAGINACIÓN
========================================================== */
.guapacho-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.guapacho-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.guapacho-pagination ul.page-numbers li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guapacho-pagination ul.page-numbers a,
.guapacho-pagination ul.page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  background: #ffffff;
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.guapacho-pagination ul.page-numbers a:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.guapacho-pagination ul.page-numbers .current {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #ffffff;
}

.guapacho-pagination ul.page-numbers .dots {
  border: none;
  background: transparent;
  min-width: auto;
  height: auto;
  padding: 0 6px;
  color: var(--color-muted);
}

.guapacho-pagination ul.page-numbers .next,
.guapacho-pagination ul.page-numbers .prev {
  padding: 0 16px;
}

/* ==========================================================
   10) TÍTULOS DE SECCIÓN
========================================================== */
.guapacho-section-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.guapacho-section-divider {
  width: 72px;
  height: 4px;
  background: var(--color-blue);
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

/* ==========================================================
   11) TARJETAS / CARDS
========================================================== */
.guapacho-card-title {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0.35rem 0 0.5rem;
}

.guapacho-card-meta {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.guapacho-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
}

/* ==========================================================
   12) MINIATURAS
========================================================== */
.guapacho-thumb img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* ==========================================================
   13) TAG CLOUD
========================================================== */
.guapacho-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  line-height: 1.8;
}

.guapacho-tags-cloud a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.guapacho-tags-cloud a:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ==========================================================
   14) PÁGINA DE ARCHIVOS
========================================================== */
.guapacho-archive-wrap {
  max-width: 72rem;
  margin: 0 auto;
}

.guapacho-archive-intro {
  max-width: 42rem;
}

.guapacho-archive-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guapacho-archive-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.guapacho-featured-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .guapacho-featured-cats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.guapacho-featured-cat {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  padding: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guapacho-featured-cat:hover {
  border-color: #60a5fa;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.10);
}

.guapacho-featured-cat-title {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.guapacho-featured-cat-count {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-blue);
}

/* Calendario */
#wp-calendar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  color: #374151;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #ffffff;
}

#wp-calendar caption {
  caption-side: top;
  padding: 14px 0 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text);
  text-transform: capitalize;
}

#wp-calendar th,
#wp-calendar td {
  text-align: center;
  padding: 12px 10px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

#wp-calendar th:last-child,
#wp-calendar td:last-child {
  border-right: none;
}

#wp-calendar tr:last-child td {
  border-bottom: none;
}

#wp-calendar th {
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
  font-size: 13px;
}

#wp-calendar td {
  color: #334155;
  background: #ffffff;
}

#wp-calendar td.pad {
  background: #f9fafb;
}

#wp-calendar td a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--color-blue);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

#wp-calendar td a:hover {
  background: var(--color-blue);
  color: #ffffff;
}

#wp-calendar tfoot {
  display: none;
}

.guapacho-archive-months {
  border-top: 1px solid var(--color-border);
  padding-top: 18px;
  margin-top: 18px;
}

.guapacho-archive-months-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.guapacho-archive-months-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guapacho-archive-month-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.guapacho-archive-month-link:hover {
  background: #dbeafe;
  color: #1d4ed8;
}
