/* ====== BASE ====== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Kedebideri", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3faf8;
    color: #1f2f2b;
}

/* ====== HERO (ENCABEZADO VERDE) ====== */
.hero {
    background: linear-gradient(180deg, #04B6A8, #14C4B6);
    padding: 28px 0 40px;  /* Más compacto */
    text-align: center;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}

.hero-inner {
    max-width: 580px;
    margin: 0 auto;
}

.hero-logo {
    width: 120px;            /* reduce de 180-200px */
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.08));
}

.hero-text h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
}

.hero-text p {
    margin: 0;
    font-size: 15px;
}

/* Título */
.hero-copy h1 {
    font-size: 26px;         /* antes 32-36 */
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.4px;
}

/* Subtítulo */
.hero-copy p {
    margin-top: 4px;
    font-size: 15px;         /* antes muy grande */
    color: rgba(255,255,255,0.9);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .hero {
        padding: 22px 0 32px;
    }
    .hero-logo {
        width: 100px;
    }
    .hero-copy h1 {
        font-size: 22px;
    }
    .hero-copy p {
        font-size: 14px;
    }
}

/* ====== CONTENEDOR PRINCIPAL ====== */
.site-main {
    max-width: 1200px;
    margin: -45px auto 40px;
    padding: 0 15px 10px;
}

/* ====== TARJETAS GENERALES ====== */
.card,
.search-card-home,
.search-card,
.panel-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #E0ECEA;
    box-shadow: 0 16px 40px rgba(0,0,0,0.06);
    padding: 20px 24px 20px;
    max-width: 1100px;
    margin: 0 auto 28px;
}

.search-card-home h2,
.search-card h2,
.panel-card h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
}

.search-card-home p,
.search-card p,
.panel-card p {
    margin: 0 0 14px 0;
    font-size: 19px;
    color: #555;
}

/* ====== FORMULARIOS (inputs / selects / textareas) ====== */

label {
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid #D5E5E1;
    font-size: 13px;
    font-family: inherit;
    background: #f7fcfb;
}

textarea {
    min-height: 60px;
    resize: vertical;
}

/* Grids para formularios de búsqueda */
.search-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

/* Grids para panel del médico (puedes usarlos libremente) */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* ====== BOTONES ====== */

.btn-primary,
.btn-buscar,
button[type="submit"] {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background: #04b6a8;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-buscar {
    width: 100%;
}

.btn-primary:hover,
.btn-buscar:hover,
button[type="submit"]:hover {
    background: #039c91;
}

/* Botones pequeños (admin, panel, etc.) */
.btn-small {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
}

/* ====== LISTADO DE MÉDICOS / TABLAS ====== */

.medico-card {
    padding: 10px 0;
}

.medico-card h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
}

.medico-card p {
    margin: 2px 0;
    font-size: 13px;
}

/* tablas admin */
.medicos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.medicos-table th,
.medicos-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #E4ECEB;
    text-align: left;
}

.medicos-table th {
    background: #F5FAF9;
    font-weight: 600;
}

/* Pills de estatus */
.pill-ok {
    background: #CFF3E5;
    color: #0C6A4B;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
}

.pill-pend {
    background: #FFE0C8;
    color: #A45314;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
}

/* ====== PANEL DEL MÉDICO ====== */

.panel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.panel-top .links a {
    margin-left: 12px;
    font-size: 13px;
    text-decoration: none;
}

.panel-top .links a:first-child {
    color: #04b6a8;
}
.panel-top .links a:last-child {
    color: #d84242;
}

/* Avatar circular grande */
.avatar-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #e4f1ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #7a8c88;
    margin-right: 24px;
}

/* Wrapper de cabecera de panel */
.panel-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

/* ====== FOOTER ====== */

.site-footer {
    text-align: center;
    font-size: 12px;
    color: #777;
    padding-bottom: 20px;
}

/* ====== RESPONSIVE GENERAL ====== */
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-logo {
        max-width: 170px;
    }

    .site-main {
        margin-top: 0px;
    }

    .search-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .avatar-circle {
        margin-right: 0;
    }
}

/* =========================================================
   GRID DE RESULTADOS EN BUSCAR.PHP  (tarjetas de médicos)
   ========================================================= */

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 15px;
}

/* Tarjeta base */
.result-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 18px 16px;
    border-radius: 14px;
    border: 1px solid #E0ECEA;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
}

