
/*CABCERA PUEBLOS*/
.cabecera-logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.8em 0.9em;
  border-bottom: 3px solid #e5e5e5;
  margin-bottom: 0.6em;
}

/* LOGO */
.cabecera-logo img {
  width: 96px;
  height: 96px;
  z-index: 2;
}

/* TEXTOS */
.cabecera-textos {
  line-height: 1.2;
  z-index: 2;
}

.cabecera-lema {
  font-size: 0.95em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cabecera-titulo {
  font-size: 1.2em;
  margin-top: 0.15em;
  color: #333;
}

/* ENLACE INVISIBLE QUE CUBRE TODA LA CABECERA */
.cabecera-volver {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: 0;
  overflow: hidden;
  padding-left: 25px; /* controla separación */
}

.cabecera-volver::before {
  content: "←";
  position: absolute;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.8em;  /* más grande */
  color: #000;
  text-indent: 0;
  z-index: 3;
}

/* EFECTO HOVER SUTIL (opcional) */
.cabecera-logo:hover {
  background-color: #f7f7f7;
}

/* MÓVIL */
@media (max-width: 768px) {
  .cabecera-logo {
    gap: 0.6em;
  }

  .cabecera-logo img {
    width: 56px;
    height: 56px;
  }

  .cabecera-lema {
    font-size: 0.8em;
  }

  .cabecera-titulo {
    font-size: 1em;
  }
}

/* ================================
   Ajustes personalizados AmiAire Blog css
   ================================ */


@media (max-width: 575.98px) {
  .container, .container-fluid {
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box;
  }
}

h1 {
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  h1 {
    margin-bottom: 25px;
  }
}


/* === Pie de fotografía flotante (escritorio) === */
.foto-izq {
  float: left;
  margin: 0 15px 10px 0;      /* separación respecto al texto */
  width: 200px;               /* tamaño de la foto en escritorio */
  text-align: center;         /* centra el pie debajo */
}

.foto-izq img {
  display: block;
  width: 100%;
  height: auto;
}

.foto-izq p {
  margin-top: 6px;            /* espacio entre imagen y pie */
  font-weight: bold;
  font-size: 0.9em;
  color: #555;
  line-height: 1.2em;
  text-align: center;         /* asegura centrado en escritorio */
}

/* Móvil y tablets pequeñas: forzar bloque (sin envolvimiento de texto) */
@media (max-width: 820px) {
  .foto-izq {
    float: none !important;        /* anula flotado siempre */
    display: block;                /* ocupa la línea completa */
    clear: both;                   /* separa de texto previo */
    margin: 0 auto 12px auto;      /* centrado */
    width: min(92vw, 360px);       /* ancho cómodo en móvil */
    text-align: center;
    overflow: hidden;              /* crea BFC: evita texto a los lados */
    /* alternativa moderna: display: flow-root; (si prefieres) */
  }

  .foto-izq img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }

  .foto-izq p {
    display: block;
    margin-top: 12px;
    text-align: center;
  }
}


/* =========================
   Banner de cookies
   ========================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 99999;          /* siempre por encima */
    pointer-events: auto;    /* clics habilitados */
}

.cookie-banner h5 {
    margin: 0;
    font-size: 1.25em;
}

