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

body {
    font-family: 'League Spartan', sans-serif;
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    padding: 2rem 0;
}

.logo {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    gap: 2rem;
}

.main-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: #cccccc;
    max-width: 600px;
}

.footer {
    text-align: center;
    padding: 2rem 0;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-icon {
    font-size: 2.5rem;
    color: #ffffff;
    transition: color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px);
}

.social-icon.facebook:hover {
    color: #1877f2;
}

.social-icon.instagram:hover {
    color: #e4405f;
}

@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .social-icon {
        font-size: 2rem;
    }
}

/* Event and Section Styles */
.event-intro {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #ffffff;
}

/* PDF Viewer Styles */
.pdf-section {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 3rem;
}

.pdf-container {
    width: 100%;
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 1rem;
}

.flipbook-wrapper {
    width: 100%;
    height: 600px;
    border: 2px solid #333;
    border-radius: 10px;
    overflow: hidden;
    background-color: #1a1a1a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flipbook-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
    font-size: 1.2rem;
}

.flipbook-loading i {
    font-size: 2rem;
    color: #ff6b6b;
}

.flipbook-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
}

.control-btn {
    background: linear-gradient(45deg, #333, #555);
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
}

.control-btn:hover {
    background: linear-gradient(45deg, #555, #777);
    transform: translateY(-2px);
}

.page-info {
    color: #ffffff;
    font-weight: 500;
    padding: 0.8rem 1rem;
    background-color: #333;
    border-radius: 8px;
    min-width: 120px;
    text-align: center;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-viewer-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

#pdf-canvas {
    max-width: 100%;
    max-height: 100%;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
    font-size: 1.1rem;
}

.direct-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ff6b6b;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 2px solid #ff6b6b;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.direct-link:hover {
    background-color: #ff6b6b;
    color: #ffffff;
    transform: translateY(-2px);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #333;
}

.control-btn:disabled:hover {
    transform: none;
    background: #333;
}

/* Magazine Cover Styles */
.cover-section {
    width: 100%;
    max-width: 900px;
    margin-bottom: 3rem;
}

.cover-container {
    width: 100%;
    height: 600px;
    background: url('assets/portada-quinta-edicion.JPG') left top/cover no-repeat;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cover-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.cover-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
    display: none;
    
}

.cover-content {
    text-align: center;
    color: #ffffff;
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.cover-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    line-height: 1.1;
    display: none;

}

.cover-subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    opacity: 0.9;
    display: none;

}

.cover-edition-btn {
    background-color: #ffffff;
    color: #1a1a1a;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #ffffff;
    display: none;

}

.cover-edition-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: #1a1a1a;
}

/* Photo Grid Styles */
.photos-section {
    width: 100%;
    max-width: 1200px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.photo-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #1a1a1a;
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.photo-item img.align-top {
    object-fit: contain;
    object-position: top;
    height: auto;
    max-height: 200px;
}

.photo-item.fallback-item {
    position: relative;
}

.photo-item.fallback-item::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: bold;
    z-index: 1;
}

.vertical-preview {
    object-fit: cover !important;
    object-position: center top;
    height: 200px !important;
    width: 100%;
    border-radius: 10px;
}

/* View More Button */
.view-more-container {
    text-align: center;
    margin-top: 2rem;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #FFFFFF;
    color: #1a1a1a;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #ffffff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #ff6b6b;
}

.modal-actions {
    margin-top: 1rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #ffffff;
    color: #1a1a1a;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.4);
}

/* Gallery Page Styles */
.nav {
    text-align: start;
    margin-top: 1rem;
    padding-left: 2rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 2px solid #333;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.gallery-intro {
    margin-bottom: 2rem;
}

.gallery-section {
    width: 100%;
    max-width: 1400px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.gallery-go-back-btn {
    background-color: #ffffff;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 2px solid #333;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.gallery-go-back-btn:hover {
    /* background-color: #333; */
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .social-icon {
        font-size: 2rem;
    }

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

    .pdf-container {
        height: 400px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .photo-item img {
        height: 150px;
    }

    .modal-content {
        width: 95%;
        padding: 10px;
    }

    .cover-container {

        height: 500px;
    }
    
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

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

    .pdf-container {
        height: 300px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .view-more-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .cover-container {
        background-position: top;
        background-size: cover;
        background-repeat: no-repeat;
        height: 450px;
    }

    .nav {
        text-align: center;
        margin-top: 2rem;
    }
    
}

@media (max-width: 375px) {

    .cover-container {
        background-position: top;
        background-size: cover;
        background-repeat: no-repeat;
        height: 400px;
    }
    
}

