/**
 * Modern Header & Footer Styles
 * Gaming-inspired design with smooth animations
 */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-color: #667eea;
    --accent-hover: #764ba2;
    --text-dark: #1a1a2e;
    --text-light: #fff;
    --bg-dark: #0f0f1e;
    --bg-accent: #16213e;
    --transition-speed: 0.3s;
}

/* ============================================
   MODERN HEADER
   ============================================ */

.modern-header {
    background: transparent;
    box-shadow: none;
    position: relative;
    z-index: 1000;
}

/* Header Top Bar - Light background */
.header-top {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Site Branding */
.site-branding {
    flex-shrink: 0;
}

.site-branding .custom-logo-link {
    display: block;
    line-height: 1;
}

.site-branding .custom-logo {
    max-height: 60px;
    width: auto;
    transition: transform var(--transition-speed) ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.site-branding .custom-logo:hover {
    transform: scale(1.05);
}

.site-title {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.site-title a {
    color: var(--text-dark);
    text-decoration: none;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-speed);
}

.site-title a:hover {
    transform: translateX(3px);
}

/* Header Banner Slot */
.header-banner-slot {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.header-banner-link {
    display: block;
    max-width: 700px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed) ease;
    position: relative;
}

.header-banner-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.header-banner-link:hover::before {
    opacity: 1;
}

.header-banner-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.header-banner-image {
    display: block;
    width: 100%;
    height: auto;
    transition: transform var(--transition-speed) ease;
}

.header-banner-link:hover .header-banner-image {
    transform: scale(1.02);
}

/* Navigation Bar - STICKY */
.main-navigation {
    background: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow var(--transition-speed);
}

.main-navigation::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(102, 126, 234, 0.3) 50%,
        transparent 100%);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--transition-speed);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
}

.menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    position: absolute;
    top: 50%;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    position: absolute;
    top: 50%;
}

/* Modern Menu */
.modern-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.modern-menu > li {
    position: relative;
}

.modern-menu > li > a {
    display: block;
    padding: 20px 25px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    transition: all var(--transition-speed) ease;
}

/* Hover Effect */
.modern-menu > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: translateX(-50%);
    transition: width var(--transition-speed) ease;
}

.modern-menu > li > a:hover {
    color: var(--accent-color);
}

.modern-menu > li > a:hover::before {
    width: 80%;
}

/* Current Page Indicator */
.modern-menu > li.current-menu-item > a,
.modern-menu > li.current_page_item > a {
    color: var(--accent-color);
    position: relative;
}

.modern-menu > li.current-menu-item > a::before,
.modern-menu > li.current_page_item > a::before {
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
    }
}

.modern-menu > li.current-menu-item > a::after,
.modern-menu > li.current_page_item > a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 5px;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50%) scale(1.5);
    }
}

/* ============================================
   MODERN FOOTER
   ============================================ */

.modern-footer {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1e 100%);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 60px;
    position: relative;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(102, 126, 234, 0.5) 50%,
        transparent 100%);
}

/* Footer Banner */
.footer-banner-section {
    padding: 40px 0;
    background: rgba(22, 33, 62, 0.5);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.footer-banner-link {
    display: block;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: all var(--transition-speed) ease;
}

.footer-banner-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

.footer-banner-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Footer Widgets */
.footer-widgets {
    padding: 60px 0 40px;
}

/* Footer Navigation */
.footer-navigation {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
    position: relative;
}

.footer-menu a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width var(--transition-speed);
}

.footer-menu a:hover {
    color: var(--text-light);
}

.footer-menu a:hover::after {
    width: 100%;
}

/* Site Info */
.site-info {
    padding: 30px 0;
    text-align: center;
}

