/* Reseteo básico y variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --secondary: #0f172a;
    --bg-light: #f8fafc;
    --text-dark: #334155;
    --text-light: #64748b;
    --whatsapp: #25d366;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 80px;
}

/* ==========================================================================
   Main Header & Navigation (Sticky Top Bar)
   ========================================================================== */
.main-header {
    background-color: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: fixed; /* Cambiado a fixed para asegurar que la nav quede fija en móviles */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999; /* Máxima prioridad sobre cualquier capa */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.85rem 1.5rem;
}

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

/* Marca y Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.brand-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--primary); /* O #38bdf8 */
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Links & Acciones */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Dropdown Productos */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.dropdown:hover .dropdown-trigger {
    color: #ffffff;
}

.chevron-icon {
    transition: transform 0.2s ease;
}

.dropdown:hover .chevron-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 260px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.item-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
}

.item-desc {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

/* Email & Botón CTA */
.email-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.email-link:hover {
    color: #ffffff;
}

.nav-btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.nav-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
section.hero {
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* Corta cualquier desborde de las imágenes de fondo */
    isolation: isolate; /* Crea un contexto de apilamiento aislado estricto */
    padding: 6rem 1rem 4rem; /* Padding superior para compesar la nav fixed */
    background: linear-gradient(135deg, var(--secondary) 0%, #1e293b 100%);
    color: white;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0; /* Asegura cubrir el 100% exacto del container sin salirse */
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0; /* Queda al fondo absoluto dentro del hero */
}

.hero-bg-front {
    z-index: 1;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

section.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Oscurece el fondo */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3; /* El texto queda siempre sobre la imagen y el overlay */
    color: white;
    text-align: center;
    max-width: 800px;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    color: #f1f5f9;
    font-size: 1.2rem;
    line-height: 1.7;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Pricing Section / Grid
   ========================================================================== */
.pricing-section {
    max-width: 1100px;
    margin: 2rem auto 3rem;
    padding: 0 1rem;
}

.pricing-container {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 1rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pricing-container::-webkit-scrollbar {
    display: none;
}

.pricing-card {
    flex: 0 0 85%;
    scroll-snap-align: center;
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 15px -3px rgb(2 132 199 / 0.1), 0 4px 6px -4px rgb(2 132 199 / 0.1);
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.card-header h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.card-header .desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    min-height: 45px;
}

.price {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.features-list li {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-dark);
}

.features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ==========================================================================
   Info Section
   ========================================================================== */
.info-section {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.info-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-card h4 {
    margin-bottom: 1rem;
    color: var(--secondary);
    font-size: 1.1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
}

.info-card ul {
    list-style-type: none;
}

.info-card ul li {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.7;
}

.info-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-light);
    font-size: 1.2rem;
}

.info-card ul li strong {
    color: var(--secondary);
}

/* ==========================================================================
   Custom Software Development Section
   ========================================================================== */
.custom-dev-section {
    padding: 4rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.custom-dev-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    color: #ffffff;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.custom-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-dev-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.2;
}

.custom-dev-content p {
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.custom-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.custom-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.custom-features li svg {
    color: #38bdf8;
    flex-shrink: 0;
}

.quote-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.quote-box h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.quote-box p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.btn-custom {
    display: inline-block;
    width: 100%;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-custom:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   Footer & Floating Elements
   ========================================================================== */
footer {
    background-color: #f1f5f9;
    color: var(--text-dark);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top: 2px solid #e2e8f0;
}

footer p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.95rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--whatsapp);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

.whatsapp-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (min-width: 768px) {
    .pricing-container {
        overflow-x: visible;
        scroll-snap-type: none;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .pricing-card {
        flex: 1;
        max-width: 340px;
    }

    .pricing-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    }
}

@media (max-width: 768px) {
    section.hero {
        min-height: 380px;
        padding: 3rem 1rem 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .custom-dev-container {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .custom-dev-content h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 640px) {
    .email-link span {
        display: none;
    }
}

@media (max-width: 768px) {
    section.hero {
        min-height: 380px;
        padding: 6.5rem 1.25rem 3.5rem; /* Asegura espacio suficiente arriba por el header fixed */
    }

    .pricing-section {
        position: relative;
        z-index: 10; /* Eleva el pricing para asegurarse de que quede por encima visualmente si hay sombras */
        margin-top: 1rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
        line-height: 1.5;
    }
}