/* ======================================================
   Estela.app – Blog "Ansiedad y Estrés"
   Estilos globales con fondo estrellado y diseño coherente
   ====================================================== */

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variables */
:root {
  --c-primary: #00aaff;
  --c-primary-dark: #0077cc;
  --c-border: #ffffff2b;
  --c-text: #f0f0f0;
  --c-text-muted: #bcbcbc;
  --c-shadow: rgba(0, 170, 255, 0.35);
}

/* Body */
body {
  font-family: "Inter", Arial, sans-serif;
  background: url("/recursos/imagenes/fondo_estelado.png") no-repeat center center fixed;
  background-size: cover;
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Contenedor principal */
.container {
  max-width: 780px;
  margin: 0px auto 0;
  padding: 1.75rem 1.25rem;
  background: transparent;
  backdrop-filter: none;
}

@media (max-width: 768px) {
  .container { padding: 1.25rem 1rem; }
}

/* Tipografía */
h1, h2, h3 {
  color: #fff;
  margin-top: 0;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.8rem; }

@media (max-width: 768px) {
  h1 { font-size: 1.7rem; }
}

p { margin-bottom: 1.15rem; }

/* Enlaces y botones */
a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--c-primary-dark);
}

.btn {
  display: inline-block;
  background: var(--c-primary);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: 28px;
  font-weight: 700;
  box-shadow: 0 4px 12px var(--c-shadow);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--c-primary-dark);
  box-shadow: 0 6px 18px var(--c-shadow);
  color: white;
}

/* Secciones */
section {
  margin-bottom: 2.5rem;
}

ul {
  padding-left: 1.5rem;
}

/* Bloque CTA */
.cta {
  background: rgba(0, 0, 0, 0.55);
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--c-primary);
  margin: 2.25rem 0;
  border-radius: 6px;
}

.text-center { text-align: center; }
.text-muted { color: var(--c-text-muted); }

/* FAQ (acordeón) */
details {
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.9rem 1.2rem;
  color: var(--c-primary);
  position: relative;
  list-style: none;
}

summary::marker,
summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "➜";
  position: absolute;
  right: 1rem;
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(90deg);
}

details[open] summary {
  border-bottom: 1px solid var(--c-border);
}

details p {
  padding: 0.9rem 1.2rem 1.2rem;
  margin: 0;
}

/* Imágenes */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Tablas */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

th, td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--c-border);
}

th {
  background: rgba(0, 0, 0, 0.5);
  text-align: left;
}

td {
  background: rgba(0, 0, 0, 0.35);
}

/* Código */
pre, code {
  background: #0e0e0e;
  color: #c2c2c2;
  border-radius: 5px;
  padding: 0.3rem 0.6rem;
  font-family: "Source Code Pro", monospace;
}

/* Animación */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.7s ease forwards;
}

/* Historia – Estilo chat tipo timeline */
.seccion-historia {
  padding: 80px 20px;
  color: #ffffff;
}

.historia-contenedor {
  max-width: 800px;
  margin: 0 auto;
}

.historia-titulo {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 50px;
}

.historia-dialogo {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.bloque {
  border-radius: 16px;
  position: relative;
  font-size: 1.05em;
  line-height: 1.6;
  padding: 16px 24px;
  box-sizing: border-box;
}

.bloque.paciente {
  background-color: rgba(255, 255, 255, 0.04);
  border-left: 4px solid #ffffff33;
}

.bloque.paciente .fecha {
  font-size: 0.85em;
  color: #cccccc;
  margin-bottom: 6px;
  display: block;
}

.bloque.paciente p { margin: 0; }

.bloque.estela {
  background-color: rgba(0, 170, 255, 0.07);
  border-left: 4px solid #00ccff;
  font-style: italic;
}

.bloque.estela.final {
  background-color: var(--c-primary);
  color: #fff;
  font-style: normal;
  border: none;
  text-align: center;
}

.fecha {
  font-size: 0.85em;
  color: #cccccc;
  margin-bottom: 6px;
  display: block;
}

.grafica-estela {
  width: 100%;
  max-width: 600px;
  margin: 20px auto 10px;
  display: block;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.leyenda-grafica {
  display: block;
  margin-top: 10px;
  font-size: 0.85em;
  color: #ccc;
  text-align: center;
}

.historia-cta {
  margin-top: 60px;
  text-align: center;
}

.boton-volver {
  background-color: var(--c-primary);
  color: #fff;
  padding: 14px 30px;
  font-size: 1em;
  border-radius: 30px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.boton-volver:hover {
  background-color: var(--c-primary-dark);
}
