/* ==========================================================================
   RESET & VARIABLES
   ========================================================================== */
:root {
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: #ecfdf5;
    --gold: #d97706;
    --gold-light: #fef3c7;
    --dark: #0f172a;
    --dark-muted: #1e293b;
    --text: #334155;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --amber-bg: #fffbeb;
    --amber-border: #fcd34d;
    --amber-text: #92400e;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 35px -10px rgba(5, 150, 105, 0.25);
    --transition: all 0.25s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background-color: var(--white);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-green {
    color: var(--primary) !important;
}

.text-amber {
    color: var(--gold) !important;
}

.text-gold {
    color: var(--gold) !important;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand span {
    color: var(--primary);
}

.brand-badge {
    background: var(--primary-light);
    color: var(--primary);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--dark);
    cursor: pointer;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.88rem;
}

.btn-block {
    width: 100%;
    padding: 14px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 24px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 12px 24px;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
}

.btn-outline-dark {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--dark);
    padding: 10px 20px;
}

.btn-outline-dark:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-store {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--dark);
    color: var(--white);
    padding: 10px 18px;
    border-radius: var(--radius-md);
}

.btn-store i {
    font-size: 1.6rem;
}

.btn-store-dark i {
    color: var(--primary);
}

.btn-store .btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.btn-store small {
    font-size: 0.68rem;
    opacity: 0.8;
}

.btn-store strong {
    font-size: 0.95rem;
}

.btn-store:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    padding: 70px 0 60px;
    background: radial-gradient(circle at top right, rgba(5, 150, 105, 0.08) 0%, transparent 60%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 3.1rem;
    line-height: 1.15;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.stat-item h4 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--dark);
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
}

.device-mockup {
    width: 290px;
    border-radius: 40px;
    background: #0f172a;
    padding: 10px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
    border: 4px solid #334155;
}

.mockup-screen {
    border-radius: 32px;
    overflow: hidden;
}

/* ==========================================================================
   GALERÍA CON AUTO-SCROLL (1 a 17)
   ========================================================================== */
.gallery-section {
    padding: 85px 0 60px;
    background: var(--white);
    overflow: hidden;
}

.gallery-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 25px 0;
    position: relative;
}

/* Gradientes difuminados a los bordes para suavidad */
.gallery-wrapper::before,
.gallery-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 70px;
    z-index: 2;
    pointer-events: none;
}

.gallery-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--white), transparent);
}

.gallery-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--white), transparent);
}

.gallery-track {
    display: flex;
    gap: 24px;
    width: max-content;
    will-change: transform;
    cursor: grab;
}

.gallery-track:active {
    cursor: grabbing;
}

