/* ===================================
   NEVIUMDEV STYLES – SEGURO Y OPTIMIZADO
   =================================== */

/* 🔒 Seguridad base: evitar inyección CSS externa */
@layer reset, base, components, utilities;

/* VARIABLES Y RESET */
@layer reset {
    :root {
        --color-bg-dark: #111827;
        --color-text-light: #F9FAFB;
        --color-accent-pink: #EC4899;
        --color-card-bg: #1F2937;
        --color-border: #374151;
        --color-subtitle: #9CA3AF;
        --spacing-lg: 3rem;
        --spacing-md: 2rem;
        --focus-outline: 2px solid #EC4899;
    }

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

    html {
        scroll-behavior: smooth;
        -webkit-text-size-adjust: 100%;
    }

    body {
        background-color: var(--color-bg-dark);
        color: var(--color-text-light);
        font-family: 'Inter', sans-serif;
        line-height: 1.6;
        overflow-x: hidden;
    }

    /* Evitar selección y drag accidental */
    img, svg {
        user-select: none;
        -webkit-user-drag: none;
    }

    /* Evitar focus outline raro en click */
    :focus:not(:focus-visible) {
        outline: none;
    }
}

/* BASE */
@layer base {
    .container {
        width: 90%;
        max-width: 1200px;
        margin: 0 auto;
    }

    section {
        padding: 60px 0;
        border-bottom: 1px solid var(--color-border);
    }

    h1, h2 {
        font-weight: 900;
        line-height: 1.2;
    }

    h1 {
        font-size: 3.5rem;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 40px;
        color: var(--color-text-light);
    }

    .highlight {
        color: var(--color-accent-pink);
        display: inline-block;
    }

    .section-description {
        color: var(--color-subtitle);
        margin-bottom: 20px;
    }
}

/* BOTONES */
@layer components {
    .btn {
        padding: 10px 25px;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 600;
        cursor: pointer;
        border: none;
        text-align: center;
        display: inline-block;
        transition: all 0.25s ease-in-out;
        will-change: background-color, color, transform;
    }

    .btn:focus-visible {
        outline: var(--focus-outline);
        outline-offset: 3px;
    }

    .primary-btn {
        background-color: var(--color-accent-pink);
        color: var(--color-text-light);
    }

    .primary-btn:hover,
    .primary-btn:focus {
        background-color: #D6287A;
        transform: translateY(-2px);
    }

    .secondary-btn {
        background-color: transparent;
        border: 1px solid var(--color-accent-pink);
        color: var(--color-accent-pink);
        margin-left: 10px;
    }

    .secondary-btn:hover {
        background-color: var(--color-accent-pink);
        color: var(--color-bg-dark);
    }

    .large-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
        width: 100%;
    }
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}
.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-text-light);
}
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}
.nav-links li a {
    color: var(--color-subtitle);
    text-decoration: none;
    margin-left: 25px;
    transition: color 0.2s ease-in-out;
}
.nav-links li a:hover {
    color: var(--color-text-light);
}

/* SECCIONES PRINCIPALES */
.hero-section {
    text-align: center;
}
.breadcrumbs {
    color: var(--color-subtitle);
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.subtitle {
    font-size: 1.1rem;
    color: var(--color-subtitle);
    margin-bottom: 40px;
}
.hero-image-placeholder {
    height: 350px;
    width: 100%;
    background-color: var(--color-card-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--color-subtitle);
    margin-top: 50px;
    user-select: none;
}

/* CÓMO TRABAJO */
.steps-section { text-align: center; }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
    background-color: var(--color-card-bg);
    padding: 30px;
    border-radius: 8px;
}
.step-card {
    text-align: left;
    padding: 20px;
    border-left: 3px solid var(--color-accent-pink);
}
.step-number {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-accent-pink);
}
.step-detail { color: var(--color-subtitle); }

/* BENEFICIOS */
.benefits-section { text-align: center; }
.benefits-grid {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}
.benefit-column {
    background-color: var(--color-card-bg);
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
}
.benefit-item {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}
.benefit-item:last-child {
    border-bottom: none;
}
.benefit-title {
    font-weight: 700;
    color: var(--color-text-light);
}
.benefit-text { color: var(--color-subtitle); }

