﻿/**
 * Firework Pet Alert - Simple Header & Navigation
 * Modern Blue/Orange Theme
 * Created: November 18, 2025
 */

/* ==================== CSS VARIABLES - HEADER SPECIFIC ==================== */
:root {
    --header-full-height: 280px;
    --header-duration-normal: 0.3s;
    --header-timing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== SKIP LINK ==================== */
.fpa-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100000;
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue, #4A90E2);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}
.fpa-skip-link:focus {
    left: 0;
}

/* ==================== FULL HEADER (HERO) ==================== */
.fpa-header-site { 
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

#fpa-header-site-header.fpa-header-full-header {
    width: 100%;
    min-height: var(--header-full-height);
    background: linear-gradient(145deg, #2C5AA0 0%, var(--primary-blue) 40%, #5BA3E8 100%);
    position: relative;
    z-index: var(--z-header);
    box-shadow: 0 8px 32px rgba(44, 90, 160, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all var(--header-duration-normal) var(--header-timing-smooth);
}

/* Animated gradient overlay for depth */
#fpa-header-site-header.fpa-header-full-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 138, 101, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 138, 101, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 8s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Decorative paw print pattern */
#fpa-header-site-header.fpa-header-full-header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 30%, rgba(255, 255, 255, 0.08) 2px, transparent 2px),
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px),
        radial-gradient(circle at 85% 70%, rgba(255, 138, 101, 0.12) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255, 138, 101, 0.08) 1.5px, transparent 1.5px);
    background-size: 120px 120px;
    background-position: 0 0, 10px 10px, 0 0, 8px 8px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.fpa-header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 40px 0 35px;
    position: relative;
    z-index: 1;
}

.fpa-header-content {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

/* Decorative accent */
.fpa-header-content::before {
    content: '\1F43E'; /* Paw prints emoji */
    font-size: 2.5rem;
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    filter: drop-shadow(0 4px 8px rgba(255, 138, 101, 0.3));
}

#fpa-header-site-header.fpa-header-full-header .fpa-header-brand {
    font-size: 3.2rem;
    color: var(--white);
    line-height: 1.1;
    font-weight: 800;
    margin: 0 0 15px 0;
    font-family: var(--font-family-heading);
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
}

/* Subtle underline accent */
#fpa-header-site-header.fpa-header-full-header .fpa-header-brand::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-orange), transparent);
    border-radius: 2px;
    opacity: 0.8;
}

#fpa-header-site-header.fpa-header-full-header .fpa-header-tagline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    line-height: 1.5;
}

/* ==================== MAIN NAVIGATION - GLASSMORPHISM ==================== */
.fpa-header-main-nav {
    width: 100vw;
    height: 65px;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%),
        linear-gradient(145deg, #2C5AA0 0%, #4A90E2 40%, #5BA3E8 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -65px;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

/* When sticky (scrolled past header) - add solid blue background behind the glassmorphism */
.fpa-header-main-nav.scrolled {
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%),
        linear-gradient(145deg, #2C5AA0 0%, #4A90E2 40%, #5BA3E8 100%);
}

.fpa-header-main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
    gap: 8px;
}

.fpa-header-menu-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* ==================== MENU LINKS WITH ORANGE ACCENTS ==================== */
.fpa-header-main-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 0 22px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    height: 45px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Hover effect with orange gradient */
.fpa-header-main-menu a::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #FF6F3D 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    z-index: -1;
}

.fpa-header-main-menu a:hover::before {
    opacity: 1;
}

.fpa-header-main-menu a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 138, 101, 0.4);
    color: var(--white);
}

/* Current page indicator with orange accent */
.fpa-header-main-menu .current-menu-item > a {
    background: linear-gradient(135deg, rgba(255, 138, 101, 0.9) 0%, rgba(255, 111, 61, 0.9) 100%);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 138, 101, 0.3);
}