/* Tarjeta DESTACADA (borde dorado + estrella) */
.result-card.card-destacado {
    border: 2px solid #e0b10f;
    background: linear-gradient(135deg, #fffdf5, #ffffff);
    box-shadow: 0 8px 26px rgba(224,177,15,0.28);
    position: relative;
}

.result-card.card-destacado::after {
    content: "⭐";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 15px;
    background: #ffffff;
    border-radius: 50%;
    padding: 2px;
    border: 1px solid #e0b10f;
    color: #e0b10f;
    box-shadow: 0 2px 4px rgba(224,177,15,0.25);
}

/* Hover tarjeta */
.result-card:hover {
    transform: translateY(-2px);
    border-color: #04b6a8;
    box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

/* Avatar circular (foto o iniciales) */
.rv-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #04b6a8;
    flex-shrink: 0;
}

.rv-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Iniciales cuando NO hay foto */
.result-photo-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #f4fbfa);
    color: #04b6a8;
    font-weight: 600;
    font-size: 24px;
    border: 2px solid #04b6a8;
    box-shadow: 0 4px 12px rgba(4, 182, 168, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Iniciales cuando el médico es DESTACADO */
.result-photo-initials.destacado {
    border-color: #e0b10f;
    color: #e0b10f;
    box-shadow: 0 4px 12px rgba(224,177,15,0.4);
}

/* Efecto hover sobre iniciales / foto */
.result-card:hover .result-photo-initials,
.result-card:hover .rv-avatar-img {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(4, 182, 168, 0.28);
}

/* Contenido texto + botones */
.result-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

/* Fila superior solo badges (a la derecha) */
.result-card-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

/* Nombre completo */
.result-name-line {
    margin: 6px 0 2px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

/* Especialidad: rojo, negritas y más grande */
.result-specialty-line {
    margin: 2px 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #c43131;
}

/* Ubicación */
.result-location-line {
    margin: 0 0 6px;
    font-size: 13px;
    color: #555;
}

/* Datos de contacto */
.result-contact {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.result-contact strong {
    font-weight: 600;
}

/* Badges Destacado / Verificado */
.result-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-destacado {
    background: #fff3cd;
    border-color: #ffec99;
    color: #8a6d1f;
}

.badge-verificado {
    background: #e6f4ea;
    border-color: #c8e6c9;
    color: #256029;
}

.badge-nuevo {
    background: #e3f2fd;
    border-color: #bbdefb;
    color: #0d47a1;
}

/* Botones */
.result-actions {
    margin-top: 8px;
}

.btn-cta {
    display: block;
    text-align: center;
    padding: 7px 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

/* Ver perfil completo */
.btn-perfil {
    background: #04b6a8;
    color: #ffffff;
}

.btn-perfil:hover {
    background: #039488;
}

/* Fila de WhatsApp / Llamar */
.result-actions-row {
    margin-top: 6px;
    display: flex;
    gap: 6px;
}

/* WhatsApp */
.btn-whatsapp {
    flex: 1;
    background: #25D366;
    color: #ffffff;
}

.btn-whatsapp:hover {
    background: #1ebe5b;
}

/* Llamar */
.btn-call {
    flex: 1;
    background: #12c2b9;
    color: #ffffff;
}

.btn-call:hover {
    background: #0f9d96;
}

/* Paginación */
.pagination {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
}

.pagination a {
    display: inline-block;
    margin: 0 3px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid #D5E5E1;
    text-decoration: none;
    color: #047c75;
    background: #fff;
}

.pagination a.active {
    background: #04b6a8;
    color: #fff;
    border-color: #04b6a8;
}

.pagination a:hover {
    background: #e6f7f5;
}

/* Responsive tarjetas resultados */
@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .result-card {
        padding: 14px 14px 12px;
        gap: 12px;
    }

    .rv-avatar {
        width: 120px;
        height: 120px;
    }

    .result-name-line {
        font-size: 16px;
    }
}

/* ====== TARJETAS DEL PANEL DEL MÉDICO ====== */

.panel-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.panel-tile {
    border: 1px solid #E0ECEA;
    border-radius: 12px;
    padding: 12px 14px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.03);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.panel-tile h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
}

.panel-tile p {
    margin: 0;
    color: #555;
    font-size: 13px;
}

.panel-tile-footer {
    margin-top: 10px;
    text-align: right;
}

.link-primary {
    font-size: 13px;
    text-decoration: none;
    color: #04b6a8;
    font-weight: 600;
}

.link-primary:hover {
    text-decoration: underline;
}

/* Responsive: panel tiles en menos columnas en pantallas pequeñas */
@media (max-width: 1024px) {
    .panel-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .panel-tiles {
        grid-template-columns: 1fr;
    }
}

/* ====== BARRA DE PROGRESO PERFIL ====== */

.progress-wrapper {
    margin-top: 6px;
    margin-bottom: 18px;
}

.progress-text {
    font-size: 13px;
    margin-bottom: 4px;
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e2f1ee;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #04b6a8, #47dac8);
    transition: width 0.4s ease;
}

/* ====== PERFIL PÚBLICO DEL MÉDICO ====== */

.profile-header-card {
    margin-bottom: 20px;
}

.profile-header {
    display: flex;
    gap: 20px;
    align-items: center;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #e4f1ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: #047c75;
}

.profile-main h2 {
    margin: 0 0 4px 0;
    font-size: 22px;
}

.profile-specialty {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #155c55;
}

.profile-cedula {
    margin: 0 0 6px 0;
    font-size: 13px;
}

.profile-tags {
    margin-bottom: 10px;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #04b6a8;
    background: #ffffff;
    color: #04b6a8;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #e6f7f5;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr;
    gap: 20px;
}

.profile-info-grid h3 {
    margin-top: 0;
}

/* Consultorios */
.clinic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.clinic-card {
    border: 1px solid #E0ECEA;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.03);
    font-size: 13px;
}

.clinic-card h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
}

.clinic-address {
    margin: 0 0 4px 0;
}

.clinic-contact {
    margin: 0 0 3px 0;
}

.clinic-contact a {
    text-decoration: none;
    color: #047c75;
}

.clinic-contact a:hover {
    text-decoration: underline;
}

.clinic-map {
    margin-top: 6px;
}

.clinic-map iframe {
    width: 100%;
    height: 180px;
    border: 0;
    border-radius: 10px;
}

/* Responsive perfil / consultorios */
@media (max-width: 900px) {
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
    .clinic-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== BADGES EN RESULTADOS DE BÚSQUEDA (ya usados arriba) ====== */

.result-card-top h3 {
    margin: 0;
}

@media (max-width: 640px) {
    .result-card-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .result-badges {
        justify-content: flex-start;
    }
}

/* ====== PERFIL PÚBLICO - VISTA MÓVIL (extra ajustes) ====== */
@media (max-width: 768px) {

    /* Hero más compacto y centrado */
    .hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        padding: 16px 12px;
    }

    .hero-logo {
        max-width: 120px;
    }

    .hero-text h1 {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .hero-text p {
        font-size: 13px;
        line-height: 1.4;
    }

    /* Tarjeta principal del perfil */
    .panel-card {
        margin: 10px 10px 14px;
        padding: 12px;
        border-radius: 14px;
    }

    .profile-header-card {
        margin-bottom: 12px;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .profile-avatar {
        width: 70px;
        height: 70px;
        font-size: 22px;
    }

    .profile-main h2 {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .profile-specialty {
        font-size: 14px;
    }

    .profile-cedula {
        font-size: 12px;
    }

    .profile-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-top: 8px;
    }

    .profile-actions .btn-primary,
    .profile-actions .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 9px 10px;
        font-size: 14px;
        border-radius: 999px;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .profile-info-grid h3 {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .profile-info-grid h4 {
        font-size: 14px;
        margin-bottom: 3px;
    }

    .profile-info-grid p {
        font-size: 13px;
        line-height: 1.45;
    }

    .clinic-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .clinic-card {
        padding: 10px;
        border-radius: 12px;
        font-size: 13px;
    }

    .clinic-card h4 {
        font-size: 15px;
    }

    .clinic-address,
    .clinic-contact {
        font-size: 12px;
    }

    .clinic-map iframe {
        height: 190px;
        border-radius: 10px;
    }

    /* Tarjetas de resultado en móvil: un poquito más compactas */
    .result-card {
        padding: 10px;
        gap: 10px;
    }

    .result-card-content {
        font-size: 13px;
    }
}

/* Ajuste extra para pantallas muy pequeñas */
@media (max-width: 480px) {
    .panel-card {
        margin: 8px;
        padding: 10px;
    }

    .profile-main h2 {
        font-size: 17px;
    }

    .profile-actions .btn-primary,
    .profile-actions .btn-secondary {
        font-size: 13px;
        padding: 8px 10px;
    }

    .clinic-map iframe {
        height: 170px;
    }
}

/* Barra fija de contacto en móviles */
@media (max-width: 768px) {

    .sticky-contact-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 8px 10px;
        background: rgba(255,255,255,0.97);
        box-shadow: 0 -4px 12px rgba(0,0,0,0.10);
        display: flex;
        gap: 8px;
        z-index: 999;
    }

    .sticky-btn {
        flex: 1;
        text-align: center;
        border-radius: 999px;
        padding: 10px 12px;
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
        border: none;
    }

    .sticky-whatsapp {
        background: #25D366;
        color: #ffffff;
    }

    .sticky-call {
        background: #12c2b9;
        color: #ffffff;
    }

    /* Para que el contenido no quede tapado por la barra */
    body {
        padding-bottom: 70px;
    }
}

.sticky-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sticky-btn .icon svg {
    display: block;
}


