/*
Theme Name: FairKEP
Theme URI: https://fairkep.de
Author: FairKEP
Author URI: https://fairkep.de
Description: Custom Theme für das FairKEP-Portal – Unternehmensdaten im KEP-Markt
Version: 1.0.0
License: Proprietary
Text Domain: fairkep
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.2
*/

/* ==========================================================================
   Inter Font – DSGVO-konform lokal gehostet
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    src: url('./assets/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./assets/fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./assets/fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./assets/fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* ==========================================================================
   1. Design Tokens / CSS Custom Properties
   ========================================================================== */

:root {
    /* Farben – Primär */
    --primary-dark: #0d2137;
    --primary-blue: #1a365d;

    /* Farben – Akzent */
    --accent-lime: #9ACD32;
    --accent-lime-dark: #7CB518;
    --accent-gold: #D4A02B;

    /* Farben – Text */
    --text-light: #ffffff;
    --text-dark: #1a365d;
    --text-muted: #64748b;

    /* Farben – Hintergründe */
    --bg-light: #f8fafc;
    --bg-cream: #faf9f6;

    /* Farben – Rahmen */
    --border-light: #e2e8f0;

    /* Schatten */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

    /* Radien */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Übergänge */
    --transition: all 0.3s ease;
}


/* ==========================================================================
   2. Reset & Basis
   Frontend: voller Reset. Elementor-Editor: Reset nur in Widget-Containern.
   ========================================================================== */

:where(body:not(.elementor-editor-active)) *,
:where(body:not(.elementor-editor-active)) *::before,
:where(body:not(.elementor-editor-active)) *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:where(body.elementor-editor-active .elementor-widget-container) *,
:where(body.elementor-editor-active .elementor-widget-container) *::before,
:where(body.elementor-editor-active .elementor-widget-container) *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    font-size: 1.0625rem;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* WordPress Admin-Bar: Navbar nach unten verschieben */
.admin-bar .navbar {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .navbar {
        top: 46px;
    }
}


/* ==========================================================================
   2b. Elementor Container neutralisieren
   Elementor-Wrapper sollen transparent sein – unser Widget-CSS steuert Layout.
   ========================================================================== */

.elementor-page .e-con {
    --container-max-width: 1280px;
    --container-default-padding-top: 0;
    --container-default-padding-right: 0;
    --container-default-padding-bottom: 0;
    --container-default-padding-left: 0;
    --padding-top: 0;
    --padding-right: 0;
    --padding-bottom: 0;
    --padding-left: 0;
    --padding-block-start: 0;
    --padding-block-end: 0;
    --padding-inline-start: 0;
    --padding-inline-end: 0;
    --gap: 0;
    --widgets-spacing: 0;
    --widgets-spacing-row: 0;
    --widgets-spacing-column: 0;
}

.elementor-page .e-con-boxed > .e-con-inner {
    max-width: 100%;
}

.elementor-page .elementor-widget:not(:last-child) {
    margin-bottom: 0;
}


/* ==========================================================================
   3. Navigation (identisch auf allen Seiten)
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--primary-dark);
    padding: 0 2rem;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-light);
}

.logo-text span {
    color: var(--accent-lime);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.9;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-lime);
    transition: var(--transition);
}

.nav-links a:hover {
    opacity: 1;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--accent-lime);
    color: var(--primary-dark) !important;
    padding: 0.6rem 1.25rem !important;
    border-radius: var(--radius-sm);
    font-weight: 600 !important;
    opacity: 1 !important;
}

.nav-cta:hover {
    background: var(--accent-lime-dark);
}

.nav-cta::after {
    display: none !important;
}

/* Dropdown-Submenü */
.nav-links .has-dropdown {
    position: relative;
}

.nav-links .has-dropdown > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 6px;
    margin-bottom: 2px;
    opacity: 0.7;
    transition: transform 0.2s ease;
    position: static !important;
    background: none !important;
}

.nav-links .has-dropdown:hover > a::after {
    transform: rotate(-135deg);
    width: 6px;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    min-width: 220px;
    list-style: none;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}

.nav-links .has-dropdown:hover > .nav-dropdown {
    display: block;
}

.nav-dropdown li {
    margin: 0;
}

.nav-dropdown a {
    display: block;
    padding: 0.6rem 1.25rem !important;
    font-size: 0.9rem !important;
    white-space: nowrap;
    opacity: 0.8 !important;
}

.nav-dropdown a:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.05);
}

.nav-dropdown a::after {
    display: none !important;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition);
}


/* ==========================================================================
   4. Hero – Basis (Unterseiten: zugang-*, bestaetigung-*, stammdaten, etc.)
   ========================================================================== */

