/**
 * HENFLUX - Design System & Stylesheet Principal
 * Arquitectura SaaS moderna, minimalista, ultra liviana y accesible
 * Soporte nativo para modo claro y oscuro con transiciones suaves
 */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Tema Oscuro por Defecto (Default Tech Aesthetic) */
    --bg-main: #090d16;
    --bg-surface: #101726;
    --bg-surface-elevated: #182238;
    --bg-card: rgba(16, 23, 38, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(59, 130, 246, 0.4);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-accent: #38bdf8;
    --brand-glow: rgba(56, 189, 248, 0.15);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --header-height: 72px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px -5px rgba(37, 99, 235, 0.3);
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-subtle: #e2e8f0;
    --border-hover: rgba(37, 99, 235, 0.3);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --brand-primary: #1d4ed8;
    --brand-primary-hover: #1e40af;
    --brand-accent: #0284c7;
    --brand-glow: rgba(2, 132, 199, 0.1);

    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 30px -5px rgba(29, 78, 216, 0.15);
}

/* ==========================================================================
   RESET Y BASE
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

/* ==========================================================================
   CONTENEDORES Y TIPOGRAFÍA
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container-narrow {
    max-width: 860px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ==========================================================================
   BADGES Y PILLS
   ========================================================================== */
.badge-tech {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: var(--brand-glow);
    color: var(--brand-accent);
    border: 1px solid var(--border-hover);
    margin-bottom: 1rem;
    align-self: flex-start;
    flex-shrink: 0;
    height: fit-content;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-tech::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-accent);
    box-shadow: 0 0 8px var(--brand-accent);
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.35;
    max-width: 100%;
    box-sizing: border-box;
}

.btn-primary {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    color: #ffffff;
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.88rem;
}

.btn-lg {
    padding: 0.95rem 2rem;
    font-size: 1.05rem;
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
}

[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.88);
}

.site-header .container {
    max-width: 1360px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1.5rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-right: clamp(2rem, 3.5vw, 3.5rem);
    flex-shrink: 0;
}

.site-logo span {
    color: var(--brand-accent);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-right: auto;
}

.mobile-nav-header,
.mobile-nav-actions,
.mobile-nav-overlay {
    display: none;
}

.mobile-nav-links {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1.25vw, 1.35rem);
}

.nav-link {
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
}

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

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.94rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-dropdown-trigger:hover {
    color: var(--text-primary);
}

.dropdown-chevron {
    transition: transform 0.25s ease;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 260px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.6rem;
    box-shadow: var(--shadow-subtle);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    white-space: normal;
}

.dropdown-item:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Switch de Modo Oscuro / Claro */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* Botón Menú Móvil Hamburger */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* ==========================================================================
   SECCIONES PRINCIPALES (HERO, SECTORS, PILLARS)
   ========================================================================== */