.fpa-header-main-menu .current-menu-item > a:hover {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #FF6F3D 100%);
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 992px) {
    #fpa-header-site-header.fpa-header-full-header { min-height: 240px; }
    .fpa-header-main { padding: 30px 15px 0; }
    #fpa-header-site-header.fpa-header-full-header .fpa-header-brand { font-size: 2.6rem; }
    #fpa-header-site-header.fpa-header-full-header .fpa-header-tagline { font-size: 1.15rem; }
    .fpa-header-main-menu { gap: 4px; }
    .fpa-header-main-menu a { padding: 0 16px; font-size: 0.9rem; }
}

@media (max-width: 768px) {
    /* Hide entire desktop header on mobile */
    #fpa-header-site-header {
        display: none !important;
    }
    
    .fpa-header-content::before { display: none; }
    .fpa-header-main-nav { height: 55px; display: none; }
    .fpa-header-main-menu { 
        flex-wrap: wrap; 
        gap: 3px; 
        padding: 5px;
        justify-content: center;
    }
    .fpa-header-main-menu a { 
        padding: 0 12px; 
        font-size: 0.85rem; 
        height: 40px; 
    }
}

@media (max-width: 480px) {
    .fpa-header-main-menu a { 
        padding: 0 10px; 
        font-size: 0.8rem; 
        height: 36px; 
    }
}

/* ==================== UTILITY CLASSES ==================== */
.fpa-header-wrapper { 
    position: relative; 
    z-index: 1; 
}

/* Smooth scrolling + anchor offset for sticky nav */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* ==================== ADMIN BAR COMPATIBILITY ==================== */

/* Adjust sticky nav position when WordPress admin bar is present */
.admin-bar .fpa-header-main-nav {
    top: 32px;
}

.admin-bar .fpa-header-mobile-nav {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .fpa-header-main-nav {
        top: 46px;
    }
    
    .admin-bar .fpa-header-mobile-nav {
        top: 46px;
    }
}

/* ==================== MOBILE NAVIGATION ==================== */

/* Hide mobile nav on desktop */
.fpa-header-mobile-nav,
.fpa-header-mobile-overlay,
.fpa-header-mobile-menu-panel {
    display: none;
}

