       /* --- ESTILOS GENERALES Y RESET --- */
/* --- ESTILOS GENERALES Y RESET --- */
* {
    box-sizing: border-box;
}

/* --- CONFIGURACIÓN GENERAL DE PÁGINAS INTERIORES --- */
body.pagina-interior {
    background-color: #f4f1ea; /* Fondo general de la página */
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra el contenido horizontalmente */
    justify-content: flex-start; /* Alinea todo el contenido desde arriba */
    padding: 30px 20px;
    font-family: 'Georgia', serif;
}

/* --- CONTENEDOR PRINCIPAL FLUIDO (Adiós a la caja modal cerrada) --- */
.contenedor-principal {
    width: 100%;
    max-width: 1000px; /* Anchura generosa de 1000px para todas las páginas */
    background: #ffffff; /* Fondo blanco de lectura */
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    /* Eliminamos cualquier límite de altura para que crezca infinito hacia abajo */
}

/* Estilo por defecto para TODAS las páginas secundarias (Blog, Biografía, etc.): fondo liso y ordenado */
body {
    background-color: #f4f1ea; /* Un tono pergamino/tierra suave muy elegante, o pon #2b2b2b si lo prefieres oscuro */
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Georgia', serif;
    padding: 20px;
}

/* Estilo exclusivo para la PORTADA (index.html), con su imagen de fondo del aljibe */
body.portada {
    background-image: url('imagenes/fondoweb.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Mantiene la imagen fija para que no baile */
    padding: 0;
}

/* --- CONTENEDOR PRINCIPAL (Cabecera / Menú de botones) --- */
.contenedor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    padding: 20px;
    margin-top: 30px;
}

/* --- ESTILO DEL TÍTULO / NOMBRE --- */
.nombre {
    font-size: 55px;
    font-weight: bold;
    color: black;
}

/* --- BOTONERA --- */
.botonera {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* --- ESTILOS DE LOS BOTONES DE IMAGEN --- */
.image-button {
    position: relative;
    width: 100px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 30%;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    z-index: 1;
}

.image-button:hover {
    transform: scale(1.15); /* Reducido ligeramente de 1.6 para móviles */
    box-shadow: 7px 7px 25px rgba(255, 140, 0, 0.7);
    z-index: 10;
}

/* Tooltip: Nombre al pasar el cursor */
.image-button::after {
    content: attr(data-text);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.image-button:hover::after {
    opacity: 1;
}

/* Imágenes de los botones principales */
.btn-propietario { background-image: url('imagenes/santiago.jpg'); }
.btn-libro       { background-image: url('imagenes/libroboton.jpg'); }
.btn-tienda    { background-image: url('imagenes/tienda.jpg'); }
.btn-blog        { background-image: url('imagenes/aljibe.jpg'); }

/* --- VENTANA EMERGENTE (MODAL) Y SECCIÓN DEL LIBRO --- */
.modal-overlay, .seccion-libro {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 9998;
    padding: 15px;
}

.modal-contenido, .libro-contenedor-interno {
    background: #ffffff;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    position: relative;
    display: flex;
    flex-direction: column;
}


/* Tipografías y textos internos */
.modal-contenido h2, .libro-contenedor-interno h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #b8a68b;
    padding-bottom: 10px;
}

.modal-contenido p, .modal-contenido .detalles-proyecto li {
    margin-bottom: 15px;
    text-align: justify;
    color: #333;
}

/* Recuadro para la imagen del libro */
.libro-imagen-recuadro {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 15px 0;
}

.libro-imagen-recuadro img {
    max-width: 100%;
    width: 350px; /* Tamaño adaptado */
    height: auto;
    border-radius: 4px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.2);
}

.libro-texto-aviso {
    font-size: 16px;
    color: #2c3e50;
    text-align: center;
    margin-top: 15px;
    line-height: 1.6;
}

.libro-texto-aviso strong {
    color: #8c2d3b;
}

/* --- DISEÑO RESPONSIVO (MÓVILES Y PANTALLAS PEQUEÑAS) --- */
@media (max-width: 768px) {
    .contenedor {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        margin-top: 10px;
    }

    .nombre {
        font-size: 35px; /* Reducimos el tamaño del título principal para que no desborde */
    }

    .botonera {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
.modal-contenido, .libro-contenedor-interno {
    background: #ffffff;
    width: 90%;
    max-width: 1000px; /* Ampliado también a 1000px */
    margin: 30px auto;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    position: relative;
    display: flex;
    flex-direction: column;
}
    }
}
/* --- ESTILOS DEL BLOG / CUADERNO DE CAMPO --- */
.entrada-blog {
    background: #ffffff;
    width: 90%;          /* Deja un margen lateral elegante del 10% total (5% a cada lado) */
    max-width: 1000px;   /* Pone el tope exacto en 1000px para que no se extienda de más */
    margin: 25px auto;   /* Centra perfectamente la tarjeta */
    padding: 40px;       /* Margen interior para que el texto no pegue a los bordes */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15); /* Sombra suave y limpia */
}

.entrada-blog h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
    border-bottom: 2px solid #b8a68b;
    padding-bottom: 10px;
}

