/* ==========================================================================
   FOOTER INSTITUCIONAL TECH - ARQUITECTURA FUNDALUZ SISTEMA
   ========================================================================== */

.footer-tech-bg,
.cfl-footer {
    background: #120281 !important;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(59, 130, 246, 0.25);
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    z-index: 10;
}

/* Canvas para efecto Three.js de ondas de energía (Idéntico a fundaluz_sistema) */
#footer-energy-flow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.6 !important;
    z-index: 1;
}

/* Ocultar cuadrícula para mantener exclusivamente las ondas Three.js como en fundaluz_sistema */
.footer-grid-overlay {
    display: none !important;
}

/* Grid Principal de 4 Columnas */
.footer-content {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 0.9fr 1.5fr;
    gap: 3.5rem;
    align-items: start;
    margin-bottom: 2.8rem;
}

/* Columna 1: Brand & Lead */
.footer-logo-tech {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    margin-bottom: 1.2rem;
    transition: transform 0.3s ease;
}

.footer-logo-tech:hover {
    transform: translateY(-2px);
}

.cfl-footer-logo-img {
    height: 62px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.45));
}

.cfl-footer-logo-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    display: block;
    line-height: 1;
}

.cfl-footer-logo-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.cfl-footer-lead {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.92rem;
    line-height: 1.75;
    margin: 0 0 1.5rem;
    max-width: 320px;
}

/* Redes Sociales Tech */
.footer-social-tech {
    display: flex;
    gap: 0.85rem;
}

.f-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.f-social-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
    color: #60a5fa !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
}

/* Títulos de Columnas Tech (Fundaluz Sistema) */
.tech-title-forced {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.6) !important;
    display: inline-block !important;
    font-family: var(--font-heading) !important;
    text-transform: uppercase !important;
    letter-spacing: 2.5px !important;
    font-size: 0.92rem !important;
    margin-bottom: 1.4rem !important;
    position: relative !important;
    font-weight: 900 !important;
}

.tech-title-forced .tech-title-bar,
.tech-title-forced span {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 3px;
    background: #3b82f6;
    box-shadow: 0 0 15px #3b82f6;
    border-radius: 2px;
}

/* Listas de Enlaces */
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.f-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.68) !important;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.f-link i {
    color: #38bdf8;
    font-size: 0.75rem;
}

.f-link:hover {
    color: #60a5fa !important;
    transform: translateX(6px);
    opacity: 1;
}

/* Contacto Tech (Estilo Tarjetas Fundaluz Sistema) */
.footer-contact-tech-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-contact-tech-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.86rem;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 0.7rem 0.95rem;
    transition: all 0.25s ease;
}

a.footer-contact-tech-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-2px);
    color: #ffffff;
}

.footer-tech-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ==========================================================================
   ALIANZAS INSTITUCIONALES - TIRA DE LOGOS
   ========================================================================== */
.cfl-footer-alliances-wrap {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1.5rem;
    padding-top: 2rem;
    position: relative;
    z-index: 5;
}

.cfl-footer-alliances-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.cfl-footer-alliances-header p {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 3.5px;
    text-transform: uppercase;
}

/* Tira de Logos Oficiales (Integrada al Fondo Oscuro del Footer) */
.cfl-footer-logos-strip {
    display: flex;
    gap: 3.8rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    background: transparent;
    padding: 1.2rem 0;
    margin: 0 auto;
    max-width: 1000px;
}

.footer-alliance-v2 {
    opacity: 0.85;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.footer-alliance-v2:hover {
    opacity: 1;
    transform: scale(1.08) translateY(-4px);
}

.footer-alliance-v2 img {
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.footer-logo-cfl {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

.footer-alliance-v2:hover .footer-logo-cfl {
    filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.5));
}

.footer-logo-fundaluz {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.footer-alliance-v2:hover .footer-logo-fundaluz {
    filter: drop-shadow(0 0 16px rgba(59, 130, 246, 0.6));
}

.footer-logo-fatlyf {
    height: 56px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3)) drop-shadow(0 0 18px rgba(59, 130, 246, 0.25));
}

.footer-alliance-v2:hover .footer-logo-fatlyf {
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 28px rgba(59, 130, 246, 0.5));
}

.footer-logo-ba {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.footer-alliance-v2:hover .footer-logo-ba {
    filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.5));
}

/* Barra Inferior de Copyright */
.cfl-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1.6rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    position: relative;
    z-index: 5;
}

.cfl-footer-admin-lock {
    color: rgba(255, 255, 255, 0.35);
    margin-left: 10px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.cfl-footer-admin-lock:hover {
    color: #38bdf8;
    transform: scale(1.1);
}

/* Responsividad */
@media (max-width: 991px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.8rem;
    }
    .cfl-footer-logos-strip {
        gap: 2.6rem;
        padding: 1rem 0;
    }
    .footer-logo-cfl { height: 52px; }
    .footer-logo-fundaluz { height: 44px; }
    .footer-logo-fatlyf { height: 48px; }
    .footer-logo-ba { height: 42px; }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.2rem;
    }
    .cfl-footer-logos-strip {
        gap: 2rem;
        padding: 0.8rem 0;
    }
    .footer-logo-cfl { height: 46px; }
    .footer-logo-fundaluz { height: 38px; }
    .footer-logo-fatlyf { height: 42px; }
    .footer-logo-ba { height: 36px; }
    .cfl-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
