﻿/* ============================================
   DIRECTORIO PRESTADORES - PREMIUM MINIMAL
   ============================================ */
html {
    font-size: 90%;
}
.directorio-page {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ============================================
   HERO PREMIUM DIRECTORIO
   ============================================ */

.directorio-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: 2rem 2rem 1.7rem;
    border: 1px solid rgba(139, 29, 29, .08);
    border-radius: 30px;
    background: radial-gradient(circle at top left, rgba(139, 29, 29, .08), transparent 30%), linear-gradient(135deg, #ffffff 0%, #fffdfd 45%, #faf8f8 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .05), inset 0 1px 0 rgba(255,255,255,.7);
}

.hero-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(60px);
    opacity: .45;
    pointer-events: none;
}

.hero-glow-1 {
    top: -80px;
    left: -60px;
    width: 220px;
    height: 220px;
    background: rgba(139,29,29,.12);
}

.hero-glow-2 {
    right: -40px;
    bottom: -100px;
    width: 240px;
    height: 240px;
    background: rgba(193,148,67,.12);
}

.directorio-kicker {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.1rem;
    color: #8B1D1D;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: 2.8px;
    text-transform: uppercase;
}

.kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B1D1D, #c43c3c);
    box-shadow: 0 0 0 4px rgba(139,29,29,.10), 0 0 18px rgba(139,29,29,.25);
}

.directorio-hero-main {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.directorio-hero-left {
    flex: 1;
    min-width: 0;
}

.directorio-hero h1 {
    max-width: 640px;
    margin: 0 0 .8rem;
    color: #111;
    font-size: clamp(1.10rem, 2.4vw, 1.4rem);
    line-height: 1.18;
    font-weight: 820;
    letter-spacing: -.7px;
    text-wrap: balance;
}

.directorio-hero-subtext {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .9rem;
    margin: 0;
}

.hero-sub-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(139,29,29,.09), rgba(139,29,29,.04));
    border: 1px solid rgba(139,29,29,.10);
    color: #8B1D1D;
    font-size: .8rem;
    font-weight: 850;
    backdrop-filter: blur(10px);
    transition: all .25s ease;
}

    .hero-sub-badge i {
        color: #22b86d;
        font-size: .85rem;
    }

.directorio-hero:hover .hero-sub-badge {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(139,29,29,.10);
}

.hero-sub-divider {
    width: 24px;
    height: 1px;
    background: rgba(0,0,0,.12);
}

.hero-sub-description {
    max-width: 560px;
    color: #68717d;
    font-size: .98rem;
    line-height: 1.6;
    font-weight: 500;
}

.directorio-hero-visual {
    position: relative;
    width: 290px;
    height: 150px;
    flex-shrink: 0;
}

.hero-floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .9rem;
    border-radius: 24px;
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(255,255,255,.7);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 45px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.9);
    transition: all .3s ease;
}

.hero-card-main {
    top: 10px;
    right: 0;
    width: 240px;
    padding: 1rem 1.1rem;
    transform: rotate(-3deg);
}

.hero-card-secondary {
    left: 10px;
    bottom: 10px;
    padding: .8rem 1rem;
    transform: rotate(4deg);
    font-size: .84rem;
    font-weight: 750;
    color: #8B1D1D;
}

.directorio-hero:hover .hero-card-main {
    transform: rotate(-1deg) translateY(-4px);
}

.directorio-hero:hover .hero-card-secondary {
    transform: rotate(2deg) translateY(-3px);
}

.hero-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8B1D1D, #b53131);
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 12px 24px rgba(139,29,29,.25);
}

.hero-card-main span {
    display: block;
    color: #8B1D1D;
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: .18rem;
}

.hero-card-main strong {
    display: block;
    color: #111;
    font-size: .95rem;
    line-height: 1.3;
    font-weight: 900;
}

/* ============================================
   BUSCADOR DIRECTORIO
   ============================================ */

.directorio-search-card {
    margin: 1.5rem 0 1.7rem;
    padding: .5rem 1rem;
    border: 1px solid #e7e7e7;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.directorio-search-form {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) 1fr 1fr 1fr auto;
    align-items: center;
    gap: 0;
}

.search-field {
    position: relative;
    min-width: 0;
}

    .search-field label {
        display: block;
        margin-bottom: .45rem;
        color: #8B1D1D;
        font-size: .66rem;
        font-weight: 800;
        letter-spacing: 1.8px;
        text-transform: uppercase;
    }

    .search-field:not(:first-child)::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-10px);
        width: 1px;
        height: 44px;
        background: #ececec;
    }

.search-input {
    position: relative;
}

    .search-input i {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #8B1D1D;
        font-size: .88rem;
        opacity: .9;
    }

    .search-input input,
    .search-field select {
        width: 100%;
        height: 48px;
        border: none;
        border-radius: 0;
        background: transparent;
        color: #1f2933;
        font-size: .92rem;
        font-weight: 600;
        outline: none;
        box-shadow: none;
        transition: all .2s ease;
    }

    .search-input input {
        padding: 0 1rem 0 2.6rem;
    }

