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

:root {
    --primary-purple: #b19cd9;
    --light-purple: #e6d4ff;
    --primary-green: #68b5ab;
    --primary-green-dark: #5B9B93FF;
    --light-green: #d4f5e9;
    --dark-purple: #9675c0;
    --white: #ffffff;
    --gray-light: #f8fafc;
    --gray-dark: #334155;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--gray-dark);
}

/* Header y Navegación */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--dark-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/*.logo::before {*/
/*    content: "📚";*/
/*    font-size: 1.5rem;*/
/*    -webkit-text-fill-color: initial;*/
/*}*/

.view-more-link{
    text-decoration: none;
    color: var(--primary-green);
    font-weight: 600;
    transition: all 0.3s;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    text-transform: uppercase;
    color: var(--dark-purple);
    font-weight: 600;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary-green);
    color: var(--white);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: var(--dark-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 5% 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 3rem;
    line-height: 1.8;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: var(--primary-green);
    text-transform: uppercase;
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(177, 156, 217, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(177, 156, 217, 0.6);
    color: white;
}



/* Floating decorations */
.floating-element {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Sections */
section {
    padding: 80px 5%;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-purple);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--gray-dark);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Groups Section */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.group-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-purple), var(--primary-green));
}

.group-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--light-purple);
}

.group-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.group-card h3 {
    color: var(--dark-purple);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.group-card p {
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.age-badge {
    background: var(--primary-green);
    text-transform: uppercase;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.age-badge:hover {
    background: var(--primary-green-dark);
    color: white;
}

.groups-section {
    max-width: 1200px;
}

/* Books Section */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.book-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-10px) rotate(-1deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.book-cover {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.book-info {
    padding: 1.5rem;
}

.book-info h4 {
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.book-info p {
    color: var(--gray-dark);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
footer {
    background: var(--dark-purple);
    color: white;
    text-align: center;
    padding: 3rem 5%;
}

/* Mobile menu styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-purple);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .groups-grid,
    .songs-grid,
    .books-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}


.book-modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.book-modal-content {
    background: #fff;
    max-width: 800px;
    width: 90%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}

.book-modal-body {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    gap: 20px;
}

.book-modal-body img {
    max-width: 250px;
    max-height: 300px;
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.book-modal-text {
    flex: 1;
}

.book-modal-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.book-modal-close:hover {
    color: #000;
}

.buy-button {
    display: inline-block;
    margin-top: 15px;
    background: var(--primary-green);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
}

.buy-button:hover {
    background: var(--primary-green-dark);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.custom-modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.custom-modal-content {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    position: relative;
    animation: fadeIn 0.3s ease;
}

.custom-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 26px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
}

.custom-modal-close:hover {
    color: #000;
}

.modal-title {
    color: var(--dark-purple);
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.modal-label {
    display: block;
    color: var(--gray-dark);
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--light-purple);
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.modal-input:focus {
    border-color: var(--primary-green);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    margin: 0 5px;
    padding: 10px 0;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: var(--gray-light);
    color: var(--gray-dark);
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-submit {
    background: var(--primary-green);
    color: white;
}

.btn-submit:hover {
    background: var(--primary-green-dark);
}

.alert-error {
    background: #ffe5e5;
    color: #b20000;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.view-more-btn {
    display: inline-block;
    background: var(--primary-green);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
    border: none;
}

.view-more-btn:hover {
    background: var(--primary-green-dark);
}

/* ==== Materials Section ==== */
.materials-section {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logout-button {
    background: var(--primary-purple);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background: var(--dark-purple);
    transform: translateY(-2px);
}

.material-group {
    margin-bottom: 3rem;
}

.material-section-title {
    font-size: 1.6rem;
    color: var(--dark-purple);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.material-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.material-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.material-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.material-title {
    font-size: 1.2rem;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.material-description {
    color: var(--gray-dark);
    opacity: 0.8;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Media elements */
.material-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
    object-fit: cover;
}

.material-frame {
    width: 100%;
    height: 200px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.material-video iframe,
.material-spotify iframe {
    width: 100%;
    border-radius: 12px;
    height: 250px;
    margin-bottom: 1rem;
}

.material-audio {
    width: 100%;
    margin-bottom: 1rem;
}

/* Descargar */
.download-button {
    background: var(--primary-green);
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    transition: background 0.3s ease;
}

.download-button:hover {
    background: var(--primary-green-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .material-section-title {
        font-size: 1.3rem;
        text-align: center;
    }
    .materials-section {
        padding: 60px 5%;
    }
}

