/**
 * Red Rabbit Club - Formular-Stile
 * 
 * Verbesserte Styling für Formulare mit Animationen und responsivem Design
 */

/* Allgemeine Formular-Stile */
.form {
    background-color: var(--secondary);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to right, var(--primary), #ff8080);
    z-index: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #fff;
}

.form-group label .required {
    color: var(--primary);
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.2);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* Verbesserte Datei-Upload-Gestaltung */
.file-upload-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-upload-button {
    background-color: var(--dark);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.file-upload-button:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.file-upload-button i {
    font-size: 18px;
}

.file-name {
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    color: #999;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Checkbox und Radio Button Styling */
.checkbox-container {
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.2);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 8px;
    top: 4px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Form Fehler- und Erfolgsmeldungen */
.input-error, .file-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    animation: shake 0.5s;
}

.file-success {
    color: #2ecc71;
    font-size: 14px;
    margin-top: 5px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.form-response {
    margin-top: 20px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    position: relative;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

/* Abschnitt-Styling */
.application-section {
    background-color: var(--dark);
    padding: 80px 0;
}

.application-form-container {
    max-width: 900px;
    margin: 40px auto 0;
}

.application-form-container h3 {
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
    color: var(--primary);
}

.job-info, .initiative-info {
    background-color: var(--secondary);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.job-info::after, .initiative-info::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(230, 0, 0, 0.1) 50%);
    z-index: 1;
}

.job-info h2, .initiative-info h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
}

.initiative-info h2 span {
    color: var(--primary);
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.job-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.job-meta span i {
    color: var(--primary);
}

.job-description, .initiative-info p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

/* Animationen für Formularelemente */
.animate-form {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Additional styling for specific elements */
.submit-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background-color: #cc0000;
    box-shadow: 0 5px 15px rgba(230, 0, 0, 0.3);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(230, 0, 0, 0.2);
}

.submit-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Glow effect animation */
.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: inherit;
    background: linear-gradient(45deg, var(--primary), transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-effect:hover::after {
    opacity: 0.6;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.6;
    }
}

/* Team Gallery Styling */
.team-section {
    background-color: var(--secondary);
    padding: 80px 0;
}

.team-gallery {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-top: 40px;
}

@media (min-width: 576px) {
    .team-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .team-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img,
.gallery-item.animated img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px 20px 15px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-caption,
.gallery-item.animated .gallery-caption {
    transform: translateY(0);
}

/* Responsive Anpassungen */
@media (max-width: 576px) {
    .form {
        padding: 20px;
    }
    
    .job-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
        margin-bottom: 10px;
    }
}