/* ============================================
   Mar de Lotos Templo Zen — Estilos globales
   Versión 2025 | HTML5 + CSS3 + Responsive
   ============================================ */

/* --- Variables de diseño --- */
:root {
  --color-cafe:         #996633;
  --color-cafe-trans:   rgba(153, 102, 51, 0.92);
  --color-blanco:       #ffffff;
  --color-texto:        #000000;
  --color-titulo:       #002060;        /* azul marino */
  --color-subtitulo:    #444444;        /* gris oscuro */
  --color-vinieta:      #666666;        /* negro al 60% */
  --fuente:             'Trebuchet MS', 'Gill Sans', sans-serif;

  /* Escala tipográfica fluida */

  --fs-titulo:     clamp(1.2rem, 2.5vw, 1.7rem);   /* ≈20pt en desktop */
  --fs-subtitulo:  calc(var(--fs-titulo) * 0.85);
  --fs-cuerpo:     calc(var(--fs-titulo) * 0.70);

  --ancho-maximo:  1100px;
  --radio-borde:   4px;
  --transicion:    0.25s ease;
  --margen-foto:   20px;
}

/* --- Reset mínimo --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================
   BASE
   ============================================ */
body {
  font-family: var(--fuente);
  font-size: var(--fs-cuerpo);
  color: var(--color-texto);
  background-color: #f9f6f1;
  line-height: 1.7;
  text-align: left;
}

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

a {
  color: #003399;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ============================================
   JERARQUÍA TIPOGRÁFICA
   ============================================ */

/* Títulos — azul marino */
h1, h2, h3 {
  font-family: var(--fuente);
  color: var(--color-titulo);
  font-weight: bold;
  font-style: normal;
  line-height: 1.3;
  margin-bottom: 0.5em;
}
h1 { font-size: var(--fs-titulo); }
h2 { font-size: var(--fs-subtitulo); color: var(--color-subtitulo); }
h3 { font-size: var(--fs-subtitulo); color: var(--color-subtitulo); }

/* Clases de semántica de contenido */
.sec-titulo {
  font-family: var(--fuente);
  font-size: var(--fs-titulo);
  color: var(--color-titulo);
  font-weight: bold;
  font-style: normal;
  display: block;
  margin-bottom: 0.6em;
}

.sec-subtitulo {
  font-family: var(--fuente);
  font-size: var(--fs-subtitulo);
  color: var(--color-subtitulo);
  font-weight: bold;
  font-style: italic;
  display: block;
  margin-bottom: 0.4em;
}

/* Texto de cuerpo */
p, li, td, th {
  font-family: var(--fuente);
  font-size: var(--fs-cuerpo);
  color: var(--color-texto);
}

b, strong { font-weight: bold; }
i, em     { font-style: italic; }

/* ============================================
   FOTOGRAFÍAS
   margen 10px en todos los lados,
   texto fluye al lado
   ============================================ */
img[align="right"],
.foto-der {
  float: right;
  margin: var(--margen-foto);
  border-radius: var(--radio-borde);
  display: inline;
}

img[align="left"],
.foto-izq {
  float: left;
  margin: var(--margen-foto);
  border-radius: var(--radio-borde);
  display: inline;
}

/* Limpia float al terminar cada celda/bloque */
td::after,
.bloque::after {
  content: "";
  display: table;
  clear: both;
}

/* ============================================
   LISTAS
   viñetas al 60% del cuerpo + sangría francesa
   ============================================ */
ul, ol {
  padding-left: 3em;
  margin-bottom: 1em;
}

ul { list-style-type: disc; }

ul li::marker {
  color: var(--color-vinieta);
  font-size: 0.6em;
}

li { margin-bottom: 0.5em; }

ul ul, ol ul {
  list-style-type: circle;
  margin-top: 0.3em;
}

/* ============================================
   TABLAS
   ============================================ */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-family: var(--fuente);
  font-size: var(--fs-cuerpo);
  margin-bottom: 1.5em;
  table-layout: auto;
}

td, th {
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}

