/* ============================================================
   Genomik – Gineouro styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=Barlow:wght@400;600;700&display=swap');

:root {
    --blue-dark: #003472;
    --blue-main: #0057a8;
    --blue-row:  #eaf4fc;
    --border:    #b8d4ee;
    --green-mid: #16a34a;
    font-size: 18px;
}

body {
    font-family: 'Barlow', sans-serif;
    background: #e8f2fb;
    margin: 0;
    color: #001a3d;
    font-size: 1rem;
}

/* ── Header ──────────────────────────────────────────── */
.page-header {
    background: linear-gradient(180deg, #001f52 0%, var(--blue-main) 100%);
    text-align: center;
    padding: 2.5em 1.25em 4.375em;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header h1 {
    font-family: 'Barlow Condensed';
    font-size: clamp(1.875rem, 6vw, 3.4375rem);
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.5em;
    background: #e8f2fb;
    clip-path: ellipse(55% 100% at 50% 100%);
}

/* ── Layout ──────────────────────────────────────────── */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25em;
}

/* ── Search ──────────────────────────────────────────── */
.controls-card {
    background: white;
    padding: 1.25em;
    border-radius: 0.75em;
    box-shadow: 0 0.625em 1.875em rgba(0, 52, 114, 0.15);
    margin-top: -2.5em;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 0.875em 1.25em;
    border: 2px solid #eee;
    border-radius: 0.5em;
    font-size: 1.125em;
    outline: none;
    box-sizing: border-box;
    transition: 0.3s;
    font-family: 'Barlow', sans-serif;
}

.search-input:focus {
    border-color: var(--blue-main);
}

/* ── Category pills ──────────────────────────────────── */
.filter-row {
    margin: 1.5625em 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    justify-content: center;
}

.pill {
    padding: 0.5em 1.125em;
    border: 2px solid var(--blue-main);
    border-radius: 0.375em;
    color: var(--blue-main);
    font-family: 'Barlow Condensed';
    font-weight: 700;
    font-size: 0.9375em;
    text-transform: uppercase;
    cursor: pointer;
    background: white;
    transition: 0.2s;
}

.pill.active {
    background: var(--blue-main);
    color: white;
}

/* ── Section wrapper ─────────────────────────────────── */
.section-wrap {
    margin-bottom: 2.1875em;
    border-radius: 0.625em;
    overflow: hidden;
    border: 1px solid var(--border);
    background: white;
}

.section-header {
    display: flex;
    flex-direction: column;
    background: var(--blue-main);
    color: white;
}

.section-title {
    background: var(--blue-dark);
    font-family: 'Barlow Condensed';
    font-weight: 900;
    font-size: 1.1875em;
    text-transform: uppercase;
    display: flex;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.title-icon-box {
    background: rgba(255, 255, 255, 0.15);
    padding: 0 0.9375em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.9375em;
}

.title-text {
    display: flex;
    align-items: center;
    padding: 0.75em 0.625em 0.75em 0;
    justify-content: center;
    flex-grow: 1;
}

/* ── Column headers (6 cols) ─────────────────────────── */
.col-hd-row {
    display: grid;
    grid-template-columns: 1fr 110px 160px 75px 140px 160px;
    font-family: 'Barlow Condensed';
    font-size: 0.8125em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    box-sizing: border-box;
}

.col-hd {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em 0.75em;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    line-height: 1.2;
}

.col-hd:first-child { justify-content: flex-start; }

.col-hd.col-discount {
    background: rgba(34, 197, 94, 0.30);
    border-left: 2px solid rgba(34, 197, 94, 0.6);
}

/* ── Exam rows ───────────────────────────────────────── */
.exam-row {
    display: grid;
    grid-template-columns: 1fr 110px 160px 75px 140px 160px;
    border-top: 1px solid var(--border);
    align-items: stretch;
}

.exam-row:nth-child(even) { background: var(--blue-row); }

.cell {
    padding: 0.75em 0.75em;
    display: flex;
    align-items: center;
    font-size: 1em;
}

.cell-name {
    font-weight: 700;
    color: var(--blue-dark);
    border-right: 1px solid var(--border);
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.cell-center {
    justify-content: center;
    border-right: 1px solid var(--border);
    text-align: center;
}

.cell-muestra,
[data-label="Método"] {
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ── Precio Paciente ─────────────────────────────────── */
.cell-price-original {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    border-right: 1px solid var(--border);
    padding: 0.5em 0.75em;
    box-sizing: border-box;
}

.cell-price-original .price-val {
    font-family: 'Barlow Condensed';
    font-weight: 800;
    font-size: 1.15em;
    line-height: 1;
    white-space: nowrap;
    color: var(--blue-dark);
    text-decoration: line-through;
    opacity: 0.6;
}

.cell-price-original.no-price .price-val {
    color: #9ca3af;
    text-decoration: none;
    opacity: 1;
}

/* ── Precio Especialista ─────────────────────────────── */
.cell-price-discount {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: white;
    border: none;
    padding: 0.5em 0.75em;
    border-left: 2px solid rgba(34, 197, 94, 0.4);
    box-sizing: border-box;
}

.cell-price-discount.no-price {
    background: #d1fae5;
    color: #6b7280;
}

.price-val {
    font-family: 'Barlow Condensed';
    font-weight: 800;
    font-size: 1.25em;
    line-height: 1;
    white-space: nowrap;
}

.saving-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 0.25em;
    font-family: 'Barlow Condensed';
    font-weight: 900;
    font-size: 0.62em;
    letter-spacing: 1px;
    padding: 0.1em 0.45em;
    margin-top: 0.25em;
    line-height: 1.4;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    .col-hd-row { display: none; }

    .section-title { width: 100%; }

    .exam-row {
        grid-template-columns: 1fr;
        padding: 0.75em;
    }

    .cell {
        border: none;
        padding: 0.3125em 0;
        border-bottom: 1px dotted var(--border);
        justify-content: flex-start;
    }

    .cell::before {
        content: attr(data-label)": ";
        font-weight: 800;
        width: 7em;
        flex-shrink: 0;
        color: var(--blue-main);
        font-size: 0.875em;
    }

    .cell-price-original {
        background: none !important;
        border: none !important;
        padding: 0.3125em 0;
        border-bottom: 1px dotted var(--border) !important;
        flex-direction: row;
        gap: 0.4em;
        align-items: center;
    }

    .cell-price-original .price-val { color: var(--blue-dark); }

    .cell-price-discount {
        background: none !important;
        border: none !important;
        padding: 0.3125em 0;
        border-bottom: 1px dotted var(--border) !important;
        flex-direction: row;
        gap: 0.4em;
        align-items: center;
    }

    .cell-price-discount .price-val { color: var(--green-mid); }

    .saving-badge {
        background: var(--green-mid);
        color: white;
        border: none;
    }

    .cell-center { text-align: left; }
}
