/* ==========================================================================
   ACGP - GLOBAL HEADER & FOOTER STYLES
   Associació Catalana de Guies de Pesca (https://guias-pesca.com)
   ========================================================================== */

:root {
    --acgp-primary: #0a2540;
    --acgp-primary-dark: #061829;
    --acgp-accent: #00a896;
    --acgp-accent-hover: #028090;
    --acgp-gold: #f4a261;
    --acgp-gold-dark: #e76f51;
    --acgp-text: #1e293b;
    --acgp-text-muted: #64748b;
    --acgp-bg-light: #f8fafc;
    --acgp-white: #ffffff;
    --acgp-border: #e2e8f0;
    --acgp-shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --acgp-shadow-md: 0 8px 24px rgba(10,37,64,0.12);
    --acgp-shadow-lg: 0 16px 36px rgba(10,37,64,0.18);
    --acgp-radius: 12px;
    --acgp-font: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Ocultar cabeceras y pies antiguos de Elementor en toda la web */
header#masthead:not(#acgp-global-header),
footer#colophon:not(#acgp-global-footer),
.ehf-header,
.ehf-footer,
.elementor-25,
.elementor-72,
header.site-header,
footer.site-footer {
    display: none !important;
}

/* Contenedor principal de la cabecera: SIEMPRE VISIBLE AL HACER SCROLL (FIXED HEADER) */
#acgp-global-header {
    width: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999999 !important;
    font-family: var(--acgp-font);
    background: var(--acgp-white) !important;
    box-shadow: 0 4px 20px rgba(10, 37, 64, 0.12) !important;
    transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}

/* Compatibilidad con la barra superior de administración de WordPress */
body.admin-bar #acgp-global-header {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar #acgp-global-header {
        top: 46px !important;
    }
}

/* Espaciador dinámico que evita que el contenido quede oculto bajo la cabecera fija */
.acgp-header-spacer {
    display: block !important;
    width: 100% !important;
    height: 115px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    pointer-events: none !important;
}

@media (max-width: 991px) {
    .acgp-header-spacer {
        height: 125px !important;
    }
}

@media (max-width: 640px) {
    .acgp-header-spacer {
        height: 140px !important;
    }
}

/* Compensar el desplazamiento al hacer clic en enlaces de ancla */
html {
    scroll-behavior: smooth !important;
    scroll-padding-top: 130px !important;
}
:target, [id] {
    scroll-margin-top: 130px !important;
}

/* Ocultar barra superior y banners intrusivos de Google Translate */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}
body {
    top: 0px !important;
}

/* 1. TOPBAR */
.acgp-topbar {
    background: linear-gradient(90deg, #061829 0%, #0a2540 60%, #0f3d63 100%);
    color: #e2e8f0;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.acgp-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.acgp-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.acgp-topbar-contact {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.acgp-topbar-contact a {
    color: #cbd5e1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    font-weight: 500;
}

.acgp-topbar-contact a:hover {
    color: #38bdf8;
}

.acgp-topbar-contact svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    opacity: 0.85;
}

/* Espacio destacado de Patrocinadores en Header */
.acgp-header-sponsors {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.07);
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.acgp-sponsors-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.acgp-sponsor-link {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.acgp-sponsor-link:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.acgp-sponsor-link img {
    height: 24px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
}

.acgp-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Selector de traducción */
.acgp-lang-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.acgp-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
}

.acgp-lang-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.acgp-lang-btn.active {
    background: #00a896 !important;
    border-color: #00a896 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 168, 150, 0.45);
}

.acgp-lang-flag {
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

/* 2. NAVBAR PRINCIPAL */
.acgp-navbar {
    padding: 12px 0;
    background: #ffffff;
    border-bottom: 1px solid var(--acgp-border);
}

.acgp-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.acgp-logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.acgp-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    display: block;
}

.acgp-nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 22px;
}