.hero {
    background: #0d2137;
    background-image:
        radial-gradient(ellipse 80% 50% at 70% 40%, rgba(26, 54, 93, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 30% 80%, rgba(14, 35, 60, 0.4) 0%, transparent 40%);
    min-height: 75vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(154, 205, 50, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-content {
    z-index: 1;
    min-width: 0;
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero-description {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.hero-icon-large {
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-icon-large svg {
    width: 100%;
    height: 100%;
}


/* ==========================================================================
   5. Content Sections (Unterseiten)
   ========================================================================== */

.content-section {
    padding: 3rem 2rem;
    background: var(--bg-cream);
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
}

.content-section h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.7;
}

.content-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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


/* ==========================================================================
   6. Formulare (zugang-* Seiten)
   ========================================================================== */

.form-section {
    padding: 3rem 2rem;
    background: white;
    border-top: 1px solid var(--border-light);
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
}

.form-section h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

.form-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--bg-light);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-lime);
    background: white;
    box-shadow: 0 0 0 4px rgba(154, 205, 50, 0.15);
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-grid label {
    font-weight: 500;
    color: var(--text-dark);
}

.form-grid input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-light);
}

.form-grid input:focus {
    outline: none;
    border-color: var(--accent-lime);
    box-shadow: 0 0 0 3px rgba(154, 205, 50, 0.15);
}


/* ==========================================================================
   7. Checkboxen & Absenden (zugang-* Seiten)
   ========================================================================== */

.checkbox-section {
    padding: 2rem;
    background: var(--bg-cream);
    border-radius: 12px;
    margin: 2rem 0;
}

.checkbox-section h2,
.checkbox-section h3 {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.checkbox-container {
    max-width: 900px;
    margin: 0 auto;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.checkbox-item input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--accent-lime);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-item span {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.checkbox-item a {
    color: var(--accent-lime-dark);
    text-decoration: underline;
}

.submit-section {
    padding: 2rem;
    background: white;
    text-align: center;
}

.submit-container {
    max-width: 900px;
    margin: 0 auto;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: var(--accent-lime);
    border: none;
    border-radius: 8px;
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-submit:hover {
    background: var(--accent-lime-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(154, 205, 50, 0.3);
}

.btn-submit svg {
    width: 18px;
    height: 18px;
}


/* ==========================================================================
   8. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent-lime);
    color: var(--primary-dark);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
}

.btn-primary:hover {
    background: var(--accent-lime-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(154, 205, 50, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-lime);
    color: var(--accent-lime);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-dark);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.back-link:hover {
    background: var(--primary-dark);
    color: white;
}

.additional-hint {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}


/* ==========================================================================
   9. Bestätigungs-Seiten (bestaetigung-*)
   ========================================================================== */

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(154, 205, 50, 0.15);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.success-icon svg {
    width: 30px;
    height: 30px;
    color: var(--accent-lime);
}


/* ==========================================================================
   10. "Weitere Lösungen" Section (Lösungsseiten)
   ========================================================================== */

.solutions-section#loesung {
    padding: 5rem 2rem;
    background: white;
}

.solutions-section#loesung .section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.solutions-section#loesung .section-header h2 {
    color: var(--primary-dark);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.solutions-section#loesung .section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.solutions-section#loesung .solutions-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.solutions-section#loesung .solution-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.solutions-section#loesung .solution-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.solutions-section#loesung .solution-card::before {
    display: none;
}

.solutions-section#loesung .solution-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.solutions-section#loesung .solution-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.solutions-section#loesung .solution-card-link:hover .solution-card {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}


/* ==========================================================================
   11. Footer (identisch auf allen Seiten)
   ========================================================================== */

.footer {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-column h4 {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-lime);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal li {
    list-style: none;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--accent-lime);
}


/* ==========================================================================
   12. Responsive Design – Gemeinsame Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-illustration {
        display: none;
    }

    .solutions-section#loesung .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-dropdown {
        position: static;
        transform: none;
        border: none;
        box-shadow: none;
        padding: 0.25rem 0 0 0;
        min-width: auto;
        display: none;
    }

    .nav-links .has-dropdown:hover > .nav-dropdown {
        display: none;
    }

    .nav-links .has-dropdown.open > .nav-dropdown {
        display: block;
    }

    .nav-dropdown a {
        padding: 0.4rem 0 0.4rem 1rem !important;
        font-size: 0.85rem !important;
        opacity: 0.6 !important;
    }

    .nav-dropdown a:hover {
        opacity: 1 !important;
        background: none;
    }

    .nav-links .has-dropdown > a::after {
        transition: transform 0.2s ease;
    }

    .nav-links .has-dropdown.open > a::after {
        transform: rotate(-135deg);
    }

    .solutions-section#loesung .solutions-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 0.75rem;
    }
}
