/**
 * Milas Marketing - About Me & Projects Sections CSS
 * Styles für die neuen "Über mich" und "Projekte" Sektionen
 * VERBESSERTE VERSION - Optimierte Bildpositionierung für David Langner
 * Last updated: Juli 2025
 */

/* ===== ÜBER MICH SECTION ===== */
.about-me {
    background-color: var(--light-gray);
    position: relative;
}

.about-me-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
    margin-top: 50px;
}

.about-me-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.about-me-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.4);
}

.about-me-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.5), transparent);
    padding: 30px 25px 25px;
    transform: translateY(100%);
    transition: all 0.4s ease;
}

.about-me-image:hover .image-overlay {
    transform: translateY(0);
}

.overlay-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.overlay-content p {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.4;
}

.about-me-text {
    padding: 20px 0;
}

.about-me-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--medium);
}

.about-me-text p:last-child {
    margin-bottom: 0;
}

.about-me-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.about-me-text ul {
    list-style: none;
    padding-left: 0;
    margin: 25px 0;
}

.about-me-text li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--medium);
}

.about-me-text li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
}

/* ===== PROJEKTE SECTION ===== */
.projects {
    background-color: var(--dark);
    position: relative;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.project-card {
    background-color: var(--light-gray);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.project-image {
    position: relative;
    height: 320px; /* Erhöht von 280px für bessere Darstellung */
    overflow: hidden;
}

/* HAUPTVERBESSERUNG: Optimierte Bildpositionierung */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%; /* GEÄNDERT: Zeigt mehr vom Körper, nicht nur den Kopf */
    transition: all 0.4s ease;
}

/* Spezifische Anpassung für Portrait-Bilder wie David Langner */
.project-image img[src*="david_langner"],
.project-image img[alt*="David Langner"] {
    object-position: center 20%; /* Noch bessere Positionierung für Portraits */
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-category,
.project-status {
    background-color: rgba(18, 18, 18, 0.8);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.project-status {
    background-color: rgba(244, 235, 198, 0.9);
    color: #333333;
}

.project-content {
    padding: 30px 25px;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 15px;
    font-weight: 700;
}

.project-description,
.project-impact,
.project-mission {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    color: var(--medium);
}

.project-impact {
    color: var(--primary-color);
    font-weight: 500;
}

.project-mission {
    font-style: italic;
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
    margin-left: 10px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tag {
    background-color: rgba(244, 235, 198, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(244, 235, 198, 0.2);
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: rgba(244, 235, 198, 0.2);
    transform: translateY(-2px);
}

/* Coming Soon Projekt */
.project-card.coming-soon {
    border: 2px dashed rgba(244, 235, 198, 0.3);
    background-color: rgba(30, 30, 30, 0.5);
}

.coming-soon-placeholder {
    height: 320px; /* Angepasst an neue Höhe */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-align: center;
}

.coming-soon-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

.coming-soon-placeholder p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.4;
}

.project-cta {
    margin-top: 20px;
    text-align: center;
}

.project-cta .btn {
    padding: 12px 25px;
    font-size: 0.95rem;
}

/* Projekte CTA */
.projects-cta {
    text-align: center;
    margin-top: 60px;
    padding: 50px 30px;
    background-color: var(--light-gray);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.projects-cta h3 {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 15px;
}

.projects-cta p {
    font-size: 1.1rem;
    color: var(--medium);
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .about-me-content {
        gap: 40px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 30px;
    }
    
    .project-image {
        height: 300px; /* Angepasst für mittelgroße Bildschirme */
    }
    
    .coming-soon-placeholder {
        height: 300px;
    }
}

@media (max-width: 992px) {
    .about-me-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .about-me-image {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .project-image {
        height: 280px;
    }
    
    .coming-soon-placeholder {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .about-me-text p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 20px;
    }
    
    .about-me-text ul {
        margin: 20px 0;
    }
    
    .about-me-text li {
        font-size: 1rem;
        padding-left: 20px;
        margin-bottom: 10px;
    }
    
    .about-me-text li::before {
        font-size: 1.1rem;
    }
    
    .project-image {
        height: 240px; /* Etwas höher für bessere mobile Darstellung */
    }
    
    .coming-soon-placeholder {
        height: 240px;
    }
    
    /* Mobile: Bessere Positionierung für Portrait-Bilder */
    .project-image img {
        object-position: center 30%; /* Auf mobilen Geräten etwas mehr Körper zeigen */
    }
    
    .project-image img[src*="david_langner"],
    .project-image img[alt*="David Langner"] {
        object-position: center 25%; /* Spezielle Anpassung für David Langner auf Mobile */
    }
    
    .project-content {
        padding: 25px 20px;
    }
    
    .project-content h3 {
        font-size: 1.3rem;
    }
    
    .project-description,
    .project-impact,
    .project-mission {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    .projects-cta {
        padding: 40px 20px;
        margin-top: 40px;
    }
    
    .projects-cta h3 {
        font-size: 1.5rem;
    }
    
    .projects-cta p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .about-me-image {
        max-width: 100%;
    }
    
    .overlay-content {
        padding: 20px 15px 15px;
    }
    
    .overlay-content h3 {
        font-size: 1.3rem;
    }
    
    .overlay-content p {
        font-size: 0.9rem;
    }
    
    .project-image {
        height: 220px;
    }
    
    .coming-soon-placeholder {
        height: 220px;
    }
    
    .project-content {
        padding: 20px 15px;
    }
    
    .project-overlay {
        bottom: 10px;
        right: 10px;
    }
    
    .project-category,
    .project-status {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .project-tags {
        gap: 6px;
        margin-top: 15px;
    }
    
    .tag {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .projects-cta {
        padding: 30px 15px;
    }
    
    .projects-cta h3 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .coming-soon-placeholder i {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .coming-soon-placeholder p {
        font-size: 1rem;
    }
}

/* Touch-optimierte Interaktionen */
@media (hover: none) {
    .about-me-image:hover {
        transform: none;
    }
    
    .about-me-image:active {
        transform: scale(0.98);
    }
    
    .project-card:hover {
        transform: none;
    }
    
    .project-card:active {
        transform: scale(0.98);
    }
    
    .image-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.3), transparent);
    }
    
    .tag:hover {
        background-color: rgba(244, 235, 198, 0.1);
        transform: none;
    }
    
    .tag:active {
        background-color: rgba(244, 235, 198, 0.2);
        transform: scale(0.95);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .about-me-image,
    .project-card,
    .projects-cta {
        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
    }
}

/* Landscape-Modus für Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .about-me-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .about-me-image {
        max-width: 300px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .coming-soon-placeholder {
        height: 180px;
    }
    
    .projects-cta {
        padding: 30px 20px;
    }
}

/* Zusätzliche Animationen */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.6s ease-out;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.4s;
}

/* Verbesserungen für Accessibility */
.about-me-image img,
.project-image img {
    transition: transform 0.3s ease;
}

.about-me-image:focus-within,
.project-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Optimierte Performance für mobile Geräte */
.project-image img,
.about-me-image img {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.project-card,
.about-me-image {
    will-change: transform, box-shadow;
}

/* NEUE ADDITION: Fallback für verschiedene Bildformate */
.project-image img {
    /* Optimierung für verschiedene Seitenverhältnisse */
    min-height: 100%;
    min-width: 100%;
}