/* ====== FOOTER ====== */
.footer {
    background-color: var(--footer-bg, #1a2a3a);
    padding: 30px 0 20px;
    color: #ffffff;
    margin-top: auto;
}

.footer a {
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    color: #ffffff;
}

.footer a:hover {
    color: var(--footer-teal, #00bcd4) !important;
}

/* Logo */
.imgLogoSanatorio {
    width: 15rem;
    height: auto;
    display: block;
}

.logoSanatorio {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
}

.containerLogo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

/* Redes Sociales */
.redesSociales {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 15px;
}

.redesSociales img {
    width: 3.5em;
    height: auto;
    transition: transform 0.3s ease;
}

.redesSociales img:hover {
    transform: scale(1.1);
}

/* Layout principal del footer */
.row-footer-body {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    padding: 0;
}

/* Bloque izquierdo */
.footer-brand {
    flex: 0 0 30%;
    max-width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

/* Bloque derecho */
.footer-menus {
    flex: 0 0 60%;
    max-width: 60%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 20px;
    padding: 15px;
    box-sizing: border-box;
}

/* Cada columna del menú */
.footer-menu {
    flex: 1;
    min-width: 150px;
}

.footer-menu-1,
.footer-menu-2,
.footer-menu-3 {
    flex: 0 0 30%;
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--footer-teal, #00bcd4);
    font-weight: 600;
}

.footer ul {
    padding-left: 0;
    margin: 0;
}

.footer li {
    margin-bottom: 8px;
    list-style: none;
}

.footer li a {
    display: inline-block;
    padding: 2px 0;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

/* ====== RESPONSIVE FOOTER ====== */

/* Tablets */
@media (min-width: 768px) and (max-width: 991px) {
    .footer-menus {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .footer-menu {
        flex: 0 0 100%;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .footer-menu ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .logoSanatorio {
        max-width: 180px;
    }
    
    .footer-brand {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .footer-menus {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .redesSociales {
        justify-content: center !important;
    }
}

/* Móviles */
@media (max-width: 767px) {
    .row-footer-body {
        flex-direction: column;
        gap: 0;
    }
    
    .footer-brand,
    .footer-menus {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 10px 15px;
    }
    
    .footer-menus {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px 5px;
    }
    
    .footer-menu {
        width: 100%;
        margin-bottom: 25px;
        text-align: center;
    }
    
    .footer-menu:last-child {
        margin-bottom: 0;
    }
    
    .footer-menu ul {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-menu li {
        width: 100%;
        text-align: center;
        list-style: none;
        margin-bottom: 8px;
    }
    
    .footer-menu li a {
        display: inline-block;
        padding: 5px 0;
        font-size: 0.9rem;
    }
    
    .footer h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .logoSanatorio {
        max-width: 150px;
    }
    
    .redesSociales {
        justify-content: center !important;
        gap: 12px;
    }
    
    .redesSociales img {
        width: 30px;
        height: 30px;
    }
    
    .footer-brand {
        padding-bottom: 5px;
    }
}

/* Móviles muy pequeños */
@media (max-width: 400px) {
    .footer {
        padding: 20px 0 15px;
    }
    
    .footer a {
        font-size: 0.8rem;
    }
    
    .footer h4 {
        font-size: 0.9rem;
    }
    
    .logoSanatorio {
        max-width: 120px;
    }
    
    .redesSociales img {
        width: 25px;
        height: 25px;
    }
}