/*
Theme Name: UK Militia Forces v3
Theme URI: https://ukmilitia.com
Author: UK Militia Forces / Zevonix
Author URI: https://zevonix.com
Description: Advanced WordPress theme for UK Militia Forces EVE Online Corporation with integrated EVE SSO authentication, member-only areas, stream access, and modern responsive design.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ukmilitia
Tags: gaming, esports, eve-online, custom-menu, featured-images, threaded-comments, translation-ready, responsive-design

UK Militia Forces WordPress Theme v3, Copyright 2024
UK Militia Forces Theme is distributed under the terms of the GNU GPL
*/

/* ============================================
   CSS VARIABLES - THEME COLORS
   ============================================ */
:root {
    /* Primary Colors */
    --primary-dark: #000000;
    --primary-darker: #000000;
    --secondary-dark: rgba(0, 0, 0, 0.95);

    /* Accent Colors */
    --accent-blue: #54acfa;
    --accent-cyan: #00d4ff;
    --accent-red: #dc3545;
    --accent-red-hover: #c82333;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Background Colors */
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --bg-card: rgba(0, 0, 0, 0.8);
    --bg-card-hover: rgba(20, 20, 20, 0.9);

    /* Border Colors */
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);

    /* Spacing */
    --container-padding: 10px;
    --section-spacing: 60px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

/* ============================================
   GLOBAL RESETS & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #000000;
    background-image: url('assets/images/bg.png');
    background-repeat: repeat;
    background-attachment: fixed;
    background-position: center center;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Anurati', 'Arial Black', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h5 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.25rem); }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-cyan);
}

/* Colored text accent */
.colored {
    color: var(--accent-blue);
}

/* ============================================
   LAYOUT & CONTAINERS
   ============================================ */
.container {
    width: 100%;
    max-width: 1400px;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    margin: 0 auto;
}

