:root {
    --color-primary: #0ea5e9;
    /* Tailwind cyan-500 */
}

/* === Navegación === */
.nav-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3730a3 100%);
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.3);
}


/* === Tarjetas === */
.feature-card,
.card-hover,
.testimonial-card,
.modulo-card,
.professional-card {
    transition: all 0.3s ease;
}

.feature-card:hover,
.card-hover:hover,
.testimonial-card:hover,
.modulo-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-elevated);
}

.professional-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid #e0e7ff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modulo-card {
    text-align: center;
    padding: 1.5rem;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.modulo-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: background-color 0.3s ease;
}

.modulo-card:hover .modulo-icon {
    background-color: #d1fae5;
}

.modulo-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.modulo-card:hover .modulo-title {
    color: #059669;
}

.modulo-text {
    font-size: 0.875rem;
    color: #4b5563;
}

.categoria-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
}

/* === Modales === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 95%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: var(--shadow-elevated);
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.modal-icon {
    width: 50px;
    height: 50px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 24px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-subtitle {
    font-size: 1rem;
    color: var(--color-muted);
    margin: 5px 0 0 0;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--color-muted);
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.functions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.function-item {
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.function-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.function-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.function-title::before {
    content: "✓";
    color: var(--color-success);
    font-weight: bold;
    margin-right: 8px;
}

.function-desc {
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.modal-image-container {
    margin: 1.25rem auto;
    text-align: center;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 60%;
}

.modal-image {
    width: auto;
    max-width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* === Chat y notificaciones === */
.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 1.25rem;
    width: 350px;
    max-height: 500px;
    background: white;
    border-radius: 1rem;
    z-index: 1000;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.chat-widget.show {
    transform: translateY(0);
    opacity: 1;
}

.notification {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    z-index: 3000;
    background: var(--color-success);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

/* === Íconos e interacción === */
.role-icon {
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-icon:hover {
    filter: brightness(1.1);
}

.dashboard-icon {
    cursor: default;
}

/* === Buscador institucional === */
.input-buscador {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    color: #1f2937;
    border-radius: 0.75rem;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    /* sombra más marcada */
}

.input-buscador:hover {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
    /* sombra azul institucional */
}

.input-buscador:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
    /* halo azul al enfocar */
    border: none;
}