/* ============================================================
   Sparlöwe – Custom CSS
   Ergänzt Tailwind mit spezifischen Komponenten-Styles
   ============================================================ */

:root {
    --yellow: #FFD200;
    --black: #1A1A1A;
    --white: #FFFFFF;
    --gray-light: #F4F4F5;
    --shadow-btn: 4px 4px 0px 0px rgba(0, 0, 0, 1);
    --shadow-btn-hover: 2px 2px 0px 0px rgba(0, 0, 0, 1);
    --transition: all 0.2s ease;
    --radius: 8px;
    --radius-xl: 16px;
    --ease-smooth: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Barlow Condensed', sans-serif;
}

a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--yellow);
    color: var(--black);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: var(--radius);
    border: 2px solid var(--black);
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover {
    transform: translateY(2px);
    box-shadow: var(--shadow-btn-hover);
    color: var(--black);
    text-decoration: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--black);
    color: var(--white);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: var(--radius);
    border: 2px solid var(--black);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
}
.btn-secondary:hover { background: #333; color: var(--white); text-decoration: none; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--black);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: var(--radius);
    border: 2px solid var(--black);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
}
.btn-outline:hover { background: var(--black); color: var(--white); }

/* ============================================================
   FORMS
   ============================================================ */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #D1D5DB;
    border-radius: var(--radius);
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--black);
    background: #F9FAFB;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--black);
    background: var(--white);
}
.form-input::placeholder { color: #9CA3AF; }
.form-input.error { border-color: #DC2626; background: #FFF5F5; }

select.form-input {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231A1A1A' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 6px;
}
.form-label .required { color: #DC2626; margin-left: 2px; }

.form-group { margin-bottom: 18px; }

.form-hint {
    font-size: 0.78rem;
    color: #6B7280;
    margin-top: 4px;
}

/* ============================================================
   CALCULATOR WIDGET
   ============================================================ */
.calculator-tabs {
    display: flex;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 20px;
}

.calc-tab {
    flex: 1;
    padding: 12px 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #6B7280;
    transition: var(--transition);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.calc-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--yellow);
    transform: scaleX(0);
    transition: transform 0.2s;
}
.calc-tab.active { color: var(--black); }
.calc-tab.active::after { transform: scaleX(1); }
.calc-tab:hover { color: var(--black); }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-item {
    border: 2px solid #E5E7EB;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.faq-item.open { border-color: var(--black); }

.faq-question {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    background: var(--white);
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.2s;
    color: var(--black);
}
.faq-question:hover { background: #FAFAFA; }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.faq-answer.open { max-height: 400px; }

.faq-answer-inner {
    padding: 16px 20px 20px;
    color: #4B5563;
    border-top: 1px solid #E5E7EB;
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-chevron {
    font-size: 1.3rem;
    transition: transform 0.3s;
    flex-shrink: 0;
    color: #6B7280;
}
.faq-chevron.open { transform: rotate(180deg); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--white);
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card-featured {
    background: var(--white);
    border: 2px solid var(--yellow);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.8);
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
    border: 3px dashed #D1D5DB;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #FAFAFA;
}
.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--yellow);
    background: #FFFBEB;
    transform: scale(1.01);
}

/* ============================================================
   BADGES & LABELS
   ============================================================ */
.section-badge {
    display: inline-block;
    background: var(--yellow);
    color: var(--black);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 2px solid var(--black);
    margin-bottom: 12px;
}

.savings-badge {
    display: inline-block;
    background: var(--yellow);
    color: var(--black);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 6px 14px;
    border-radius: 6px;
    border: 2px solid var(--black);
    transform: rotate(-2deg);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.8);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.status-badge.new { background: #EFF6FF; color: #1D4ED8; }
.status-badge.success { background: #F0FDF4; color: #16A34A; }
.status-badge.warning { background: #FFFBEB; color: #D97706; }

/* ============================================================
   STEPS
   ============================================================ */
.step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--black);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--black);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.8);
    flex-shrink: 0;
}

/* ============================================================
   REVIEW STARS
   ============================================================ */
.stars {
    display: flex;
    gap: 2px;
    color: var(--yellow);
    font-size: 1.1rem;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}
.alert-success { background: #F0FDF4; border: 1px solid #86EFAC; color: #166534; }
.alert-error   { background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B; }
.alert-warning { background: #FFFBEB; border: 1px solid #FCD34D; color: #92400E; }
.alert-info    { background: #EFF6FF; border: 1px solid #93C5FD; color: #1E40AF; }

/* ============================================================
   TRAINING MODULES
   ============================================================ */
.module-card {
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}
.module-card:hover { border-color: var(--yellow); box-shadow: 4px 4px 0 rgba(0,0,0,0.8); }

.module-header {
    background: var(--black);
    color: var(--white);
    padding: 16px 20px;
}

.progress-bar {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--yellow);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    background: var(--yellow);
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    right: -100px;
    top: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(0,0,0,0.04);
}

.calculator-card {
    background: var(--white);
    border: 2px solid var(--black);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 8px 8px 0px 0px rgba(0,0,0,1);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-ring {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.animate-fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Live dot animation */
.live-dot {
    width: 8px;
    height: 8px;
    background: #16A34A;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}
.live-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: #16A34A;
    animation: pulse-ring 1.5s ease-out infinite;
}

/* Subtle energy motion: focused on calculator tabs and CTA icon feedback */
@keyframes electric-breathe {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(253, 224, 71, 0));
    }
    45% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 6px rgba(253, 224, 71, 0.45));
    }
    55% {
        transform: scale(1.03);
        filter: drop-shadow(0 0 3px rgba(253, 224, 71, 0.25));
    }
}

@keyframes electric-flicker-soft {
    0%, 95%, 100% {
        opacity: 1;
    }
    96% {
        opacity: 0.78;
    }
    97.5% {
        opacity: 1;
    }
}

@keyframes gas-breathe {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 0 0 rgba(251, 146, 60, 0));
    }
    50% {
        transform: translateY(-1px) scale(1.04);
        filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.35));
    }
}

