/* ============================================================
   MindGain – Main Stylesheet
   Primary Black: #0A0A0A | Cyan: #00F5FF | Amber: #F0A500
   Bebas Neue (display) | DM Sans (body)
   ============================================================ */

/* ──────────────────────────────────────────────
   CSS Custom Properties
   ────────────────────────────────────────────── */
:root {
    --mg-black:       #0A0A0A;
    --mg-black-soft:  #111111;
    --mg-black-card:  #181818;
    --mg-cyan:        #00F5FF;
    --mg-cyan-dim:    rgba(0, 245, 255, 0.12);
    --mg-amber:       #F0A500;
    --mg-amber-dim:   rgba(240, 165, 0, 0.12);
    --mg-white:       #FFFFFF;
    --mg-grey-light:  #CCCCCC;
    --mg-grey-mid:    #888888;
    --mg-grey-dark:   #333333;

    --mg-font-display: 'Bebas Neue', sans-serif;
    --mg-font-body:    'DM Sans', sans-serif;

    --mg-header-height: 80px;
    --mg-container:     1200px;
    --mg-radius:        4px;
    --mg-radius-lg:     8px;

    --mg-transition:    0.25s ease;
    --mg-shadow:        0 4px 24px rgba(0, 0, 0, 0.4);
    --mg-shadow-cyan:   0 0 24px rgba(0, 245, 255, 0.2);
}

/* ──────────────────────────────────────────────
   Reset & Base
   ────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--mg-font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--mg-white);
    background-color: var(--mg-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--mg-cyan);
    text-decoration: none;
    transition: color var(--mg-transition);
}

a:hover {
    color: var(--mg-amber);
}

/* ──────────────────────────────────────────────
   Typography
   ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--mg-font-display);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.1;
    color: var(--mg-white);
}

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

p {
    margin-bottom: 1rem;
    color: var(--mg-grey-light);
}

p:last-child {
    margin-bottom: 0;
}

strong, b {
    font-weight: 600;
    color: var(--mg-white);
}

/* ──────────────────────────────────────────────
   Layout Utilities
   ────────────────────────────────────────────── */
.mg-container {
    width: 100%;
    max-width: var(--mg-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding-top: var(--mg-header-height);
}

/* WordPress Adminleiste: Header nach unten verschieben */
body.admin-bar .site-header {
    top: 32px;
}

body.admin-bar .site-main {
    padding-top: calc(var(--mg-header-height) + 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
    body.admin-bar .site-main {
        padding-top: calc(var(--mg-header-height) + 46px);
    }
}

/* Elementor Full-Width Support */
.elementor-section.elementor-section-stretched {
    left: 0 !important;
    width: 100% !important;
}

/* ──────────────────────────────────────────────
   Header
   ────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    height: var(--mg-header-height);
    background-color: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 245, 255, 0.08);
    transition: background-color var(--mg-transition), box-shadow var(--mg-transition);
}

.site-header.scrolled {
    background-color: rgba(10, 10, 10, 0.98);
    box-shadow: var(--mg-shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.site-branding:hover {
    opacity: 0.85;
}

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

.site-title {
    font-family: var(--mg-font-display);
    font-size: 1.75rem;
    letter-spacing: 0.1em;
    color: var(--mg-white);
    line-height: 1;
}

.site-title span {
    color: var(--mg-cyan);
}

/* Navigation */
.nav-primary {
    display: flex;
    align-items: center;
}

.nav-primary ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-primary ul li {
    position: relative;
}

.nav-primary ul li a {
    display: flex;
    align-items: center;
    height: var(--mg-header-height);
    padding: 0 20px;
    font-family: var(--mg-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mg-grey-light);
    text-decoration: none;
    transition: color var(--mg-transition);
    white-space: nowrap;
}

.nav-primary ul li a:hover,
.nav-primary ul li.current-menu-item > a,
.nav-primary ul li.current-page-ancestor > a {
    color: var(--mg-cyan);
}

/* CTA Button im Menü */
.nav-primary ul li.menu-item-cta > a {
    height: auto;
    padding: 10px 22px;
    background-color: var(--mg-cyan);
    color: var(--mg-black);
    font-weight: 700;
    border-radius: var(--mg-radius);
    margin-left: 8px;
    transition: background-color var(--mg-transition), transform var(--mg-transition);
}

.nav-primary ul li.menu-item-cta > a:hover {
    background-color: var(--mg-amber);
    color: var(--mg-black);
    transform: translateY(-1px);
}

/* Dropdown */
.nav-primary ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--mg-black-card);
    border: 1px solid rgba(0, 245, 255, 0.12);
    border-top: 2px solid var(--mg-cyan);
    border-radius: 0 0 var(--mg-radius) var(--mg-radius);
    box-shadow: var(--mg-shadow);
    flex-direction: column;
    gap: 0;
    z-index: 100;
}

