/*
Theme Name: Abuelo Seguros
Theme URI: https://abueloseguros.es
Description: Tema personalizado para el blog de Abuelo Seguros
Author: Marcos Pereira
Version: 1.0
Template: twentytwentyfive
*/

/* ===== VARIABLES ===== */
:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --blue: #1e3a8a;
  --blue2: #2563eb;
  --tp: #f0fdfa;
  --tl: #ccfbf1;
  --g9: #0f172a;
  --g8: #1e293b;
  --g7: #334155;
  --g5: #64748b;
  --g2: #e2e8f0;
  --fh: 'Lora', Georgia, serif;
  --fb: 'DM Sans', system-ui, sans-serif;
}

/* ===== FUENTES ===== */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ===== BODY ===== */
body {
  font-family: var(--fb) !important;
  color: var(--g7) !important;
  background: #eef1f7 !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
  -webkit-font-smoothing: antialiased !important;
}

/* ===== HEADER ===== */
.wp-block-template-part header,
header.wp-block-template-part {
  background: rgba(255,255,255,0.97) !important;
  border-bottom: 1px solid var(--g2) !important;
  box-shadow: 0 1px 12px rgba(15,23,42,0.06) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 99 !important;
}

/* Logo / Site title */
.wp-block-site-title a,
.wp-block-site-title {
  font-family: var(--fh) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--blue) !important;
  text-decoration: none !important;
}

/* ===== BARRA AFILIADO (banner superior) ===== */
body::before {
  content: 'ℹ️  Como Afiliado de Amazon, gano comisiones sin coste extra para ti. Solo recomiendo lo que funciona.';
  display: block;
  background: linear-gradient(90deg, var(--teal), var(--blue2));
  color: rgba(255,255,255,0.93);
  font-size: 12.5px;
  padding: 9px 24px;
  text-align: center;
  font-family: var(--fb);
}

/* ===== NAVEGACIÓN ===== */
.wp-block-navigation a {
  font-family: var(--fb) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--g7) !important;
  padding: 7px 11px !important;
  border-radius: 7px !important;
  transition: all 0.2s !important;
  text-decoration: none !important;
}

.wp-block-navigation a:hover {
  background: var(--tp) !important;
  color: var(--teal) !important;
  font-weight: 600 !important;
}

/* Botón inicio destacado */
.wp-block-navigation a[href="https://abueloseguros.es"] {
  background: var(--teal) !important;
  color: white !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 7px 14px !important;
}

