/* estilos.css - RedEspecialista.cl */

/* Estilos base y tipografía */
body { 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; 
    background-color: #f9fafb; 
    color: #1f2937; 
    margin: 0; 
    padding: 0; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1rem; 
}

/* Barra de navegación */
nav { 
    background-color: #ffffff; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); 
    position: sticky; 
    top: 0; 
    z-index: 50; 
}
.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 64px; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1rem; 
}
.logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: #2563eb; 
    text-decoration: none; 
}
.logo-gray { color: #374151; }
.logo-cl { color: #3b82f6; }
.btn-nav { 
    background-color: #2563eb; 
    color: #ffffff; 
    padding: 0.5rem 1rem; 
    border-radius: 8px; 
    font-weight: 500; 
    text-decoration: none; 
    font-size: 0.875rem; 
    transition: background-color 0.2s; 
}
.btn-nav:hover { background-color: #1d4ed8; }

/* Sección Hero (Buscador Principal) */
header { 
    background: linear-gradient(to right, #1d4ed8, #4338ca); 
    color: #ffffff; 
    padding: 5rem 1rem; 
    text-align: center; 
}
h1 { 
    font-size: 2.5rem; 
    font-weight: 800; 
    margin: 0 0 1rem 0; 
    letter-spacing: -0.025em; 
    line-height: 1.2; 
}
@media (max-width: 768px) { h1 { font-size: 2rem; } }
.hero-p { font-size: 1.25rem; color: #dbeafe; margin: 0 0 2rem 0; }

/* Formulario de Búsqueda */
.search-form { 
    background-color: #ffffff; 
    padding: 0.5rem; 
    border-radius: 12px; 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
    max-width: 960px; /* ← Cambiado aquí para hacerlo más grande */
    margin: 0 auto; 
}
@media (min-width: 768px) { .search-form { flex-direction: row; } }
.input-group { display: flex; align-items: center; padding: 0 0.75rem; flex: 1; }
.input-group-principal { flex: 2 !important;}



.border-r { border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem; }
@media (min-width: 768px) { 
    /*.border-r { border-bottom: none; border-right: 1px solid #e5e7eb; padding-bottom: 0; } */
    .border-r { 
        border-bottom: none; 
        border-right: 1px solid #e5e7eb; 
        padding-bottom: 0; 
    } 
    

    /*.w-md { width: 250px; flex: none; } */
    .w-md { 
        width: 210px; 
        flex: none; 
    } 
}

.search-icon { color: #9ca3af; margin-right: 0.5rem; font-size: 1.1rem; }
.search-input { width: 100%; border: none; padding: 0.75rem 0; font-size: 1rem; color: #111827; outline: none; }
.btn-search { 
    background-color: #2563eb; 
    color: #ffffff; 
    font-weight: 600; 
    padding: 0.75rem 2rem; 
    border: none; 
    border-radius: 8px; 
    font-size: 1rem; 
    cursor: pointer; 
    transition: background-color 0.2s; 
}
.btn-search:hover { background-color: #1d4ed8; }

/* Tarjetas de Categorías */
.categories-section { padding: 4rem 1rem; }
h2 { font-size: 1.75rem; font-weight: 700; color: #111827; text-align: center; margin: 0 0 2.5rem 0; }
.grid-categories { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 480px) { .grid-categories { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-categories { grid-template-columns: repeat(4, 1fr); } }
.card { 
    background-color: #ffffff; 
    padding: 1.5rem; 
    border-radius: 12px; 
    border: 1px solid #f3f4f6; 
    text-align: center; 
    cursor: pointer; 
    transition: transform 0.2s, box-shadow 0.2s; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.card-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.card-title { font-size: 1.125rem; font-weight: 600; color: #1f2937; margin: 0 0 0.25rem 0; }
.card-desc { font-size: 0.75rem; color: #6b7280; margin: 0; }

/* Estilos para el Formulario de Registro */
.form-box { background-color: #ffffff; padding: 2.5rem; border-radius: 16px; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.05); max-width: 550px; margin: 3rem auto; }
.form-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin: 0 0 0.5rem 0; color: #111827; }
.form-desc { font-size: 0.875rem; color: #6b7280; text-align: center; margin: 0 0 2rem 0; }
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.25rem; }
@media (min-width: 576px) { .form-row { grid-template-columns: repeat(2, 1fr); } }
label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: #374151; }
.form-control { width: 100%; padding: 0.625rem 0.75rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem; color: #1f2937; outline: none; box-sizing: border-box; }
.form-control:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.btn-submit { width: 100%; background-color: #2563eb; color: #ffffff; font-weight: 600; padding: 0.875rem; border: none; border-radius: 8px; font-size: 1rem; cursor: pointer; margin-top: 1.5rem; transition: background-color 0.2s; }
.btn-submit:hover { background-color: #1d4ed8; }

/* Footer */
footer { background-color: #111827; color: #9ca3af; padding: 2rem 1rem; text-align: center; font-size: 0.875rem; border-top: 1px solid #1f2937; margin-top: auto; }
footer p { margin: 0; }

/* Estilos extra para la ficha de perfil individual */
.profile-card { background-color: #ffffff; border-radius: 16px; border: 1px solid #e5e7eb; padding: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; margin-top: 3rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
@media (min-width: 768px) { .profile-card { flex-direction: row; align-items: flex-start; text-align: left; } }
.avatar { width: 128px; height: 128px; background-color: #dbeafe; color: #2563eb; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 700; box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); }
.badge { background-color: #eff6ff; color: #1d4ed8; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.profile-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 2rem; margin-bottom: 4rem; }
@media (min-width: 768px) { .profile-layout { grid-template-columns: 2fr 1fr; } }
.info-box { background-color: #ffffff; padding: 1.5rem; border-radius: 16px; border: 1px solid #e5e7eb; }
.btn-cta { display: block; text-align: center; text-decoration: none; font-weight: 600; padding: 0.875rem; border-radius: 12px; margin-bottom: 0.75rem; transition: background-color 0.2s; color: #ffffff; }


/* ==========================================
   ESTILOS PARA EL MODAL DE ÉXITO (REGISTRO)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-icon {
    width: 64px;
    height: 64px;
    background-color: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem auto;
}


/* ==========================================
   ESTILOS PARA LA PÁGINA DE RESULTADOS
   ========================================== */
.results-card {
    background-color: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.results-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
@media (min-width: 640px) {
    .results-card { flex-direction: row; align-items: center; }
}
.avatar-small {
    width: 72px;
    height: 72px;
    background-color: #dbeafe;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}
.results-info {
    flex: 1;
    text-align: left;
}
.results-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0.375rem 0 0.125rem 0;
}
.results-spec {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4b5563;
    margin: 0 0 0.5rem 0;
}
.results-desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}
.results-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.825rem;
    color: #9ca3af;
}
.results-action {
    flex-shrink: 0;
    width: 100%;
}
@media (min-width: 640px) {
    .results-action { width: 130px; }
}
