/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --muted-text: #4b5563;
    --surface: #ffffff;
    --surface-muted: #f3f4f6;
    --card-bg: #ffffff;
    --hero-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    --border-color: #d1d5db;
    --footer-bg: #1f2937;
    --footer-text: #ffffff;
    --page-gutter: clamp(1rem, 4vw, 2rem);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--surface);
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body, button, input, textarea, select {
    font-family: 'Montserrat', sans-serif;
}

body.dark-theme {
    --primary-color: #60a5fa;
    --secondary-color: #3b82f6;
    --text-color: #f3f4f6;
    --muted-text: #cbd5f5;
    --surface: #0f172a;
    --surface-muted: #111827;
    --card-bg: #1f2937;
    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --border-color: #374151;
    --footer-bg: #0b1120;
    --footer-text: #e5e7eb;
    --shadow: 0 8px 25px rgba(15, 23, 42, 0.4);
}

/* Estilos de la sección de instalación */
.installasection {
    padding: 5rem 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

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

.installasection h2 {
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    text-align: center;
    width: 100%;
    max-width: 900px;
    padding: 0 2rem;
    box-sizing: border-box;
}

.installasection > p {
    font-size: 1.2rem;
    margin: 0 auto 5rem;
    color: var(--muted-text);
    max-width: 700px;
    line-height: 1.8;
    padding: 0 1rem;
}

.video-container {
    margin: 0 auto 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    max-width: 160px;
    width: 35%;
}

.video-container video {
    display: block;
    width: 100%;
    height: auto;
    border: none;
    outline: none;
}

.support {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.support p {
    font-size: 1.1rem;
    color: var(--muted-text);
    margin: 0;
}

.support a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.support a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .installasection {
        padding: 3rem 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }
    
    .installasection h2 {
        font-size: 2rem;
        padding: 0 1.5rem;
        max-width: 100%;
    }
    
    .installasection > p {
        font-size: 1.1rem;
        margin-bottom: 4rem;
        padding: 0 0.5rem;
        line-height: 1.7;
    }
    
    .video-container {
        border-radius: 8px;
        width: 85%;
        max-width: 400px;
        margin: 0 auto 1rem;
        padding: 0;
        box-sizing: border-box;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        margin: 0 auto;
        box-sizing: border-box;
    }
}

/* Estilos del encabezado */
.header {
    background-color: var(--surface);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

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

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Estilos del héroe */
.hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('prana img/portada 1.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #fff;
    overflow: hidden;
}

.hero,
.portada-2 {
    margin-left: calc(var(--page-gutter) * -1);
    margin-right: calc(var(--page-gutter) * -1);
    width: calc(100% + (var(--page-gutter) * 2));
}

.portada-2 {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('prana img/portada 2.png');
    background-size: cover;
    background-position: center calc(70% + var(--p2-parallax-offset, 0px));
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #fff;
    margin: 0;
    padding: 4rem 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

.portada-2::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.hero-content,
.portada-2-content {
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
    padding: 2rem;
    margin: 0 auto;
}

.hero h1,
.portada-2 h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p,
.portada-2 p {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cta-button {
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-shadow: none;
}

/* Mejoras para móviles */
@media (max-width: 768px) {
    .hero,
    .portada-2 {
        min-height: 80vh;
        padding: 4rem 1rem;
    }

    .hero {
        background-attachment: scroll;
        background-position: center top !important;
    }

    .portada-2 {
        background-attachment: scroll;
        background-position: center top;
    }
    
    .hero h1,
    .portada-2 h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero p,
    .portada-2 p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .portada-2 {
        padding: 3rem 1rem;
    }
}

/* Ajustes para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1,
    .portada-2 h2 {
        font-size: 2.5rem;
    }
    
    .hero p,
    .portada-2 p {
        font-size: 1.2rem;
    }
}

/* Alcance */
.reach {
    padding: 5rem 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    background: var(--surface-muted);
}

.reach-header {
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reach-header .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    color: var(--muted-text);
}

.reach-header h2 {
    font-size: 2.5rem;
}

.reach-carousel {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.reach-carousel-viewport {
    flex: 1;
    overflow: hidden;
}

.reach-track {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
    transition: transform 0.4s ease;
}

.reach-item {
    flex: 0 0 270px;
    background: var(--card-bg);
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.5;
    transform: scale(0.9);
}

.reach-item.is-active {
    flex-basis: 320px;
    opacity: 1;
    transform: scale(1);
}

.reach-item video {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 1rem;
    object-fit: cover;
    background: #000;
}

.reach-nav {
    border: none;
    background: var(--card-bg);
    color: var(--text-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.reach-nav:hover {
    background: var(--primary-color);
    color: #fff;
}

.reach-player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-color);
    max-width: 600px;
    margin: 2rem auto 0;
}

.reach-progress {
    font-size: 0.9rem;
    color: var(--muted-text);
}

/* Estilos de botones */
.cta-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--secondary-color);
}

/* Estilos de características */
.features {
    padding: 6rem 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.features h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.bundle-video {
    padding: 4rem 1.5rem 6rem;
    text-align: center;
}

.bundle-video h2 {
    margin-bottom: 2rem;
}

.bundle-video .video-container {
    max-width: 720px;
    width: 100%;
}

.bundle-video p {
    max-width: 720px;
    margin: 1.25rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(15, 23, 42, 0.15);
}

.bundle-video p a {
    text-decoration: none;
    color: #93c5fd;
}

.bundle-video p a:visited {
    color: #93c5fd;
}

.bundle-video p a:hover {
    color: #bfdbfe;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.product-card {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    gap: 0;
    align-items: center;
    width: 100%;
    max-width: 340px;
    justify-self: center;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: contain;
    background: var(--surface-muted);
    border-radius: 0.5rem;
}

.product-name {
    margin-top: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}

.product-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.product-price {
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--accent-color, #f5c048);
}

.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 2000;
}

.qr-modal[hidden] {
    display: none;
}

.qr-modal__content {
    background: var(--surface);
    color: var(--text-color);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.qr-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
}

.qr-modal__image {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: #fff;
}

.qr-modal__link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.quantity-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.quantity-btn:hover,
.quantity-btn:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

.quantity-control input {
    width: 60px;
    text-align: center;
    padding: 0.5rem;
    border: none;
    font-size: 1rem;
    background: transparent;
    color: inherit;
    appearance: textfield;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}

.buy-button {
    background: var(--accent-color, #f5c048);
    color: #0f172a;
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 192, 72, 0.35);
}

.whatsapp-button {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    background: #25d366;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.35);
    z-index: 1800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.45);
}

.whatsapp-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.about {
    padding: 5rem 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    background: var(--surface);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-content h2 {
    font-size: 2.25rem;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--muted-text);
}

/* Estilos de contacto */
.contact {
    padding: 6rem 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    background-color: var(--surface-muted);
}

.contact h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--surface);
    color: var(--text-color);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* Estilos del pie de página */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 2rem 0;
    width: 100%;
}

main {
    padding-top: 70px; /* Ajusta según la altura de tu header */
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Botón para alternar tema */
.theme-toggle {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: transparent;
}

/* Menú lateral móvil */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 75%;
    max-width: 320px;
    background: var(--surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1500;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1400;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-controls {
        width: 100%;
        justify-content: space-between;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

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

    .reach {
        padding: 4rem 1.5rem;
    }

    .reach-carousel {
        flex-direction: column;
    }

    .reach-track {
        gap: 1rem;
    }

    .reach-item {
        flex-basis: 220px;
    }

    .reach-item.is-active {
        flex-basis: 240px;
    }
}
