/* ============================================
   ELEMENTZ GLOBAL THEME - Circuit Noir
   Header & Footer Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES (Global)
   ============================================ */
:root {
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: #151d2e;
    --accent-cyan: #00d4ff;
    --accent-cyan-dim: rgba(0, 212, 255, 0.15);
    --accent-amber: #f59e0b;
    --accent-amber-dim: rgba(245, 158, 11, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.4);
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'DM Sans', sans-serif;
}

/* ============================================
   HEADER STYLES
   ============================================ */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#header .header-inner {
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.4s ease;
}

#header.header-scrolled .header-inner {
    background: rgba(10, 15, 26, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 80px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
#logo {
    flex-shrink: 0;
}

#logo a {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

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

#logo .logo-default,
#logo .logo-dark {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#logo a::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-cyan);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* Main Navigation */
#mainMenu {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

#mainMenu nav {
    display: flex;
    align-items: center;
}

#mainMenu nav > ul {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#mainMenu nav > ul > li {
    position: relative;
}

#mainMenu nav > ul > li > a {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

#mainMenu nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--accent-cyan);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#mainMenu nav > ul > li > a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

#mainMenu nav > ul > li > a:hover::after {
    transform: scaleX(1);
}

#mainMenu nav > ul > li.current > a,
#mainMenu nav > ul > li.active > a {
    color: var(--accent-cyan);
}

/* Dropdown Menu */
#mainMenu nav > ul > li.dropdown > a::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

#mainMenu nav > ul > li.dropdown:hover > a::before {
    transform: rotate(180deg);
}

#mainMenu .dropdown-menu,
#mainMenu nav > ul > li .dropdown-menu,
#mainMenu nav > ul > li > .dropdown-menu {
    position: absolute;
    top: 100% !important;
    left: 0;
    min-width: 240px;
    background: #111827 !important;
    background-color: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 8px !important;
    padding: 8px 0 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
    list-style: none;
    z-index: 100;
    margin-top: 0 !important;
}

#mainMenu nav > ul > li.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#mainMenu .dropdown-menu li {
    margin: 0;
}

#mainMenu .dropdown-menu li a,
#mainMenu nav > ul > li .dropdown-menu > li > a,
#mainMenu nav > ul > li > .dropdown-menu > li > a {
    display: block;
    padding: 12px 20px !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem !important;
    color: #cbd5e1 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    line-height: 1.4 !important;
    background: transparent !important;
}

#mainMenu .dropdown-menu li a:hover,
#mainMenu nav > ul > li .dropdown-menu > li > a:hover,
#mainMenu nav > ul > li > .dropdown-menu > li > a:hover {
    color: #00d4ff !important;
    background: rgba(0, 212, 255, 0.1) !important;
    border-left-color: #00d4ff;
    padding-left: 24px !important;
}

/* Header Extras */
.header-extras {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.header-extras ul {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-extras li a,
.header-extras .p-dropdown > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.header-extras li a:hover,
.header-extras .p-dropdown > a:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: var(--accent-cyan-dim);
}

.header-extras .p-dropdown {
    position: relative;
}

.header-extras .p-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 120px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    margin-top: 8px;
}

.header-extras .p-dropdown:hover .p-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-extras .p-dropdown-content li a {
    border: none;
    border-radius: 0;
    padding: 10px 16px;
}

/* Mobile Menu Trigger */
#mainMenu-trigger {
    display: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 16px;
}

#mainMenu-trigger .lines-button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

#mainMenu-trigger .lines {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
}

#mainMenu-trigger .lines::before,
#mainMenu-trigger .lines::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    left: 0;
    transition: all 0.3s ease;
}

#mainMenu-trigger .lines::before {
    top: -7px;
}

#mainMenu-trigger .lines::after {
    top: 7px;
}

#mainMenu-trigger:hover .lines,
#mainMenu-trigger:hover .lines::before,
#mainMenu-trigger:hover .lines::after {
    background: var(--accent-cyan);
}

/* Search hidden by default */
#search {
    display: none;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
#footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    position: relative;
}

#footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.5;
}

.footer-content {
    padding: 80px 0 60px;
}

.footer-content .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content .row {
    display: grid;
    grid-template-columns: 1.5fr 2.5fr;
    gap: 60px;
}

.footer-content .col-lg-4 {
    grid-column: 1;
}

.footer-content .col-lg-8 {
    grid-column: 2;
}

.footer-content .col-lg-8 .row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Widget Styles */
.widget {
    margin-bottom: 0;
}

.widget-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-cyan);
}

.widget p {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.widget .list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget .list li {
    margin-bottom: 12px;
}

.widget .list li a {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: #e2e8f0 !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 4px 0;
}

.widget .list li a::before {
    content: '';
    width: 6px;
    height: 1px;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

.widget .list li a:hover {
    color: #00d4ff !important;
    transform: translateX(4px);
}

.widget .list li a:hover::before {
    width: 12px;
    background: #00d4ff;
}

/* Footer Button */
.widget .btn,
.widget .btn-inverted {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    background: transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.widget .btn:hover,
.widget .btn-inverted:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    box-shadow: var(--glow-cyan);
}

/* Social Icons in Footer */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.2);
}

/* Copyright Bar */
.copyright-content {
    background: #0d1321 !important;
    padding: 20px 0;
    border-top: 1px solid var(--border-subtle);
}

.copyright-content .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.copyright-text {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: #b8c5d6;
    text-align: center;
}

.copyright-text a {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright-text a:hover {
    color: #ffffff;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1024px) {
    #mainMenu-trigger {
        display: block;
    }

    #mainMenu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        overflow-y: auto;
        padding: 20px;
    }

    #mainMenu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    #mainMenu nav > ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    #mainMenu nav > ul > li > a {
        padding: 16px 20px;
        font-size: 1rem;
    }

    #mainMenu nav > ul > li > a::after {
        display: none;
    }

    #mainMenu .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 0;
        margin: 8px 0 8px 20px;
        padding: 0;
        display: none;
    }

    #mainMenu nav > ul > li.dropdown.open .dropdown-menu {
        display: block;
    }

    .header-extras {
        display: none;
    }

    .footer-content .row {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content .col-lg-4,
    .footer-content .col-lg-8 {
        grid-column: 1;
    }

    .footer-content .col-lg-8 .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #header .container {
        height: 70px;
        padding: 0 16px;
    }

    #logo a {
        font-size: 1.2rem;
    }

    #mainMenu {
        top: 70px;
    }

    .footer-content {
        padding: 60px 0 40px;
    }

    .footer-content .col-lg-8 .row {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .widget-title {
        font-size: 0.8rem;
        margin-bottom: 16px;
    }
}

/* ============================================
   GLOBAL BODY STYLES
   ============================================ */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
}

/* Ensure content doesn't hide behind fixed header */
.body-inner {
    padding-top: 80px;
}

@media (max-width: 768px) {
    .body-inner {
        padding-top: 70px;
    }
}

/* Scroll to top button */
#scrollTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

#scrollTop.visible {
    opacity: 1;
    visibility: visible;
}

#scrollTop:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-3px);
}

#scrollTop i {
    font-size: 10px;
    line-height: 1;
}
