/* Verbessertes About-Modal */
body.modal-open,
html.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    position: fixed !important;
    height: 100% !important;
    overscroll-behavior: none !important;
    top: 0 !important;
    left: 0 !important;
}

body:not(.modal-open),
html:not(.modal-open) {
    overflow: auto !important;
    position: static !important;
    height: auto !important;
    width: auto !important;
}

/* Vollständige Abdeckung des Viewports */
#modal-overlay {
    display: none;
    position: fixed;
    z-index: 9998;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

#modal-overlay.visible {
    display: block;
    opacity: 0.85; /* Etwas transparenter */
    transition: opacity 0.3s ease;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999; /* Erhöhter z-index */
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.0); /* Etwas transparenter */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.modal.visible {
    display: block;
    opacity: 1;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 0;
    width: 90%;
    max-width: 1100px;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative; /* Stellt sicher, dass absolute Positionierung relativ zu diesem Element ist */
}

.modal.visible .modal-content {
    opacity: 1;
}

.close {
    position: fixed !important;
    right: 25px !important;
    top: 25px !important;
    color: #fff !important;
    font-size: 28px !important;
    font-weight: bold !important;
    z-index: 10000 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    width: 35px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.close:hover {
    color: #fff !important;
    background-color: rgba(52, 152, 219, 0.8) !important;
    transform: rotate(90deg) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.about-grid {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.about-image {
    position: relative;
    width: 280px;
    flex-shrink: 0;
    padding: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    background: linear-gradient(135deg, #1a2a3a, #0d1520);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-image {
    width: 100%;
    max-width: 220px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.profile-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.expertise-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge:hover {
    transform: translateY(-2px);
    background: rgba(52, 152, 219, 0.4);
    border-color: rgba(52, 152, 219, 0.6);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.about-text {
    padding: 40px;
    flex-grow: 1;
    overflow-y: auto;
    background-color: #fff;
    padding-right: 50px; /* Mehr Padding rechts */
    margin-right: 0; /* Kein Margin rechts */
}

.about-text h2 {
    font-size: 24px;
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.about-text h3 {
    font-size: 14px;
    font-weight: 500;
    color: #3498db;
    margin: 0 0 20px 0;
}

.about-intro {
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    margin-bottom: 15px;
    border-left: 2px solid #3498db;
    padding-left: 10px;
    background-color: rgba(52, 152, 219, 0.03);
    padding: 8px 10px;
    border-radius: 0 3px 3px 0;
}

.about-section {
    margin-bottom: 16px;
}

.about-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    position: relative;
    padding-bottom: 6px;
}

.about-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 2px;
    background: linear-gradient(to right, #3498db, #2ecc71);
}

.about-section h4 i {
    margin-right: 8px;
    color: #3498db;
}

.about-section p {
    margin: 0 0 8px 0;
    line-height: 1.5;
    color: #555;
    font-size: 13px;
}

.skills-list {
    margin-bottom: 15px;
}

.skills-list p {
    margin: 0 0 5px 0;
    font-size: 12px;
    line-height: 1.4;
}

.skills-list p strong {
    color: #2c3e50;
    display: inline-block;
    min-width: 110px;
}

.skills-container {
    margin: 10px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.skill-category {
    margin-bottom: 5px;
}

.skill-title {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: linear-gradient(to right, #3498db, #2ecc71);
    border-radius: 4px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button i {
    margin-right: 8px;
}

.cta-button.primary {
    background-color: #3498db;
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.cta-button.secondary {
    background-color: #ecf0f1;
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.cta-button.primary:hover {
    background-color: #2980b9;
    box-shadow: 0 7px 20px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.cta-button.secondary:hover {
    background-color: #dfe6e9;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Desktop-spezifische Anpassungen */
@media (min-width: 993px) {
    .about-image {
        width: 280px;
        padding: 30px 25px;
    }
    
    .profile-image {
        max-width: 200px;
        margin-bottom: 25px;
    }
    
    .about-text {
        padding: 30px 35px;
    }
    
    .expertise-badges {
        gap: 6px;
    }
    
    .badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .skills-container {
        gap: 10px;
        margin-bottom: 5px;
    }
    
    .skill-category {
        margin-bottom: 4px;
    }
    
    .skill-title {
        font-size: 12px;
        margin-bottom: 3px;
    }
    
    .skill-bar {
        height: 6px;
    }
}

/* Optimierter Scrollbar im Modal */
.about-text::-webkit-scrollbar {
    width: 8px;
}

.about-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.about-text::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.about-text::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Responsive Design für das About-Modal */
@media (max-width: 992px) {
    .modal-content {
        width: 90%;
        margin: 5vh auto;
    }
    
    .about-grid {
        flex-direction: column;
    }
    
    .about-image {
        width: 100%;
        padding: 25px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .profile-image {
        max-width: 120px;
        margin-bottom: 0;
        margin-right: 20px;
    }
    
    .expertise-badges {
        margin-top: 0;
        text-align: right;
        flex: 1;
    }
    
    .about-text {
        padding: 25px;
        max-height: 60vh;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 3vh auto;
    }
    
    .about-image {
        flex-direction: column;
        padding: 20px;
    }
    
    .profile-image {
        max-width: 100px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .about-text h2 {
        font-size: 22px;
    }
    
    .about-intro {
        font-size: 12px;
        padding: 10px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .skills-container {
        gap: 10px;
    }
    
    .expertise-badges {
        gap: 5px;
    }
    
    .badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}
