@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --layout-header-height: 0px;
    --layout-footer-height: 0px;
    --color-primary: #d32f2f;
    --color-primary-dark: #c62828;
    --color-text: #333333;
    --color-muted: #666666;
    --color-border: #e0e0e0;
    --color-surface: #ffffff;
    --shadow-panel: 0 12px 30px rgba(0,0,0,0.08);
    --shadow-hover: 0 18px 36px rgba(211, 47, 47, 0.18);
    --radius-sm: 6px;
    --radius-md: 12px;
}

body {
    font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.55;
}

/* Estilos de encabezados */
h1, h2, h3, h4, .panel__title,
.hero h1, .hero h2,
.section-subtitle {
    font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.01em;
}

body[data-page='gestionar-rutas'] h1,
body[data-page='localidades'] h1 {
    text-align: center;
    font-weight: 600;
    font-size: clamp(30px, 4.5vw, 38px);
    color: var(--color-text);
    margin: 48px 0 48px;
}

.help-text {
    text-align: center;
    font-size: 1rem;
    color: var(--color-text);
    margin: 0 auto 32px;
    max-width: 760px;
    padding: 14px 20px;
    background: rgba(240, 239, 164, 0.2);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-sm);
}

/* Ajuste del contenedor principal */

.container {
    width: min(1100px, 92%);
    margin: 0 auto 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.rutas-usuarios,
.split-panels {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

body[data-page='localidades'] .rutas-usuarios {
    justify-items: center;
}

body[data-page='localidades'] .rutas-container {
    width: min(560px, 100%);
}

.panel,
.rutas-container,
.usuarios-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-panel);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.panel__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-text);
}

.panel__actions {
    display: flex;
    align-items: center;
    gap: 1px;
}

.panel__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel--form .panel__body {
    flex-direction: column;
    gap: 16px;
}

