/* Top Bar Styling */
.top-bar {
    font-size: 0.75rem;
    background-color: #f8f9fa !important;
}

.top-bar-link {
    color: #666;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 2px 0;
}

.top-bar-link:hover {
    color: var(--primary-color);
}

.top-bar-link i {
    opacity: 0.8;
}

:root {
    --primary-color: #004a99;
    --secondary-color: #f8f9fa;
    --accent-color: #ffc107;
    --text-dark: #002d5a;
    --text-light: #666;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #f4f7f6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-dark {
    color: var(--text-dark) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #003a7a;
    border-color: #003a7a;
}

/* Dropdown Submenu Support */
.dropdown-menu {
    overflow: visible !important;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -10px !important;
    margin-left: 0;
    display: block !important;
    visibility: hidden;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.dropdown-submenu:hover>.dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.dropdown-menu .dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Navbar Customization */
.navbar {
    padding: 0.8rem 0;
    transition: all 0.3s ease;
}

.navbar .nav-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Brand & Logo Styles */
.logo-wrapper {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    line-height: 0;
    display: flex;
}

.navbar-brand:hover .logo-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.navbar-toggler:focus {
    box-shadow: none !important;
    outline: none !important;
}

.navbar {
    z-index: 1030 !important;
    /* Asegurar que esté por encima de sliders y otros elementos */
}

.brand-title {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 2px;
}

.brand-subtitle {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff !important;
}

/* Dropdown Menu Improvements */
.dropdown-menu {
    border-radius: 12px;
    padding: 0.8rem;
    margin-top: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateX(5px);
}

.navbar .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.45em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Tabs Styling (Personal Page) */
#personalTabs .nav-link {
    color: var(--text-dark) !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.8rem 1rem !important;
    transition: all 0.3s ease;
    border-radius: 8px;
}

#personalTabs .nav-link.active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

#personalTabs .nav-link:hover:not(.active) {
    background-color: rgba(0, 74, 153, 0.05);
}

.btn-login {
    background-color: var(--accent-color);
    color: var(--text-dark) !important;
    font-weight: 800;
    border-radius: 50px;
    padding: 0.6rem 1.6rem !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-login:hover {
    background-color: #002d5a;
    /* Un azul más oscuro que el navbar */
    color: var(--accent-color) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.btn-login:hover i {
    background: rgba(255, 193, 7, 0.1);
    color: var(--accent-color);
}

.btn-login i {
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.08);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 74, 153, 0.8), rgba(0, 74, 153, 0.8)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card-programa {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.card-programa:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 74, 153, 0.2);
}

.card-title {
    color: var(--primary-color);
}

/* Admin Sidebar */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--primary-color);
    color: #fff;
    transition: all 0.3s;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #003a7a;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul p {
    color: #fff;
    padding: 10px;
}

#sidebar ul li a {
    padding: 10px 20px;
    font-size: 1.1em;
    display: block;
    color: #fff;
    text-decoration: none;
}

#sidebar ul li a:hover {
    color: var(--primary-color);
    background: #fff;
}

#sidebar ul li.active>a,
#sidebar a[aria-expanded="true"] {
    color: #fff;
    background: #003a7a;
}

#sidebar a[data-bs-toggle="collapse"] {
    position: relative;
}

#sidebar .dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #FFF;
    transform: scale(1.1);
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background-color: #333;
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.whatsapp-tooltip::after {
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent #333;
}


.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

/* Responsive WhatsApp Button */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 30px;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

/* Social Buttons - High Specificity to override anything */
a.social-btn,
button.social-btn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    border-width: 2px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    position: relative;
    overflow: hidden;
}

a.social-btn:hover,
button.social-btn:hover {
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
    z-index: 2;
}

.social-btn i {
    font-size: 1.3rem !important;
    line-height: 1 !important;
    pointer-events: none;
}

a.social-btn-sm,
button.social-btn-sm {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    border-width: 1.5px !important;
}

a.social-btn-sm:hover,
button.social-btn-sm:hover {
    transform: translateY(-3px) scale(1.1) !important;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15) !important;
}

.social-btn-sm i {
    font-size: 1rem !important;
    line-height: 1 !important;
}

