/* =========================================
   FRANCHISE PAGE UI FIXES
   ========================================= */

/* 1. Benefits Section - Darken Background & Premium Icons */
section[aria-labelledby="benefits-title"] {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

section[aria-labelledby="benefits-title"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 196, 0, 0.05), transparent 70%);
    pointer-events: none;
}

section[aria-labelledby="benefits-title"] .card {
    background: rgba(255, 255, 255, 0.03);
    /* Glass dark */
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
    padding: 2rem;
    border-radius: 12px;
}

section[aria-labelledby="benefits-title"] .card:hover {
    transform: translateY(-5px);
    border-color: var(--primary, #ffc400);
}

section[aria-labelledby="benefits-title"] .card-icon svg {
    stroke: var(--primary, #ffc400);
    filter: drop-shadow(0 0 5px rgba(255, 196, 0, 0.4));
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

section[aria-labelledby="benefits-title"] .card-title {
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

section[aria-labelledby="benefits-title"] .card-text {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 2. Process Section - Timeline Design */
.process-section {
    position: relative;
    padding: 2rem 0;
}

.process-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.process-number {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: var(--dark, #111);
    border: 2px solid var(--primary, #ffc400);
    color: var(--primary, #ffc400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.process-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    flex: 1;
    border-left: 4px solid var(--primary, #ffc400);
}

.process-content h4 {
    color: var(--dark, #111);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.process-content p {
    color: #555;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Desktop Timeline */
@media (min-width: 768px) {
    .process-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        margin-top: 3rem;
    }

    /* Horizontal Line */
    .process-container::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 25px;
        /* Center of 50px circle */
        height: 2px;
        background: rgba(255, 196, 0, 0.3);
        z-index: 0;
    }

    .process-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .process-content {
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 1rem 0 0 0;
        color: #fff;
    }

    .process-content h4 {
        color: #fff;
    }

    .process-content p {
        color: #ccc;
    }
}

/* 3. Requirements Section - Fix Contrast */
section[aria-labelledby="requirements-title"] {
    background: #0f0f0f;
    color: #fff;
    padding: 6rem 0;
}

section[aria-labelledby="requirements-title"] .card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
}

section[aria-labelledby="requirements-title"] .card-title {
    color: var(--primary, #ffc400);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    font-size: 1.5rem;
}

section[aria-labelledby="requirements-title"] ul.list {
    padding: 0;
    margin: 0;
}

section[aria-labelledby="requirements-title"] li {
    margin-bottom: 1.5rem;
    list-style: none;
}

section[aria-labelledby="requirements-title"] strong {
    color: #fff;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

section[aria-labelledby="requirements-title"] span {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 4. Career Section - Layout Fixes */
#career {
    padding: 6rem 0;
    background: #f4f4f4;
}

#career h2 {
    color: #111;
    text-align: center;
    margin-bottom: 1rem;
}

#career .section-lead {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    color: #666;
}

#career .grid.cols-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

#career .card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    height: 100%;
}

#career .card:hover {
    transform: translateY(-5px);
}

#career .card-title {
    color: #111;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

#career .card-text {
    color: #555;
    line-height: 1.6;
}

/* Image styling */
#career .section-media {
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

#career .section-media img {
    display: block;
    width: 100%;
    height: auto;
}

/* 5. Franchise Form - Glassmorphism & Dark Theme matches Contact */
section.form-section {
    background: #111;
    /* Fallback if variable missing */
    background: var(--dark-bg, #111);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

/* Golden Glow Background similar to Contact */
section.form-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 196, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

#franchiseForm {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 196, 0, 0.15);
    padding: 3rem;
    border-radius: 16px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

#franchiseForm .field {
    margin-bottom: 1.5rem;
}

#franchiseForm label {
    display: block;
    color: #fff;
    /* Explicit white */
    margin-bottom: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

#franchiseForm input,
#franchiseForm select,
#franchiseForm textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

#franchiseForm input:focus,
#franchiseForm select:focus,
#franchiseForm textarea:focus {
    outline: none;
    border-color: var(--primary, #ffc400);
    box-shadow: 0 0 0 4px rgba(255, 196, 0, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

/* Placeholder Color */
#franchiseForm ::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Select Options for Readability */
#franchiseForm select option {
    background: #1a1a1a;
    color: #fff;
    padding: 10px;
}

#franchiseForm button[type="submit"] {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 1rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Explicit visibility fix for Desktop */
@media (min-width: 768px) {

    section.form-section,
    .form-container,
    #franchiseForm {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* =========================================
   TEXT CONTRAST FIXES FOR HEADINGS
   ========================================= */

/* 1. "Ihre Vorteile als Partner" - Benefits section heading */
section[aria-labelledby="benefits-title"] h2#benefits-title {
    color: var(--white, #fff) !important;
    text-align: center;
    margin-bottom: 3rem;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
}

/* 2. "Ihr Weg zur Partnerschaft" - Process section heading */
section[aria-labelledby="benefits-title"] .process-section h3.section-title {
    color: var(--white, #fff) !important;
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
}

/* 3. "Anforderungen" - Requirements section heading */
section[aria-labelledby="requirements-title"] h2#requirements-title {
    color: var(--white, #fff) !important;
    text-align: center;
    margin-bottom: 3rem;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
}

/* 4. "Franchise-Anfrage senden" - Form section heading and subtitle */
section.form-section h2#form-title {
    color: var(--white, #fff) !important;
    text-align: center;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
}

/* Target the subtitle paragraph that immediately follows the h2 */
section.form-section .container>h2#form-title~p {
    color: var(--gray-light, #ccc) !important;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* 5. Privacy notice - light text on dark background */
/* The privacy notice is the paragraph after the form */
section.form-section .container>form~p {
    color: var(--gray-light, #ccc) !important;
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}