.add-localidad {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.add-localidad__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.add-localidad__actions .input-field {
    flex: 1 1 280px;
}

.data-list,
.large-list,
.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-list__item,
.list-item
{
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.data-list__item:hover,
.list-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* Resaltar todo el contenedor del usuario */
.highlight {
    box-sizing: border-box;
    width: 100%;
    background-color: #ffe082; /* Fondo amarillo claro */
    border: 2px solid #ffca28; /* Borde más visible */
    font-weight: bold;
    border-radius: 5px;
    padding: 10px; /* Asegúrate de que incluye suficiente espacio */
    display: flex; /* Asegura que todos los elementos internos estén alineados */
    align-items: center; /* Centrar verticalmente el contenido */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Añadir un efecto de sombra */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Transiciones suaves */
}

/* Botones y campos de entrada separados debajo */
.add-actions {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    gap: 20px;
}

.add-actions div {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: flex-start;
}

/* Contenedor para registrar usuarios en una sola línea */
.user-registration {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.user-registration input {
    width: auto;
    margin-bottom: 0;
}

.add-actions input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.add-actions button {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    background-color: #d32f2f;
    color: #fff;
    border: none;
    transition: background-color 0.2s ease;
    box-shadow: 0 14px 24px rgba(211, 47, 47, 0.2);
}

.add-actions button:hover {
    background-color: #c62828;
}

/* Botón de acción central */
.actions {
    text-align: center;
    margin-top: 20px;
}

.actions .btn {
    padding: 16px 36px;
    font-size: 20px;
}

.actions .btn:hover {
    background: var(--color-primary-dark);
}

/* Ajuste del contenedor principal */
.loginContainer {
    width: min(100%, 420px);
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra verticalmente */
    align-items: center; /* Centra horizontalmente */
    background-color: #fff; /* Fondo claro */
    text-align: center; /* Centra el texto */
    padding: 32px 28px;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
    gap: 20px;
}

/* Estilo de los campos de entrada */
.input-field {
    width: 100%;
    max-width: 400px; /* Ancho máximo para los campos */
    padding: 15px;
    margin-bottom: 20px;
    font-size: 18px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Cambios en hover/focus */
.input-field:focus {
    border-color: #d32f2f;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Estilo de los radiobuttons y checkboxes */
input[type="radio"],
input[type="checkbox"] {
    accent-color: #d32f2f;
    cursor: pointer;
}

/* Responsividad */
@media (max-width: 600px) {
    .input-field {
        font-size: 16px;
    }

    .btn {
        font-size: 16px;
    }
}

.hidden-input {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-panel);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn--ghost {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid rgba(211, 47, 47, 0.5);
    box-shadow: none;
}

.btn--ghost:hover {
    background: rgba(211, 47, 47, 0.08);
    box-shadow: none;
}

.blurred {
    filter: blur(4px);
    pointer-events: none; /* Esto evita que los elementos sean clickeables mientras están desenfocados */
    opacity: 0.6; /* Reduce la opacidad para dar un efecto visual adicional */
}

/* Contenedor principal para cada ruta */

.data-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.data-row__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.data-row__title {
    font-weight: 600;
    color: var(--color-text);
    word-break: break-word;
}

.data-row__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ruta-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
}

.ruta-heading {
    font-weight: 600;
    color: var(--color-text);
    word-break: break-word;
}

.ruta-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ruta-metrics {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.ruta-progress {
    font-weight: 600;
    color: var(--color-primary);
}

.ruta-meta-count {
    font-weight: 600;
    color: var(--color-muted);
}

.ruta-meta-count.has-assignees {
    color: #4caf50;
}

.ruta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ruta-actions .badge {
    font-weight: 600;
    color: var(--color-primary);
}

.progreso-link {
    text-decoration: none;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}

.progreso-disabled {
    color: #999;
    pointer-events: none;
}


.ruta-assignees {
    padding: 6px 0 0 8px;
    border-left: 2px solid var(--color-border);
    margin-left: 8px;
    color: var(--color-muted);
    font-size: 0.9rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease;
}

.ruta-assignees.is-open {
    max-height: 200px;
    opacity: 1;
}

.ruta-assignees__list {
    margin: 6px 0 0 16px;
    padding: 0;
    list-style: disc;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ruta-assignees__label {
    font-weight: 600;
    color: var(--color-text);
}

.ruta-item--assigned .ruta-meta-row {
    border-left: 3px solid rgba(76, 175, 80, 0.4);
    padding-left: 12px;
}

.ruta-seleccionada {
    border: 2px solid rgba(76, 175, 80, 0.45);
    background-color: #e8f5e9;
    box-shadow: var(--shadow-hover);
}

.progreso-link::after {
    content: "\2B07";
    font-size: 14px;
    margin-left: 4px;
}

.delete-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.delete-btn:hover {
    background-color: rgba(211, 47, 47, 0.1);
    color: var(--color-primary-dark);
}

.usuario-actions {
    display: flex;
    gap: 10px;
}

.estado-asignacion {
    cursor: pointer;
    font-weight: bold;
}


.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

.popup-logo {
    width: 40px;
    height: 40px;
    background-color: transparent;
}

.popup-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.popup-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.popup-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
}

.popup-form .input-field {
    width: 100%;
    max-width: none;
}

.popup-titulo {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 10px;
}
.map-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.map-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.download-btn {
    font-size: 18px;
    line-height: 1;
}

.map-btn:hover {
    background-color: rgba(211, 47, 47, 0.1);
}

.map-btn:disabled {
    color: #999;
    cursor: default;
    background: transparent;
}
#mapa{
    width:100%;
    height:100%;
    min-height: calc(100vh - var(--layout-header-height) - var(--layout-footer-height));
}
.mapa-popup{
    width:80vw;
    height:80vh;
    max-width:none;
    max-height:none;
}
.mapa-popup iframe{
    width:100%;
    height:100%;
    border:none;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-box {
    background: #fff;
    padding: 20px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #eee;
    border-top-color: #d32f2f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text { color: #333; font-weight: 500; }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Spinner específico para carga de rutas */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

.loading-spinner::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Contenedor de progreso para rutas */
#rutas-progress {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    text-align: center;
}

#rutas-progress .loading-spinner {
    padding: 20px;
    margin: 0;
}

/* Contenedor de progreso para usuarios */
#usuarios-progress {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    text-align: center;
}

#usuarios-progress .loading-spinner {
    padding: 20px;
    margin: 0;
}

/* Contenedor de progreso para localidades */
#localidades-progress {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    text-align: center;
}

#localidades-progress .loading-spinner {
    padding: 20px;
    margin: 0;
}

/* Leyenda de colores del mapa */
.leyenda-mapa {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px;
    z-index: 1000;
    font-family: Arial, sans-serif;
    min-width: 180px;
    border: 1px solid #e0e0e0;
}

.leyenda-titulo {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #555;
}

.leyenda-item:last-child {
    margin-bottom: 0;
}

.leyenda-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.leyenda-color.verde {
    background-color: #4CAF50;
}

.leyenda-color.amarillo {
    background-color: #FFC107;
}

