/* ============================================================
   CMVH Directorios — Public Frontend Styles
   ============================================================ */

/* Wrapper */
.cmvh-dir-wrap {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f4f7f5 0%, #e8ede9 100%);
    padding: 40px 20px;
    border-radius: 16px;
    color: #2d3748;
}

/* Header */
.cmvh-dir-header {
    text-align: center;
    margin-bottom: 32px;
}

.cmvh-dir-title {
    color: #1b4332;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.2;
}

.cmvh-dir-subtitle {
    color: #2d6a4f;
    font-size: 1rem;
    margin: 0;
}

/* Controls */
.cmvh-dir-controls {
    max-width: 900px;
    margin: 0 auto 20px;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,.06);
    border: 1px solid #e2e8f0;
}

.cmvh-search-wrap {
    position: relative;
    margin-bottom: 16px;
}

.cmvh-search-input {
    width: 100%;
    padding: 14px 46px 14px 20px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    outline: none;
    background: #fff;
    transition: all .3s;
    font-family: inherit;
    box-sizing: border-box;
}

.cmvh-search-input:focus {
    border-color: #2d6a4f;
    box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}

.cmvh-search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #2d6a4f;
    font-size: 18px;
    pointer-events: none;
}

/* Filters (clinicas only) */
.cmvh-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 580px) {
    .cmvh-filters { grid-template-columns: 1fr; }
}

.cmvh-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cmvh-filter-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1b4332;
}

.cmvh-filter-select {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    background: #fff;
    font-size: 0.92rem;
    transition: all .3s;
    cursor: pointer;
    font-family: inherit;
}

.cmvh-filter-select:focus {
    border-color: #2d6a4f;
}

/* Stats Bar */
.cmvh-dir-stats {
    max-width: 900px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    color: #fff;
    padding: 14px 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(27,67,50,.2);
    font-size: 0.95rem;
    font-weight: 500;
}

.cmvh-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #d4af37;
    margin-right: 4px;
}

.cmvh-stat-sep {
    margin: 0 14px;
    opacity: .6;
}

/* Cards Grid */
.cmvh-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1300px;
    margin: 0 auto 24px;
}

@media (max-width: 480px) {
    .cmvh-cards-grid { grid-template-columns: 1fr; }
}

/* Card */
.cmvh-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 4px 15px rgba(0,0,0,.07);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all .3s;
}

.cmvh-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1b4332 0%, #d4af37 100%);
}

.cmvh-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(27,67,50,.12);
    border-color: #2d6a4f;
}

.cmvh-card-hdr {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.cmvh-card-num {
    background: linear-gradient(135deg, #1b4332, #2d6a4f);
    color: #fff;
    min-width: 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(27,67,50,.25);
}

.cmvh-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1b4332;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.cmvh-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.88rem;
}

.cmvh-card-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: #6b7280;
}

.cmvh-card-lbl {
    font-weight: 700;
    color: #1b4332;
    min-width: 78px;
    flex-shrink: 0;
}

.cmvh-card-val {
    color: #4a5568;
    overflow-wrap: anywhere;
}

.cmvh-card-reg {
    display: inline-block;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 5px 12px;
    font-family: monospace;
    font-weight: 700;
    color: #166534;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Pagination */
.cmvh-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 1300px;
    margin: 0 auto 10px;
}

.cmvh-pagination button {
    padding: 9px 14px;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    min-width: 40px;
    transition: all .25s;
    font-family: inherit;
    font-size: 0.9rem;
}

.cmvh-pagination button:hover {
    border-color: #2d6a4f;
    color: #2d6a4f;
    transform: translateY(-1px);
}

.cmvh-pagination button.active {
    background: linear-gradient(135deg, #1b4332, #2d6a4f);
    color: #fff;
    border-color: #1b4332;
}

.cmvh-pagination button:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none !important;
}

/* No results / Empty */
.cmvh-no-results,
.cmvh-dir-empty {
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
    max-width: 900px;
    margin: 0 auto;
}

.cmvh-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: .7;
}

.cmvh-no-results h3,
.cmvh-dir-empty h3 {
    font-size: 1.3rem;
    color: #374151;
    margin-bottom: 8px;
}

.cmvh-no-results p,
.cmvh-dir-empty p {
    color: #9ca3af;
}
