/* ================================================
   MAPA DOCENTES  ·  /css/servicios/docentes.css
   ProfeGo — BEM, sin Bootstrap, sin variables undefined
   ================================================ */

/* ── Header ──────────────────────────────────────── */
.doc-header {
    background: linear-gradient(135deg, var(--color-navy) 0%, #0a6b8a 100%);
    padding: 20px 24px;
}
.doc-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.doc-header__title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}
.doc-header__title-wrap > i {
    font-size: 1.8rem;
    opacity: .85;
}
.doc-header__title {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-primary);
    margin: 0 0 2px;
    color: #fff;
}
.doc-header__sub {
    font-size: .8rem;
    color: rgba(255,255,255,.75);
    margin: 0;
    font-family: var(--font-primary);
}
.doc-header__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 10px;
    padding: 9px 18px;
    font-size: .875rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
}
.doc-header__back:hover { background: rgba(255,255,255,.28); }

/* ── Mapa wrapper ─────────────────────────────────── */
.doc-map-wrap {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    min-height: 420px;
}
#teachersMap {
    width: 100%;
    height: 100%;
}

/* ── Contador flotante ────────────────────────────── */
.doc-counter {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #fff;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: .78rem;
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--color-navy);
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    z-index: 10;
    display: none;          /* se muestra desde JS cuando hay docentes */
}

/* ── Botón ubicación ──────────────────────────────── */
.doc-location-btn {
    position: absolute;
    bottom: 140px;
    right: 16px;
    z-index: 10;
    width: 46px;
    height: 46px;
    background: #fff;
    border: 2px solid #e0d8cd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    transition: box-shadow .2s, transform .2s;
    font-size: 1.1rem;
    color: var(--color-navy);
}
.doc-location-btn:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transform: scale(1.08);
}
.doc-location-btn:disabled {
    opacity: .6;
    cursor: default;
    transform: none;
}

/* ── Loading overlay ──────────────────────────────── */
.doc-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 20;
    backdrop-filter: blur(3px);
}
.doc-loading--hidden { display: none; }
.doc-loading__spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #f0ebe3;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: doc-spin .8s linear infinite;
}
@keyframes doc-spin { to { transform: rotate(360deg); } }
.doc-loading__text {
    font-size: .9rem;
    color: var(--color-navy);
    font-family: var(--font-primary);
    font-weight: 600;
    margin: 0;
    text-align: center;
    max-width: 260px;
}

/* ── Overlay fondo sidebar ────────────────────────── */
.doc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.38);
    z-index: 99;
    backdrop-filter: blur(1px);
}
.doc-overlay--visible { display: block; }

/* ── Sidebar ──────────────────────────────────────── */
.doc-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 96vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 32px rgba(0,0,0,.15);
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: right .32s cubic-bezier(.4,0,.2,1);
    border-left: 2px solid #f0ebe3;
}
.doc-sidebar--open { right: 0; }

.doc-sidebar__close-bar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 14px 16px 10px;
    background: #fff;
    border-bottom: 1px solid #f0ebe3;
    z-index: 1;
}
.doc-sidebar__close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #8fa3b1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}
.doc-sidebar__close:hover {
    background: #fff0f0;
    color: #c0392b;
}

/* ── Detalle docente ──────────────────────────────── */
.doc-detail { padding: 0 20px 32px; }

/* Hero: foto + nombre + especialidad */
.doc-detail__hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0 16px;
    border-bottom: 1.5px solid #f0ebe3;
    margin-bottom: 16px;
}
.doc-detail__img-wrap {
    position: relative;
    flex-shrink: 0;
}
.doc-detail__img {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    background: #f5f5f5;
}
.doc-detail__badge {
    position: absolute;
    bottom: 0;
    right: -2px;
    width: 22px;
    height: 22px;
}
.doc-detail__name {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-primary);
    color: var(--color-navy);
    margin: 0 0 4px;
    line-height: 1.3;
}
.doc-detail__specialty {
    font-size: .8rem;
    color: #5a7080;
    font-family: var(--font-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.doc-detail__specialty i { color: var(--color-primary); }

/* Cuerpo: descripción + experiencia + contacto */
.doc-detail__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.doc-detail__desc {
    font-size: .85rem;
    color: #4a6070;
    line-height: 1.6;
    margin: 0;
}
.doc-detail__info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .82rem;
    color: #5a7080;
}
.doc-detail__info-item i {
    color: var(--color-primary);
    margin-top: 2px;
    flex-shrink: 0;
}

/* Caja de contacto (solo student) */
.doc-detail__contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #f7f4f0;
    border-radius: 10px;
    border-left: 3px solid var(--color-primary);
}
.doc-detail__contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: #4a6070;
}
.doc-detail__contact-item i {
    color: var(--color-primary);
    width: 14px;
    flex-shrink: 0;
}
.doc-detail__contact-item a {
    color: var(--color-navy);
    text-decoration: none;
    font-weight: 600;
}
.doc-detail__contact-item a:hover { text-decoration: underline; }

/* Footer: botones de acción */
.doc-detail__footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
    border-top: 1.5px solid #f0ebe3;
}
.doc-detail__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 700;
    font-family: var(--font-primary);
    text-decoration: none;
    transition: filter .2s, transform .15s, background .2s;
    width: 100%;
    border: none;
    cursor: pointer;
}
.doc-detail__btn:hover { transform: translateY(-2px); }

/* Reservar — naranja */
.doc-detail__btn--reserve {
    background: var(--color-primary);
    color: #fff;
}
.doc-detail__btn--reserve:hover {
    filter: brightness(1.1);
    color: #fff;
}
/* Ver perfil — crema */
.doc-detail__btn--profile {
    background: #f0ebe3;
    color: #2d4a5a;
}
.doc-detail__btn--profile:hover { background: #e5ddd3; }

/* Iniciar sesión — navy */
.doc-detail__btn--login {
    background: var(--color-navy);
    color: #fff;
}
.doc-detail__btn--login:hover {
    filter: brightness(1.15);
    color: #fff;
}

/* ── Mensaje sin resultados (cuando no hay docentes) ── */
.doc-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    z-index: 15;
    max-width: 320px;
    width: 90%;
}
.doc-empty__icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}
.doc-empty__title {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-primary);
    color: var(--color-navy);
    margin: 0 0 8px;
}
.doc-empty__text {
    font-size: .82rem;
    color: #5a7080;
    margin: 0;
    line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .doc-header { padding: 14px 16px; }
    .doc-header__title { font-size: 1.1rem; }
    .doc-map-wrap { height: calc(100vh - 68px); }
}
@media (max-width: 480px) {
    .doc-sidebar { width: 100vw; right: -100vw; border-left: none; }
    .doc-detail { padding: 0 16px 28px; }
}