.cookie-banner p {
    margin: 10px 0;
    font-size: 1em;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

/* =========================
   Modal de opciones
   ========================= */
.cookie-modal {
    display: none;
    pointer-events: none;     /* por defecto no bloquea la página */
    position: fixed;
    z-index: 100000;          /* sobre el banner si se abre */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.cookie-modal.is-open {
    display: flex;
    pointer-events: auto;     /* solo capta clics cuando está abierto */
}

.cookie-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    max-width: 400px;
    margin: auto;
    text-align: left;
    pointer-events: auto;
}

.cookie-modal h5 {
    margin-top: 0;
}

.cookie-modal label {
    display: block;
    margin: 10px 0;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 600px) {
    .cookie-banner {
        padding: 10px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}


/* Estilos personalizados para el modal */
.custom-modal .modal-dialog {
  max-width: 601px;
  width: 601px;
  margin: 30px auto;
}

.custom-modal .modal-content {
  padding: 0;
  border: none;
  background: none;
  position: relative;
}

.custom-modal .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1051;
  background: rgba(255, 0, 0, 0.8);
  border: none;
  font-size: 24px;
  line-height: 1;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  text-align: center;
  padding: 0;
}

/* Imagen dentro del modal */
.custom-modal img {
  display: block;
  width: 601px;
  height: auto;
}

/* Responsividad para pantallas pequeñas */
@media (max-width: 650px) {
  .custom-modal .modal-dialog {
    max-width: 100% !important; /* como el texto */
    width: 100% !important;
    margin: 0 auto !important;  /* centrado */
    padding: 0 !important;
  }

  .custom-modal .modal-content,
  .custom-modal .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
  }

  .custom-modal img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}

a[data-toggle="modal"]{
color:#cc0000 !important;
text-decoration:none;
}

a[data-toggle="modal"]:hover{
color:#990000 !important;
text-decoration:underline;
}


/* Botones de compartir */
.share-buttons {
  max-width: 300px;         /* Limita el ancho total */
  margin: 0 auto;           /* Centra el contenedor */
  display: flex;
  justify-content: center;
  flex-wrap: wrap;          /* Ajusta a nueva línea en móviles */
  gap: 10px;                /* Espaciado entre botones */
}

.share-buttons a {
  width: 30px;              /* Tamaño del botón */
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;          /* Tamaño del icono */
  border-radius: 50%;       /* Botones redondos */
  text-decoration: none;
  color: #fff;              /* Color del icono */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.share-buttons a:hover {
  transform: scale(1.1);    /* Efecto zoom */
  opacity: 0.8;             /* Transparencia al hover */
}

/* Colores personalizados */
.share-buttons a.btn-success {
  background-color: #25D366; /* WhatsApp */
}

.share-buttons a.btn-primary {
  background-color: #3b5998; /* Facebook */
}

.share-buttons a.btn-info {
  background-color: #1DA1F2; /* X (Twitter) */
}

.share-buttons a.btn-secondary {
  background-color: #6c757d; /* Correo */
}

/* Responsividad */
@media (max-width: 576px) {
  .share-buttons {
    flex-direction: column;  /* Cambia a diseño vertical */
    align-items: center;
  }

  .share-buttons a {
    width: 100%;            /* Ocupan el ancho completo */
    max-width: 300px;
  }
}



/* Leer más - leer menos */
.resumen-container {
  position: relative;
  margin-bottom: 1em;
}

.resumen-texto {
  max-height: 14em;
  overflow: hidden;
  position: relative;
  transition: max-height 0.5s ease;
}

.resumen-texto::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 8em;
  width: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0), white 90%);
  pointer-events: none;
}

.resumen-texto.expandido::after {
  display: none;
}

.resumen-texto.expandido {
  max-height: none;
}

.boton-leer-mas,
.boton-leer-menos {
  display: inline-block;
  margin-top: 0.5em;
  padding: 0.4em 0.8em;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  border-radius: 5px;
  float: right;
}

.boton-leer-menos {
  display: none;
}


p a[data-toggle="modal"],
p a[data-toggle="modal"]:link,
p a[data-toggle="modal"]:visited,
p a[data-toggle="modal"]:hover,
p a[data-toggle="modal"]:active,
p a[data-toggle="modal"]:focus,
p a[data-toggle="modal"] em,
p a[data-toggle="modal"]:link em,
p a[data-toggle="modal"]:visited em,
p a[data-toggle="modal"]:hover em,
p a[data-toggle="modal"]:active em,
p a[data-toggle="modal"]:focus em {
  color: #cc0000 !important;
}

/* =========================
   Flecha volver arriba
   ========================= */
.flecha {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background-color: rgba(0,0,0,0.5);
  font-size: 20px;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.3s ease-in-out;
  z-index: 9999;
  border-radius: 50%;
}

.flecha:hover {
  opacity: 1;
  color: #ffffff;
  text-decoration: none;
}