/* =================================================================
   SHARED SUBPAGE STYLES
   Gemeinsame Styles für alle Unterseiten
   ================================================================= */

html,
body {
    overflow-x: hidden;
}

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

/* Breadcrumb Navigation */
.breadcrumb {
    margin: 0 1rem;
}

.breadcrumb a {
    color: #daab36;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: white;
}

/* Adjustierte Header für Unterseiten */
header nav {
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

/* Requirements Section */
.requirements {
    padding: 5rem 0;
    background: #f8fafc;
}

.requirements h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #173c4b;
}

.section-intro {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.requirement-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.requirement-card:hover {
    transform: translateY(-5px);
    border-color: #daab36;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.requirement-card.checked {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #daab36;
}

.requirement-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #daab36, #c4982e);
    border-radius: 50%;
}

.requirement-icon img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.requirement-card h3 {
    color: #173c4b;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.requirement-check strong {
    color: #173c4b;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.requirement-check p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.check-button {
    background: #daab36;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.check-button:hover {
    background: #c4982e;
    transform: scale(1.05);
}

.check-button.checked {
    background: #10b981;
}

.check-button.checked::before {
    content: "✓ ";
}

/* Requirements Result */
.requirements-result {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    margin-top: 2rem;
    border: 2px solid #daab36;
}

.result-content h3 {
    color: #173c4b;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    min-width: 140px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #daab36;
    display: block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: white;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Calculator Section */
.calculator-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #173c4b 0%, #1a4455 100%);
    color: white;
    overflow-x: hidden;
}