.calculator-tabs .calc-tab i.ph-lightning,
.calculator-tabs .calc-tab i.ph-fire {
    display: inline-block;
    will-change: transform, filter, opacity;
}

.calculator-tabs .calc-tab i.ph-lightning {
    animation: electric-breathe 2.6s var(--ease-smooth) infinite, electric-flicker-soft 11s steps(1, end) infinite;
    transform-origin: 50% 62%;
}

.calculator-tabs .calc-tab i.ph-fire {
    animation: gas-breathe 3.2s var(--ease-smooth) infinite;
    transform-origin: 50% 72%;
}

.btn-primary i.ph-lightning,
.btn-primary i.ph-fire,
.btn-secondary i.ph-lightning,
.btn-secondary i.ph-fire {
    transition: transform 0.22s var(--ease-smooth), filter 0.22s var(--ease-smooth);
}

.btn-primary:hover i.ph-lightning,
.btn-secondary:hover i.ph-lightning {
    transform: translateY(-1px) scale(1.08);
    filter: drop-shadow(0 0 7px rgba(253, 224, 71, 0.5));
}

.btn-primary:hover i.ph-fire,
.btn-secondary:hover i.ph-fire {
    transform: translateY(-1px) scale(1.06);
    filter: drop-shadow(0 0 7px rgba(251, 146, 60, 0.45));
}

/* ============================================================
   PARTNER DASHBOARD
   ============================================================ */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    color: #374151;
}
.sidebar-link:hover, .sidebar-link.active {
    background: var(--yellow);
    color: var(--black);
    text-decoration: none;
}

/* ============================================================
   UTILITY
   ============================================================ */
.section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--black);
}

.section-subtitle {
    font-size: 1.05rem;
    color: #4B5563;
    line-height: 1.6;
    max-width: 600px;
}

/* Scroll reveal init (set by JS) */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F1F1F1; }
::-webkit-scrollbar-thumb { background: var(--black); border-radius: 4px; }

/* Print */
@media print {
    header, footer, #cookieBanner, [title="WhatsApp Kontakt"] { display: none !important; }
}

/* Mobile */
@media (max-width: 768px) {
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
    .hero-section { padding: 40px 0 60px; }
    .calculator-card { box-shadow: 4px 4px 0px 0px rgba(0,0,0,1); }
}

@media (prefers-reduced-motion: reduce) {
    .calculator-tabs .calc-tab i.ph-lightning,
    .calculator-tabs .calc-tab i.ph-fire {
        animation: none !important;
        filter: none !important;
        transform: none !important;
    }

    .btn-primary i.ph-lightning,
    .btn-primary i.ph-fire,
    .btn-secondary i.ph-lightning,
    .btn-secondary i.ph-fire {
        transition: none !important;
        filter: none !important;
        transform: none !important;
    }
}
