/* ===== ESTILOS DEL FOOTER SIDCO ===== */

/* Variables CSS */
:root {
  
  --bg-color: #ffffff;
  --text-color: #111111;
  --muted-text: #444444;
  --text-light: #4b5563; /* gris oscuro para modo claro */
  --primary-color: #64b8c0; /* celeste */
  --secondary-color: #64b8c0;
  --accent-color: #64b8c0;
  --border-color: #e5e7eb;
  /* Footer variables para claro */
  --bg-dark: #ffffffff;
  --bg-darker: #ffffffa2;
  --text-white: #111111;
}

[data-theme="dark"] {
  --bg-color: #0a0a0a;
  --text-color: #ffffff;
  --muted-text: #cccccc;
  --text-light: #cccccc; /* gris claro para modo oscuro */
  --primary-color: #c60074; /* fucsia */
  --secondary-color: #c60074;
  --accent-color: #c60074;
  --border-color: #333333;
  /* Footer variables para oscuro */
  --bg-dark: #1a1a1a;
  --bg-darker: #0f0f0f;
  --text-white: #ffffff;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== FOOTER PRINCIPAL ===== */
.footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* ===== SECCIÓN SUPERIOR ===== */
.footer-top {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 40px;
    align-items: start;
}

/* ===== LÍNEAS VERTICALES SEPARADORAS ===== */
.footer-separator {
    width: 1px;
    height: 200px;
    background: var(--secondary-color);
    opacity: 0.6;
    position: relative;
    margin: 0 20px;
}

/* ===== COLUMNAS DEL FOOTER ===== */
.footer-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Logo y marca */
.footer-brand {
    margin-bottom: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.brand-logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 1px;
}

.brand-description {
    color: var(--text-white);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Títulos de sección */
.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 8px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
}

/* Enlaces del footer */
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
    position: relative;
    padding: 4px 0;
    opacity: 0.85;
}

.footer-links li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-links li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
    opacity: 1;
}

.footer-links li a:hover::before { width: 100%; }

/* Alinear comportamiento con header por tema */
[data-theme="light"] .footer-links li a:hover { color: #008ba3; }
[data-theme="light"] .footer-links li a::before { background: #008ba3; }
[data-theme="dark"] .footer-links li a:hover { color: var(--primary-color); }
[data-theme="dark"] .footer-links li a::before { background: var(--primary-color); }

/* ===== REDES SOCIALES ===== */
.social-media h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-white);
}

.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    color: var(--text-white);
    text-decoration: none;
    transition: 0.2s ease-in-out;
    border: none;
    outline: none;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.social-link:hover {
    cursor: pointer;
    transform: scale(1.1);
}

/* Colores específicos por red social */
.social-link[aria-label="Facebook"]:hover {
    background-color: #1877f2;
}

.social-link[aria-label="Instagram"]:hover {
    background-color: #cc39a4;
}

.social-link[aria-label="LinkedIn"]:hover {
    background-color: #0077b5;
}

.social-link[aria-label="YouTube"]:hover {
    background-color: #ff0000;
}

.social-link[aria-label="WhatsApp"]:hover {
    background-color: #25d366;
}

.social-link:hover i {
    color: white;
}

.social-link i {
    font-size: 1.1rem;
    color: #333;
    transition: 0.2s ease-in-out;
}

/* ===== INFORMACIÓN DE CONTACTO ===== */
.contact-info {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-white);
}

.contact-item i {
    color: var(--primary-color);
    width: 16px;
    font-size: 0.9rem;
}

.contact-item span {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===== NEWSLETTER ===== */
.footer-newsletter {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.newsletter-text h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-white);
}

.newsletter-text p {
    color: var(--text-light);
    max-width: 400px;
}

/* Formulario de suscripción */
.subscribe-form {
    flex-shrink: 0;
}

.form-group {
    display: flex;
    gap: 10px;
    max-width: 400px;
}

.form-group input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input[type="email"]::placeholder {
    color: var(--text-light);
}

.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.15);
}

.btn-subscribe {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-subscribe i {
    font-size: 0.9rem;
}

/* ===== SECCIÓN INFERIOR ===== */
.footer-bottom {
    padding: 20px 0;
    background: var(--bg-darker);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.company-info {
    font-size: 0.8rem !important;
    color: var(--text-light) !important;
    opacity: 0.7;
}

.footer-legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--secondary-color);
}

/* ===== BOTÓN VOLVER ARRIBA ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
.whatsapp-float {
    position: fixed;
    bottom: 90px; /* por encima del back-to-top */
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #25d366 !important; /* Forzar color verde de WhatsApp */
    color: #ffffff !important; /* Forzar color blanco */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
.whatsapp-float.show { opacity: 1; visibility: visible; transform: translateY(0); }
.whatsapp-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}
.whatsapp-float i { font-size: 1.4rem; }

/* ===== VIÑETA FLOTANTE RRHH ===== */
.rrhh-float {
    position: fixed;
    right: 30px;
    bottom: 150px; /* por encima de WhatsApp */
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.rrhh-float.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rrhh-float-btn {
    display: flex;
    align-items:center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    border-radius: 999px;
    padding: 12px 12px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(0,0,0,0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 52px; /* colapsado */
    overflow: hidden;
    transition: max-width 0.28s ease, background-color 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .rrhh-float-btn {
    background: rgba(255, 255, 255, 0.55);
    color: #111111;
    border-color: rgba(0,0,0,0.12);
}

.rrhh-float-btn:hover {
    border-color: rgba(255,255,255,0.55);
}

.rrhh-float-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #ffffff;
    flex: 0 0 auto;
}

.rrhh-float-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.rrhh-float-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.15;
}

.rrhh-float-link {
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    color: inherit;
    opacity: 0.9;
}

.rrhh-float-link:hover {
    text-decoration: underline;
    opacity: 1;
}

.rrhh-float.is-expanded .rrhh-float-btn {
    max-width: 320px;
}

.rrhh-float.is-expanded .rrhh-float-text {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .rrhh-float {
        right: 20px;
        bottom: 130px;
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 75px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr auto 1fr;
        gap: 30px;
    }
    
    .footer-separator:nth-child(4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .footer-top {
        padding: 40px 0 30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-separator {
        display: none;
    }
    
    .newsletter-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .form-group {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .footer-top {
        padding: 30px 0 20px;
    }
    
    .footer-newsletter {
        padding: 30px 0;
    }
    
    .newsletter-text h3 {
        font-size: 1.3rem;
    }
    
    .social-links {
        gap: 8px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .footer-legal {
        gap: 15px;
    }
    
    .footer-legal a {
        font-size: 0.8rem;
    }
    
    .brand-name {
        font-size: 1.5rem;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-column {
    animation: fadeInUp 0.6s ease-out;
}

.footer-column:nth-child(1) { animation-delay: 0.1s; }
.footer-column:nth-child(3) { animation-delay: 0.2s; }
.footer-column:nth-child(5) { animation-delay: 0.3s; }

/* Animación para separadores */
.footer-separator {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: 0.4s;
}

/* ===== EFECTOS HOVER ADICIONALES ===== */
.footer-links li a:hover {
    transform: translateX(8px);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
}

.btn-subscribe:hover {
    transform: translateY(-3px) scale(1.05);
}

/* ===== ESTILOS PARA FOCUS ===== */
.footer-links li a:focus,
.social-link:focus,
.btn-subscribe:focus,
.back-to-top:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* ===== ESTILOS PARA DARK MODE (si se implementa) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #ffffff;
        --text-light: #cccccc;
    }
}