.calculator-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.calculator-section > .container > p {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.calculator-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-button {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-button:hover {
    border-color: #daab36;
    color: #daab36;
}

.tab-button.active {
    background: #daab36;
    border-color: #daab36;
    color: white;
}

.calculator-content {
    display: none;
}

.calculator-content.active {
    display: block;
}

.calc-form {
    background: rgba(255,255,255,0.1);
    padding: 3rem;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    overflow-x: hidden;
}

.input-group {
    margin-bottom: 2rem;
    position: relative;
}

.input-wrapper {
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: white;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: white;
    backdrop-filter: blur(5px);
}

/* Number inputs bekommen Platz für € Zeichen */
.input-wrapper input[type="number"] {
    padding-right: 2.5rem;
}

.input-group input::placeholder {
    color: rgba(255,255,255,0.6);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #daab36;
    box-shadow: 0 0 0 3px rgba(218, 171, 54, 0.2);
}

/* PROFESSIONELLE € ZEICHEN POSITIONIERUNG */
.input-wrapper .input-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #b8914a;
    font-weight: 500;
    pointer-events: none;
    font-size: 14px;
    line-height: 1;
    z-index: 10;
    user-select: none;
}

/* Fokus-Effekt für € Zeichen */
.input-wrapper input:focus ~ .input-unit {
    color: #daab36;
}

/* Dropdown Styling */
.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* Dropdown-Optionen stylen */
.input-group select option {
    background: #173c4b;
    color: white;
    padding: 0.5rem;
}

/* Browser-spezifische Fixes */
.calc-form select,
.calculator-section select {
    background-color: rgba(23, 60, 75, 0.9) !important;
}

.calc-form select option,
.calculator-section select option {
    background-color: #173c4b !important;
    color: white !important;
}

.input-group small {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}

.calculate-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.calc-result {
    background: rgba(255,255,255,0.15);
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    border-left: 4px solid #daab36;
    backdrop-filter: blur(10px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* RESPONSIVE CALCULATOR GRIDS - FIX FÜR MOBILE */
.calc-result div[style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
}

/* Advantages Section */
.advantages {
    padding: 5rem 0;
    background: white;
}

.advantages h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #173c4b;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.advantage-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.advantage-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.advantage-icon img {
    height: 72px;
}

.advantage-card h3 {
    color: #173c4b;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.advantage-card p {
    color: #666;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background: #f8fafc;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #173c4b;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.faq-question h3 {
    color: #173c4b;
    font-size: 1.2rem;
    margin: 0;
}

.faq-arrow {
    color: #daab36;
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-arrow {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem 2rem;
    max-height: 300px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #173c4b 0%, #1a4455 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-benefits {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.cta-benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.benefit-icon {
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .cta-button,
.cta-buttons .secondary-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Contact Form Enhancements */
.contact-form select {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    background: white;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
}

.form-checkbox label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.specialist-note {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
}

.specialist-note h4 {
    color: #daab36;
    margin-bottom: 1rem;
}

.specialist-note p {
    margin-bottom: 1rem;
}

.specialist-note ul {
    list-style: none;
    padding: 0;
}

.specialist-note li {
    padding: 0.25rem 0;
    font-size: 0.95rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .breadcrumb {
        margin: 0;
    }
    
    .nav-links {
        margin: 0;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .calculator-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-button {
        width: 200px;
        text-align: center;
    }
    
    .calc-form {
        padding: 2rem 1rem;
        margin: 0 1rem;
    }
    
    /* MOBILE CALCULATOR RESPONSIVE FIXES */
    .calc-result {
        padding: 1.5rem 1rem;
        margin: 1rem 0;
        font-size: 1rem;
    }
    
    /* Force single column layout on mobile for all calculator grids */
    .calc-result div[style*="grid-template-columns: repeat(auto-fit"],
    .calc-result div[style*="grid-template-columns: repeat(2"],
    .calc-result div[style*="display: grid"] {
        display: block !important;
        grid-template-columns: none !important;
    }
    
    .calc-result div[style*="text-align: center"] > div {
        margin-bottom: 1rem !important;
        padding: 0.75rem !important;
    }
    
    .requirements-grid {
        grid-template-columns: 1fr;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-benefits {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-benefit {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .benefit-icon {
        width: 28px;
        height: 28px;
    }
    
    .benefit-icon img {
        width: 20px;
        height: 20px;
    }
    
    .input-wrapper .input-unit {
        right: 8px;
        font-size: 12px;
    }

    .input-wrapper input[type="number"] {
        padding-right: 2rem;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1rem;
    }
}

/* MOBILE SPECIFIC CALCULATOR OVERRIDES */
@media (max-width: 480px) {
    .calc-form {
        padding: 1.5rem 0.75rem;
        margin: 0 0.5rem;
    }
    
    .calc-result {
        padding: 1rem 0.75rem;
        font-size: 0.95rem;
    }
    
    /* Ensure no horizontal overflow on very small screens */
    .calc-result * {
        max-width: 100% !important;
        word-wrap: break-word !important;
    }
    
    /* Stack all calculator content vertically on very small screens */
    .calc-result div[style*="display: flex"] {
        display: block !important;
        flex-direction: column !important;
    }
    
    .calc-result div[style*="justify-content: space-between"] > span,
    .calc-result div[style*="justify-content: space-between"] > div {
        display: block !important;
        margin-bottom: 0.5rem !important;
        text-align: left !important;
    }
}

/* FINALE LÖSUNG: Hochspezifische Selektoren für alle Calculator */
.calculator-section .input-unit,
.calc-form .input-unit,
#budget-calculator .input-unit,
#kfw-calculator .input-unit,
#costs-calculator .input-unit,
#partnership-calculator .input-unit,
#legal-calculator .input-unit,
#exit-calculator .input-unit,
.input-wrapper .input-unit {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #b8914a !important;
    font-weight: 500 !important;
    pointer-events: none !important;
    font-size: 14px !important;
    line-height: 1 !important;
    z-index: 10 !important;
    user-select: none !important;
    width: auto !important;
    height: auto !important;
    display: inline !important;
}

/* Alle Number-Inputs einheitlich */
.calculator-section input[type="number"],
.calc-form input[type="number"],
#budget-calculator input[type="number"],
#kfw-calculator input[type="number"],
#costs-calculator input[type="number"],
#partnership-calculator input[type="number"],
.input-wrapper input[type="number"] {
    padding-right: 2.5rem !important;
}

/* Mobile Anpassung */
@media (max-width: 768px) {
    .calculator-section .input-unit,
    .calc-form .input-unit,
    .input-wrapper .input-unit {
        right: 8px !important;
        font-size: 12px !important;
    }
    
    .calculator-section input[type="number"],
    .calc-form input[type="number"],
    .input-wrapper input[type="number"] {
        padding-right: 2rem !important;
    }
}