.nav-primary ul li:hover > ul {
    display: flex;
}

.nav-primary ul li ul li a {
    height: auto;
    padding: 12px 20px;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-primary ul li ul li:last-child a {
    border-bottom: none;
}

/* Mobile Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--mg-radius);
    transition: background-color var(--mg-transition);
}

.nav-toggle:hover {
    background-color: var(--mg-cyan-dim);
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--mg-white);
    border-radius: 2px;
    transition: transform var(--mg-transition), opacity var(--mg-transition), background-color var(--mg-transition);
    transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--mg-cyan);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--mg-cyan);
}

/* ──────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────── */
.site-footer {
    background-color: var(--mg-black-soft);
    border-top: 1px solid rgba(0, 245, 255, 0.1);
    padding-top: 64px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Footer Widget Styles */
.footer-widget .widget {
    color: var(--mg-grey-light);
}

.footer-widget__title {
    font-family: var(--mg-font-display);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    color: var(--mg-cyan);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
}

.footer-widget p {
    font-size: 0.875rem;
    color: var(--mg-grey-mid);
    line-height: 1.8;
}

/* Widget: Nav Menu */
.footer-widget .widget_nav_menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget .widget_nav_menu ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-widget .widget_nav_menu ul li:last-child {
    border-bottom: none;
}

.footer-widget .widget_nav_menu ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--mg-grey-mid);
    text-decoration: none;
    transition: color var(--mg-transition), padding-left var(--mg-transition);
}

.footer-widget .widget_nav_menu ul li a::before {
    content: '›';
    color: var(--mg-cyan);
    font-size: 1rem;
    line-height: 1;
    transition: transform var(--mg-transition);
}

.footer-widget .widget_nav_menu ul li a:hover {
    color: var(--mg-white);
    padding-left: 4px;
}

/* Widget: Text */
.footer-widget .widget_text p {
    font-size: 0.875rem;
    color: var(--mg-grey-mid);
}

/* Footer Bottom Bar */
.footer-bottom {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--mg-grey-mid);
}

.footer-copyright a {
    color: var(--mg-grey-mid);
    transition: color var(--mg-transition);
}

.footer-copyright a:hover {
    color: var(--mg-cyan);
}

.footer-bottom-nav {
    display: flex;
    gap: 20px;
    list-style: none;
    flex-wrap: wrap;
}

.footer-bottom-nav li a {
    font-size: 0.8rem;
    color: var(--mg-grey-mid);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--mg-transition);
}

.footer-bottom-nav li a:hover {
    color: var(--mg-cyan);
}

/* ──────────────────────────────────────────────
   Buttons (Global)
   ────────────────────────────────────────────── */
.mg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--mg-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: var(--mg-radius);
    cursor: pointer;
    transition: all var(--mg-transition);
    white-space: nowrap;
}

.mg-btn--primary {
    background-color: var(--mg-cyan);
    color: var(--mg-black);
}