.fecha-articulo {
    font-size: 14px;
    color: #8c2d3b;
    font-style: italic;
    margin-bottom: 15px;
}

.entrada-blog p {
    color: #333;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 15px;
}
/* --- NAvegación ENTRE ENTRADAS DEL BLOG --- */
.navegacion-entradas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed #b8a68b;
}

.btn-nav-blog {
    background-color: #2c3e50;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
}

.btn-nav-blog:hover {
    background-color: #8c2d3b; /* El rojo granate elegante del sitio */
    transform: translateY(-2px);
}

.btn-nav-blog.deshabilitado {
    background-color: #ccc;
    cursor: default;
    pointer-events: none;
    opacity: 0.6;
}
/* --- DESPLAZAMIENTO SUAVE GENERAL --- */
html {
    scroll-behavior: smooth;
}
/* --- BARRA DE NAVEGACIÓN SUPERIOR --- */
.barra-navegacion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0dcd0;
}

.menu-interior {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
/* ==========================================================
   BARRA DE NAVEGACIÓN SUPERIOR (Único bloque limpio y definitivo)
   ========================================================== */

/* --- BARRA DE NAVEGACIÓN FLOTANTE SIN FONDO --- */
.barra-navegacion {
    position: sticky;        /* Se queda fija al hacer scroll */
    top: 15px;               /* Un pequeño margen desde el borde superior para que flote con elegancia */
    z-index: 1000;           /* Flota por encima de todo */
    background: transparent; /* SIN FONDO: Quitamos el blanco para que se vea a través */
    display: flex;
    justify-content: center; 
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 40px auto;
    padding: 10px 0;
    border: none;            /* Sin líneas de separación */
    box-shadow: none;        /* Sin sombras de caja */
}

.menu-interior {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 2. Estilo base de los botones en reposo (Amarillo albero y letras negras) */
.enlace-menu {
    background-color: #e6ca65; /* Amarillo albero cálido */
    color: #000000;            /* Letras negras */
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    border: 1px solid #d4b886;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* 3. Efecto al pasar el cursor (Se agranda, cambia a granate y las letras a blanco) */
.enlace-menu:hover {
    background-color: #8c2d3b !important; /* Granate clásico */
    color: #ffffff !important;            /* Letras blancas puras */
    border-color: #72242f !important;
    transform: scale(1.1);                /* Se agranda de forma suave */
    box-shadow: 0 5px 12px rgba(140, 45, 59, 0.35);
}

/* 4. Botón de la página actual (Marcado fijo) */
.enlace-menu.activo {
    background-color: #8c2d3b;
    color: #ffffff;
    border-color: #72242f;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: default;
    transform: none; /* La página activa se queda estática y marcada */
}


/* ==========================================================
  --------------- CONTENEDOR DE COMPARTIR ------------------
   ========================================================== */

.zona-compartir {
    display: flex;
    align-items: center;
    gap: 12px;
	margin-right: 120px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #e0dcd0; /* Sutil línea separadora */
    font-size: 14px;
    color: #555555;
	
}

.zona-compartir span {
    font-weight: bold;
}

/* --- BOTONES DE COMPARTIR --- */
.btn-compartir {
    background-color: #f4f0eb;
    color: #2c3e50;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #d4b886;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-compartir:hover {
    background-color: #8c2d3b !important;
    color: #ffffff !important;
    border-color: #72242f !important;
}

/* --- CONTENEDOR DE ICONOS SOCIALES Y COMPARTIR --- */
.zona-compartir-iconos {
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio estrecho y ordenado entre iconos */
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed #e0dcd0;
    flex-wrap: wrap; /* Si la pantalla es pequeña, bajan con orden */
}

/* --- ESTILO COMPACTO PARA LOS BOTONES DE COMPARTIR/ICONOS --- */
.btn-icono-social {
    background-color: #f4f0eb;
    color: #2c3e50;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #d4b886;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.btn-icono-social:hover {
    background-color: #8c2d3b !important;
    color: #ffffff !important;
    border-color: #72242f !important;
    transform: scale(1.05);
}
/* ==========================================================
   AJUSTES MÓVIL: MÁRGENES, TEXTO Y CABECERA FLOTANTE
   ========================================================== */

@media (max-width: 768px) {
  
  /* 1. Eliminar desbordamientos laterales que causan scroll horizontal */
  body, html {
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
    padding: 0;
  }

  /* 2. Ampliar el ancho del texto del blog y reducir márgenes laterales excesivos */
  .entrada-blog, .contenido-principal, article, .post-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Ajustar tamaño de letra para lectura fluida en móvil */
  .entrada-blog p, article p {
    font-size: 1.05rem;
    line-height: 1.6;
  }

  /* 3. Hacer que la botonera/cabecera superior deje de flotar para no ocupar media pantalla */
  header, .header-flotante, .nav-bar, .menu-superior {
    position: relative !important; /* Deja de estorbar fija arriba */
    top: auto !important;
    width: 100%;
    box-shadow: none; /* Opcional: quita sombra pesada si la tenía */
  }
}