.search-field select {
    padding: 0 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #111 50%), linear-gradient(135deg, #111 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 13px) calc(50% - 2px);
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

    .search-input input:hover,
    .search-field select:hover {
        background: rgba(0,0,0,.012);
    }

    .search-input input:focus,
    .search-field select:focus {
        background: rgba(139,29,29,.025);
    }

.btn-directorio-search {
    height: 48px;
    margin-left: 1rem;
    padding: 0 1.35rem;
    border: none;
    border-radius: 0;
    background: #8B1D1D;
    color: #fff;
    font-size: .88rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    cursor: pointer;
    transition: all .22s ease;
    white-space: nowrap;
}

    .btn-directorio-search:hover {
        background: #6f1717;
    }

    .btn-directorio-search i {
        font-size: .82rem;
    }

.search-input input::placeholder {
    color: #7e8794;
    font-weight: 500;
}

/* ============================================
   RESULTADOS
   ============================================ */

.directorio-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 0 .2rem;
}

.results-label {
    display: block;
    color: #8B1D1D;
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: .2rem;
}

.directorio-results-header h2 {
    margin: 0;
    color: #151515;
    font-size: 1.15rem;
    font-weight: 850;
}

.clear-filters {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #8B1D1D;
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none;
}

    .clear-filters:hover {
        color: #5f1212;
    }

/* ============================================
   GRID Y CARD
   ============================================ */

.prestadores-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(340px, 1fr));
    gap: 1.4rem;
}

.prestador-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid #e9e9e9;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .04);
    transition: all .3s ease;
}

    .prestador-card:hover {
        transform: translateY(-5px);
        border-color: rgba(139, 29, 29, .22);
        box-shadow: 0 24px 56px rgba(0, 0, 0, .08);
    }

/* COVER */

.prestador-cover {
    position: relative;
    height: 168px;
    overflow: hidden;
    background: #8B1D1D;
}

    .prestador-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.prestador-cover-pattern {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, rgba(255,255,255,.18), transparent 30%), linear-gradient(135deg, #8B1D1D, #5f1212);
    color: rgba(255,255,255,.55);
    font-size: 3rem;
}

.prestador-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.35));
}

.prestador-logo {
    position: absolute;
    left: 1rem;
    bottom: 12px;
    z-index: 3;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .prestador-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .prestador-logo span {
        color: #8B1D1D;
        font-size: 1.6rem;
        font-weight: 900;
    }

/* BODY ALINEADO */

.prestador-body {
    flex: 1;
    padding: 1rem 1rem 1rem;
}

    .prestador-meta,
    .prestador-body h3,
    .prestador-description,
    .prestador-stats,
    .prestador-publicaciones {
        width: 100%;
    }

.prestador-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 0 0 .7rem;
}

    .prestador-meta span {
        display: inline-flex;
        align-items: center;
        gap: .32rem;
        padding: .32rem .6rem;
        border-radius: 999px;
        background: #fafafa;
        color: #5d6470;
        border: 1px solid #eeeeee;
        font-size: .72rem;
        font-weight: 750;
    }

    .prestador-meta i {
        color: #8B1D1D;
        font-size: .72rem;
    }

.prestador-body h3 {
    margin: 0 0 .45rem;
    color: #111;
    font-size: 1.18rem;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -.35px;
}

.prestador-description {
    min-height: 44px;
    margin: 0 0 .8rem;
    color: #5d6470;
    font-size: .9rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* STATS ALINEADAS */

.prestador-stats {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: .65rem;
    margin: .75rem 0 .9rem;
    padding: 0;
    line-height: 1;
}

    .prestador-stats div {
        display: inline-flex;
        align-items: center;
        gap: .32rem;
        position: relative;
        padding: 0;
        margin: 0;
        line-height: 1;
        min-width: 0;
    }

        .prestador-stats div:not(:last-child)::after {
            content: "";
            width: 1px;
            height: 11px;
            background: #e5e5e5;
            margin-left: .65rem;
            flex-shrink: 0;
        }

    .prestador-stats strong {
        display: inline-block;
        color: #8B1D1D;
        font-size: .9rem;
        font-weight: 900;
        line-height: 1;
    }

    .prestador-stats span {
        display: inline-block;
        color: #747d89;
        font-size: .58rem;
        font-weight: 850;
        text-transform: uppercase;
        letter-spacing: .45px;
        line-height: 1;
        white-space: nowrap;
    }

/* PUBLICACIONES ALINEADAS */

.prestador-publicaciones {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .15rem;
}

.mini-publicacion {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: .7rem .85rem;
    border-radius: 15px;
    background: #fff;
    border: 1px solid #eeeeee;
    transition: all .2s ease;
}

    .mini-publicacion:hover {
        border-color: rgba(139,29,29,.16);
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(0,0,0,.04);
    }

    .mini-publicacion div {
        width: 100%;
        min-width: 0;
    }

    .mini-publicacion span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.2;
        color: #8B1D1D;
        font-size: .66rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .55px;
    }

        .mini-publicacion span strong {
            color: #111;
            font-size: .82rem;
            font-weight: 850;
            text-transform: none;
            letter-spacing: 0;
        }

    .mini-publicacion small {
        display: block;
        margin-top: .32rem;
        color: #222;
        font-size: .79rem;
        font-weight: 700;
        line-height: 1.2;
    }

