/* ===========================================================
   Gabriel AI Factory — CSS premium para tutelevisor.es
   ===========================================================
   Copiar este bloque ENTERO en:
   wp-admin -> Apariencia -> Personalizar -> CSS adicional

   Aplica a todos los posts y pages que tengan las clases
   gfo-* generadas por el sistema.
   =========================================================== */

/* ===== Tipografia y reset general ===== */
.entry-content,
.post-content,
.gfo-article,
.page .entry-content,
.single .entry-content {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1A1A1A;
  line-height: 1.7;
  font-size: 1.05rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0A0E1A;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 700;
}

.entry-content h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 1.5rem;
}

.entry-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-top: 1rem;
  position: relative;
}

.entry-content h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, #0066FF, #FF6B00);
  border-radius: 2px;
}

.entry-content h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.entry-content > p:first-of-type {
  font-size: 1.18rem;
  line-height: 1.65;
  border-left: 3px solid #0066FF;
  padding-left: 1rem;
  margin: 1.5rem 0 2rem 0;
}

/* ===== Tabla comparativa ===== */
.tabla-comparativa {
  width: 100%;
  margin: 2.5rem 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(10,14,26,0.08);
  font-size: 0.95rem;
}

.tabla-comparativa thead {
  background: linear-gradient(135deg, #0066FF, #0052CC);
}

.tabla-comparativa thead th {
  padding: 1.1rem 0.85rem;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: white !important;
  border: none;
}

.tabla-comparativa tbody td {
  padding: 1.1rem 0.85rem;
  border-bottom: 1px solid #E1E5EB;
  vertical-align: middle;
  background: #FFFFFF;
  transition: background 0.2s ease;
}

.tabla-comparativa tbody tr:last-child td { border-bottom: none; }
.tabla-comparativa tbody tr:hover td { background: #F6F8FB; }
.tabla-comparativa tbody td strong { color: #0A0E1A; font-weight: 700; }

/* ===== BOTONES AMAZON CTA — el FIX del bug invisible ===== */
.amazon-cta-inline,
a.amazon-cta-inline,
.entry-content a.amazon-cta-inline {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.6rem 1.1rem !important;
  background: linear-gradient(135deg, #FF6B00, #E55A00) !important;
  color: white !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(255,107,0,0.4) !important;
  transition: all 0.25s ease !important;
  white-space: nowrap !important;
  font-size: 0.85rem !important;
  border: none !important;
  cursor: pointer !important;
}

.amazon-cta-inline::after {
  content: "→";
  margin-left: 0.2rem;
  transition: transform 0.25s ease;
}

.amazon-cta-inline:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  color: white !important;
}

.amazon-cta-inline:hover::after { transform: translateX(3px); }

.wp-block-button.amazon-cta a,
.wp-block-button.amazon-cta a.wp-block-button__link,
.entry-content .wp-block-button.amazon-cta a {
  background: linear-gradient(135deg, #FF6B00, #E55A00) !important;
  color: white !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  padding: 0.95rem 2rem !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(255,107,0,0.4) !important;
  transition: all 0.25s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
}

.wp-block-button.amazon-cta a:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 36px rgba(255,107,0,0.5) !important;
}

.wp-block-button.amazon-cta a::after {
  content: "→";
  transition: transform 0.25s ease;
}

.wp-block-button.amazon-cta a:hover::after { transform: translateX(3px); }

.wp-block-buttons {
  display: flex !important;
  justify-content: center !important;
  margin: 2rem 0 !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
}

/* ===== Pros y contras ===== */
.gfo-pros-header,
.gfo-cons-header {
  margin-bottom: 0.5rem !important;
  margin-top: 1.25rem !important;
  font-size: 1.05rem;
}

.gfo-pros-header strong { color: #16A34A; font-size: 1.05rem; }
.gfo-cons-header strong { color: #DC2626; font-size: 1.05rem; }

.entry-content ul.gfo-pros,
.entry-content ul.gfo-cons {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0.5rem 0 1.5rem 0 !important;
}

.entry-content ul.gfo-pros li,
.entry-content ul.gfo-cons li {
  padding: 0.45rem 0 0.45rem 2rem !important;
  position: relative;
  margin: 0.25rem 0 !important;
}

.entry-content ul.gfo-pros li::before {
  content: "✓";
  color: #16A34A;
  font-weight: 800;
  position: absolute;
  left: 0;
  top: 0.45rem;
  font-size: 1rem;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(22,163,74,0.12);
  border-radius: 50%;
}

.entry-content ul.gfo-cons li::before {
  content: "✕";
  color: #DC2626;
  font-weight: 800;
  position: absolute;
  left: 0;
  top: 0.45rem;
  font-size: 0.9rem;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(220,38,38,0.1);
  border-radius: 50%;
}

/* ===== Para quien es / NO es ===== */
.gfo-target {
  padding: 0.85rem 1rem !important;
  border-radius: 6px;
  margin: 0.5rem 0 1rem 0 !important;
  font-size: 1rem;
}

.gfo-target-yes {
  background: rgba(22,163,74,0.07);
  border-left: 3px solid #16A34A;
}

.gfo-target-yes strong { color: #16A34A; }

.gfo-target-no {
  background: rgba(220,38,38,0.05);
  border-left: 3px solid #DC2626;
}

.gfo-target-no strong { color: #DC2626; }

/* ===== FAQ Accordion ===== */
.gfo-faq-list {
  margin: 1.5rem 0 2rem 0 !important;
  display: grid;
  gap: 0.75rem;
}

.gfo-faq-item {
  background: #FFFFFF;
  border: 1px solid #E1E5EB;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.gfo-faq-item:hover {
  border-color: #0066FF;
  box-shadow: 0 1px 2px rgba(10,14,26,0.05);
}

.gfo-faq-item[open] {
  border-color: #0066FF;
  box-shadow: 0 4px 12px rgba(10,14,26,0.08);
}

.gfo-faq-q {
  padding: 1.15rem 3.5rem 1.15rem 1.4rem !important;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: #0A0E1A;
  list-style: none;
  position: relative;
  user-select: none;
  transition: color 0.2s ease;
}

.gfo-faq-q::-webkit-details-marker { display: none; }
.gfo-faq-q::marker { display: none; content: ""; }

.gfo-faq-q::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 300;
  color: white;
  background: linear-gradient(135deg, #0066FF, #0052CC);
  border-radius: 50%;
  transition: transform 0.3s ease;
  line-height: 1;
}

.gfo-faq-item[open] .gfo-faq-q { color: #0066FF; }

.gfo-faq-item[open] .gfo-faq-q::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

.gfo-faq-q:hover { color: #0066FF; }

.gfo-faq-a {
  padding: 0 1.4rem 1.25rem 1.4rem !important;
  color: #5A6473;
  line-height: 1.7;
}

.gfo-faq-a p { margin: 0 0 0.75rem 0 !important; }
.gfo-faq-a p:last-child { margin-bottom: 0 !important; }

/* ===== Disclaimer editorial ===== */
.editorial-disclaimer {
  margin-top: 4rem !important;
  padding: 1.5rem 1.75rem !important;
  background: #F6F8FB;
  border-left: 4px solid #0066FF;
  border-radius: 0 12px 12px 0;
  font-size: 0.92rem;
  color: #5A6473;
  font-style: italic;
}

.editorial-disclaimer::before {
  content: "✏️ ";
  margin-right: 0.4rem;
  font-style: normal;
}

/* ===== Hero image ===== */
.entry-content > figure.wp-block-image:first-of-type img,
.entry-content > .wp-block-image:first-child img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(10,14,26,0.12);
  display: block;
}

.entry-content figure.wp-block-image img {
  border-radius: 12px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.entry-content figure.wp-block-image:hover img {
  transform: scale(1.01);
  box-shadow: 0 10px 30px rgba(10,14,26,0.12);
}

/* ===== Animaciones scroll ===== */
.gfo-fade {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.gfo-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .gfo-fade { opacity: 1; transform: none; transition: none; }
  .wp-block-button.amazon-cta a,
  .amazon-cta-inline,
  .gfo-faq-item { transition: none !important; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .tabla-comparativa { font-size: 0.85rem; }
  .tabla-comparativa thead th,
  .tabla-comparativa tbody td { padding: 0.7rem 0.55rem; }
  .amazon-cta-inline {
    padding: 0.55rem 0.85rem !important;
    font-size: 0.8rem !important;
  }
  .wp-block-button.amazon-cta a { width: 100%; justify-content: center; }
  .wp-block-buttons { flex-direction: column; align-items: stretch; }
  .entry-content h2 { font-size: 1.5rem; margin-top: 2rem; }
}

@media (max-width: 480px) {
  .tabla-comparativa { display: block; overflow-x: auto; white-space: nowrap; }
  .tabla-comparativa thead th { font-size: 0.65rem; }
  .gfo-faq-q::after { width: 24px; height: 24px; font-size: 1.2rem; right: 0.9rem; }
}