.container-fluid {
    width: 100%;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.row > [class*="col-"] {
    padding-left: 5px !important;
    padding-right: 5px !important;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
#main-header {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Transparent header on homepage */
.home #main-header,
.front-page #main-header {
    background: rgba(0, 0, 0, 0.5);
    border-bottom-color: transparent;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-brand-wrapper {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.navbar-brand img {
    width: 75%;
    height: auto;
    max-width: 100%;
}

/* Hide logo on homepage at top, show on scroll */
.home .navbar-brand-wrapper,
.front-page .navbar-brand-wrapper {
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.home .navbar-brand-wrapper .custom-logo-link,
.front-page .navbar-brand-wrapper .custom-logo-link {
    opacity: 0 !important;
    visibility: hidden !important;
}

.home .navbar-brand-wrapper .custom-logo,
.home .navbar-brand-wrapper img,
.front-page .navbar-brand-wrapper .custom-logo,
.front-page .navbar-brand-wrapper img {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
}

/* Show logo when scrolled */
.home.scrolled .navbar-brand-wrapper,
.front-page.scrolled .navbar-brand-wrapper {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.home.scrolled .navbar-brand-wrapper .custom-logo-link,
.front-page.scrolled .navbar-brand-wrapper .custom-logo-link {
    opacity: 1 !important;
    visibility: visible !important;
}

.home.scrolled .navbar-brand-wrapper .custom-logo,
.home.scrolled .navbar-brand-wrapper img,
.front-page.scrolled .navbar-brand-wrapper .custom-logo,
.front-page.scrolled .navbar-brand-wrapper img {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* Always show logo on other pages */
.page .navbar-brand-wrapper,
.single .navbar-brand-wrapper,
.archive .navbar-brand-wrapper,
.page .navbar-brand-wrapper .custom-logo-link,
.single .navbar-brand-wrapper .custom-logo-link,
.archive .navbar-brand-wrapper .custom-logo-link,
.page .navbar-brand-wrapper .custom-logo,
.single .navbar-brand-wrapper .custom-logo,
.archive .navbar-brand-wrapper .custom-logo {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.navbar-collapse {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.navbar-nav {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.navbar-nav.ms-auto {
    margin-left: 0 !important;
}

.nav-item {
    margin: 0 0.5rem;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    background: rgba(0, 0, 0, 0.98);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Mobile Menu Toggle */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

.icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition-fast);
}

/* ============================================
   EVE USER INFO - CHARACTER DISPLAY
   ============================================ */
.eve-user-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

/* When widget only contains login button, remove extra padding/background */
.eve-user-widget:has(.eve-login-btn:only-child) {
    background: transparent;
    border: none;
    padding: 0;
}

.eve-user-widget:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
}

/* Keep hover transparent when only login button */
.eve-user-widget:has(.eve-login-btn:only-child):hover {
    background: transparent;
    border: none;
}

.eve-user-avatar {
    position: relative;
}

.eve-user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    object-fit: cover;
}

.eve-user-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border: 2px solid var(--primary-dark);
    border-radius: 50%;
}

.eve-user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eve-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.eve-user-status {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1;
}

.eve-logout-btn {
    background: var(--accent-red);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.eve-logout-btn:hover {
    background: var(--accent-red-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.eve-login-btn {
    background: var(--accent-blue);
    color: var(--text-primary) !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition-fast);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.eve-login-btn:hover {
    background: var(--accent-cyan);
    color: var(--text-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(84, 172, 250, 0.4);
    text-decoration: none !important;
}

/* ============================================
   PAGE SECTIONS
   ============================================ */
section {
    padding: var(--section-spacing) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
}

/* ============================================
   MAIN CONTENT AREAS
   ============================================ */
.site-main {
    min-height: 60vh;
}

/* Front Page - Remove padding for hero video */
.front-page {
    padding: 0;
}

/* Hero Video Section */
.hero-video-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
    margin-top: -80px; /* Pull up behind header (adjust if needed) */
    padding-top: 80px; /* Compensate for header height */
}

.video-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo img {
    max-width: 500px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.hero-tagline {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    max-width: 700px;
    margin: 1rem auto;
    text-align: center;
}

.hero-actions {
    margin-top: 2.5rem;
    text-align: center;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Homepage Content Section */
.homepage-content {
    padding: var(--section-spacing) 0;
    background: #000000;
    background-image: url('assets/images/bg.png');
    background-repeat: repeat;
    background-attachment: fixed;
}

/* Standard Pages */
.site-main:not(.front-page) {
    padding: var(--section-spacing) 0;
    background: #000000;
    background-image: url('assets/images/bg.png');
    background-repeat: repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

.entry-header {
    margin-bottom: 2rem;
    text-align: center;
}

.entry-title {
    margin-bottom: 1rem;
    text-align: center;
}

.entry-title .colored {
    color: var(--accent-blue);
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.entry-thumbnail {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-content {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 1200px;
    margin: 0 auto;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

/* Hide post meta on pages */
.page .entry-meta,
.page-template .entry-meta,
.page-template-default .entry-meta {
    display: none !important;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.entry-content a:hover {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--accent-blue);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.entry-content pre,
.entry-content code {
    background: var(--primary-darker);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.entry-content pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.entry-content th,
.entry-content td {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    text-align: left;
}

.entry-content th {
    background: var(--primary-darker);
    font-weight: 600;
    color: var(--text-primary);
}

.entry-content iframe,
.entry-content video {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* ============================================
   CARDS & CONTENT BLOCKS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition-medium);
    backdrop-filter: blur(10px);
}

.card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: var(--accent-blue);
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-primary:hover {
    background: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(84, 172, 250, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 10px 28px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--accent-blue);
    color: var(--text-primary);
    text-decoration: none;
}

.btn-secondary.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* ============================================
   FOOTER
   ============================================ */
#main-footer {
    background: #000000;
    background-image: url('assets/images/bg.png');
    background-repeat: repeat;
    border-top: 1px solid var(--border-light);
    padding: 3rem 0 1rem;
    margin-top: var(--section-spacing);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   MEMBER-ONLY SECTIONS
   ============================================ */
.members-only-overlay {
    position: relative;
    padding: 3rem;
    text-align: center;
    background: var(--bg-card);
    border: 2px dashed var(--border-medium);
    border-radius: 12px;
}

.members-only-icon {
    font-size: 4rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.members-only-overlay h2 {
    margin-bottom: 1rem;
}

.members-only-overlay p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ============================================
   PAGE TEMPLATES - ADDITIONAL STYLING
   ============================================ */

/* Full Width Page Template */
.page-fullwidth .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* Content Focused Page Template */
.page-content-focused {
    background: #000000;
    background-image: url('assets/images/bg.png');
    background-repeat: repeat;
    background-attachment: fixed;
}

.content-article {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.content-article .entry-meta {
    font-size: 0.9rem;
}

.content-article .entry-meta span {
    display: inline-block;
}

.content-article .entry-footer {
    border-top-color: var(--border-light) !important;
}

.entry-share .btn {
    transition: var(--transition-fast);
}

.entry-share .btn:hover {
    transform: translateY(-2px);
}

/* Lead text (excerpt) styling */
.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-secondary);
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(84, 172, 250, 0.3);
}

.bg-primary {
    background-color: var(--accent-blue) !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    :root {
        --section-spacing: 40px;
    }

    .navbar-collapse {
        background: rgba(0, 0, 0, 0.98);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }

    .nav-item {
        margin: 0.5rem 0;
    }
}

@media (max-width: 768px) {
    :root {
        --section-spacing: 30px;
    }

    .eve-user-widget {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-video-section {
        height: 100vh;
    }

    .hero-logo img {
        max-width: 350px;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .content-article {
        padding: 2rem;
    }

    .entry-share {
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    :root {
        --container-padding: 5px;
    }

    .eve-user-avatar img {
        width: 35px;
        height: 35px;
    }

    .card {
        padding: 1.5rem;
    }

    .hero-video-section {
        height: 100vh;
    }

    .hero-logo img {
        max-width: 280px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .content-article {
        padding: 1.5rem;
    }

    .entry-footer {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
