/* =========================================
   footer.css | THE PUCK GAMES
   ========================================= */

:root {
    /* Colores del pie a partir de la paleta de la liga (index.css / <juego>.css).
       No se redefine --accent: lo pone la paleta de la liga. */
    --footer-bg: color-mix(in srgb, var(--bg-deep, #0a0e17) 35%, #07090d);
    --footer-card: var(--card-bg, #131a26);
    --footer-border: var(--card-border, #2a3441);
    --footer-text: var(--text-secondary, #8892b0);
    --footer-text-light: #ffffff;
    --footer-neon: var(--accent, #00f2ff);
    --footer-neon-glow: var(--accent-glow, rgba(0, 242, 255, 0.4));
}

.global-footer {
    box-sizing: border-box;   /* sin esto, width:100% + padding desbordaba 40px */
    background: linear-gradient(to bottom, var(--footer-card), var(--footer-bg));
    border-top: 1px solid var(--footer-border);
    padding: 48px 20px 0;
    margin-top: 60px;
    color: var(--footer-text);
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col { min-width: 0; }

.center-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Marca --- */
.footer-logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--footer-text-light);
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}
.footer-logo .highlight {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

.brand-col p {
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 10px;
    max-width: 320px;
}
.footer-disclaimer { font-size: .78rem !important; opacity: .72; }

.footer-heading {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--footer-text-light);
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Rejilla de juegos --- */
.footer-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 11px 24px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 310px;
    text-align: left;
}

.footer-games-grid a {
    color: var(--footer-text);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    transition: color .2s ease, transform .2s ease;
    display: inline-block;
}
.footer-games-grid a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

/* --- Redes sociales --- */
.social-icons-large {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 22px;
}
.social-icons-large a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px; height: 44px;          /* objetivo táctil cómodo */
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    text-decoration: none;
    transition: border-color .25s, background .25s, transform .25s;
}
.social-icons-large a:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    transform: translateY(-3px);
}
.social-icons-large img {
    width: 22px; height: 22px;
    object-fit: contain;
}

/* --- Contacto --- */
.puck-contact-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 0;
    border-top: 1px solid var(--footer-border);
    margin-top: 8px;
    width: 100%;
    max-width: 320px;
}
.contact-title {
    color: var(--footer-text);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    margin: 0;
    line-height: 1.5;
}

.neon-email-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    background: color-mix(in srgb, var(--accent) 6%, transparent);
    border: 1.5px solid var(--accent);
    border-radius: 50px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    font-size: .88rem;
    transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
    box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 18%, transparent);
    max-width: 100%;
}
.email-address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-icon { font-size: 1.05rem; transition: transform .3s ease; flex-shrink: 0; }

.neon-email-btn:hover {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    box-shadow: 0 0 22px var(--accent-glow), inset 0 0 10px color-mix(in srgb, var(--accent) 18%, transparent);
    transform: translateY(-3px);
}
.neon-email-btn:hover .email-icon { transform: scale(1.15) rotate(-10deg); }
.neon-email-btn:active { transform: translateY(1px); }

/* =========================================
   BARRA INFERIOR
   ========================================= */
.footer-bottom {
    border-top: 1px solid var(--footer-border);
    background: rgba(0, 0, 0, .2);
    padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
}
.footer-bottom-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-langs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.footer-langs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid transparent;
    color: var(--footer-text);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 700;
    transition: color .2s, border-color .2s, background .2s;
}
.footer-langs a img {
    width: 18px; height: 13px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
.footer-langs a:hover {
    color: var(--footer-text-light);
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.footer-langs a.current {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.footer-legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.footer-legal .dot { color: #3a4557; }

.privacy-item-link {
    font-size: .82rem;
    color: var(--footer-text);
    text-decoration: none;
    font-weight: 500;
    opacity: .85;
    transition: color .2s, opacity .2s;
}
.privacy-item-link:hover { color: var(--footer-text-light); opacity: 1; }

.footer-copy {
    margin: 0;
    font-size: .76rem;
    color: #5a6474;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .footer-container { grid-template-columns: 1fr 1fr; gap: 34px; }
    .brand-col { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
    .global-footer { padding-top: 36px; margin-top: 40px; }
    .footer-container { grid-template-columns: 1fr; gap: 34px; }
    .footer-games-grid { margin: 0 auto; max-width: 280px; }
    .footer-heading { margin-bottom: 16px; }
    .footer-langs a { font-size: .74rem; padding: 7px 11px; }
    .neon-email-btn { font-size: .8rem; padding: 11px 16px; }
}

@media (hover: none) {
    .footer-games-grid a:hover,
    .social-icons-large a:hover,
    .neon-email-btn:hover { transform: none; }
}

/* Columnas del footer: ganchos por si quieres afinarlas por separado */
.links-col, .social-col { min-width: 0; }

/* Filo de color de la sección, a juego con el del header */
.global-footer {
    position: relative;
    border-top: 1px solid var(--footer-border);
}
.global-footer::before {
    content: "";
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent, var(--accent) 22%, var(--accent) 78%, transparent);
    opacity: .5;
    pointer-events: none;
}

/* Encabezados con un subrayado del color de la sección */
.footer-heading {
    position: relative;
    padding-bottom: 10px;
}
.footer-heading::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 0;
    transform: translateX(-50%);
    width: 34px; height: 2px;
    border-radius: 2px;
    background: var(--accent);
    opacity: .65;
}
/* El PNG de X es negro: se invierte para que se vea sobre fondo oscuro */
.social-icons-large img[alt="X"] { filter: invert(1); }