@media (max-width: 768px) {
    /* Show mobile nav */
    .fpa-header-mobile-nav {
        display: flex;
        width: 100vw;
        height: 65px;
        background: 
            linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%),
            linear-gradient(145deg, #2C5AA0 0%, #4A90E2 40%, #5BA3E8 100%);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid rgba(255, 255, 255, 0.25);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        justify-content: center;
        align-items: center;
        margin-top: -65px;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        position: sticky;
        top: 0;
        z-index: 1000;
        transition: background 0.3s ease;
    }
    
    /* Admin bar compatibility for mobile nav */
    .admin-bar .fpa-header-mobile-nav {
        top: 46px;
    }
    
    /* Push page content below the sticky mobile nav */
    main#site-content {
        padding-top: 65px;
    }
    
    /* Account for admin bar + nav */
    .admin-bar main#site-content {
        padding-top: 65px;
    }
    
    /* Anchor scroll offset */
    html {
        scroll-padding-top: 70px;
    }
    
    .fpa-header-mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 1200px;
        padding: 0 20px;
        gap: 15px;
    }
    
    .fpa-header-mobile-brand {
        display: flex;
        align-items: center;
        text-decoration: none;
        color: var(--white);
        gap: 6px;
        flex: 0 0 auto;
        min-width: 0;
    }
    
    .fpa-header-mobile-paw {
        font-size: 22px;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        flex-shrink: 0;
    }
    
    .fpa-header-mobile-brand-text {
        font-family: var(--font-family-heading);
        font-weight: 700;
        font-size: 1rem;
        color: var(--white);
        white-space: nowrap;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        letter-spacing: 0.2px;
    }
    
    .fpa-header-mobile-actions {
        display: flex;
        gap: 10px;
        flex: 1;
        justify-content: center;
    }
    
    .fpa-header-mobile-btn {
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    .fpa-header-mobile-register-btn {
        background: rgba(255, 255, 255, 0.2);
        color: var(--white);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .fpa-header-mobile-register-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }
    
    .fpa-header-mobile-event-btn {
        background: linear-gradient(135deg, var(--accent-orange) 0%, #FF6F3D 100%);
        color: var(--white);
        box-shadow: 0 2px 8px rgba(255, 138, 101, 0.3);
    }
    
    .fpa-header-mobile-event-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 138, 101, 0.4);
    }
    
    /* Hamburger menu toggle (button reset) */
    .fpa-header-mobile-menu-toggle {
        -webkit-appearance: none;
        appearance: none;
        font-size: 0;
        line-height: 0;
        color: transparent;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.12);
        border: 1.5px solid rgba(255, 255, 255, 0.3);
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 8px;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    .fpa-header-hamburger {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--white);
        border-radius: 2px;
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    .fpa-header-mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.55);
        transform: scale(1.05);
    }
    
    /* Mobile slide-out menu panel */
    .fpa-header-mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(44, 90, 160, 0.6);
        backdrop-filter: blur(8px);
        z-index: 1998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .fpa-header-mobile-menu-panel {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: linear-gradient(180deg, #fff 0%, #F8F9FA 100%);
        box-shadow: -8px 0 32px rgba(44, 90, 160, 0.3);
        z-index: 1999;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        display: block;
    }
    
    /* When menu is open (JS-toggled class) */
    .fpa-header-mobile-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }
    
    .fpa-header-mobile-menu-panel.is-open {
        right: 0;
    }
    
    .fpa-header-mobile-menu-toggle.is-open .fpa-header-hamburger:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .fpa-header-mobile-menu-toggle.is-open .fpa-header-hamburger:nth-child(2) {
        opacity: 0;
    }
    
    .fpa-header-mobile-menu-toggle.is-open .fpa-header-hamburger:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    body.mobile-menu-open {
        overflow: hidden;
    }
    
    .fpa-header-mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        background: linear-gradient(135deg, #2C5AA0 0%, var(--primary-blue) 100%);
        color: white;
        border-bottom: 3px solid var(--accent-orange);
    }
    
    .fpa-header-mobile-menu-title {
        font-size: 1.3rem;
        font-weight: 800;
        font-family: var(--font-family-heading);
    }
    
    .fpa-header-mobile-close {
        background: rgba(255, 138, 101, 0.3);
        border: 2px solid rgba(255, 138, 101, 0.5);
        color: white;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        line-height: 1;
    }
    
    .fpa-header-mobile-close:hover {
        background: var(--accent-orange);
        transform: scale(1.1) rotate(90deg);
    }
    
    .fpa-header-mobile-menu-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .fpa-header-mobile-menu-item {
        border-bottom: 1px solid rgba(44, 90, 160, 0.08);
    }
    
    .fpa-header-mobile-menu-item a {
        color: var(--primary-blue);
        text-decoration: none;
        display: flex;
        align-items: center;
        padding: 18px 20px;
        font-weight: 600;
        font-size: 1rem;
        border-left: 4px solid transparent;
        transition: all 0.3s ease;
    }
    
    .fpa-header-mobile-menu-item a::before {
        content: '';
        width: 8px;
        height: 8px;
        background: linear-gradient(135deg, var(--accent-orange) 0%, #FF6F3D 100%);
        border-radius: 50%;
        margin-right: 12px;
        opacity: 0;
        transform: scale(0);
        transition: all 0.3s ease;
    }
    
    .fpa-header-mobile-menu-item a:hover,
    .fpa-header-mobile-menu-item.current-menu-item a {
        background: linear-gradient(90deg, rgba(255, 138, 101, 0.08) 0%, transparent 100%);
        border-left-color: var(--accent-orange);
        padding-left: 25px;
    }
    
    .fpa-header-mobile-menu-item a:hover::before,
    .fpa-header-mobile-menu-item.current-menu-item a::before {
        opacity: 1;
        transform: scale(1);
    }
    
    .fpa-header-mobile-menu-item.current-menu-item a {
        color: #2C5AA0;
        font-weight: 700;
    }
}

@media (max-width: 480px) {
    .fpa-header-mobile-actions {
        display: none;
    }
    
    .fpa-header-mobile-brand-text {
        font-size: 0.95rem;
    }
}
