/* Estilos generales y fondo de la catedral */
body {
    background-color: #1a1a1a;
    background-image: url('Iglesia Fondo 1 .jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'MedievalSharp', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Efecto de vidrieras enteras y completamente transparentes/translúcidas */
.vidriera-izq, .vidriera-der {
    position: fixed;
    top: 0;
    width: 140px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    /* Esto hace que el fondo negro de la imagen de la vidriera desaparezca y se funda como un cristal real */
    mix-blend-mode: screen; 
    opacity: 0.75; /* Transparencia ajustable para que se vea el fondo de la iglesia detrás */
}

.vidriera-izq { 
    left: 0; 
    background-image: url('vidriera 1 .jpg');
}
.vidriera-der { 
    right: 0; 
    background-image: url('Vidriera 2 .jpg');
}

/* Título superior medieval */
.titulo-medieval {
    font-family: 'MedievalSharp', cursive;
    color: #FFDF73;
    font-size: 48px;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
    z-index: 2;
}

/* Contenedor principal */
.container {
    width: 900px;
    background: #fdfbf7;
    border: 4px solid #3d348b;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
    overflow: hidden;
    z-index: 2;
}

/* Cabecera */
.header {
    background-color: #3d348b;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    border-bottom: 3px solid #FFDF73;
}

/* Layout de dos columnas */
.main-layout {
    display: flex;
    min-height: 450px;
}

/* Menú lateral */
.sidebar {
    width: 220px;
    background-color: #e6e2d3;
    border-right: 2px solid #ccc;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
}

.titulo-seccion {
    background-color: #3d348b;
    color: #FFDF73;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.sidebar a {
    padding: 10px 15px;
    color: #2c2263;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    border-bottom: 1px solid #dcd7c5;
    transition: background 0.2s;
}

.sidebar a:hover {
    background-color: #d4cfbd;
    color: #1a143b;
}

/* Contenido principal */
.content {
    flex: 1;
    padding: 20px;
    background-color: #fff;
}

/* Estilos internos de las secciones */
.seccion-cuerpo {
    text-align: center;
    margin-top: 10px;
}

.seccion-contenido h2 {
    color: #3d348b;
    border-bottom: 2px solid #FFDF73;
    padding-bottom: 8px;
    margin-top: 0;
    text-align: center;
}

.seccion-cuerpo h3 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #2c2263;
}

.subtitulo-seccion {
    font-size: 14px;
    color: #666;
    font-weight: bold;
    margin-bottom: 15px;
}

.seccion-cuerpo img {
    max-width: 240px;
    max-height: 280px;
    border-radius: 6px;
    border: 3px solid #3d348b;
    margin: 0 auto 15px auto;
    display: block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    object-fit: contain;
    background: #f4f1ea;
}

.texto-historia {
    text-align: justify;
    margin: 0 auto 15px auto;
    max-width: 95%;
    line-height: 1.6;
    font-size: 15px;
    color: #333;
}

.frase-box {
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #f9f6ee;
    border-left: 4px solid #3d348b;
    border-radius: 4px;
    text-align: left;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
}

.frase-box em {
    font-size: 14px;
    color: #444;
}

/* Inicio y Chat en Vivo */
.video-container {
    text-align: center;
    margin: 10px 0;
}

.video-container img {
    max-width: 100%;
    max-height: 160px;
    border-radius: 6px;
    border: 2px solid #ccc;
    object-fit: cover;
}

.chat-box {
    background: #f4f1ea;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #dcd7c5;
    margin-top: 10px;
}

.chat-box h2 {
    font-size: 15px;
    color: #3d348b;
    border: none;
    margin: 0 0 5px 0;
    padding: 0;
    text-align: left;
}

.mensajes-container {
    height: 90px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    padding: 5px 8px;
    font-size: 13px;
    margin-bottom: 8px;
    border-radius: 4px;
    text-align: left;
}

.chat-input-area {
    display: flex;
    gap: 5px;
}

.chat-input-area input {
    flex: 1;
    padding: 5px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.chat-input-area button {
    background-color: #3d348b;
    color: #FFDF73;
    border: none;
    padding: 5px 12px;
    font-weight: bold;
    border-radius: 3px;
    cursor: pointer;
}

.chat-input-area button:hover {
    background-color: #2c2263;
}