/* Reset and Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Playfair Display', serif;
    background-color: #fdfbf7;
    color: #2a2a2a;
    scroll-behavior: smooth;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    color: #1a1a1a;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #4a4a4a;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #1a1a1a;
}

/* Individual Sections */
.page-section {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fdfbf7;
    padding: 2rem 0;
}

.hero-section {
    padding: 0;
}

/* Images */
.showcase-img {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.background-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background-img.cover {
    object-fit: cover;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 3rem 4rem;
    border-radius: 4px;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeIn 1.5s ease-out;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #1a1a1a;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: #4a4a4a;
    line-height: 1.6;
}

/* Parallax Sections */
.parallax-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
}

.parallax-text {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-size: 2.5rem;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 300;
    letter-spacing: 1px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

/* Process Section */
.process-section {
    padding: 6rem 2rem;
    background-color: #f5f3ef;
    text-align: center;
}

.process-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.process-section p.process-desc {
    font-size: 1.1rem;
    color: #4a4a4a;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.process-item {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.process-video {
    width: 100%;
    max-width: 800px;
    margin: 3rem auto 0;
    display: block;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}


/* Sobre Mi Container */
.sobre-mi-section {
    padding: 8rem 2rem 4rem;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
    min-height: 100vh;
}

.sobre-mi-img {
    flex: 1;
    max-width: 50%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.sobre-mi-text {
    flex: 1;
}

.sobre-mi-text h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.sobre-mi-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a4a4a;
    margin-bottom: 1.5rem;
}


/* Closing Section styling */
.closing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.closing-img {
    max-height: 70vh;
    max-width: 50vw;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.closing-content-right {
    flex: 1;
    max-width: 400px;
}

.closing-content-right h2 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: #1a1a1a;
    color: #fdfbf7;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid #1a1a1a;
    cursor: pointer;
    outline: none;
}

.cta-button:hover {
    background-color: transparent;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* CTA Dropdown container */
.cta-wrapper {
    position: relative;
    display: inline-block;
}

.cta-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    border: 1px solid rgba(0,0,0,0.05);
}

.cta-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.cta-dropdown.dropdown-up {
    top: auto;
    bottom: 100%;
    transform: translateX(-50%) translateY(-10px);
}

.cta-dropdown.dropdown-up.show {
    transform: translateX(-50%) translateY(0);
}

.cta-dropdown a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #4a4a4a;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s, color 0.2s;
}

.cta-dropdown a:hover {
    background-color: #f5f5f5;
    color: #1a1a1a;
}

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-btn .cta-button {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.floating-btn .cta-button:hover {
    background-color: #fdfbf7;
    color: #1a1a1a;
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-section {
        min-height: auto;
        padding: 4rem 1rem;
    }
    
    .hero-section {
        min-height: 100vh;
        padding: 0;
    }
    
    .hero-content {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .showcase-img {
        max-height: 80vh;
        max-width: 100%;
    }
    
    .closing-container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .closing-img {
        max-width: 90vw;
        max-height: 50vh;
    }
    
    .closing-content-right h2 {
        font-size: 2rem;
    }
    
    .floating-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .sobre-mi-section {
        flex-direction: column;
        padding-top: 6rem;
    }
    
    .sobre-mi-img {
        max-width: 100%;
    }
    
    .parallax-text {
        font-size: 1.8rem;
    }
}

/* Origenes Section */
.origenes-section {
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

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

.origenes-header h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.origenes-header p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a4a4a;
    max-width: 800px;
    margin: 0 auto;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    justify-items: center;
}

.comic-window-container {
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comic-window-container:hover {
    transform: scale(1.05);
}

.comic-window {
    width: 100%;
    max-width: 300px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

.comic-title {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #1a1a1a;
    text-align: center;
    font-weight: 600;
}

/* Modal Carousel */
.comic-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.comic-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: scale(1.1);
}

.modal-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    height: 80vh;
    position: relative;
}

.carousel-nav {
    background: none;
    border: none;
    color: white;
    font-size: 4rem;
    cursor: pointer;
    padding: 0 2rem;
    transition: transform 0.2s, opacity 0.2s;
    z-index: 2;
}

.carousel-nav:hover {
    transform: scale(1.1);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.carousel-image-container {
    flex: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.carousel-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
}

.carousel-image.active {
    opacity: 1;
    position: relative;
}

.modal-title {
    color: white;
    font-size: 1.5rem;
    position: absolute;
    bottom: 2rem;
    text-align: center;
    width: 100%;
}

/* Mobile responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        height: 85vh;
        padding: 0 0.5rem;
    }
    
    .carousel-nav {
        font-size: 2.5rem;
        padding: 0 0.5rem;
        background-color: rgba(0, 0, 0, 0.4);
        border-radius: 5px;
        margin: 0 5px;
    }
    
    .modal-close {
        top: 1rem;
        right: 1.5rem;
        font-size: 2.5rem;
    }

    .modal-title {
        bottom: 1rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .carousel-nav {
        position: absolute;
        z-index: 10;
    }
    
    #prevBtn {
        left: 0;
    }
    
    #nextBtn {
        right: 0;
    }
    
    .carousel-image-container {
        width: 100%;
    }
}
