/* ==================== VARIABLES CSS ==================== */
:root {
    --header-height: 3.5rem;

    /* Colores: Paleta moderna y vibrante */
    --bg-dark: #0A0A0A;
    --bg-card: #161616;
    --border-color: #2A2A2A;
    --text-primary: #F0F0F0;
    --text-secondary: #A3A3A3;
    --white-color: #FFFFFF;

    /* Gradiente: Verde Neón a Cian Eléctrico */
    --gradient-accent: linear-gradient(90deg, #07eb85, #00D4FF);
    --gradient-start: #07eb85;
    --gradient-end: #00D4FF;
    --error-color: #ff4d4d;

    /* Tipografía */
    --body-font: 'Poppins', sans-serif;
    --biggest-font-size: 2.25rem;
    --h1-font-size: 1.75rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;

    /* Pesos de fuente */
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

/* Tipografía Responsiva */
@media screen and (min-width: 968px) {
    :root {
        --biggest-font-size: 4rem;
        --h1-font-size: 2.5rem;
        --h2-font-size: 1.75rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.05rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    color: var(--white-color);
    font-weight: var(--font-semibold);
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ==================== REUSABLE CSS & HELPERS ==================== */
.container {
    max-width: 1120px;
    margin-left: 1rem;
    margin-right: 1rem;
}
.grid { display: grid; gap: 1.5rem; }
.section { 
    padding: 4.5rem 0 2rem;
    padding-top: calc(4.5rem + env(safe-area-inset-top));
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}
.section__title {
    font-size: var(--h2-font-size);
    text-align: center;
    margin-bottom: 1rem;
    color: var(--white-color);
}
.section__subtitle {
    display: block;
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3.5rem;
    padding: 0 1rem;
}
.gradient-text {
    background: var(--gradient-accent);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}
.not-included {
    color: var(--error-color);
}

/* ==================== HEADER & NAV ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding-top: env(safe-area-inset-top);
}

.nav { 
    height: var(--header-height); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 0 1rem;
    position: relative;
}
.nav__logo img {
    height: 7rem; /* Antes 7rem, ahora más pequeño para móviles */
    width: auto; /* Asegura que la anchura se ajuste proporcionalmente */
    transition: opacity 0.3s;
}
.nav__logo img:hover { opacity: 0.8; }

.nav__toggle, 
.nav__close { 
    font-size: 1.5rem;
    color: var(--white-color); 
    cursor: pointer;
    z-index: var(--z-fixed);
    -webkit-tap-highlight-color: transparent;
    position: absolute;
    right: 1rem;
}

@media screen and (max-width: 767px) {
    .nav__menu { 
        position: fixed; 
        background: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        width: 70%; 
        height: 100vh; 
        top: 0; 
        right: -100%; 
        padding: 5rem 1.5rem 2rem;
        transition: right 0.4s ease;
        z-index: var(--z-fixed); 
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }

    .nav__list { 
        display: flex; 
        flex-direction: column; 
        gap: 1rem;
        padding: 0;
    }

    .nav__link { 
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        font-weight: var(--font-medium);
        font-size: 1rem;
        transition: background 0.3s, color 0.3s;
        color: var(--text-primary);
    }

    .nav__link:hover {
        background: rgba(255, 255, 255, 0.05);
        color: var(--gradient-start);
    }
}
.show-menu { right: 0 !important; }

/* ==================== BUTTONS ==================== */
.button { 
    display: inline-block; 
    padding: 0.85rem 1.75rem; 
    border-radius: .5rem; 
    font-weight: var(--font-semibold); 
    transition: transform .3s, box-shadow .3s; 
    border: none; 
    cursor: pointer; 
    font-size: 1rem;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.button--gradient { 
    background: var(--gradient-accent); 
    color: var(--bg-dark); 
}
.button--gradient:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 10px 20px -10px var(--gradient-start); 
}
.button--outline { 
    background: transparent; 
    color: var(--text-primary); 
    border: 2px solid var(--border-color); 
}
.button--outline:hover { 
    border-color: var(--text-primary); 
    color: var(--white-color); 
    background-color: rgba(255, 255, 255, 0.05);
}
.button--header { display: none; }
.button--full { width: 100%; }

/* ==================== HERO ==================== */
.hero__container { 
    padding-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero__title { 
    font-size: var(--biggest-font-size); 
    line-height: 1.2; 
    margin-bottom: 1rem; 
    font-weight: var(--font-bold); 
}

.hero__image-wrapper { 
    position: relative; 
    margin: 2rem 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero__image { 
    max-width: 280px; 
    /* Asegura que la imagen sea flexible dentro de su contenedor */
    width: 90%; 
    z-index: 5; 
    position: relative; 
}

.hero__image-wrapper::after { 
    content: ''; 
    position: absolute; 
    width: 90%; 
    height: 90%; 
    background: var(--gradient-accent); 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    filter: blur(80px); 
    z-index: 1; 
    opacity: 0.5; 
}

.hero__subtitle { 
    max-width: 500px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
}

.hero__buttons { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    gap: 1rem;
    max-width: 320px;
    margin: 0 auto 2rem;
}


/* ==================== BENEFITS ==================== */
.benefits__container { 
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
.benefit__card { 
    background-color: var(--bg-card); 
    border: 1px solid var(--border-color); 
    padding: 2rem 1.5rem; 
    border-radius: .75rem; 
    text-align: center; 
    transition: border-color .3s, transform .3s, box-shadow .3s; 
}
.benefit__card:hover { 
    transform: translateY(-5px); 
    border-color: var(--gradient-start); 
    box-shadow: 0 8px 25px rgba(7, 235, 133, 0.1);
}
.benefit__icon { font-size: 2rem; margin-bottom: 1rem; }
.benefit__title { font-size: var(--h3-font-size); margin-bottom: .5rem; }
.benefit__description { color: var(--text-secondary); font-size: var(--small-font-size); }

/* ==================== PRICING PLANS ==================== */
.plans__container {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch;
}
.plan__card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    transition: transform .3s, box-shadow .3s;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.plan__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.plan__title { font-size: 1.3rem; margin-bottom: 1rem; }
.plan__price { margin-bottom: 1rem; }
.plan__price-amount {
    /* Ajuste para el tamaño de fuente del precio */
    font-size: 2rem; /* Antes 2.75rem, ahora más pequeño en móvil */
    font-weight: var(--font-bold);
    color: var(--white-color);
}
.plan__price-period { color: var(--text-secondary); }
.plan__description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    min-height: 50px;
}
.plan__features {
    text-align: left;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}
.plan__features li {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}
.plan__features .fa-check, 
.plan__features .fa-xmark { 
    font-size: 1rem;
    min-width: 20px;
}

/* Recommended Plan styles */
.plan__card.recommended {
    border: 2px solid var(--gradient-start);
    transform: scale(1.05);
}
.plan__badge {
    position: absolute;
    top: 15px;
    right: -35px;
    background: var(--gradient-accent);
    color: var(--bg-dark);
    font-weight: var(--font-bold);
    font-size: var(--small-font-size);
    padding: .25rem 2.5rem;
    transform: rotate(45deg);
}

/* ==================== CONTACT FORM ==================== */
.contact__container { 
    max-width: 600px; 
    margin: 0 auto; 
}
.contact__form { display: grid; gap: 1.25rem; }
.form__group { position: relative; }
.form__input { 
    width: 100%; 
    padding: 1rem; 
    border: 1px solid var(--border-color); 
    border-radius: .5rem; 
    font-family: var(--body-font); 
    font-size: var(--normal-font-size); 
    background-color: var(--bg-card); 
    color: var(--text-primary); 
    transition: border-color .3s; 
    -webkit-appearance: none;
}
.form__label { 
    position: absolute; 
    top: 1rem; 
    left: 1rem; 
    color: var(--text-secondary); 
    pointer-events: none; 
    transition: all .3s; 
}
.form__input:focus { 
    outline: none; 
    border-color: var(--gradient-start); 
}
.form__input:focus + .form__label, 
.form__input:not(:placeholder-shown) + .form__label { 
    top: -.75rem; 
    left: .75rem; 
    font-size: var(--small-font-size); 
    background-color: var(--bg-card); 
    padding: 0 .25rem; 
    color: var(--gradient-start); 
}

/* Estilos para los mensajes del formulario */
.form__message {
    text-align: center;
    margin-top: 1.5rem;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    font-weight: var(--font-medium);
    opacity: 0; /* Inicialmente oculto */
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.form__message.sending {
    opacity: 1;
    transform: translateY(0);
    background-color: rgba(0, 212, 255, 0.1); /* Cian suave */
    color: var(--gradient-end);
}

.form__message.success {
    opacity: 1;
    transform: translateY(0);
    background-color: rgba(7, 235, 133, 0.1); /* Verde suave */
    color: var(--gradient-start);
}

.form__message.error {
    opacity: 1;
    transform: translateY(0);
    background-color: rgba(255, 77, 77, 0.1); /* Rojo suave */
    color: var(--error-color);
}



/* ==================== FOOTER ==================== */
.footer { 
    background-color: var(--bg-card); 
    color: var(--text-secondary); 
    padding: 3rem 1rem; 
    margin-top: 4rem; 
    text-align: center; 
    border-top: 1px solid var(--border-color); 
    padding-bottom: calc(3rem + env(safe-area-inset-bottom));
}
.footer__container { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1.5rem;
}
.footer__copy { font-size: var(--small-font-size); }
.footer__social { display: flex; gap: 1.5rem; }
.footer__social-link { font-size: 1.25rem; transition: color .3s; }
.footer__social-link:hover { color: var(--white-color); }

/* ==================== MEDIA QUERIES ==================== */
@media screen and (min-width: 576px) {
    .hero__buttons { 
        flex-direction: row; 
        max-width: none;
    }
}

@media screen and (min-width: 768px) {
    .container { margin-left: 1.5rem; margin-right: 1.5rem; }
    .nav__menu { 
        position: static; 
        width: auto; 
        height: auto; 
        padding: 0; 
        background-color: transparent; 
        border-left: none; 
    }
    .nav__list { flex-direction: row; gap: 2.5rem; }
    .nav__toggle, .nav__close { display: none; }
    .button--header { display: inline-block; }
    .section { padding: 7rem 0 3rem; }
    
    /* Hero section changes for desktop */
    .hero__container { 
        padding-top: 4rem;
    }
    
    .hero__content {
        max-width: 800px;
    }

    .hero__image { 
        max-width: 380px; 
    }
    
    .plan__card.recommended { transform: scale(1.0); }
    .plan__card.recommended:hover { transform: translateY(-8px) scale(1.05); }
    .footer__container { flex-direction: row; justify-content: space-between; }

    /* Ajuste de tamaño de fuente del precio para pantallas más grandes */
    .plan__price-amount {
        font-size: 2.75rem; /* Vuelve al tamaño original en pantallas de escritorio */
    }
}

@media screen and (min-width: 1024px) {
    .benefits__container { grid-template-columns: repeat(3, 1fr); }
    .plans__container { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
    .hero__image { 
        max-width: 480px; 
    }
    .hero__image-wrapper::after { filter: blur(120px); }
}

/* ==================== DEMO BUTTONS - SOLUCIÓN CON GRADIENTE Y AJUSTES ==================== */
.hero__demo-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem; 
    width: 100%;
    max-width: 500px;
    /* Ajustado el margen superior */
    margin: 3rem auto 0; /* Antes 5rem, ahora 3rem */
}

.demo-button {
    position: relative; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    /* Ajustado el padding para que la imagen y el texto estén más compactos */
    padding: 100px 1rem 1.5rem 1rem; /* Antes 80px top, ahora 60px */
    transition: all 0.3s ease;
    text-align: center;
    /* Reducido la altura mínima para permitir más flexibilidad */
    min-height: 150px; /* Antes 170px, ahora 150px */
}

/* (NUEVO) Creamos el resplandor con un pseudoelemento */
.demo-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150%; 
    height: 100px;
    background: radial-gradient(ellipse at top, hsla(158, 88%, 45%, 0.15), transparent 70%);
    z-index: 0; 
}


.demo-button:hover {
    transform: translateY(-5px);
    border-color: var(--gradient-start);
    box-shadow: 0 10px 20px rgba(7, 235, 133, 0.1);
}

.demo-button__image-wrapper {
    position: absolute;
    /* Ajustado la posición de la imagen para que esté más cerca del texto */
    top: -170px; /* Antes -85px, ahora -65px */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 1; 
}

.demo-button__image {
    /* Ajuste para el tamaño de las imágenes de los botones de demo */
    max-width: 200px; /* Antes 100px, ahora 80px */
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.demo-button:hover .demo-button__image {
    transform: scale(1.05);
}

.demo-button__text {
    font-weight: var(--font-semibold);
    color: var(--white-color);
    transition: color 0.3s;
    margin-top: auto;
    z-index: 1; 
}

.demo-button:hover .demo-button__text {
    color: var(--gradient-start);
}

/* ==================== iOS Specific Fixes ==================== */
/* Prevents iOS from zooming on input focus */
.ios input[type="text"],
.ios input[type="email"],
.ios input[type="tel"],
.ios textarea {
    font-size: 1rem !important; 
    -webkit-text-size-adjust: 100% !important;
}

/* Adjustments for safe areas if needed, though env() should handle most cases */
.ios body {
    padding-top: calc(env(safe-area-inset-top, 0px));
    padding-bottom: calc(env(safe-area-inset-bottom, 0px));
}

/* If you find specific elements getting cut off, you might add */
.ios .header {
    padding-top: env(safe-area-inset-top, 20px); 
}
.ios .section {
    padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
}
.ios .footer {
    padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
}

.plan__extra,
.plan__note{
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: var(--small-font-size);
}

/* ===== Listas de features en Planes: icono + texto sin saltos feos ===== */
.plan__features li{
  display: grid;
  grid-template-columns: 22px 1fr;  /* 1ª col: ícono | 2ª col: texto */
  column-gap: .75rem;
  align-items: start;
  line-height: 1.5;
}

.plan__features li i{
  grid-column: 1;
  margin-top: .2rem;               /* alinea el check con la primera línea */
  font-size: 1rem;
}

.plan__features li span{
  grid-column: 2;
  white-space: normal;
  word-break: normal;
  text-wrap: pretty;               /* navegadores modernos: cortes más bonitos */
}

.plan__features li span b{
  white-space: nowrap;             /* evita “link” y “único” en líneas distintas */
}

/* Textos auxiliares debajo de las listas */
.plan__extra,
.plan__note{
  margin-top: -0.25rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: var(--small-font-size);
}

/* ===== Botón WhatsApp Sticky (solo móvil) ===== */
.wa-sticky{
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: .5rem;

  /* Estética acorde al sitio */
  background: var(--gradient-accent);
  color: var(--bg-dark);
  border-radius: 999px;
  padding: .85rem 1rem;
  font-weight: var(--font-semibold);
  font-size: .95rem;
  box-shadow: 0 12px 25px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.wa-sticky i{
  font-size: 1.25rem;
  line-height: 1;
}

.wa-sticky:hover{ 
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0,0,0,.4);
}

/* Solo mostrar en pantallas móviles */
@media (min-width: 768px){
  .wa-sticky{ display: none; }
}

/* (Opcional) que no tape el botón cuando abrimos el teclado en iOS */
@supports (padding: max(0px)){
  .wa-sticky{
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* Empuja la sección donde están los teléfonos de demo más abajo */
.hero__demo-buttons{
  /* el primer valor (5.5rem) es la separación en móvil */
  margin: 7.5rem auto 0 !important;
}

/* un poco más de aire en pantallas grandes */
@media (min-width: 768px){
  .hero__demo-buttons{ margin-top: 6.5rem !important; }
}
@media (min-width: 1024px){
  .hero__demo-buttons{ margin-top: 7rem !important; }
}