.wp-block-navigation a[href="https://abueloseguros.es"]:hover {
  background: var(--teal-dark) !important;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.wp-site-blocks {
  max-width: 100% !important;
}

.entry-content,
.wp-block-post-content {
  font-family: var(--fb) !important;
  color: var(--g7) !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
  max-width: 760px !important;
  margin: 0 auto !important;
}

/* ===== TÍTULOS ===== */
h1, h2, h3, h4, h5, h6,
.wp-block-post-title {
  font-family: var(--fh) !important;
  color: var(--g9) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

.wp-block-post-title a {
  color: var(--g9) !important;
  text-decoration: none !important;
}

.wp-block-post-title a:hover {
  color: var(--teal) !important;
}

/* ===== LISTA DE ENTRADAS (blog index) ===== */
.wp-block-query {
  max-width: 860px !important;
  margin: 0 auto !important;
  padding: 32px 24px !important;
}

.wp-block-post {
  background: white !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 24px rgba(15,23,42,0.07) !important;
  padding: 28px 32px !important;
  margin-bottom: 24px !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.wp-block-post:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 32px rgba(15,23,42,0.12) !important;
}

/* ===== ENTRADAS INDIVIDUALES ===== */
.wp-block-post-content p {
  margin-bottom: 1.2em !important;
  color: var(--g7) !important;
}

/* ===== HERO del blog ===== */
.wp-block-query-title,
h1.wp-block-query-title {
  font-family: var(--fh) !important;
  font-size: clamp(28px, 5vw, 42px) !important;
  font-weight: 700 !important;
  color: white !important;
  text-align: center !important;
}

/* ===== PÁGINA del blog (fondo hero) ===== */
.wp-block-template-part[data-slug="header"] + * {
  background: linear-gradient(135deg, var(--blue), var(--teal)) !important;
  padding: 48px 24px !important;
  text-align: center !important;
  color: white !important;
}

/* ===== LINKS ===== */
a {
  color: var(--teal) !important;
}

a:hover {
  color: var(--teal-dark) !important;
}

/* ===== BOTONES ===== */
.wp-block-button__link,
.wp-element-button {
  background: var(--teal) !important;
  color: white !important;
  border-radius: 8px !important;
  font-family: var(--fb) !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  border: none !important;
  transition: all 0.2s !important;
}

.wp-block-button__link:hover {
  background: var(--teal-dark) !important;
}

/* ===== READ MORE ===== */
.wp-block-post-excerpt__more-link {
  color: var(--teal) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-decoration: none !important;
  border: 2px solid var(--teal) !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  display: inline-block !important;
  margin-top: 8px !important;
  transition: all 0.2s !important;
}

.wp-block-post-excerpt__more-link:hover {
  background: var(--teal) !important;
  color: white !important;
}

/* ===== FECHA Y META ===== */
.wp-block-post-date,
.wp-block-post-date time {
  color: var(--g5) !important;
  font-size: 13px !important;
  font-family: var(--fb) !important;
}

/* ===== FOOTER ===== */
footer.wp-block-template-part,
.wp-block-template-part footer {
  background: #0f1e38 !important;
  color: rgba(255,255,255,0.55) !important;
  border-top: 3px solid var(--teal) !important;
  padding: 28px 24px !important;
  text-align: center !important;
  font-size: 13px !important;
  font-family: var(--fb) !important;
}

footer a {
  color: rgba(255,255,255,0.4) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .wp-block-post {
    padding: 20px 18px !important;
  }
  
  .wp-block-query {
    padding: 20px 16px !important;
  }
}
/* ===================================
   MOBILE FIX DEFINITIVO
   =================================== */
@media (max-width: 768px) {

  .is-layout-constrained,
  .is-layout-constrained > *,
  .wp-block-post-template,
  .wp-block-post-template > li,
  .wp-block-post,
  .wp-block-post > *,
  .wp-block-post-content,
  .wp-block-post-content > *,
  .entry-content,
  .entry-content > * {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
  }

  .wp-block-query {
    padding: 0 8px !important;
  }

  .wp-block-post {
    padding: 18px 16px !important;
    margin-bottom: 12px !important;
    border-radius: 10px !important;
  }

  .wp-block-post-content,
  .entry-content {
    padding: 0 16px !important;
  }

  .wp-block-post-title,
  .wp-block-post-title a {
    font-size: 18px !important;
    line-height: 1.4 !important;
    word-break: keep-all !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
  }

  p, li {
    word-break: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    overflow-wrap: break-word !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
  }

}
/* Espaciado título del artículo */
.wp-block-post-title {
  margin-bottom: 16px !important;
  padding-bottom: 12px !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

.wp-block-post-excerpt,
.wp-block-post-excerpt p {
  margin-top: 16px !important;
  color: #475569 !important;
  font-size: 16px !important;
  line-height: 1.7 !important;
}
/* Texto justificado en artículos */
.wp-block-post-content p,
.entry-content p {
  text-align: justify !important;
  text-justify: inter-word !important;
}
/* Texto justificado - listado y artículo */
.wp-block-post-content p,
.wp-block-post-excerpt p,
.entry-content p,
.wp-block-post-excerpt__excerpt {
  text-align: justify !important;
  text-justify: inter-word !important;
  hyphens: none !important;
}
/* Botón Artículos y Reseñas */
.wp-block-navigation a[href="https://abueloseguros.es/blog/"] {
  background: transparent !important;
  color: white !important;
  border: 2px solid #0d9488 !important;
  border-radius: 8px !important;
  padding: 6px 16px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  transition: all 0.2s !important;
}

.wp-block-navigation a[href="https://abueloseguros.es/blog/"]:hover {
  background: #0d9488 !important;
  color: white !important;
}