/* =============================================== */
/*   TEMPLATE 1 - Minimalista Moderno              */
/*   Claro, fresco y alegre (turquesa / azul)      */
/* =============================================== */

:root {
    --font-head: 'Poppins', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --bg: #f3f8fb;
    --surface: #ffffff;
    --surface-alt: #eef4f8;
    --border: rgba(15, 40, 60, 0.09);
    --text: #0f2433;
    --text-muted: #5b7282;
    --price: #0f2433;

    --accent: #0891b2;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --accent-soft: rgba(6, 182, 212, 0.12);
    --accent-shadow: rgba(8, 145, 178, 0.28);

    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 10px rgba(15, 40, 60, 0.05);
    --shadow-md: 0 14px 30px rgba(15, 40, 60, 0.12);
    --container: 1200px;

    --header-bg: rgba(255, 255, 255, 0.85);
    --glass: rgba(255, 255, 255, 0.75);
    --success: #16a34a;
    --danger: #dc2626;
}

/* ---------- Modo oscuro: azul petróleo suave, no negro puro ---------- */
:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0e1c25;
    --surface: #152733;
    --surface-alt: #1c3240;
    --border: rgba(180, 225, 245, 0.1);
    --text: #e7f4fa;
    --text-muted: #94b1c0;
    --price: #ffffff;

    --accent: #22d3ee;
    --accent-soft: rgba(34, 211, 238, 0.14);
    --accent-shadow: rgba(6, 182, 212, 0.3);

    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 16px 34px rgba(0, 0, 0, 0.4);

    --header-bg: rgba(14, 28, 37, 0.85);
    --glass: rgba(255, 255, 255, 0.05);
    --success: #4ade80;
    --danger: #f87171;
}

:root[data-theme="dark"] .hero-card {
    background:
        radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.22), transparent 45%),
        radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.18), transparent 40%),
        radial-gradient(circle at 80% 100%, rgba(250, 204, 21, 0.1), transparent 45%),
        var(--surface);
}

:root[data-theme="dark"] .hero-title {
    background-image: linear-gradient(135deg, #67e8f9 0%, #93c5fd 100%);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 4px 20px rgba(15, 40, 60, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 66px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.brand-logo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: #fff;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.brand-text strong {
    font-family: var(--font-head);
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Hero ---------- */
.hero {
    padding: 1.5rem 0 1rem;
}

.hero-card {
    position: relative;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.18), transparent 45%),
        radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.14), transparent 40%),
        radial-gradient(circle at 80% 100%, rgba(250, 204, 21, 0.18), transparent 45%),
        var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.hero-kicker {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.hero-title {
    font-size: clamp(1.7rem, 3.5vw, 2.5rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    margin: 0.5rem 0 1.25rem;
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 540px;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stat strong {
    color: var(--text);
    font-size: 1rem;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.stat-link {
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.stat-link:hover {
    border-color: var(--accent);
    transform: translateX(3px);
}

.stat-link > .fa-arrow-right {
    margin-left: auto;
    color: var(--accent);
}

/* ---------- Barra de filtros (fija bajo el header) ---------- */
.filter-bar {
    position: sticky;
    top: 66px;
    z-index: 900;
    padding: 10px 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
}

.filter-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .hero-card {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat {
        flex: 1 1 200px;
    }
}

@media (max-width: 720px) {
    /* En móvil solo la barra de búsqueda queda fija, para ganar espacio */
    .site-header {
        position: relative;
    }

    .filter-bar {
        top: 0;
    }

    .hide-mobile {
        display: none;
    }

    .header-inner {
        height: 60px;
    }
}

@media (max-width: 560px) {
    .hero {
        padding: 0.75rem 0 0.25rem;
    }

    .hero-card {
        padding: 1.25rem;
        gap: 1rem;
    }

    .hero-desc {
        font-size: 0.92rem;
        margin-bottom: 1rem;
    }

    .step-icon {
        width: 26px;
        height: 26px;
        font-size: 0.72rem;
    }

    .stat-icon {
        width: 30px;
        height: 30px;
    }

    .search-box input {
        height: 42px;
    }

    .chip {
        height: 34px;
        font-size: 0.82rem;
    }
}

/* Compensar header + barra de filtros al saltar a una sección */
html {
    scroll-padding-top: 180px;
}

@media (max-width: 720px) {
    html {
        scroll-padding-top: 120px;
    }
}

/* Estadísticas compactas en móvil: 2 por fila */
@media (max-width: 560px) {
    .hero-stats {
        gap: 8px;
    }

    .stat {
        flex: 1 1 calc(50% - 4px);
        font-size: 0.78rem;
        gap: 8px;
        padding: 8px 10px;
    }

    .stat strong {
        font-size: 0.9rem;
    }

    .stat-link {
        flex-basis: 100%;
    }
}