/* DEMO */
.demo-section { text-align: center; }
.demo-placeholder {
    height: 400px;
    width: 100%;
    background-color: var(--color-card-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-subtitle);
}

/* FORMULARIO */
.contact-section { text-align: center; }
.contact-form {
    max-width: 500px;
    margin: 40px auto 0;
    padding: 30px;
    background-color: var(--color-card-bg);
    border-radius: 8px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background-color: var(--color-bg-dark);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text-light);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-accent-pink);
    outline: none;
}
.contact-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
.legal-text {
    font-size: 0.8rem;
    color: var(--color-subtitle);
    margin-top: 20px;
}

/* FOOTER */
footer {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-subtitle);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.75rem; }
    .nav-links li:not(:last-child) { display: none; }
    .hero-cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .steps-grid { grid-template-columns: 1fr; }
    .contact-buttons-group button { width: 100%; }
}
@media (max-width: 480px) {
    .container { width: 95%; }
    h1 { font-size: 2rem; }
    .hero-image-placeholder, .demo-placeholder { height: 250px; }
}

/* ANIMACIONES */
.scroll-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-section h1.fade-in-on-load {
    opacity: 0;
    animation: fadeInTitle 1.5s ease-out 0.5s forwards;
}
@keyframes fadeInTitle {
    to { opacity: 1; }
}

/* TOAST (notificación segura y accesible) */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #10B981;
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
    pointer-events: none; /* Evita clics fantasma */
}
.toast.error { background-color: #EF4444; }
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.hero-image-placeholder {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
  }
  
  .hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: transform 0.3s ease;
  }
  
  .hero-image:hover {
    transform: scale(1.02);
  }
  .demo-placeholder {
    background: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.demo-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain; /* mantiene proporciones */
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.demo-img:hover {
    transform: scale(1.02); /* efecto sutil de zoom */
}
/* 🌙 Modo oscuro suave + microajustes visuales */
:root {
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-border: #e3e8ef;
    --color-text: #1e293b;
    --color-muted: #64748b;
  }
  
  @media (prefers-color-scheme: dark) {
    :root {
      --color-bg: #0f172a;
      --color-card: #1e293b;
      --color-border: #334155;
      --color-text: #f1f5f9;
      --color-muted: #94a3b8;
    }
  
    body {
      background: var(--color-bg);
      color: var(--color-text);
    }
  
    .card {
      background: linear-gradient(145deg, #1e293b, #162032);
      border: 1px solid #2c3e50;
      box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    }
  
    .card:hover {
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
      transform: translateY(-2px);
    }
  }
  
  /* Ajustes generales */
  .card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: start;
    gap: 1rem;
    height: 100%;
    transition: all 0.3s ease;
  }
  
  .card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
/* 🎠 Carrusel adaptable */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 14px;
    background-color: var(--color-card-bg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    border: 1px solid var(--color-border);
  }
  
  /* 📸 Imágenes sin deformación */
  .carousel img {
    width: 100%;
    height: auto; /* ← deja que el alto se calcule según proporción */
    display: none;
    border-radius: 12px;
    object-fit: contain;
    transition: opacity 0.4s ease;
    background-color: #0f172a;
  }
  
  .carousel img.active {
    display: block;
    opacity: 1;
  }
  
  /* 📱 Ajuste para pantallas pequeñas */
  @media (max-width: 768px) {
    .carousel img {
      width: 100%;
      height: auto;
    }
  }
  /* 🔘 Botones */
  .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background 0.3s;
    z-index: 10;
  }
  .carousel-btn:hover { background: rgba(0, 0, 0, 0.65); }
  .carousel-btn.prev { left: 12px; }
  .carousel-btn.next { right: 12px; }
  
  /* 🔵 Puntos */
  .dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px;
  }
  .dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--color-subtitle);
    cursor: pointer;
    transition: background 0.3s;
  }
  .dots button.active { background: var(--color-accent-pink); }
  
  /* 💡 Lightbox */
  .lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  .lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
  }
  .lightbox.show { display: flex; }
  
  .carousel-video {
    width: 100%;
    max-height: 520px;
    aspect-ratio: 16 / 9; /* mantiene proporción */
    display: none;
    border-radius: 12px;
    object-fit: contain;
    background-color: #0f172a;
  }
  
  .carousel-video.active {
    display: block;
  }
  div[style*="display:none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }