/*
Theme Name: Karsten Hiermann Theme
Theme URI: https://example.com
Author: Antigravity
Author URI: https://example.com
Description: Ein professionelles, sachliches One-Page-Theme für Karsten Hiermann.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: karsten-hiermann
*/

/* --- Variables & Reset --- */
:root {
    /* Colors - Serious & Trustworthy */
    --color-primary: #0f3460;
    /* Deep Blue - Stability, Guidance */
    --color-secondary: #536dfe;
    /* Lighter Blue - Emphasis (Sparingly used) */
    --color-text: #333333;
    /* Dark Gray - Text */
    --color-text-light: #666666;
    /* Medium Gray - Subtext */
    --color-bg: #ffffff;
    /* White - Cleanliness */
    --color-bg-alt: #f4f6f8;
    /* Very Light Blue/Gray - Section distinction */
    --color-border: #e0e0e0;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --line-height-base: 1.6;
    --line-height-heading: 1.2;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: var(--line-height-base);
    font-size: 18px;
    /* Slightly larger for readability */
    overflow-x: hidden;
    width: 100%;
    -webkit-text-size-adjust: 100%;
    /* Prevents font size changes in landscape on iOS */
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    box-sizing: border-box;
    /* Ensure padding doesn't add to width */
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    /* Minimal transition */
}

a:hover {
    text-decoration: underline;
}

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

/* --- Typography --- */

/* =====================================================
   Überschriften mit Icon-Bullet (gezielt & barrierefrei)
   ===================================================== */

/* Grundgröße des Icons (Desktop) */
:root {
    --icon-bullet-size: 16px;
}

/* Nur Überschriften mit dieser Klasse */
.ueberschrift.icon-bullet {
    display: flex;
    align-items: center;
    gap: 0.5em;
    /* ca. 1 Zeichen Abstand */
    line-height: 1.3;
}

/* Dekoratives Icon */
.ueberschrift.icon-bullet::before {
    content: "";
    width: var(--icon-bullet-size);
    height: var(--icon-bullet-size);
    flex-shrink: 0;
    background-image: url("https://hiermann.de/wordpress/wp-content/uploads/2026/01/favicon-16x16-1.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Kleinere Bildschirme → kleineres Icon */
@media (max-width: 600px) {
    :root {
        --icon-bullet-size: 12px;
    }
}


h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-primary);
    line-height: var(--line-height-heading);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-xs);
}

h2::after {
    /* Subtle underline for headlines to add structure */
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
    margin-top: var(--spacing-xs);
}

p {
    margin-bottom: var(--spacing-sm);
    max-width: 800px;
}

ul,
ol,
.wp-block-list {
    margin-bottom: var(--spacing-sm);
    padding-left: 2.5rem;
    max-width: 800px;
    list-style-position: outside;
}

ul,
.wp-block-list {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: 0.5rem;
}

/* Redundant reset and explicit padding for nested lists to ensure they indent cumulatively */
ul ul,
ul ol,
ol ul,
ol ol,
.wp-block-list .wp-block-list {
    margin-bottom: 0;
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

section {
    padding: var(--spacing-xl) 0;
}

section:nth-child(even) {
    background-color: var(--color-bg-alt);
}

/* --- Header / Navigation --- */
header.site-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 2000;
    /* High enough to be above content */
}

/* Ensure smooth scrolling and account for sticky header height */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Adjust according to header height */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Allow logo and menu to wrap on very small screens */
    gap: 10px;
}

.site-branding {
    flex: 1;
    /* Branding takes available space */
    min-width: 0;
}

.site-branding .site-logo {
    max-height: 80px;
    /* Limit height to keep header compact */
    width: auto;
    /* Maintain aspect ratio */
    display: block;
}

/* --- Navigation (Always Hamburger) --- */

/* Toggle Button */
.menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 2101;
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin-left: auto !important;
    /* Force right alignment */
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: var(--color-primary);
    position: absolute;
    left: 0;
    display: block;
    content: "";
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    top: -8px;
}

.hamburger-inner::after {
    top: 8px;
}

/* Active State (X) */
.menu-toggle.is-active .hamburger-inner {
    background-color: transparent !important;
}

.menu-toggle.is-active .hamburger-inner::before {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-active .hamburger-inner::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Navigation Dropdown (Compact) */
.main-navigation {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    width: auto !important;
    min-width: 250px;
    height: auto !important;
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
    display: block !important;
    padding: var(--spacing-sm);
    z-index: 2100 !important;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    max-height: calc(100vh - 100px);
    /* Abzüglich Header-Höhe */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.main-navigation.is-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-navigation li {
    margin: 0;
    border-bottom: 1px solid var(--color-border);
}

.main-navigation li:last-child {
    border-bottom: none;
}

.main-navigation a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.main-navigation a:hover {
    background-color: var(--color-bg-alt);
    text-decoration: none;
}

/* --- Untermenü-Styling (Mobile & Desktop kompatibel) --- */
.main-navigation ul ul.sub-menu {
    border-bottom: none;
    margin: 0;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.02);
    /* Dezente Abhebung des Bereichs */
}

.main-navigation .sub-menu li {
    border-bottom: 1px solid var(--color-border);
}

.main-navigation .sub-menu li:last-child {
    border-bottom: none;
}

.main-navigation .sub-menu a {
    padding-left: 36px;
    /* Deutlich eingerückt gegenüber Hauptlinks (16px) */
    font-weight: 400;
    /* Etwas leichter als Hauptpunkte (600) */
    font-size: 0.95rem;
    /* Etwas kleiner für besseren Kontrast */
}

/* Optischer Indikator vor Unterpunkten */
.main-navigation .sub-menu a::before {
    content: "↳";
    margin-right: 8px;
    color: var(--color-text-light);
    opacity: 0.7;
}

/* Ensure header content stays aligned */
.header-content {
    position: relative;
    z-index: 1002;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Prevent body scroll when menu open */
body.menu-open {
    overflow: hidden !important;
}

/* --- Content Sections --- */
.hero {
    background-color: var(--color-primary);
    color: #fff;
    padding: 8rem 0;
    /* More vertical space */
    text-align: left;
}

.hero h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.hero .subline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
    max-width: 900px;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.8;
    max-width: 700px;
}

/* --- Content Sections --- */

/* Challenge */
.challenge-text {
    font-size: 1.25rem;
    color: var(--color-text-light);
}

/* Approach */
.approach-list li {
    font-weight: 600;
    color: var(--color-primary);
    list-style-type: none;
    /* Custom bullets or clean list */
    position: relative;
    padding-left: 1.5rem;
}

.approach-list li::before {
    content: "✓";
    /* Simple checkmark, standard font */
    position: absolute;
    left: 0;
    color: var(--color-secondary);
}

/* Impact */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.impact-item {
    background: #fff;
    padding: var(--spacing-md);
    border-left: 4px solid var(--color-secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.impact-item strong {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
    color: var(--color-primary);
}

/* Fields & Audience */
.fields-list,
.audience-text {
    font-size: 1.1rem;
}

/* --- Contact Section --- */
.contact {
    text-align: left;
}

.contact h2::after {
    margin-left: 0;
    margin-right: auto;
}

.contact-info {
    margin-top: var(--spacing-md);
    font-size: 1.25rem;
    font-weight: 600;
}

.contact-form-placeholder {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    max-width: 600px;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.contact-form-placeholder label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.contact-form-placeholder input,
.contact-form-placeholder textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    font-family: inherit;
}

.contact-form-placeholder button {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    cursor: pointer;
}

.contact-form-placeholder button:hover {
    background-color: var(--color-secondary);
}

/* --- Footer --- */
.site-footer {
    padding: var(--spacing-md) 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}



@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero .subline {
        font-size: 1.25rem;
    }

    .header-content {
        /* Support wrapping while maintaining right-alignment for the burger */
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
}