/* ==========================================================================
   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 {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.acgp-lang-btn:hover, .acgp-lang-btn.active {
    background: #00a896;
    border-color: #00a896;
    color: #fff;
}

/* 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-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .acgp-nav-menu {
        display: none;
    }
    .acgp-nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        border-top: 1px solid var(--acgp-border);
    }
    .acgp-mobile-toggle {
        display: block;
    }
}

@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;
    }
}
