/*
 * PAQ Play – ajustes de UI/UX (2026-09-17)
 * Hoja de estilos independiente del build de Vite: se carga después de styles.css y
 * templatemo-style.css desde layouts/app.blade.php. Para revertir, quitar ese <link>.
 */

:root {
    --paq-blue: #00A3E0;          /* acento de marca (sobre fondos oscuros) */
    --paq-blue-strong: #0077B6;   /* botones con texto blanco / texto azul sobre fondos claros (contraste AA) */
    --paq-blue-strong-hover: #00649A;
    --paq-navy: #010217;
    --paq-focus: #7DD3FC;
}

/* ---------- Accesibilidad global ---------- */

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 2000;
    background: #fff;
    color: var(--paq-navy);
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}
.skip-link:focus {
    top: 12px;
    color: var(--paq-navy);
}

main:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--paq-focus);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Navegación ---------- */

.paq-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.paq-lang-switch a {
    display: inline-block;
    min-width: 32px;
    padding: 4px 6px;
    text-align: center;
    color: rgba(255, 255, 255, .75) !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
}
.paq-lang-switch a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .08);
}
.paq-lang-switch a.activeLang {
    color: #fff !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.paq-user-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
    font-size: 13px;
}
.paq-user-nav .paq-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, .25);
}
.paq-user-nav .paq-profile-link {
    color: #fff;
    text-decoration: none;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.paq-user-nav .paq-profile-link:hover {
    color: var(--paq-blue);
}
.paq-logout-btn {
    color: rgba(255, 255, 255, .8) !important;
    background: transparent;
    border: 0;
    padding: 6px;
    line-height: 1;
    border-radius: 4px;
}
.paq-logout-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .08);
}

.pam-signin,
.mobile-nav-signin {
    background: var(--paq-blue-strong) !important;
    font-weight: 600 !important;
}
.pam-signin:hover,
.mobile-nav-signin:hover {
    background: var(--paq-blue-strong-hover) !important;
    color: #fff !important;
}

#mobileMenuToggle {
    min-width: 44px;
    min-height: 44px;
}
.mobile-nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
}
.mobile-nav-user-section .paq-logout-btn {
    font-size: 15px;
}

/* Anclas: que el título no quede debajo del menú fijo */
[id="events"],
[id="gallery"] {
    scroll-margin-top: 96px;
}

/* ---------- Home: hero ---------- */

#panamAquaticsCarousel .carousel-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(1, 2, 23, .72) 0%, rgba(1, 2, 23, .35) 45%, rgba(1, 2, 23, 0) 75%),
                linear-gradient(0deg, rgba(1, 2, 23, .55) 0%, rgba(1, 2, 23, 0) 45%);
    pointer-events: none;
    z-index: 1;
}
#panamAquaticsCarousel .carousel-caption {
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
#panamAquaticsCarousel .carousel-indicators {
    z-index: 3;
}
#panamAquaticsCarousel .paq-slide-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}
#panamAquaticsCarousel .carousel-caption a.badge {
    position: relative;
    z-index: 3;
    color: #fff;
    text-decoration: none;
}
/* Toda la diapositiva es clickeable: el texto deja pasar el clic al enlace de fondo */
#panamAquaticsCarousel .paq-slide-link ~ .carousel-caption {
    pointer-events: none;
}
#panamAquaticsCarousel .paq-slide-link ~ .carousel-caption a {
    pointer-events: auto;
}
#panamAquaticsCarousel .panam-tagline,
#panamAquaticsCarousel .panam-location-title {
    font-weight: 400 !important;
}

