@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    color: #1f2937;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px; /* Aumentado de 240px a 280px */
    height: 100%;
    background-color: #2c3e50;
    color: white;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}

/* Contenedor de logo y título */
.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

/* Logo */
.logo {
    width: 100px;
    height: auto;
    margin-bottom: 12px;
}

/* Título */
.sidebar h2 {
    font-size: 22px;
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

.sidebar a {
    width: 100%;
    padding: 15px 20px;
    text-decoration: none;
    font-size: 16px;
    color: white;
    transition: background 0.3s;
    text-align: left;
}

.sidebar a:hover {
    background-color: #34495e;
}

/* Main content */
.main {
    margin-left: 280px; /* Igual que el nuevo ancho de .sidebar */
    padding: 30px;
    background-color: #f9fafb;
    min-height: 100vh;
}

.main h1 {
    font-size: 28px;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 24px;
    transition: 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}

.card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 500;
}

.card p {
    font-size: 15px;
    color: #4b5563;
}

/* Lista de libros */
.libros ul {
    list-style: none;
    padding-left: 0;
}

.libros li {
    margin: 8px 0;
}

.libros a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 500;
}

.libros a:hover {
    text-decoration: underline;
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-mensaje {
    background-color: #d1fae5;
    color: #065f46;
    padding: 25px 30px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

 /* Estilo rápido para botón Ver más */
    .btn-ver-mas {
        display: inline-block;
        margin-top: 10px;
        padding: 8px 16px;
        background-color: #007bff;
        color: #fff;
        border-radius: 8px;
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.3s ease;
    }

    .btn-ver-mas:hover {
        background-color: #0056b3;
    }

/* === Diseño Responsivo === */
@media (max-width: 1024px) {
    .main {
        padding: 20px;
    }

    .sidebar a {
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 0;
    }

    .sidebar a {
        display: inline-block;
        padding: 10px 14px;
        font-size: 15px;
    }

    .main {
        margin-top: 20px;
        padding: 16px;
    }

    .card {
        padding: 16px;
    }

    .card h3 {
        font-size: 18px;
    }

    .card p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .main h1 {
        font-size: 22px;
        text-align: center;
    }

    .sidebar {
        flex-direction: column;
        align-items: center;
    }

    .sidebar h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .sidebar a {
        width: 100%;
        text-align: center;
        font-size: 14px;
        padding: 10px;
    }

    .card {
        margin-bottom: 16px;
    }
}