/* ===================================================
   DiHealth - Modern Custom Styles
   ================================================== */

/* ===== GLOBAL FIXES ===== */
html {
    height: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
}

/* ===== MODERN ANIMATIONS ===== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CARD ENHANCEMENTS ===== */
.card {
    border: none;
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-img-top {
    transition: transform var(--transition-slow);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* ===== SECTION SPACING ===== */
section {
    padding: 5rem 0;
    position: relative;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

/* ===== GLASSMORPHISM CARD ===== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--bs-border-radius-lg);
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

/* ===== FORM ENHANCEMENTS ===== */
.form-control,
.form-select {
    border-radius: var(--bs-border-radius);
    border: 2px solid #e8e8e8;
    padding: 0.75rem 1rem;
    transition: all var(--transition-base);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 149, 218, 0.1);
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        padding: 1rem;
        border-radius: var(--bs-border-radius);
        margin-top: 1rem;
        box-shadow: var(--shadow-md);
    }

    .hero-bienvenida {
        min-height: 100vh;
    }

    .hero-bienvenida h1 {
        font-size: 2rem;
    }

    .hero-bienvenida p {
        font-size: 1rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm-custom {
    box-shadow: var(--shadow-sm);
}

.shadow-md-custom {
    box-shadow: var(--shadow-md);
}

.shadow-lg-custom {
    box-shadow: var(--shadow-lg);
}

.shadow-xl-custom {
    box-shadow: var(--shadow-xl);
}

/* ===== TEXT IMPROVEMENTS ===== */
p {
    line-height: 1.8;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.7;
}

/* ===== ACCORDION MODERN STYLES ===== */
.accordion-button {
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1.25rem 1.5rem;
}

.accordion-button:not(.collapsed) {
    background: var(--gradient-primary);
    color: white;
}

.accordion-body {
    padding: 1.5rem;
    line-height: 1.8;
}

/* ===== LINK HOVER EFFECTS ===== */
a {
    transition: all var(--transition-base);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ===== IMAGE EFFECTS ===== */
img {
    max-width: 100%;
    height: auto;
}

.img-hover-zoom {
    overflow: hidden;
    border-radius: var(--bs-border-radius);
}

.img-hover-zoom img {
    transition: transform var(--transition-slow);
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* ===== FEATURE BOXES ===== */
.feature-box {
    padding: 2rem;
    border-radius: var(--bs-border-radius-lg);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-box i,
.feature-box svg {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* ===== LOADER ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 576px) {
    .btn-primary {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }

    section {
        padding: 2rem 0;
    }
}

/* ===== INTERACTIVE TEAM CARDS ===== */
.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    /* To indicate interactivity */
}

/* Normal state: bio hidden */
.team-bio {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    margin-top: 0;
}

/* Hover (Desktop) and Active (Mobile/Click) states */
/* We force the styles via classes to handle both scenarios */
.team-card:hover .team-bio,
.team-card.active .team-bio {
    max-height: 1000px;
    /* Large enough to fit content */
    opacity: 1;
    margin-top: 1rem;
}

.team-card:hover,
.team-card.active {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    z-index: 10;
}

/* Mobile adjustments to prevent sticky hover issues */
@media (hover: none) {
    .team-card:hover .team-bio {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
    }

    .team-card.active .team-bio {
        max-height: 1000px;
        opacity: 1;
        margin-top: 1rem;
    }
}

/* ===== HOVER LIFT EFFECT ===== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== NAVBAR SLOGAN ===== */
.navbar-slogan {
    font-size: 0.75rem;
    /* Smaller font */
    color: var(--bs-azul-medio);
    font-style: italic;
    margin-top: -2px;
    font-weight: 500;
    max-width: 200px;
    line-height: 1.2;
    display: block;
}

@media (max-width: 768px) {
    .navbar-slogan {
        font-size: 0.65rem;
        max-width: 150px;
    }
}

/* ===== FLOATING WHATSAPP WIDGET ===== */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.whatsapp-float {
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 3px #999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: white;
    transform: scale(1.1);
}

.whatsapp-float i {
    margin-top: 2px;
}

.whatsapp-chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.whatsapp-chat-box.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-header {
    background-color: #075e54;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whatsapp-body {
    padding: 1rem;
    background-color: #e5ddd5;
}

.whatsapp-body textarea {
    font-size: 0.9rem;
    resize: none;
}