.site-info p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991px) {
    .header-top-inner {
        flex-direction: column;
        gap: 20px;
    }

    .header-banner-slot {
        width: 100%;
        justify-content: center;
    }

    .modern-menu {
        flex-wrap: wrap;
        gap: 0;
    }

    .modern-menu > li > a {
        padding: 15px 20px;
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .header-top {
        padding: 15px 0;
    }

    .site-branding .custom-logo {
        max-height: 50px;
    }

    .site-title {
        font-size: 24px;
    }

    /* Mobile Menu Toggle - Always visible */
    .menu-toggle {
        display: flex !important;
        margin: 10px auto;
        width: fit-content;
    }

    /* Hide menu by default on mobile */
    .modern-menu {
        display: none !important;
        flex-direction: column;
        width: 100%;
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .modern-menu.active {
        display: flex !important;
    }

    .modern-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .modern-menu > li:last-child {
        border-bottom: none;
    }

    .modern-menu > li > a {
        padding: 15px 20px;
        text-align: center;
    }

    .modern-menu > li > a::before {
        left: 0;
        transform: none;
        width: 3px;
        height: 0;
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
    }

    .modern-menu > li > a:hover::before,
    .modern-menu > li.current-menu-item > a::before,
    .modern-menu > li.current_page_item > a::before {
        height: 60%;
    }

    /* Make sure navigation is positioned correctly */
    .main-navigation {
        position: relative;
    }

    .main-navigation .container {
        position: relative;
    }

    .footer-banner-section {
        padding: 30px 0;
    }

    .footer-menu {
        flex-direction: column;
        gap: 15px;
    }
}

/* Desktop banner visibility */
@media (min-width: 768px) {
    .mobile-banner {
        display: none !important;
    }
}

/* Mobile banner visibility */
@media (max-width: 767px) {
    .desktop-banner {
        display: none !important;
    }

    .header-banner-link,
    .footer-banner-link {
        max-width: 400px;
    }
}

.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Site Branding */
.site-branding {
    flex-shrink: 0;
}

.site-branding .custom-logo-link {
    display: block;
    line-height: 1;
}

.site-branding .custom-logo {
    max-height: 50px;
    width: auto;
    transition: transform var(--transition-speed) ease;
}

.site-branding .custom-logo:hover {
    transform: scale(1.05);
}

.site-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.site-title a {
    color: var(--text-light);
    text-decoration: none;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-speed);
}

.site-title a:hover {
    transform: translateX(3px);
}

/* Header Banner Slot */
.header-banner-slot {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.header-banner-link {
    display: block;
    max-width: 700px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-speed) ease;
    position: relative;
}

.header-banner-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.header-banner-link:hover::before {
    opacity: 1;
}

.header-banner-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.header-banner-image {
    display: block;
    width: 100%;
    height: auto;
    transition: transform var(--transition-speed) ease;
}

.header-banner-link:hover .header-banner-image {
    transform: scale(1.02);
}

/* Navigation Bar */
.main-navigation {
    background: #fff;
    padding: 0;
    position: relative;
}

.main-navigation::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(102, 126, 234, 0.3) 50%,
        transparent 100%);
}

/* Modern Menu */
.modern-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.modern-menu > li {
    position: relative;
}

.modern-menu > li > a {
    display: block;
    padding: 20px 25px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    transition: all var(--transition-speed) ease;
}

/* Hover Effect */
.modern-menu > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: translateX(-50%);
    transition: width var(--transition-speed) ease;
}

.modern-menu > li > a:hover {
    color: var(--accent-color);
}

.modern-menu > li > a:hover::before {
    width: 80%;
}

/* Current Page Indicator */
.modern-menu > li.current-menu-item > a,
.modern-menu > li.current_page_item > a {
    color: var(--accent-color);
    position: relative;
}

.modern-menu > li.current-menu-item > a::before,
.modern-menu > li.current_page_item > a::before {
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
    }
}

.modern-menu > li.current-menu-item > a::after,
.modern-menu > li.current_page_item > a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 5px;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50%) scale(1.5);
    }
}

/* ============================================
   MODERN FOOTER
   ============================================ */

.modern-footer {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1e 100%);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 60px;
    position: relative;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(102, 126, 234, 0.5) 50%,
        transparent 100%);
}

/* Footer Banner */
.footer-banner-section {
    padding: 40px 0;
    background: rgba(22, 33, 62, 0.5);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.footer-banner-link {
    display: block;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: all var(--transition-speed) ease;
}

.footer-banner-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

.footer-banner-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Footer Widgets */
.footer-widgets {
    padding: 60px 0 40px;
}

/* Footer Navigation */
.footer-navigation {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
    position: relative;
}

.footer-menu a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width var(--transition-speed);
}

.footer-menu a:hover {
    color: var(--text-light);
}

.footer-menu a:hover::after {
    width: 100%;
}

/* Site Info */
.site-info {
    padding: 30px 0;
    text-align: center;
}

.site-info p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991px) {
    .header-top-inner {
        flex-direction: column;
        gap: 20px;
    }

    .header-banner-slot {
        width: 100%;
        justify-content: center;
    }

    .modern-menu {
        flex-wrap: wrap;
        gap: 0;
    }

    .modern-menu > li > a {
        padding: 15px 20px;
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .header-top {
        padding: 15px 0;
    }

    .site-branding .custom-logo {
        max-height: 40px;
    }

    .site-title {
        font-size: 24px;
    }

    .modern-menu {
        flex-direction: column;
        width: 100%;
    }

    .modern-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .modern-menu > li > a {
        padding: 15px 20px;
        text-align: center;
    }

    .modern-menu > li > a::before {
        left: 0;
        transform: none;
        width: 3px;
        height: 0;
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
    }

    .modern-menu > li > a:hover::before,
    .modern-menu > li.current-menu-item > a::before,
    .modern-menu > li.current_page_item > a::before {
        height: 60%;
    }

    .footer-banner-section {
        padding: 30px 0;
    }

    .footer-menu {
        flex-direction: column;
        gap: 15px;
    }
}

/* Desktop banner visibility */
@media (min-width: 768px) {
    .mobile-banner {
        display: none !important;
    }
}

/* Mobile banner visibility */
@media (max-width: 767px) {
    .desktop-banner {
        display: none !important;
    }

    .header-banner-link,
    .footer-banner-link {
        max-width: 400px;
    }
}
