/* ============================================================
   SHARED STYLES – energieberatungmoehl.de
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* === CSS VARIABLEN === */
:root {
    --primary: #004655;
    --primary-dark: #003340;
    --accent: #FBBA00; /* Original Logofarbe */
    --accent-hover: #FFD233; /* Etwas leuchtenderes Gelb für Hover = "Energie" */
    --bg: #f2f5f7;
    --white: #ffffff;
    --text: #2c2c2c;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.13);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --header-height: 80px;
    --ease: 0.25s ease;
}

/* === RESET & BASE === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #002d3a;
    background-image: url('blueprint.svg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text);
    line-height: 1.65;
    padding-top: var(--header-height);
    -webkit-font-smoothing: antialiased;
}

/* === HEADER === */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    border-bottom: 3px solid var(--accent);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
}

.logo-img {
    max-height: 55px;
    width: auto;
    display: block;
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.87rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    position: relative;
    padding-bottom: 3px;
    transition: color var(--ease);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform var(--ease);
}

nav a:hover {
    color: var(--primary-dark);
}

nav a:hover::after,
nav a.active::after {
    transform: scaleX(1);
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    transition: background var(--ease);
}

.hamburger:hover {
    background: var(--bg);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 3px solid var(--accent);
    padding: 16px 5% 24px;
    z-index: 999;
    box-shadow: var(--shadow-md);
    flex-direction: column;
    gap: 4px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

/* === LAYOUT === */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 0;
}

section {
    margin-bottom: 70px;
    scroll-margin-top: 110px;
}

/* === TRUST BAR === */
.trust-bar {
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid var(--border);
    padding: 16px 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--accent);
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 900;
    color: var(--primary);
    flex-shrink: 0;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 34px;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--ease);
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 0 16px rgba(251, 186, 0, 0.5), 0 0 32px rgba(251, 186, 0, 0.25);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(251, 186, 0, 0.7), 0 0 48px rgba(251, 186, 0, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.65);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-dark {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-dark:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* === SECTION LABELS === */
.section-label {
    display: inline-block;
    font-size: 0.77rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--primary);
    background: var(--accent);
    box-shadow: 0 0 12px rgba(251, 186, 0, 0.4);
    padding: 4px 13px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.section-title {
    color: var(--primary);
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 40px;
}

/* === SERVICE BOXES === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 26px;
}

.service-box {
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-top: 5px solid var(--primary);
    display: flex;
    flex-direction: column;
    transition: transform var(--ease), box-shadow var(--ease);
}

.service-box:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.service-box.highlight {
    border-top-color: var(--accent);
}

.service-box h3 {
    color: var(--primary);
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.badge {
    display: inline-block;
    background: var(--accent);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    margin-bottom: 10px;
}

.box-link {
    margin-top: auto;
    padding-top: 20px;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.93rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    border-bottom: 2px solid transparent;
    transition: border-color var(--ease), gap var(--ease);
}

.box-link:hover {
    border-bottom-color: var(--accent);
    gap: 10px;
}

/* === LISTS === */
ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

ul li {
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    font-size: 0.96rem;
    color: #444;
    line-height: 1.5;
}

ul li:last-child {
    border-bottom: none;
}

.check {
    color: var(--accent);
    font-weight: 900;
    font-size: 1.1rem;
    min-width: 26px;
    flex-shrink: 0;
    margin-right: 9px;
    padding-top: 1px;
    text-shadow: 0 0 10px rgba(251, 186, 0, 0.7), 0 0 18px rgba(251, 186, 0, 0.4);
}

/* === CREDENTIALS / EXPERT === */
.credentials {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.credentials-inner {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 48px 50px;
}

.portrait-img {
    width: 200px;
    height: 260px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 0 0 30px rgba(251, 186, 0, 0.25), var(--shadow-lg);
    flex-shrink: 0;
    transform: scaleX(-1);
}

.credentials-text {
    flex: 1;
}

.credentials-text h3 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 6px;
    line-height: 1.1;
}

.credentials-text .expert-title {
    font-size: 0.97rem;
    color: var(--text-muted);
    margin-bottom: 22px;
    line-height: 1.7;
}

.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 24px;
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 7px 15px;
    border-radius: 50px;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--primary);
}

