/* Estilos generales */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Header */
.parallax-section {
    background: transparent;
    position: relative;
}

header.parallax-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

header.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

header.parallax-section h1, header.parallax-section h2 {
    position: relative;
    z-index: 1;
}

header.parallax-section h1 {
    font-size: 3.5em;
    margin-bottom: 0.2em;
}

header.parallax-section h2 {
    font-size: 1.8em;
    font-weight: 300;
}

/* Navegación */
nav {
    background-color: #333;
    padding: 1em 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5em 1em;
    margin: 0 0.5em;
}

nav a:hover {
    background-color: #555;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em;
}

section {
    margin-bottom: 4em;
}

h2 {
    color: #333;
    border-bottom: 2px solid #ff6600;
    padding-bottom: 0.5em;
    display: inline-block;
}

/* Parallax sections */
.parallax-section {
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.parallax-section .content {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2em;
    border-radius: 10px;
    position: relative;
    z-index: 2;
    max-width: 600px;
}

/* Book content and benefits */
.book-content, .benefits {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.book-content h2, .benefits h2 {
    flex-basis: 30%;
    margin-right: 2em;
}

.book-content ul, .benefits ul {
    list-style-type: none;
    padding-left: 0;
    flex-basis: 70%;
}

.book-content li, .benefits li {
    margin-bottom: 1em;
    padding-left: 1.5em;
    position: relative;
}

.book-content li:before, .benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #ff6600;
}

/* Testimonials */
.testimonials {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.testimonials h2 {
    width: 100%;
    margin-bottom: 1em;
}

.testimonial {
    flex-basis: calc(50% - 1em);
    margin-bottom: 2em;
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.testimonial-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.testimonial:nth-child(1) .testimonial-bg {
    background-image: url('https://picsum.photos/id/1005/800/600');
}

.testimonial:nth-child(2) .testimonial-bg {
    background-image: url('https://picsum.photos/id/1006/800/600');
}

.testimonial-content {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5em;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial .author {
    text-align: right;
    font-style: italic;
    color: #ff6600;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    background-color: #ff6600;
    color: white;
    padding: 0.8em 1.5em;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #e65c00;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1em 0;
}

/* New sections */
.cta-initial {
    text-align: center;
    padding: 4em 0;
    background-color: #f8f9fa;
}

.why-this-ebook, .explore-chapters, .what-youll-learn, .book-special, .faq {
    padding: 4em 0;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2em;
}

.grid-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1.5em;
    text-align: center;
}

.grid-item img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1em;
}

.testimonial-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2em 0;
}

.testimonial-item {
    flex: 0 0 auto;
    width: 300px;
    margin-right: 2em;
    scroll-snap-align: start;
}

.author-section {
    display: flex;
    align-items: center;
    margin-top: 4em;
}

.author-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-right: 2em;
}

.faq-item {
    margin-bottom: 2em;
}

.faq-item h3 {
    color: #ff6600;
    margin-bottom: 0.5em;
}

/* Responsive design */
@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll;
    }

    .testimonial {
        flex-basis: 100%;
    }

    header.parallax-section h1 {
        font-size: 2.5em;
    }

    header.parallax-section h2 {
        font-size: 1.3em;
    }

    .book-content, .benefits {
        flex-direction: column;
    }

    .book-content h2, .benefits h2 {
        margin-right: 0;
        margin-bottom: 1em;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .author-section {
        flex-direction: column;
        text-align: center;
    }

    .author-image {
        margin-right: 0;
        margin-bottom: 1em;
    }
}

/**/


/* Sección de compra */
.purchase {
    background-color: #f8f9fa;
    padding: 4em 0;
    text-align: center;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.sales-progress {
    height: 10px;
    background-color: #e0e0e0;
    margin-bottom: 2em;
    border-radius: 5px;
    overflow: hidden;
}

.sales-progress::before {
    content: '';
    display: block;
    height: 100%;
    width: 75%; /* Ajusta este valor para mostrar el progreso */
    background-color: #ff6600;
}

.price-comparison {
    margin: 2em 0;
}

.original-price {
    text-decoration: line-through;
    color: #888;
}

.sale-price {
    font-size: 1.5em;
    color: #ff6600;
    margin: 0.5em 0;
}

.savings {
    color: #28a745;
    font-weight: bold;
}

.countdown {
    font-size: 1.2em;
    margin: 1em 0;
}

.cta-button-large {
    font-size: 1.2em;
    padding: 1em 2em;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cta-button-large:hover {
    background-color: #e65c00;
}

.guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2em 0;
}

.guarantee img {
    width: 100px;
    margin-right: 1em;
}

.visitor-counter {
    font-style: italic;
    color: #888;
    margin-top: 2em;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1em 0;
}

/* Exit Popup */
.exit-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.exit-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2em;
    border-radius: 10px;
    text-align: center;
}

.exit-popup-content h3 {
    margin-top: 0;
}

.exit-popup-content button {
    margin: 1em 0.5em;
    padding: 0.5em 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.exit-popup-content button:first-of-type {
    background-color: #ff6600;
    color: white;
}

.exit-popup-content button:last-of-type {
    background-color: #e0e0e0;
    color: #333;
}

  @keyframes changeColorH1 {
    0% { color: #007bff; }
    50% { color: #dc3545; }
    100% { color: #007bff; }
  }

  @keyframes changeColorH2 {
    0% { color: #28a745; }
    50% { color: #ffc107; }
    100% { color: #28a745; }
  }

header.parallax-section h1 {
    animation: changeColorH1 5s infinite;
}

header.parallax-section h2 {
    animation: changeColorH2 5s infinite;
}

nav {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ff6600;
}

.nav-links .cta-button {
    background-color: #ff6600;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-links .cta-button:hover {
    background-color: #e65c00;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px;
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: #ffffff;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
        margin: 1rem 0;
    }

    .burger {
        display: block;
    }
}

.nav-active {
    transform: translateX(0%);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}


/* Navegación */
nav {
    background-color: #333;
    padding: 1em 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5em 1em;
    margin: 0 0.5em;
}

nav a:hover {
    background-color: #555;
}

.tip-carousel {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.2em;
    padding: 0 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    margin: 20px 0;
}

.tip-message {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}
