/* Tipografía base */
body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif;
}

/* Respetar el atributo hidden siempre */
[hidden] {
    display: none !important;
}

/* Accessibilidad: foco visible */
:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Navbar */
.navbar {
    background-color: #446E9B;
}

.link-registro,
.link-login {
    cursor: pointer;
}

.navbar-toggler-icon {
    filter: invert(100%);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff;
}

.navbar-dark .navbar-brand {
    color: white;
}

.separador {
    width: 1px;
    background-color: rgba(255, 255, 255, 0.35);
    margin: 0 0.5rem;
    padding: 0;
}

/* ===== Hero / buscador principal ===== */
.hero {
    background-image:
            radial-gradient(circle at 1px 1px, rgba(13, 110, 253, 0.10) 1px, transparent 0),
            linear-gradient(180deg, #e7efff 0%, #f9fafb 100%);
    background-size: 26px 26px, auto;
    background-repeat: repeat, no-repeat;
    padding: 130px 1rem 4rem;
    position: relative;
}

.hero-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.hero-eyebrow {
    display: inline-block;
    background: #fff;
    color: #0a58ca;
    border: 1px solid #cfe0fb;
    border-radius: 30px;
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: clamp(1.9rem, 3.6vw, 2.9rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.hero .highlight {
    color: #0d6efd;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #4b5563;
    max-width: 620px;
    margin: 0 auto 2rem;
}

.search-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 42, 92, 0.12);
    padding: 1.75rem;
    max-width: 920px;
    margin: 0 auto;
    text-align: left;
}

.search-form .form-group {
    margin-bottom: 0.5rem;
}

.search-form .form-group-btn {
    margin-bottom: 0.5rem;
}

.search-form label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.search-form label i {
    color: #0d6efd;
}

.search-form .custom-select {
    height: 54px;
    border-radius: 12px;
    border-color: #cbd5e1;
    font-size: 1rem;
    color: #1f2937;
    background-color: #ffffff;
}

.search-form .custom-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.btn-buscar {
    background: #0d6efd;
    border: none;
    border-radius: 12px;
    height: 54px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    width: 100%;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-buscar:hover,
.btn-buscar:focus {
    background: #0a58ca;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.35);
}

.btn-buscar:disabled,
.btn-buscar.disabled {
    background: #a7c6f5;
    color: #ffffff;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.search-hint {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
}

.search-hint i {
    color: #9ca3af;
}

.form-error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin: 0.85rem 0 0;
}

.form-error--soft {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

/* ===== Sección informativa ===== */
.info-section {
    padding: 4rem 1rem 5rem;
    text-align: center;
}

.info-section h2 {
    color: #1f2937;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    margin-bottom: 0.75rem;
}

.section-lead {
    color: #6b7280;
    max-width: 640px;
    margin: 0 auto 2.5rem;
    font-size: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    text-align: center;
}

.info-card {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 6px 18px rgba(15, 42, 92, 0.07);
    transition: transform 0.2s ease;
}

.info-card:hover {
    transform: translateY(-4px);
}

.info-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #e8f0fe;
    color: #0d6efd;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.info-card h3 {
    font-size: 1.05rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: #6b7280;
    font-size: 0.92rem;
    margin: 0;
}

/* ===== Resultados ===== */
.results-section {
    padding: 0 1rem 4rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.results-header h2 {
    color: #1f2937;
    font-size: clamp(1.3rem, 2.3vw, 1.7rem);
    margin: 0;
}

.results-count {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    background: #e8f0fe;
    color: #0a58ca;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

.results-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #ffffff;
    border: 1px dashed #d1d5db;
    border-radius: 18px;
    color: #4b5563;
}

.results-state-icon {
    font-size: 2.4rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.results-state h3 {
    color: #1f2937;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.results-state p {
    color: #6b7280;
    margin-bottom: 1.25rem;
}

.results-state-text {
    font-size: 1.05rem;
    margin: 0;
}

.results-state .btn {
    min-width: 190px;
}

/* ===== Tarjetas de médicos ===== */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.doctor-card {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 6px 16px rgba(15, 42, 92, 0.06);
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

a.doctor-card:hover,
a.doctor-card:focus {
    color: inherit;
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(15, 42, 92, 0.12);
}

.doctor-card--sin-enlace {
    cursor: default;
}

.doctor-avatar {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eef2ff;
}

.doctor-info {
    flex: 1;
    min-width: 0;
}

.doctor-name {
    margin: 0 0 0.3rem;
    font-size: 1.08rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.doctor-specialty {
    display: inline-block;
    background: #e8f0fe;
    color: #0a58ca;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    margin: 0 0 0.55rem;
}

.doctor-location,
.doctor-id {
    color: #6b7280;
    font-size: 0.88rem;
    margin: 0 0 0.35rem;
}

.doctor-location i,
.doctor-id i {
    margin-right: 0.35rem;
    color: #9ca3af;
}

.doctor-id {
    display: block;
    color: #9ca3af;
    font-size: 0.8rem;
    margin-bottom: 0;
}

.doctor-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.55rem;
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.88rem;
}

/* ===== Footer ===== */
footer {
    background-color: #1f2937;
    color: white;
    padding: 2rem 1.5rem;
    margin-top: 2rem;
}

footer p {
    text-align: center;
    margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero {
        padding: 120px 1rem 3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .search-form {
        padding: 1.25rem;
    }

    .results-section {
        padding: 0 1rem 3rem;
    }

    .info-section {
        padding: 3rem 1rem 3.5rem;
    }
}

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

@media (max-width: 576px) {
    .hero {
        padding-top: 110px;
    }

    .search-form {
        text-align: left;
    }

    .doctor-card {
        padding: 1rem;
    }

    .doctor-avatar {
        width: 84px;
        height: 84px;
    }
}