.gallery-card {
    flex: 0 0 215px;
    margin: 10px 6px;
    /* Margen para que respiren */
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.card-inner {
    background: #0f172a;
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    border: 2px solid #e2e8f0;
    overflow: hidden;
}

.card-inner img {
    border-radius: 18px;
    width: 100%;
    height: 410px;
    object-fit: cover;
}

.gallery-card span {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ==========================================================================
   CARACTERÍSTICAS
   ========================================================================== */
.features {
    padding: 90px 0;
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 55px;
}

.section-header h2 {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(5, 150, 105, 0.3);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 18px;
}

.feature-card h3 {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ==========================================================================
   PLANES BASE
   ========================================================================== */
.pricing-section {
    padding: 90px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    align-items: stretch;
    margin-bottom: 45px;
}

.plan-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: var(--transition);
}

.plan-card.featured {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-xl);
    transform: scale(1.02);
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 16px;
    border-radius: 20px;
    text-transform: uppercase;
}

.plan-tag {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
}

.plan-card h3 {
    font-size: 1.7rem;
    color: var(--dark);
    margin: 8px 0;
}

.plan-card .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.plan-card .price span {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
    font-size: 0.92rem;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.plan-features li.disabled {
    opacity: 0.45;
    text-decoration: line-through;
}

/* ==========================================================================
   ALERTA DE SEGURIDAD (REGLA 30 DÍAS)
   ========================================================================== */
.security-alert {
    background: var(--amber-bg);
    border: 1px solid var(--amber-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.alert-icon {
    background: var(--gold-light);
    color: var(--amber-text);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-content h4 {
    color: var(--amber-text);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.alert-content p {
    color: #78350f;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.alert-highlight {
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
}

/* ==========================================================================
   CALCULADORA INTERACTIVA
   ========================================================================== */
.calculator-section {
    padding: 90px 0;
    background-color: var(--bg-light);
}

.calc-wrapper {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 35px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.calc-group {
    margin-bottom: 30px;
}

.calc-label {
    display: block;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    font-size: 1rem;
}

.plan-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-content {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    transition: var(--transition);
}

.radio-card input:checked+.radio-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.radio-content strong {
    display: block;
    color: var(--dark);
}

.radio-content small {
    color: var(--text-muted);
}

/* Slider de clientes */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.client-count-badge {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
}

.custom-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--border);
    outline: none;
    accent-color: var(--primary);
    cursor: pointer;
}

.slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Add-ons */
.addons-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.addon-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.addon-item:hover {
    border-color: var(--primary);
}

.addon-item input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.addon-info {
    width: 100%;
}

.addon-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.addon-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.addon-info p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Contador de Almacenamiento */
.storage-selector {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    font-size: 0.85rem;
}

.counter-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.btn-counter {
    background: var(--bg-light);
    border: none;
    width: 32px;
    height: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-counter:hover {
    background: var(--primary);
    color: var(--white);
}

.counter-box span {
    padding: 0 14px;
    font-weight: 700;
}

.storage-mb {
    color: var(--primary);
    font-weight: 700;
}

/* Resumen del cotizador */
.calc-summary {
    background: var(--dark);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calc-summary h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.summary-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.9rem;
    color: #94a3b8;
    border-bottom: 1px solid var(--dark-muted);
    padding-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
}

.summary-line span:last-child {
    font-weight: 700;
    color: var(--white);
}

.summary-total {
    margin: 25px 0;
}

.summary-total small {
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
}

.total-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: #34d399;
}

.total-number span {
    font-size: 1rem;
    color: #94a3b8;
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox.active {
    display: flex;
}

.lightbox-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#lightbox-img {
    max-height: 80vh;
    max-width: 90vw;
    border-radius: 18px;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.6);
}

.lightbox-counter {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    color: white;
    font-size: 2.4rem;
    background: none;
    border: none;
    cursor: pointer;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition);
}

.lightbox-btn:hover {
    background: var(--primary);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */
.cta-section {
    padding: 75px 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--dark) 0%, #064e3b 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
}

.cta-box h2 {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-box p {
    font-size: 1.05rem;
    opacity: 0.85;
    margin-bottom: 28px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: var(--dark);
    color: #94a3b8;
    padding-top: 70px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 35px;
    padding-bottom: 50px;
}

.footer .brand {
    color: var(--white);
    margin-bottom: 15px;
}

.footer h4 {
    color: var(--white);
    font-size: 1.05rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.92rem;
}

.footer-list a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.social-links a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--dark-muted);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--dark-muted);
    padding: 22px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin: 0 auto 30px;
    }

    .hero-buttons,
    .hero-stats {
        justify-content: center;
    }

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

    .plan-card.featured {
        transform: none;
    }

    .calc-wrapper {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background: var(--white);
        flex-direction: column;
        padding: 35px 20px;
        gap: 20px;
        transition: var(--transition);
        border-top: 1px solid var(--border);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-content h1 {
        font-size: 2.3rem;
    }

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

    .security-alert {
        flex-direction: column;
    }

    .gallery-card {
        flex: 0 0 175px;
    }

    .card-inner img {
        height: 330px;
    }
}

/* Estados interactivos para el calculador */
.gold-options-disabled {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.storage-estimate-box {
    margin-top: 12px;
    background: var(--bg-light);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.storage-estimate-box p {
    font-size: 0.82rem;
    color: var(--dark);
    margin-bottom: 4px;
}

.storage-estimate-box i {
    color: var(--primary);
    margin-right: 6px;
}

.storage-disclaimer {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.3;
}