/* ACTIONS */

.prestador-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
    border-top: 1px solid #eeeeee;
    background: #fff;
}

.btn-prestador-primary {
    flex: 1;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border-radius: 14px;
    background: #8B1D1D;
    color: #fff;
    font-size: .86rem;
    font-weight: 850;
    text-decoration: none;
    transition: all .25s ease;
}

    .btn-prestador-primary:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(139, 29, 29, .22);
    }

.prestador-quick-actions {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.btn-prestador-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    color: #8B1D1D;
    text-decoration: none;
    transition: all .25s ease;
}

    .btn-prestador-icon:hover {
        color: #8B1D1D;
        transform: translateY(-2px);
        background: #fff;
        box-shadow: 0 8px 18px rgba(0,0,0,.08);
    }

.btn-whatsapp-mini {
    color: #25D366;
}

/* EMPTY */

.directorio-empty {
    margin-top: 1.5rem;
    padding: 3rem 1rem;
    text-align: center;
    border: 1px solid #e9e9e9;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(0,0,0,.04);
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(139, 29, 29, .08);
    color: #8B1D1D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.directorio-empty h3 {
    margin: 0 0 .4rem;
    color: #111;
    font-size: 1.4rem;
    font-weight: 900;
}

.directorio-empty p {
    margin: 0 auto 1.2rem;
    max-width: 460px;
    color: #5d6470;
    font-size: .95rem;
    line-height: 1.6;
}

.btn-empty-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1.2rem;
    border-radius: 999px;
    background: #8B1D1D;
    color: #fff;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 850;
}

    .btn-empty-reset:hover {
        color: #fff;
    }

/* RESPONSIVE */

@media (max-width: 1100px) {
    .directorio-search-form {
        grid-template-columns: 1fr 1fr;
        gap: .8rem;
    }

    .search-main {
        grid-column: 1 / -1;
    }

    .search-field::before {
        display: none;
    }

    .search-field {
        border: 1px solid #ececec;
    }

    .btn-directorio-search {
        width: 100%;
        margin-left: 0;
    }

    .prestadores-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .directorio-page {
        padding: 1.5rem .85rem 3rem;
    }

    .directorio-hero {
        padding: 1.3rem 1rem;
        border-radius: 24px;
    }

        .directorio-hero h1 {
            font-size: 1.45rem;
        }

    .directorio-hero-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .directorio-hero-subtext {
        align-items: flex-start;
        flex-direction: column;
        gap: .75rem;
    }

    .hero-sub-divider,
    .directorio-hero-visual {
        display: none;
    }

    .hero-sub-description {
        font-size: .92rem;
    }

    .directorio-search-card {
        padding: .8rem;
    }

    .directorio-search-form {
        grid-template-columns: 1fr;
    }

    .search-field {
        border: 1px solid #ececec;
    }

        .search-field label {
            padding-left: .9rem;
            padding-top: .7rem;
            margin-bottom: 0;
        }

        .search-input input,
        .search-field select {
            height: 44px;
        }

    .directorio-results-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .prestadores-grid {
        grid-template-columns: 1fr;
    }

    .prestador-cover {
        height: 155px;
    }

    .prestador-stats {
        gap: .5rem;
    }

        .prestador-stats div:not(:last-child)::after {
            margin-left: .5rem;
        }

        .prestador-stats strong {
            font-size: .86rem;
        }

        .prestador-stats span {
            font-size: .55rem;
        }
}
/* =========================================================
   MINI PUBLICACIONES: MOSTRAR 3 Y SCROLL SI HAY MÁS
========================================================= */

.prestador-publicaciones {
    max-height: 196px;
    overflow-y: auto;
    padding-right: .25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 29, 29, .35) transparent;
}

    .prestador-publicaciones::-webkit-scrollbar {
        width: 5px;
    }

    .prestador-publicaciones::-webkit-scrollbar-track {
        background: transparent;
    }

    .prestador-publicaciones::-webkit-scrollbar-thumb {
        background: rgba(139, 29, 29, .35);
        border-radius: 999px;
    }

        .prestador-publicaciones::-webkit-scrollbar-thumb:hover {
            background: rgba(139, 29, 29, .55);
        }