.leyenda-color.rojo {
    background-color: #F44336;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .leyenda-mapa {
        top: 10px;
        right: 10px;
        padding: 12px;
        min-width: 160px;
        font-size: 12px;
    }
    
    .leyenda-titulo {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .leyenda-item {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .leyenda-color {
        width: 14px;
        height: 14px;
    }
}

/* Spinner específico para la lista de localidades */
#localidadesList .loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
    width: 100%;
    height: 200px; /* Altura fija para centrar verticalmente */
}

/* ✅ NUEVOS ESTILOS: Botones deshabilitados y spinner de asignación */
.estado-asignacion:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.estado-asignacion:disabled:hover {
    background-color: inherit;
    transform: none;
}

/* Estilo para el spinner de asignación (⏳) */
.estado-asignacion:disabled:not([data-loading="false"]) {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404 !important;
    font-weight: bold;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ====== Landing pública (index) ====== */
/* Header */
.site-header {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 100;
}

.site-header__inner {
    width: min(1100px, 92%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

@media (max-width: 768px) {
    .site-header__inner {
        width: 100%;
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .brand-logo { height: 56px; }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav .nav-link {
        padding: 7px 10px;
        font-size: 0.9rem;
        white-space: nowrap;
        flex: 0 0 auto;
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.brand-logo { height: 72px; width: auto; display: block; }

.site-nav .nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.site-nav .nav-link--primary {
    background-color: #d32f2f;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
}

.site-nav .nav-link--primary:hover {
    background-color: #c62828;
}

.site-nav .nav-link--ghost {
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid rgba(211, 47, 47, 0.4);
    color: #d32f2f;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-nav .nav-link--ghost:hover {
    background-color: rgba(211, 47, 47, 0.08);
    border-color: rgba(211, 47, 47, 0.6);
}

.site-nav .nav-link--active:not(.nav-link--primary) {
    color: #d32f2f;
}

.site-nav .nav-link--active:not(.nav-link--primary)::after {
    content: '';
    display: block;
    height: 2px;
    background: currentColor;
    margin-top: 6px;
    border-radius: 999px;
}

.site-nav .nav-link--primary.nav-link--active {
    box-shadow: 0 10px 24px rgba(211, 47, 47, 0.25);
}

/* Layout helpers */
.page-main {
    width: min(1100px, 94vw);
    margin: 0 auto;
    padding: 40px 0;
    min-height: calc(100vh - var(--layout-header-height) - var(--layout-footer-height));
}

.page-main--map {
    width: 100%;
    padding: 0;
    position: relative;
    min-height: calc(100vh - var(--layout-header-height) - var(--layout-footer-height));
}

body[data-page='login'] {
    background: #f5f5f5;
}

body[data-page='login'] .page-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--layout-header-height) - var(--layout-footer-height) - 40px);
    padding: 40px 16px;
}

/* Hero */
.hero {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
    padding: 180px 0 220px;
    overflow: hidden;
    /* Full-bleed: ocupa el ancho completo del viewport, incluso si el contenedor tiene límites */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.hero.has-image { background: none; }
.hero.has-image::before {
    content: '';
    position: absolute;
    /* Más área y zoom-out para ver más imagen sin gaps */
    inset: -12% -12% -0% -12%;
    background-image: var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    filter: brightness(0.62) saturate(0.98); /* sin blur */
    transform: scale(0.9);
    transform-origin: center;
}
.hero.has-image::after {
    content: '';
    position: absolute; inset: 0;
    /* Overlay superior oscuro suave + desvanecido inferior a blanco */
    background:
        linear-gradient(180deg, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.24) 40%, rgba(255, 254, 254, 0.556) 80%, rgb(255, 255, 255) 90%),
        linear-gradient(180deg, rgba(255,255,255,0) 72%, rgba(255,255,255,0.75) 93%, #ffffff 100%);
}
.hero.has-image .hero__content { position: relative; }
.hero.has-image h1 { color: #fff; }
.hero.has-image p { color: #f3f3f3; }

.hero__content {
    width: min(1000px, 92%);
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    color: #333;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 42px);
    margin: 0 0 28px;
}

.hero p {
    color: #555;
    font-size: 18px;
    margin: 0 auto 40px;
    max-width: 760px;
}

.hero__actions .btn--primary {
    display: inline-block;
    background-color: #d32f2f;
    color: #fff;
    padding: 14px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.hero__actions .btn--primary:hover { background-color: #c62828; }

@media (max-width: 768px) {
    .hero {
        padding: 120px 0 140px;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Features */
.features { padding: 110px 0 160px; }
.features h2 {
    text-align: center;
    color: #333;
    font-weight: 600;
    margin: 0 0 36px;
}

.features-grid {
    width: min(1100px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}

.feature-card {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 28px 22px;
    transition: background-color .2s ease, transform .2s ease;
}

.feature-card:hover { background: #f5f5f5; transform: translateY(-2px); }
.feature-card__icon { font-size: 26px; margin-bottom: 8px; }
.feature-card__iconimg { width: 28px; height: 28px; display: block; margin-bottom: 8px; }
.feature-card h3 { margin: 0 0 6px; color: #333; font-size: 18px; }
.feature-card p { margin: 0; color: #555; line-height: 1.45; }

/* Footer */
.site-footer {
    border-top: 1px solid #eee;
    background: #fafafa;
}

.site-footer__inner {
    width: min(1100px, 92%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    color: #666;
}

.footer-store {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-store__img {
    display: block;
    width: 160px;
    height: auto;
}

.footer-link { color: #d32f2f; text-decoration: none; }
.footer-link:hover { color: #c62828; }

/* Responsive */
@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
}

/* ====== Sección "Conoce nuestra app" ====== */
.app-overview { padding: 110px 0 160px; }
.app-overview h2 { text-align: center; color: #333; font-weight: 600; margin: 0 0 20px; }
.section-subtitle { text-align: center; color: #666; margin: 0 auto 34px; width: min(900px, 92%); }

.video-grid {
    width: min(1100px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.video-card { background: #fafafa; border: 1px solid #eee; border-radius: 12px; padding: 18px; }
.video-card h3 { font-size: 16px; margin: 10px 6px 4px; color: #333; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 8px; background: #000; }
.video-frame { position: absolute; inset: 0; width: 100%; height: 100%; }

@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .video-grid { grid-template-columns: 1fr; } }

/* ====== Sección Contacto ====== */
.contact { padding: 20px 0 60px; background: #fff; }
.contact h2 { text-align: center; color: #333; font-weight: 600; margin: 0 0 10px; }
.contact-actions { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 14px; }
.btn--secondary { background: #555; color: #fff; }
.btn--secondary:hover { background: #444; }

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: inline-block;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.2s ease;
    z-index: 1100;
}

.whatsapp-float:hover { transform: translateY(-2px); }
.whatsapp-icon-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
}

.whatsapp-float:hover .whatsapp-icon-img {
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.25));
}

@media (max-width: 600px) {
    .whatsapp-float {
        right: 16px;
        bottom: 16px;
    }

    .whatsapp-icon-img {
        width: 58px;
        height: 58px;
    }
}

@media (max-width: 400px) {
    .whatsapp-icon-img {
        width: 52px;
        height: 52px;
    }
}

/* Suaviza el scroll hacia anclas */
html { scroll-behavior: smooth; }

/* ====== Animaciones reveal on scroll ====== */
/* Por defecto visibles; se ocultan solo si JS activa .js-reveal */
.reveal { transition: opacity 600ms ease, transform 600ms ease; will-change: opacity, transform; }
.js-reveal .reveal { opacity: 0; transform: translateY(18px); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none; transform: none; }
    .js-reveal .reveal { opacity: 1; }
}

/* Contact page extra spacing */
body[data-page='contacto'] .contact-page { padding-top: 56px; padding-bottom: 110px; }

/* ====== Contacto (página) ====== */
.contact-wrapper { width: min(900px, 92%); margin: 28px auto 0; }
/* Estilo minimal para la página de contacto */
.contact-form { background: transparent; border: none; border-radius: 0; padding: 0; }
.contact-form .form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.contact-form label { color: #444; font-weight: 500; }
.contact-form .input-field { background: #fff; border: 1px solid #ddd; border-radius: 6px; box-shadow: none; width: 100%; max-width: none; }
.contact-form .input-field:focus { border-color: #d32f2f; box-shadow: none; }
.contact-form textarea.input-field { resize: vertical; }
/* Botón no a todo el ancho */
.contact-form .btn { width: auto; max-width: none; display: inline-block; padding: 12px 20px; }

/* Separación visual del hero gris en la página de contacto */
body[data-page='contacto'] .hero { margin-bottom: 16px; }
body[data-page='contacto'] .contact-page { padding-top: 32px; }
/* Reset básico para evitar márgenes del navegador */
html, body { margin: 0; padding: 0; }