.dena-logo {
    max-width: 200px;
    height: auto;
    opacity: 0.9;
    transition: opacity var(--ease);
    display: block;
}

.dena-logo:hover {
    opacity: 1;
}

/* === CONTACT SECTION === */
.contact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 60px 44px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.contact h2 {
    color: var(--white);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
}

.contact>p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    margin-bottom: 34px;
    position: relative;
}

.contact-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    position: relative;
}

/* === CONTACT FORM (Formspree) === */
.contact-form {
    margin: 0 auto;
    max-width: 560px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 34px;
    position: relative;
}

.contact-form .form-intro {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 14px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.09);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.97rem;
    transition: border-color var(--ease), background var(--ease);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.14);
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

/* Browser-Autofill Farbe überschreiben (verhindert blaue/gelbe Chrome-Färbung) */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(0, 70, 85, 0.85) inset;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #ffffff;
}

.form-submit {
    width: 100%;
    margin-top: 6px;
}

.form-success {
    background: rgba(251, 186, 0, 0.15);
    border: 1px solid rgba(251, 186, 0, 0.5);
    border-radius: var(--radius-sm);
    padding: 16px;
    color: var(--accent);
    font-weight: 700;
    text-align: center;
    display: none;
    margin-top: 14px;
}

/* === FLOATING CALL BUTTON (Mobile Only) === */
.floating-call {
    display: none;
    position: fixed;
    bottom: 26px;
    right: 22px;
    z-index: 1001;
    background: var(--accent);
    color: var(--primary);
    width: 62px;
    height: 62px;
    border-radius: 50%;
    font-size: 1.5rem;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(251, 186, 0, 0.6), 0 0 40px rgba(251, 186, 0, 0.3);
    text-decoration: none;
    transition: transform var(--ease), box-shadow var(--ease);
    animation: pulse-call-neon 2.5s infinite;
}

.floating-call:hover {
    transform: scale(1.1);
    box-shadow: 0 0 28px rgba(251, 186, 0, 0.7), 0 0 55px rgba(251, 186, 0, 0.4);
}

@keyframes pulse-call-neon {
    0%, 100% {
        box-shadow: 0 0 20px rgba(251, 186, 0, 0.6), 0 0 0 0 rgba(251, 186, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 186, 0, 0.6), 0 0 0 16px rgba(251, 186, 0, 0);
    }
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 36px 20px;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.38);
    background: transparent;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin-top: 0;
}

footer p {
    margin-bottom: 6px;
}

footer a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    margin: 0 10px;
    font-weight: 600;
    transition: color var(--ease);
}

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

/* === CONTENT BLOCKS (Subpages) === */
.content-block {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-md);
    margin-bottom: 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.content-block h2 {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
    margin-bottom: 18px;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anim {
    opacity: 0;
}

.anim.visible {
    animation: fadeInUp 0.55s ease forwards;
}

.anim.d1 {
    animation-delay: 0.08s;
}

.anim.d2 {
    animation-delay: 0.18s;
}

.anim.d3 {
    animation-delay: 0.30s;
}

/* === RESPONSIVE === */
@media (max-width: 850px) {
    :root {
        --header-height: 70px;
    }

    body {
        padding-top: var(--header-height);
    }

    nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .container {
        padding: 28px 0;
    }

    section {
        margin-bottom: 50px;
    }

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

    .credentials-inner {
        flex-direction: column;
        padding: 28px 22px;
        gap: 22px;
        text-align: center;
    }

    .portrait-img {
        width: 140px;
        height: auto;
    }

    .cert-badges {
        justify-content: center;
    }

    .contact {
        padding: 40px 22px;
    }

    .contact h2 {
        font-size: 1.6rem;
    }

    .trust-bar {
        gap: 14px;
    }

    .trust-item {
        font-size: 0.82rem;
    }

    .btn {
        padding: 14px 26px;
        font-size: 0.95rem;
    }

    .floating-call {
        display: flex;
    }
}