/* Logos Carousel Scroll - Modern Masking */
.logos-slider {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    position: relative;
    background: transparent;
    /* Aplicar máscara de desvanecimiento en ambos extremos */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

#logosInteresSlider .logos-track {
    display: flex !important;
    width: max-content !important;
    animation: scrollLogos 60s linear infinite;
    /* Aumentado el tiempo ya que ahora hay mucha más distancia */
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
}

#logosInteresSlider .logos-track:hover {
    animation-play-state: paused;
}

#logosInteresSlider .logo-item {
    flex: 0 0 auto !important;
    width: 200px !important;
    /* Un poco más de espacio para que no estén tan pegados */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease;
}

.logo-item:hover {
    transform: scale(1.05);
}

.grayscale-hover {
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.4s ease;
}

.grayscale-hover:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Executive Professional Personnel Styles */
.executive-section {
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.executive-header {
    border-left: 6px solid var(--primary-color);
    padding-left: 1.5rem;
    margin-bottom: 3.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.executive-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.executive-header span {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    opacity: 0.7;
}

.executive-card {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.executive-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.executive-photo-area {
    width: 100%;
    padding-top: 100%;
    /* Square aspect ratio */
    position: relative;
    background: #f0f2f5;
    overflow: hidden;
}

.executive-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.executive-card:hover .executive-photo {
    transform: scale(1.08);
}

.executive-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.executive-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 74, 153, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.executive-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.executive-cargo {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.executive-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.executive-btn {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #f8f9fa;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.executive-btn:hover {
    background: var(--primary-color);
    color: white;
}

.executive-btn.whatsapp:hover {
    background: #25d366;
}

.docente-subgroup {
    margin-top: 3rem;
    position: relative;
}

.docente-subgroup::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
}

.docente-subgroup-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #888;
    margin-bottom: 1.5rem;
    padding-top: 10px;
}

/* Refined Personnel Page Styles */
.personal-search-wrapper {
    max-width: 600px;
    margin: -30px auto 0;
    position: relative;
    z-index: 10;
}

.personal-search-input {
    height: 60px;
    border-radius: 30px;
    padding-left: 2.5rem;
    padding-right: 1.5rem;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.personal-search-input:focus {
    box-shadow: 0 15px 40px rgba(0, 74, 153, 0.15);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.2rem;
    z-index: 11;
}

.filter-sidebar-card {
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 100px;
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f8f9fa;
    color: var(--text-dark);
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.filter-option:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(5px);
}

.filter-option.active {
    background: var(--primary-color);
    color: white !important;
    box-shadow: 0 8px 20px rgba(0, 74, 153, 0.2);
}

.filter-count {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
}

.filter-option.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Enhanced Section Header */
.section-marker {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    gap: 20px;
}

.section-marker h2 {
    font-size: 2.25rem;
    margin: 0;
    white-space: nowrap;
}

.section-marker-line {
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(to purple, var(--primary-color), transparent);
    opacity: 0.2;
}

/* Card Improvements */
.personnel-card-modern {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.personnel-card-modern:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 74, 153, 0.12);
}

/* Shared Directory & Personnel Professional Styles */
.directory-hero {
    background: linear-gradient(135deg, #002d5a 0%, #004a99 100%);
    position: relative;
}

.directory-sidebar {
    position: sticky;
    top: 100px;
}

.category-list-group .list-group-item {
    border: none;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border-radius: 10px !important;
    margin-bottom: 5px;
}

.category-list-group .list-group-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.category-list-group .list-group-item:hover {
    background-color: rgba(0, 74, 153, 0.05);
    transform: translateX(5px);
}

.category-list-group .list-group-item.active {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 74, 153, 0.3);
}

.category-list-group .list-group-item.active i {
    color: white;
}

/* Professional Card Design */
.prof-card {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    background: white;
}

.prof-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 74, 153, 0.15);
}

.prof-card-img-container {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2.5rem 0;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.prof-card-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
}

.prof-card:hover .prof-card-img {
    transform: scale(1.05);
}

.prof-card-body {
    padding: 1.5rem;
    text-align: center;
}

.prof-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.prof-card-role {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.2rem;
}

.prof-card-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    gap: 15px;
}

.prof-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #555;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.prof-action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.prof-action-btn.whatsapp:hover {
    background: #25d366;
}

.prof-section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.prof-section-title::after {
    content: '';
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(to right, #eee, transparent);
}

.social-circle-btn.whatsapp-color:hover {
    background: #25d366;
}