.acgp-nav-item a {
    color: #1e293b;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    padding: 6px 0;
    position: relative;
    transition: color 0.2s ease;
}

.acgp-nav-item a:hover {
    color: #00a896;
}

.acgp-nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #00a896;
    transition: width 0.25s ease;
}

.acgp-nav-item a:hover::after {
    width: 100%;
}

.acgp-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acgp-btn-cta {
    background: linear-gradient(135deg, #00a896 0%, #028090 100%);
    color: #ffffff !important;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 168, 150, 0.28);
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.acgp-btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 168, 150, 0.38);
    background: linear-gradient(135deg, #028090 0%, #00a896 100%);
}

.acgp-btn-cta svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Botón menú móvil */
.acgp-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--acgp-border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--acgp-primary);
}

.acgp-mobile-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
}

/* 3. FOOTER GLOBAL */
#acgp-global-footer {
    background: #061829;
    color: #94a3b8;
    font-family: var(--acgp-font);
    padding-top: 60px;
    border-top: 4px solid #00a896;
    position: relative;
    z-index: 10;
}

.acgp-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.acgp-footer-col h4 {
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 18px;
    position: relative;
    padding-bottom: 10px;
}

.acgp-footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 3px;
    background: #00a896;
    border-radius: 2px;
}

.acgp-footer-logo {
    height: 48px;
    width: auto;
    margin-bottom: 16px;
    border-radius: 6px;
    background: #fff;
    padding: 4px 8px;
}

.acgp-footer-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 16px;
}

.acgp-footer-legal-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: #cbd5e1;
}

.acgp-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.acgp-footer-links li {
    margin-bottom: 10px;
}

.acgp-footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.acgp-footer-links a:hover {
    color: #38bdf8;
    transform: translateX(3px);
}

.acgp-footer-sponsors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.acgp-footer-sponsor-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.acgp-footer-sponsor-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #00a896;
}

.acgp-footer-sponsor-card img {
    height: 32px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    background: #fff;
    padding: 3px 6px;
    border-radius: 4px;
}

.acgp-footer-sponsor-card span {
    font-size: 12.5px;
    color: #e2e8f0;
    font-weight: 600;
}

.acgp-footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: #64748b;
}

.acgp-footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
}

.acgp-footer-bottom a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {
    .acgp-navbar {
        position: relative !important;
    }
    .acgp-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .acgp-nav-menu {
        display: none !important;
    }
    .acgp-nav-menu.open {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        padding: 12px 18px 20px 18px !important;
        box-shadow: 0 16px 36px rgba(10, 37, 64, 0.18) !important;
        border-top: 2px solid #00a896 !important;
        border-bottom: 2px solid #e2e8f0 !important;
        gap: 0 !important;
        max-height: calc(85vh - 70px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        z-index: 9999999 !important;
        list-style: none !important;
        margin: 0 !important;
    }
    .acgp-nav-menu.open .acgp-nav-item {
        width: 100% !important;
        margin: 0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }
    .acgp-nav-menu.open .acgp-nav-item:last-child {
        border-bottom: none !important;
    }
    .acgp-nav-menu.open .acgp-nav-item a {
        display: block !important;
        padding: 13px 12px !important;
        font-size: 15.5px !important;
        font-weight: 700 !important;
        color: #0a2540 !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
    }
    .acgp-nav-menu.open .acgp-nav-item a:hover,
    .acgp-nav-menu.open .acgp-nav-item a:active {
        color: #00a896 !important;
        padding-left: 18px !important;
        background: #f8fafc !important;
        border-radius: 6px !important;
    }
    .acgp-nav-menu.open .acgp-admin-carnet-item {
        margin-top: 10px !important;
        border-bottom: none !important;
    }
    .acgp-nav-menu.open .acgp-admin-carnet-item a {
        background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%) !important;
        border: 1px solid #bae6fd !important;
        border-radius: 8px !important;
        color: #028090 !important;
        text-align: center !important;
    }
    .acgp-mobile-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        background: #f8fafc !important;
        border: 1.5px solid #cbd5e1 !important;
        border-radius: 10px !important;
        padding: 0 !important;
        cursor: pointer !important;
        color: #0a2540 !important;
        touch-action: manipulation !important;
        transition: all 0.2s ease !important;
    }
    .acgp-mobile-toggle:hover,
    .acgp-mobile-toggle:active,
    .acgp-mobile-toggle.active {
        background: #00a896 !important;
        border-color: #00a896 !important;
        color: #ffffff !important;
    }
    .acgp-mobile-toggle svg {
        width: 24px !important;
        height: 24px !important;
        fill: currentColor !important;
        pointer-events: none !important;
    }
}

