/********** Team Profile CSS **********/

:root {
    --primary: #1E60AA;
    --secondary: #FF4917;
    --light: #EDF1FC;
    --dark: #17224D;
    --gold: #F7A11A;
    --gold-dark: #d98f0e;
}

.fw-medium {
    font-weight: 600 !important;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

/* Buttons */
.btn {
    font-weight: 600;
    transition: 0.5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/* Spinner */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/* Navbar */
.top-bar {
    height: 75px;
    padding: 0 4rem;
}

.nav-bar {
    position: relative;
    padding: 0 4.75rem;
    transition: .5s;
    z-index: 9999;
}

.nav-bar.sticky-top {
    position: sticky;
    padding: 0;
    z-index: 9999;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar-light .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: var(--dark);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    outline: none;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .nav-bar {
        padding: 0;
    }

    .navbar-light .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar-light .navbar-nav {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

/* ===== TEAM DROPDOWN - DIRECTORS HOVER ===== */

/* Hide Directors submenu by default */
.team-directors-menu {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Show Directors submenu on hover */
.team-directors-dropdown:hover > .team-directors-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Keep the dropdown arrow clickable for mobile */
.team-directors-toggle {
    cursor: pointer;
}

/* Position the submenu correctly */
@media (min-width: 992px) {
    .team-directors-dropdown {
        position: relative;
    }

    .team-directors-menu {
        position: absolute;
        left: 100%;
        top: 0;
        margin-left: 2px;
        min-width: 280px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15);
        padding: 10px 0;
        border: none;
        z-index: 1000;
    }
}

/* Mobile view - show submenu when clicked */
@media (max-width: 991.98px) {
    .team-directors-menu {
        position: static !important;
        left: auto !important;
        top: auto !important;
        margin-left: 15px !important;
        box-shadow: none !important;
        background: rgba(0,0,0,0.02) !important;
        border-left: 2px solid var(--gold);
        border-radius: 0 !important;
        padding: 5px 0 !important;
        min-width: auto !important;
    }

    .team-directors-menu .dropdown-item {
        padding-left: 25px !important;
    }

    .team-directors-menu .dropdown-item small {
        font-size: 11px;
        color: #6c757d;
    }

    /* On mobile, show when toggle is clicked (using data-bs-toggle) */
    .team-directors-dropdown.show > .team-directors-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* ===== DROPDOWN GENERAL STYLES ===== */

/* Main dropdown styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 10px 0;
    min-width: 220px;
}

.dropdown-menu .dropdown-item {
    padding: 8px 20px;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.dropdown-menu .dropdown-item:hover {
    background: rgba(11, 43, 92, 0.05);
    color: var(--gold);
    padding-left: 25px;
}

.dropdown-menu .dropdown-item i {
    width: 20px;
    color: var(--gold);
}

.dropdown-menu .dropdown-item small {
    font-weight: 400;
    font-size: 11px;
    color: #6c757d;
    margin-top: 1px;
}

.dropdown-menu .dropdown-divider {
    margin: 8px 20px;
    border-color: #e9ecef;
}

/* Fade animation for dropdowns */
.fade-up {
    animation: fadeUp 0.3s ease forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* For desktop: show main dropdown on hover */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }

    /* Nested menus open only while their own parent is hovered. */
    .navbar-nav .dropdown-menu .dropdown-menu {
        display: none !important;
        visibility: hidden;
        opacity: 0;
    }

    .navbar-nav .dropdown-menu .dropdown:hover > .dropdown-menu {
        display: block !important;
        visibility: visible;
        opacity: 1;
    }
}

/* Footer */
.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid #FFFFFF;
    border-radius: 35px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

/* WOW Animation Fix */
.wow {
    visibility: hidden;
}

.wow.animated {
    visibility: visible;
}

/* Text color utilities */
.text-secondary {
    color: var(--secondary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-light {
    background-color: var(--light) !important;
}

/* Profile-specific improvements */
.profile-section .bg-light {
    background-color: var(--light) !important;
}

/* Responsive improvements for profile cards */
@media (max-width: 768px) {
    .profile-title-badge {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: -20px;
        margin-left: 10px;
        margin-right: 10px;
    }
}

/* ============================================
   FORCED STYLES FOR TEAM CARDS (with !important)
   ============================================ */

/* Fix social row – force horizontal layout */
.team-social-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    width: 100% !important;
}

/* Fix profile row – force horizontal and visible */
.team-profile-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 6px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    width: 100% !important;
}

/* Ensure the profile link is always visible and styled */
.team-member-profile-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #f8d56b, #d9a41d) !important;
    color: #0b2b5c !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    box-shadow: 0 8px 18px rgba(217, 164, 29, 0.28) !important;
    transition: .3s ease !important;
}

.team-member-profile-link:hover {
    background: linear-gradient(135deg, #f7c843, #c98d14) !important;
    color: #0b2b5c !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 22px rgba(217, 164, 29, 0.38) !important;
}

/* Fix hover flip animation */
.team-item .team-text .bg-light {
    position: relative;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: .5s;
}

.team-item .team-text .bg-primary {
    position: relative;
    height: auto;
    min-height: 110px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 10px 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    transition: .5s;
}

.team-item:hover .team-text .bg-light {
    margin-top: -90px;
}

/* Social icons inside the card */
.team-item .team-text .bg-primary .btn {
    color: var(--primary);
    background: #FFFFFF;
    margin: 0 2px;
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(11, 43, 92, 0.08);
}

.team-item .team-text .bg-primary .btn:hover {
    color: #FFFFFF;
    background: var(--secondary);
    transform: translateY(-1px);
}

/* Advisor variant */
.team-section-advisors .team-item .team-text .bg-light {
    background: #f6f0e4 !important;
}

.team-section-advisors .team-item .team-text .bg-primary {
    background: linear-gradient(135deg, #2d6a4f, #4a7c59) !important;
}

.team-section-advisors .team-item .team-text .bg-primary .btn {
    color: #1f3b2d;
    background: #FFFFFF;
}

.team-section-advisors .team-item .team-text .bg-primary .btn:hover {
    color: #FFFFFF;
    background: #1d3f30;
}