.hero-section {
    padding: clamp(3.5rem, 8vw, 6.5rem) 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(9, 13, 22, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: 1.25rem;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    margin-bottom: 2.25rem;
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Mockup Tecnológico SaaS Hero */
.hero-mockup-wrapper {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    overflow: hidden;
}

.mockup-window-header {
    background: var(--bg-surface-elevated);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-address-bar {
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 0.25rem 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mockup-dashboard-body {
    padding: 2rem;
    background: var(--bg-surface);
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .mockup-dashboard-body {
        grid-template-columns: 1fr;
        padding: 1.25rem 1rem;
        gap: 1.25rem;
    }

    .mockup-address-bar {
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
        margin-left: 0.5rem;
        max-width: 220px;
    }
}

/* ==========================================================================
   GRILLAS Y TARJETAS
   ========================================================================== */
.section {
    padding: 5rem 0;
    position: relative;
}

.section-alt {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

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

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-subtle);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--brand-glow);
    color: var(--brand-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--brand-accent);
}

.card-link:hover {
    gap: 0.7rem;
}

/* ==========================================================================
   PORTAFOLIO DE PROYECTOS (4 COLUMNAS EN DESKTOP, 1 EN MÓVILES)
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.portfolio-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}

.portfolio-card-header {
    background: var(--bg-surface-elevated);
    padding: 0.55rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}

.portfolio-url-badge {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    background: var(--bg-main);
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-sm);
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-main);
}

.portfolio-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-card-media img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 2;
}

.portfolio-category-pill {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--brand-accent);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.portfolio-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.portfolio-client {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.portfolio-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.portfolio-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.portfolio-tag {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.portfolio-card-action {
    margin-top: auto;
}

.portfolio-btn {
    width: 100%;
    gap: 0.4rem;
    font-size: 0.88rem;
    padding: 0.65rem 1rem;
}

.portfolio-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.portfolio-filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-surface-elevated);
}

.portfolio-filter-btn.active {
    color: #ffffff;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   METODOLOGÍA Y PROCESO
   ========================================================================== */
.process-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.step-number {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ==========================================================================
   PREGUNTAS FRECUENTES (FAQ ACORDEÓN)
   ========================================================================== */
.faq-accordion {
    max-width: 840px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background: var(--bg-surface);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 1rem;
}

.faq-chevron {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1.25rem;
    display: none;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    display: block;
}

/* ==========================================================================
   FORMULARIOS DE CONVERSIÓN
   ========================================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

/* ==========================================================================
   TABLAS COMPARATIVAS
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.94rem;
}

.table-custom th, .table-custom td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.table-custom th {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    font-weight: 600;
}

.table-custom tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--brand-accent);
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */
.floating-whatsapp {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: #25d366;
    color: #ffffff;
    padding: 0.75rem 1.25rem 0.75rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
    transition: var(--transition);
    text-decoration: none;
}

.floating-whatsapp svg {
    flex-shrink: 0;
}

.floating-whatsapp:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
    color: #ffffff;
    background: #20ba5a;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 4.5rem 0 3rem;
    margin-top: auto;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.92rem;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--brand-accent);
    transform: translateX(3px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-legal-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.footer-legal-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    white-space: nowrap;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0;
}

.footer-legal-links a:hover {
    color: var(--brand-accent);
}

/* ==========================================================================
   NOTIFICACIONES TOAST
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    min-width: 280px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE FIRST & BREAKPOINTS)
   ========================================================================== */
@media (max-width: 1024px) {
    .site-logo {
        margin-right: 0;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        color: var(--text-primary);
        cursor: pointer;
        padding: 0;
        transition: var(--transition);
    }

    .mobile-menu-btn:hover {
        border-color: var(--border-hover);
        background: var(--bg-surface-elevated);
    }

    /* Cajón de Navegación Lateral Móvil */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: var(--bg-surface);
        border-left: 1px solid var(--border-subtle);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
        z-index: 10001;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 1.5rem;
        transform: translateX(105%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    /* Overlay */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        display: block;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-subtle);
        margin-bottom: 1rem;
    }

    .mobile-nav-title {
        font-weight: 700;
        font-size: 1.05rem;
        color: var(--text-primary);
    }

    .mobile-close-btn {
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-size: 1.8rem;
        cursor: pointer;
        line-height: 1;
        padding: 0.2rem;
        transition: var(--transition);
    }

    .mobile-close-btn:hover {
        color: var(--text-primary);
    }

    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        flex: 1;
        overflow-y: auto;
    }

    .nav-link {
        padding: 0.7rem 0.85rem;
        font-size: 1rem;
        border-radius: var(--radius-sm);
        display: block;
        width: 100%;
    }

    .nav-link:hover {
        background: var(--bg-surface-elevated);
        color: var(--text-primary);
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-trigger {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.7rem 0.85rem;
        font-size: 1rem;
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
    }

    .nav-dropdown-trigger:hover,
    .nav-dropdown.open .nav-dropdown-trigger {
        background: var(--bg-surface-elevated);
        color: var(--text-primary);
    }

    .nav-dropdown.open .dropdown-chevron {
        transform: rotate(180deg);
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background: var(--bg-surface-elevated);
        border-radius: var(--radius-md);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: none;
        transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        padding: 0.4rem 0.5rem;
        margin: 0.35rem 0 0.5rem;
    }

    .dropdown-item {
        padding: 0.55rem 0.75rem;
        font-size: 0.88rem;
    }

    .mobile-nav-actions {
        display: block;
        padding-top: 1.25rem;
        border-top: 1px solid var(--border-subtle);
        margin-top: 1rem;
    }

    .mobile-contact-info {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.8rem;
        color: var(--text-muted);
        text-align: center;
        margin-top: 0.75rem;
    }

    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    
    .site-footer {
        padding-bottom: 5.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .footer-legal-links {
        width: 100%;
        gap: 0.75rem 1.25rem;
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

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

    .floating-whatsapp {
        width: 54px;
        height: 54px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
        bottom: 20px;
        right: 20px;
    }

    .floating-whatsapp span {
        display: none;
    }

    .floating-whatsapp svg {
        width: 28px;
        height: 28px;
    }

    .hero-glow {
        width: 320px;
        height: 250px;
    }
}

@media (max-width: 640px) {
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .btn-lg {
        padding: 0.85rem 1.25rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding-bottom: 6rem;
    }

    .footer-legal-links {
        gap: 0.5rem 1rem;
    }

    .footer-legal-links a {
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   PRICING TABLES & PROMO CARDS (HOSTING DESDE $3.000, MIGRACIONES, LOW-COST)
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }
}

.pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
}

.pricing-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

.pricing-card.featured {
    border-color: var(--brand-accent);
    background: linear-gradient(180deg, var(--bg-surface-elevated) 0%, var(--bg-surface) 100%);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.15);
}

.pricing-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    white-space: nowrap;
}

.pricing-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.pricing-price-box {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin: 1rem 0 1.25rem;
}

.pricing-currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-accent);
}

.pricing-amount {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.pricing-period {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.pricing-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

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

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.pricing-features li svg {
    flex-shrink: 0;
    color: var(--brand-accent);
    margin-top: 2px;
}

.pricing-features li strong {
    color: var(--text-primary);
}

.pricing-action {
    margin-top: auto;
}

/* Feature Showcase Promo Cards */
.promo-banner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

@media (max-width: 900px) {
    .promo-banner-grid {
        grid-template-columns: 1fr;
    }
}

.promo-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.promo-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-subtle);
}

.promo-card-migration {
    border-left: 4px solid #10b981;
}

.promo-card-lowcost {
    border-left: 4px solid var(--brand-accent);
}

.promo-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.promo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.promo-icon-green {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.promo-icon-blue {
    background: var(--brand-glow);
    color: var(--brand-accent);
}

.promo-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
}

.promo-tag-green {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.promo-tag-blue {
    background: rgba(56, 189, 248, 0.15);
    color: var(--brand-accent);
}

.promo-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.promo-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.promo-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.promo-bullets li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.promo-bullets li svg {
    flex-shrink: 0;
}

.promo-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

/* Feature highlight pill ticker */
.feature-pills-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding: 0.85rem 1.75rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    margin: 0 auto 3.25rem;
    max-width: 980px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.feature-pill-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.feature-pill-item svg {
    color: var(--brand-accent);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .feature-pills-bar {
        border-radius: var(--radius-md);
        justify-content: flex-start;
        padding: 1rem;
        margin: 0 auto 2.25rem;
    }
}