/* Tablas con datos (preceptos, paramitas) */
.tabla-datos { border: 1px solid #ccc; }
.tabla-datos td,
.tabla-datos th {
  border: 1px solid #ccc;
  padding: 10px 12px;
}
.tabla-datos th {
  background-color: #f0ebe2;
  font-weight: bold;
  color: var(--color-titulo);
}
.tabla-datos tr:nth-child(even) td { background-color: #faf7f2; }

/* ============================================
   AVISO ESPECIAL (caja amarilla)
   ============================================ */
.aviso-importante {
  background-color: #ffcc66;
  border-left: 4px solid #cc8800;
  padding: 14px 18px;
  margin: 20px 0;
  font-weight: bold;
  font-size: var(--fs-cuerpo);
  text-align: center;
  border-radius: var(--radio-borde);
  max-width: 75%;
}

/* ============================================
   ENCABEZADO
   ============================================ */
.site-header {
  width: 100%;
  background-color: #f9f6f1;
}

.header-identidad {
  max-width: var(--ancho-maximo);
  margin: 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-texto h1 {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: normal;
  color: var(--color-texto);
  font-style: normal;
  line-height: 1.2;
}

.header-texto .subtitulo {
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  font-style: italic;
  font-weight: bold;
  color: #555;
  margin-top: 4px;
  line-height: 1.4;
}

.header-texto .lema {
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  font-style: italic;
  font-weight: bold;
  color: var(--color-cafe);
  margin-top: 6px;
}

.header-logo img {
  width: clamp(240px, 40vw, 570px);
  height: auto;
  float: none;
  display: block;
  margin: 0;
  border-radius: var(--radio-borde);
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.site-nav {
  background-color: var(--color-cafe-trans);
  width: 100%;
}

.nav-contenedor {
  max-width: var(--ancho-maximo);
  margin: 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  color: var(--color-blanco);
  font-size: 1 rem;
  line-height:1;
}

.nav-lista {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  margin: 0;
}

.nav-lista li a {
  display: block;
  padding: 8px 10px;
  color: var(--color-blanco);
  font-size: clamp(1 rem, 1.5 vw, 1.05 rem);
  font-weight: 600;
  font-style: normal;
  transition: background-color var(--transicion);
  white-space: nowrap;
}

.nav-lista li a:hover,
.nav-lista li a[aria-current="page"] {
  background-color: rgba(255,255,255,0.2);
  border-radius: var(--radio-borde);
  text-decoration: none;
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
main {
  padding: 20px;
  max-width: var(--ancho-maximo);
}

.seccion {
  margin-bottom: 3em;
  padding-bottom: 2em;
  border-bottom: 1px solid #ddd;
}
.seccion:last-child { border-bottom: none; }

/* ============================================
   PIE DE PÁGINA
   ============================================ */
.site-footer {
  background-color: var(--color-cafe);
  color: var(--color-blanco);
  margin-top: 40px;
  padding: 18px 20px;
}

.footer-contenedor {
  max-width: var(--ancho-maximo);
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-inicio a {
  color: var(--color-blanco);
  font-size: 1.05rem;
  font-weight: bold;
  font-style: normal;
  transition: opacity var(--transicion);
}
.footer-inicio a:hover { opacity: 0.75; text-decoration: none; }

.footer-copyright {
  font-size: 0.95rem;
  font-style: italic;
  flex: 1;
  color: var(--color-blanco);
}

.footer-redes {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-redes a img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  float: none;
  margin: 0;
  display: block;
  transition: opacity var(--transicion), transform var(--transicion);
}
.footer-redes a:hover img { opacity: 0.8; transform: scale(1.08); }

/* ============================================
   RESPONSIVE — MÓVIL (max 768px)
   ============================================ */
@media (max-width: 768px) {

  .header-identidad {
    flex-direction: column-reverse;
    align-items: flex-start;
    text-align: left;
  }

  .header-logo img {
    width: min(90vw, 300px);
    display: block;
  }

  .nav-toggle { display: block; }

  .nav-lista {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 8px;
  }

  .nav-lista.abierto { display: flex; }

  .nav-lista li a {
    padding: 11px 16px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }

  main { padding: 16px; }

  /* Imágenes flotadas pasan a bloque en móvil */
  img[align="right"],
  img[align="left"] {
    float: none;
    display: block;
    width: 100% !important;
    height: auto !important;
    margin: var(--margen-foto) 0;
  }

  .aviso-importante { max-width: 100%; }

  .footer-contenedor {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .footer-copyright { flex: none; }

  /* Tablas con scroll horizontal si no caben */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================
   RESPONSIVE — TABLET (769px–1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {

  .header-logo img { width: clamp(200px, 28vw, 320px); }

  .nav-lista li a {
    padding: 12px 10px;
    font-size: 0.92rem;
  }
}
