/* 1. CONFIGURACIÓN BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f9f9f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 2. CONTENEDOR */
.contenedor {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px; 
    margin-bottom: 50px;
    padding: 20px;
}

.poema-slider {
    width: 100%;
    max-width: 850px;
    position: relative; /* Necesario para posicionar los botones */
}

/* 3. CONTROLES INVISIBLES */
input[type="radio"] {
    display: none;
}

/* 4. LA CAJA */
.caja-poema {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    overflow: hidden; 
    width: 100%;
    height: auto;
    position: relative; /* Para que los dots se anclen aquí */
}

/* 5. EL CONTENEDOR DESLIZANTE */
.slides-container {
    display: flex;
    width: 200%;
    align-items: flex-start;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 6. CADA POEMA */
.poema-content {
    width: 50%;
    flex-shrink: 0;
    padding: 40px 60px 60px 60px; /* Ajustado el padding */
    text-align: center; 
}

/* TÍTULO */
.poema-content h2 {
    text-align: center;
    font-family: 'Georgia', serif;
    margin-bottom: 15px;
    color: #0056b3; 
    font-size: 1.4rem; /* Un poco más pequeño */
    font-weight: 600;
}

/* CUERPO DEL POEMA - MÁS PEQUEÑO */
.poema-content p {
    margin-top: 0;  
    white-space: pre-line;
    text-align: center;
    font-family: 'Georgia', serif;
    font-style: italic;
    color: #444;
    font-size: 0.95rem; /* TEXTO MÁS PEQUEÑO */
    line-height: 1.5; 
}

/* 7. BOTONES ARRIBA A LA DERECHA */
.dots-container {
    position: absolute;
    top: 25px;      /* Distancia desde el borde superior */
    right: 30px;    /* Distancia desde el borde derecho */
    display: flex;
    gap: 8px;
    z-index: 10;    /* Para que siempre esté por encima del texto */
}

.dot {
    width: 8px;     /* Dots un poco más discretos */
    height: 8px;
    background-color: #cbd5e0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* LÓGICA DE MOVIMIENTO Y COLORES */
#p1:checked ~ .caja-poema .slides-container { transform: translateX(0%); }
#p2:checked ~ .caja-poema .slides-container { transform: translateX(-50%); }

#p1:checked ~ .caja-poema .dots-container label[for="p1"],
#p2:checked ~ .caja-poema .dots-container label[for="p2"] {
    background-color: #0056b3; 
    width: 16px;
    border-radius: 10px;
}

/* Estilo base de la X */
.cerrar {
    display: inline-block; /* Imprescindible para que pueda girar */
    text-decoration: none;
    color: #444; 
    transition: transform 0.4s ease; /* Velocidad del giro */
    font-weight: bold;
}

/* Efecto al pasar el ratón */
.cerrar:hover {
    transform: rotate(90deg); /* Gira 90 grados */
    color: #ff4d4d;          /* Opcional: cambia a un tono rojo al tocarla */
}