.social-share-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 30px;
  background-color: #f9f9f9;
  border-radius: 0;
}

.share-title {
  font-size: 15px;
  font-weight: 600;
  color: #52246a;
}

.social-icons {
  display: flex;
  gap: 10px;
}
.main_window{
    background-color: #fff;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icon:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

/* Estilo específico para ajustar el SVG de X dentro del botón */
.social-icon .x-logo {
  width: 16px;
  height: 16px;
  fill: #ffffff;
}

/* Colores de marca y correo */
.social-icon.whatsapp { background-color: #25d366; }
.social-icon.telegram { background-color: #229ed9; }
.social-icon.x-twitter { background-color: #000000; }
.social-icon.linkedin { background-color: #0a66c2; }
.social-icon.facebook { background-color: #1877f2; }
.social-icon.email { background-color: #52246a; }

/*DESARROLLO PRINCIPAL DE TODO*/
.main_window{
    max-width: 100%;
    margin: 0 auto;
    height: auto;
    padding-bottom:4rem;
}
.level-selector-wrapper {
    display: flex;
    justify-content: center;
    font-family: "Varela Round", sans-serif;
    margin: 0 auto;
    padding-top:5rem;
    max-width: 230px;
}

/* Rectángulo principal que contiene las tres letras */
.main-selector {
    display: flex;
    width: 100%;
    background-color: #52246a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    margin-bottom:3rem;
}

/* Celdas individuales (A, B, C) */
.level-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.602rem;
    font-weight: 600;
    padding: 20px 0;
    text-align: center;
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
}

/* Líneas separadoras entre celdas */
.level-btn:not(:last-child):after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background-color: #fff;
}

/* Efecto al pasar el ratón (hover) */
.level-btn:hover {
    color: #bb3925;
    background-color: #f3ad16;
    z-index: 2;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}
.level-btn.active {
    color: #bb3925;
    background-color: #f3ad16;
    z-index: 2;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}
/*LIBRO*/
.book {
    width: 85%;
    height: auto;
    margin: 0 auto;
    position: relative;
    background:
linear-gradient(27deg, #551322 2px, transparent 2px) 0 5px,
linear-gradient(207deg, #4a1320 5px, transparent 5px) 10px 0px,
linear-gradient(27deg, #4a1320 5px, transparent 2px) 0px 10px,
linear-gradient(90deg, #551322 2px, transparent 2px),
linear-gradient(#4a1320 25%, #4a1320 25%, #4a1320 50%, transparent 50%, transparent 75%, #4a1320 75%, #4a1320);
background-color: #551322;
background-size: 10px 10px;
    border-radius: 4px 12px 12px 4px;
    border-left: 50px solid #4a1320; /* Lomo vertical izquierdo */
    box-sizing: border-box;
    /* Sistema de sombras para volumen, profundidad y relieve */
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.35), /* Sombra exterior general del libro */
        inset 12px 0 10px -2px rgba(0, 0, 0, 0.25); /* Relieve de la portada junto al lomo */       
}

/* --- Simulación del bloque de hojas SUPERIOR --- */
.book::before {
    content: '';
    position: absolute;
    top: -7px;         /* Sobresale por la parte superior */
    left: 3px;         /* Empieza justo después del lomo */
    right: 1px;        /* CONTROLA LARGO */
    height: 8px;       /* Grosor visible de las hojas arriba */
    background-color: #fdfbf7;
    border-radius: 3px 3px 0 0;
    
    /* Líneas de las páginas y sombra proyectada superior */
    box-shadow: 
        inset 0 1px 0 #e0dbd1,
        inset 0 2px 0 #f4f0ea,
        inset 0 4px 0 #e8e3d8,
        inset 0 5px 0 #f4f0ea,
        0 -3px 6px rgba(0, 0, 0, 0.12);
}

/* --- Simulación del bloque de hojas DERECHO --- */
.book::after {
    content: '';
    position: absolute;
    top: -7px; /*CONTROLA ALTURA DE LA HOJA*/
    right: -6px;       /* Sobresale por el lateral derecho */
    bottom: 6px;
    width: 8px;        /* Grosor visible de las hojas a la derecha */
    background-color: #fdfbf7;
    border-radius: 0 4px 4px 0;
    
    /* Líneas de las páginas y sombra proyectada lateral */
    box-shadow: 
        inset 1px 0 0 #e0dbd1,
        inset 3px 0 0 #f4f0ea,
        inset 5px 0 0 #e8e3d8,
        3px 0 6px rgba(0, 0, 0, 0.12);
}

/* --- Contenido interior de la portada --- */
.book .cover-content {
    padding: 40px;
    color: #ffffff;
    position: relative;
    z-index: 10;
}

/*Bookmarks*/
/* --- Contenedor de los marcapáginas --- */
.bookmarks-container {
    position: absolute;
    top: -73px; /* Aumentado para dar espacio a los marcapáginas más altos */
    left: 80px;
    right: 80px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
    overflow: hidden; /* Oculta la parte extra que sobra hacia abajo */
    height: 70px;     /* Altura fija del contenedor para gestionar el solape */
}

/* --- Estilo base de cada marcapáginas (Más altos y largos por dentro) --- */
.bookmark {
    pointer-events: auto;
    background-color: #52246a;
    color: #fff;
    font-size: 1.266rem;
    font-weight: 600;
    text-decoration: none;
    /* Más altos: aumentamos el padding superior e inferior */
    padding: 16px 24px; 
    border-radius: 6px 10px 0 0;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
    /* Posición inicial: los empujamos hacia abajo dentro del contenedor para que tengan "cuerpo" extra */
    transform: translateY(18px); 
}

/* --- Efecto al pasar el ratón (Hover) --- */
.bookmark:hover {
    /* Al hacer hover suben del todo, revelando el cuerpo extra y eliminando el hueco */
    transform: translateY(0px); 
    background-color: #642f82;
}

/*CONTENIDO DEL LIBRO*/
/* --- Contenedor general del interior para centrar todo y dejar margen al lomo --- */
.book-content {
 font-family: "PT Serif Caption", serif;
    position: relative;
    width: 100%;
    height: 100%;
    padding: 3rem 3rem 3rem 2rem; /* Deja espacio para el lomo izquierdo (50px) */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Para que la cinta diagonal no sobresalga del libro */
}

/* --- Estructura de textos e imagen --- */
.page-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
    z-index: 2;
}

.book-title-top {
    font-size: 2.281rem;
    color: #fff; /* O el color que prefieras para el texto sobre el fondo oscuro */
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity:0.9;
    position: relative;
    padding-bottom: 12px;
}
.book-title-top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 230px;
    height: 3px;
    background-color: #bb3925; /* Usamos el amarillo de la bandera o un tono pergamino */
    opacity: 1;
}
.book-title-bottom{
    font-size: 2.027rem;
    color: #fff; /* O el color que prefieras para el texto sobre el fondo oscuro */
   opacity: 0.9;
    margin: 0;
    text-transform: uppercase;
}

.book-subtitle {
    font-size: 1.424rem;
    color: #fff;
    opacity: 0.9;
    font-style: italic;
    margin: 0;
}

.book-image-container img {
    max-height: 230px;
    object-fit: contain;
    border-radius: 8px;
    opacity:0.9;
}
.texto-sobre-tela {
    color: #f4f0ea; /* Un tono marfil/hilo claro */
    text-shadow: 
        /* Sombra oscura abajo y a la derecha (crea el hueco donde se hunde la costura) */
        1px 1px 0px rgba(0, 0, 0, 0.7),
        2px 2px 2px rgba(0, 0, 0, 0.4),
        
        /* Brillo claro arriba y a la izquierda (crea el relieve del hilo sobresaliendo) */
        -1px -1px 0px rgba(255, 255, 255, 0.15);
}
/* --- Cinta diagonal con los colores de la bandera de España --- */
.spanish-ribbon {
    position: absolute;
    bottom: 50px;
    right: -60px;
    width: 300px;
    height: 50px;
    transform: rotate(-45deg);
    background: linear-gradient(
        to bottom,
        #aa151b 25%, 
        #f1bf00 25%, 
        #f1bf00 75%, 
        #aa151b 75%
    );
   box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    z-index: 1;
}

/* --- Botón SVG interactivo en la parte central derecha --- */
.side-svg-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 5;
    opacity:0.8;
    animation: pointRight 4s ease-in-out infinite;
}

.side-svg-btn:hover {
animation-play-state: paused;
    transform: translateY(-50%) scale(1.1);
}
@keyframes pointRight {
    /* Del 0% al 70% el icono se queda completamente quieto */
    0%, 70% {
        transform: translateY(-50%) translateX(0);
    }
    /* Entre el 75% y el 85% hace el gesto rápido hacia la derecha y vuelve */
    75% {
        transform: translateY(-50%) translateX(10px);
    }
    80% {
        transform: translateY(-50%) translateX(0);
    }
    85% {
        transform: translateY(-50%) translateX(6px);
    }
    /* Del 90% al 100% vuelve a quedarse quieto esperando el siguiente ciclo */
    90%, 100% {
        transform: translateY(-50%) translateX(0);
    }
}