/* El logo del tagline se usaba en la vista pero su CSS nunca llegó al build */
.panam-tagline__logo {
    width: 42px !important;
    height: auto !important;
    max-height: 22px !important;
    max-width: 42px !important;
    object-fit: contain;
    display: inline-block;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    #panamAquaticsCarousel .carousel-item::after {
        background: linear-gradient(0deg, rgba(1, 2, 23, .85) 0%, rgba(1, 2, 23, .45) 50%, rgba(1, 2, 23, .1) 100%);
    }
    #panamAquaticsCarousel .carousel-caption.text-start {
        position: absolute !important;
        left: 16px !important;
        right: 16px !important;
        top: auto !important;
        bottom: 36px !important;
        transform: none !important;
        padding: 0 !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
    #panamAquaticsCarousel .carousel-caption img:not(.panam-tagline__logo) {
        max-width: 55% !important;
        height: auto !important;
        margin-bottom: .5rem !important;
    }
    #panamAquaticsCarousel .panam-badge-title {
        font-size: 1.45rem !important;
        line-height: 1.2;
        text-align: left !important;
        padding-top: 0;
    }
    #panamAquaticsCarousel .panam-tagline {
        font-size: 1rem !important;
        margin-bottom: .25rem;
    }
    #panamAquaticsCarousel .panam-location-title {
        font-size: .95rem !important;
        margin-bottom: 0;
    }
    #panamAquaticsCarousel .carousel-indicators {
        margin-left: 0 !important;
        margin-bottom: 10px;
    }
}

/* ---------- Home: secciones ---------- */

.paq-flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 24px 0 0;
    padding: 14px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .95);
    color: #1b2537;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.paq-flash i {
    margin-top: 3px;
}
.paq-flash--error i { color: #c62828; }
.paq-flash--success i { color: #2e7d32; }
.paq-flash--info i { color: var(--paq-blue-strong); }
.paq-flash p {
    margin: 0;
    flex: 1;
}
.paq-flash .btn-close {
    flex: 0 0 auto;
}

.paq-empty-live {
    width: 100%;
    text-align: center;
    padding: 28px 16px 8px;
    color: #fff;
}
.paq-empty-live i {
    font-size: 2rem;
    opacity: .7;
    margin-bottom: 10px;
}
.paq-empty-live h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.paq-empty-live p {
    color: rgba(255, 255, 255, .8);
    margin-bottom: 16px;
}
.paq-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.paq-btn-outline:hover {
    background: #fff;
    color: var(--paq-navy);
}

/* Disciplinas: son informativas (no enlaces), sin cursor de mano ni animación de "clic" */
.discipline-item {
    cursor: default !important;
}
.discipline-item:hover {
    transform: none !important;
    opacity: 1 !important;
}
.discipline-item:hover .discipline-icon {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
}

/* Tarjetas: texto secundario legible y foco visible */
.event-card a:focus-visible {
    outline-offset: 4px;
    border-radius: 12px;
}
.event-card .text-muted {
    color: rgba(255, 255, 255, .82) !important;
}

/* ---------- Formularios (login, registro, recuperar contraseña) ---------- */

.paq-pw-field {
    position: relative;
    display: block;
}
.paq-pw-field > input {
    padding-right: 52px !important;
}
.paq-pw-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5b6b7f;
    font-size: 1.05rem;
    cursor: pointer;
}
.paq-pw-toggle:hover {
    color: var(--paq-blue-strong);
    background: rgba(0, 119, 182, .08);
}
/* En login/registro el input tiene margin-bottom: 2rem; se compensa para centrar el ícono */
.panam-body-form .paq-pw-field {
    margin-bottom: 2rem;
}
.panam-body-form .paq-pw-field > input {
    margin-bottom: 0 !important;
}
.profile-content-card .paq-pw-toggle {
    color: rgba(255, 255, 255, .7);
}
.profile-content-card .paq-pw-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.paq-field-hint {
    display: block;
    margin: -1.5rem 0 1.75rem;
    font-size: .85rem;
    color: #5b6b7f;
}

button.is-loading {
    cursor: progress !important;
    opacity: .85;
}

/* ---------- Footer ---------- */

footer .paq-footer-social a:focus-visible {
    outline-color: #fff;
}
@media (max-width: 991.98px) {
    footer .paq-footer-social-col {
        text-align: left !important;
    }
    footer .paq-footer-social {
        justify-content: flex-start !important;
    }
    footer .paq-footer-sponsors {
        justify-content: flex-start !important;
    }
}

/* ---------- Botón flotante de WhatsApp en móvil: solo ícono ---------- */
@media (max-width: 576px) {
    #whatsappFloat {
        padding: 12px !important;
    }
    #whatsappFloat .wa-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}