@media (max-width: 768px) {
    .acgp-topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .acgp-footer-grid {
        grid-template-columns: 1fr;
    }
    .acgp-header-sponsors {
        width: 100%;
        justify-content: space-between;
    }
    .acgp-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .acgp-logo-img {
        height: 42px !important;
    }
    .acgp-nav-inner {
        gap: 10px !important;
    }
    .acgp-header-actions {
        gap: 8px !important;
    }
    .acgp-btn-cta {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .acgp-logo-img {
        height: 36px !important;
    }
    .acgp-btn-cta span {
        display: none !important;
    }
    .acgp-btn-cta {
        padding: 9px 12px !important;
        border-radius: 9px !important;
    }
    .acgp-btn-cta svg {
        margin: 0 !important;
    }
}

/* ==========================================================================
   SEGURIDAD MODALES / OVERLAYS GLOBALES (EVITA DESBORDAMIENTOS BAJO EL FOOTER)
   ========================================================================== */
.acgp-modal-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(6, 24, 41, 0.78) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 9999999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px 16px !important;
    box-sizing: border-box !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.acgp-modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ==========================================================================
   BOTÓN FLOTANTE DE RETORNO A INICIO (BACK TO TOP)
   ========================================================================== */
.acgp-back-to-top {
    position: fixed !important;
    bottom: 26px !important;
    right: 26px !important;
    z-index: 99990 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 18px 10px 12px !important;
    background: linear-gradient(135deg, #028090 0%, #00a896 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 999px !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    box-shadow: 0 10px 25px rgba(2, 128, 144, 0.38), 0 2px 6px rgba(0, 0, 0, 0.12) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(22px) scale(0.92);
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.32s, 
                box-shadow 0.25s ease, 
                background 0.25s ease !important;
    user-select: none;
    outline: none;
}

.acgp-back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

.acgp-back-to-top:hover {
    background: linear-gradient(135deg, #00a896 0%, #028090 100%) !important;
    box-shadow: 0 14px 32px rgba(0, 168, 150, 0.5), 0 4px 10px rgba(0, 0, 0, 0.18) !important;
    transform: translateY(-4px) scale(1.04) !important;
    color: #ffffff !important;
}

.acgp-back-to-top:active {
    transform: translateY(-1px) scale(0.98) !important;
    box-shadow: 0 6px 16px rgba(0, 168, 150, 0.4) !important;
}

.acgp-back-to-top:focus-visible {
    outline: 2px solid #38bdf8 !important;
    outline-offset: 3px !important;
}

.acgp-btt-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    transition: transform 0.25s ease, background 0.25s ease;
}

.acgp-back-to-top:hover .acgp-btt-icon-box {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.32);
}

.acgp-btt-svg {
    display: block;
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.acgp-btt-label {
    line-height: 1;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .acgp-back-to-top {
        bottom: 20px !important;
        right: 20px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        width: 46px !important;
        height: 46px !important;
        justify-content: center !important;
    }
    .acgp-btt-label {
        display: none !important;
    }
    .acgp-btt-icon-box {
        background: transparent !important;
        width: auto !important;
        height: auto !important;
    }
}