.mg-btn--primary:hover {
    background-color: #00d8e0;
    color: var(--mg-black);
    transform: translateY(-2px);
    box-shadow: var(--mg-shadow-cyan);
}

.mg-btn--secondary {
    background-color: transparent;
    color: var(--mg-cyan);
    border: 1px solid var(--mg-cyan);
}

.mg-btn--secondary:hover {
    background-color: var(--mg-cyan-dim);
    color: var(--mg-cyan);
    transform: translateY(-2px);
}

.mg-btn--amber {
    background-color: var(--mg-amber);
    color: var(--mg-black);
}

.mg-btn--amber:hover {
    background-color: #d99200;
    color: var(--mg-black);
    transform: translateY(-2px);
}

/* ──────────────────────────────────────────────
   Content Area (non-Elementor pages)
   ────────────────────────────────────────────── */
.entry-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 64px 24px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2em;
    margin-bottom: 0.6em;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5em;
    margin-bottom: 1rem;
    color: var(--mg-grey-light);
}

.entry-content li {
    margin-bottom: 0.4em;
}

.entry-content blockquote {
    border-left: 3px solid var(--mg-cyan);
    padding: 16px 24px;
    margin: 2em 0;
    background-color: var(--mg-cyan-dim);
    border-radius: 0 var(--mg-radius) var(--mg-radius) 0;
}

.entry-content blockquote p {
    color: var(--mg-white);
    font-style: italic;
    margin: 0;
}

.entry-content a {
    color: var(--mg-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content a:hover {
    color: var(--mg-amber);
}

/* ──────────────────────────────────────────────
   404 Page
   ────────────────────────────────────────────── */
.page-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 64px 24px;
}

.page-404__code {
    font-family: var(--mg-font-display);
    font-size: clamp(6rem, 20vw, 12rem);
    line-height: 1;
    color: var(--mg-cyan);
    opacity: 0.3;
    letter-spacing: 0.05em;
}

.page-404__title {
    margin-top: -1rem;
    margin-bottom: 1rem;
}

.page-404__text {
    max-width: 480px;
    margin-bottom: 2rem;
}

/* ──────────────────────────────────────────────
   Scrollbar
   ────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--mg-black);
}

::-webkit-scrollbar-thumb {
    background: var(--mg-grey-dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mg-cyan);
}

/* ──────────────────────────────────────────────
   Selection
   ────────────────────────────────────────────── */
::selection {
    background-color: var(--mg-cyan);
    color: var(--mg-black);
}

/* ──────────────────────────────────────────────
   Responsive – Tablet (max 1024px)
   ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-widgets .footer-widget:last-child {
        grid-column: 1 / -1;
    }
}

/* ──────────────────────────────────────────────
   Responsive – Mobile (max 768px)
   ────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --mg-header-height: 64px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-primary {
        display: none;
        position: fixed;
        top: var(--mg-header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(10, 10, 10, 0.99);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 32px 24px;
        overflow-y: auto;
        z-index: 99999;
    }

    .nav-primary.is-open {
        display: flex !important;
    }

    .nav-primary ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }

    .nav-primary ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-primary ul li a {
        height: auto;
        padding: 16px 0;
        font-size: 1.1rem;
        letter-spacing: 0.04em;
    }

    .nav-primary ul li.menu-item-cta > a {
        margin: 16px 0 0 0;
        padding: 14px 24px;
        text-align: center;
        justify-content: center;
    }

    .nav-primary ul li ul {
        position: static;
        display: flex;
        border: none;
        border-top: none;
        background-color: transparent;
        box-shadow: none;
        padding-left: 16px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .footer-widgets .footer-widget:last-child {
        grid-column: auto;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ──────────────────────────────────────────────
   Elementor Overrides
   ────────────────────────────────────────────── */
.elementor-widget-heading .elementor-heading-title {
    line-height: 1.1;
}

/* Elementor sections inside main */
.elementor-section,
.e-con {
    position: relative;
}
