/* Textfeld Styling - Inspiriert vom Container 6 Design */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    background-color: #fff9f9;
    color: #b71c1c;
    padding: clamp(8px, 1.5vw, 16px);
    border-radius: 6px;
    border: 1px solid #ffcdd2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.5;
    margin-bottom: 15px;
    position: relative;
    transform-origin: center center;
    will-change: transform, box-shadow;
}

/* Hover-Effekt ähnlich wie bei Container 6 */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
textarea:hover,
select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(183, 28, 28, 0.1);
    border-color: #ef5350;
}

/* Fokus-Zustand */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #c62828;
    box-shadow: 0 0 0 3px rgba(239, 83, 80, 0.2);
    transform: translateY(-2px);
}

/* Beschriftungen für Formularfelder */
label {
    color: #c62828;
    margin-bottom: 8px;
    display: block;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Pflichtfeld-Markierung mit Stern */
label.required::after {
    content: "*";
    color: #e53935;
    margin-left: 4px;
}

/* E-Mail-Links im Kontaktbereich */
.modal-content a[href^="mailto"] {
    color: #c62828;
    text-decoration: none;
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 2px 0;
}

.modal-content a[href^="mailto"]::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #ef5350;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.modal-content a[href^="mailto"]:hover {
    color: #e53935;
}

.modal-content a[href^="mailto"]:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Checkbox speziell stylen */
input[type="checkbox"] {
    margin-right: 10px;
    vertical-align: middle;
}

input[type="checkbox"]+label {
    display: inline;
    vertical-align: middle;
    color: #b71c1c;
    font-weight: normal;
}

/* Absenden-Button im Kontaktformular */
.modal-btn,
#sendContactForm {
    background-color: #e53935;
    color: white;
    border: none;
    padding: clamp(8px, 1.5vw, 12px) clamp(15px, 2vw, 25px);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: clamp(0.9rem, 1vw, 1.1rem);
}

.modal-btn:hover,
#sendContactForm:hover {
    background-color: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Pflichtfeldhinweis */
.required-hint {
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    color: #c62828;
    margin-top: 5px;
    font-style: italic;
}

/* Responsive Anpassungen */
/* Kleine Bildschirme (Tablets, Mobilgeräte) */
@media (max-width: 768px) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select,
    label {
        font-size: 0.95rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        padding: 10px;
        margin-bottom: 12px;
    }

    .modal-btn,
    #sendContactForm {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Mittlere Bildschirme (Laptops, Desktops) */
@media (min-width: 1200px) and (max-width: 1599px) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select,
    label {
        font-size: 1rem;
    }

    .modal-btn,
    #sendContactForm {
        padding: 10px 20px;
    }
}

/* Größere Bildschirme (größere Desktops) */
@media (min-width: 1600px) and (max-width: 1919px) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        padding: 12px 15px;
        font-size: 1.05rem;
        margin-bottom: 18px;
    }

    label {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }

    .modal-btn,
    #sendContactForm {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Sehr große Bildschirme (4K und größer) */
@media (min-width: 1920px) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        padding: 15px 20px;
        font-size: 1.1rem;
        margin-bottom: 20px;
        border-radius: 8px;
    }

    label {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .modal-btn,
    #sendContactForm {
        padding: 15px 30px;
        font-size: 1.1rem;
        border-radius: 6px;
    }

    .required-hint {
        font-size: 0.9rem;
    }
}

/* Spezifische Anpassungen für Fehlermeldungen */
.error-message {
    color: #e53935;
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 15px;
    display: none;
}

/* Animation für Fehlermeldungen */
.error-shake {
    animation: error-shake 0.6s cubic-bezier(.36, .07, .19, .97) both;
    transform: translate3d(0, 0, 0);
}

@keyframes error-shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-3px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(3px, 0, 0);
    }
}

/* Styling für Formularfeld-Gruppen */
.form-group {
    margin-bottom: 20px;
}

/* Eingabefeld-Validierungsstile */
input:invalid,
textarea:invalid {
    border-color: #e53935;
}

/* Eingabefeld-Validierungsanzeige erst nach Benutzer-Interaktion */
input:placeholder-shown:invalid,
textarea:placeholder-shown:invalid {
    border-color: #ffcdd2;
}

/* Zusätzliche Media Query für kritische Breakpoints (etwa 695px) */
@media (max-width: 800px) {

    /* Verbesserte Container-Anpassung im Modal */
    .modal-content {
        padding: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Formular-Elemente immer auf volle Breite setzen */
    #contactForm,
    .form-group,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        width: 100% !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Padding reduzieren */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        padding: 8px !important;
        font-size: 14px !important;
    }

    /* Modal-Breite begrenzen und zentrieren */
    .modal {
        max-width: 95vw !important;
        width: 95vw !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* Zusätzliche Media Query für sehr schmale Geräte */
@media (max-width: 480px) {
    .modal-content {
        padding: 10px !important;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        padding: 6px !important;
        font-size: 13px !important;
        margin-bottom: 10px !important;
    }

    label {
        font-size: 14px !important;
        margin-bottom: 5px !important;
    }

    .modal-btn,
    #sendContactForm {
        width: 100% !important;
        padding: 10px !important;
    }
}