/**
 * Milas Marketing - Mobile Optimization CSS
 * Additional mobile-specific styles to enhance responsiveness
 * Last updated: April 2025
 */

/* Allgemeine responsive Anpassungen */
@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
    
    /* Bessere Lesbarkeit auf Tablets */
    p {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 992px) {
    /* Navigation Optimierungen */
    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1003;
        margin-left: auto;
        width: 40px;
        height: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: rgba(18, 18, 18, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s ease-in-out;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        padding: 30px 0;
        height: calc(100vh - 80px);
        overflow-y: auto;
        z-index: 1002;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 20px 0;
    }
    
    .nav-menu li a {
        font-size: 1.2rem;
        display: inline-block;
        padding: 10px 20px;
        min-width: 200px;
        border-radius: 30px;
        transition: all 0.3s ease;
    }
    
    .nav-menu li a:active {
        background-color: rgba(244, 235, 198, 0.1);
        transform: scale(0.95);
    }
    
    .menu-toggle .bar {
        transition: all 0.3s ease;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Hero-Sektion Anpassungen */
    .hero {
        padding: 150px 0 80px;
    }
    
    .hero-content {
        width: 90%;
        max-width: 600px;
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-btns {
        flex-direction: column;
        gap: 15px;
        padding: 0 25px;
        margin: 0 auto;
        max-width: calc(100% - 50px);
    }
    
    /* Spezifische Hero-Button-Anpassungen */
    #home .hero-btns .primary-btn,
    #home .hero-btns .secondary-btn {
        width: auto;
        min-width: 150px;
        max-width: 200px;
        padding: 10px 15px;
        font-size: 0.9rem;
        display: inline-block;
        margin: 0 auto;
    }
    
    /* Shape Anpassungen */
    .shape {
        transform: scale(0.7);
    }
    
    .shape-1 {
        width: 250px;
        height: 250px;
        top: 10%;
        right: 5%;
    }
    
    .shape-2 {
        width: 150px;
        height: 150px;
        bottom: 15%;
        left: 2%;
    }
    
    .shape-3, .shape-4, .shape-5 {
        display: none;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Header Anpassungen */
    header {
        height: 70px;
    }
    
    .logo {
        max-width: 220px;
        height: 60px;
    }
    
    .logo-img {
        max-height: 50px;
    }
    
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    /* Text Anpassungen */
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    /* Services Grid anpassung */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* About Bereich */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Timeline Anpassungen */
    .approach-timeline:before {
        left: 30px;
    }
    
    .timeline-number {
        left: 30px;
        transform: none;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
    }
    
    /* Kontakt Container */
    .contact-container {
        flex-direction: column;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    /* Footer Anpassungen */
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-logo {
        text-align: center;
    }
    
    .footer-links ul {
        justify-content: center;
    }
    
    .footer-newsletter {
        text-align: center;
    }
    
    .newsletter-form {
        margin: 0 auto;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-policy-links {
        justify-content: center;
    }
    
    /* Scroll to top button */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    /* Wichtige Anpassungen für sehr kleine Bildschirme */
    h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.3rem;
        line-height: 1.4;
    }
    
    /* Bessere Abstände für die Lesbarkeit */
    .section-padding {
        padding: 50px 0;
    }
    
    .section-intro {
        margin-bottom: 40px;
    }
    
    .hero {
        padding: 130px 0 70px;
    }
    
    .hero-content {
        padding: 0 20px;
        width: 100%;
        max-width: 100%;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .hero-btns {
        padding: 0 30px;
        max-width: calc(100% - 60px);
        margin: 0 auto;
    }
    
    /* Button Anpassungen */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 150px;
        max-width: 60%;
    }
    
    /* Spezifische Hero-Button-Anpassungen */
    .hero-btns .primary-btn,
    .hero-btns .secondary-btn {
        width: auto;
        min-width: 150px;
        max-width: 60%;
        padding: 10px 20px;
        font-size: 0.9rem;
        display: inline-block;
    }
    
    /* Logo Anpassungen */
    .logo {
        max-width: 180px;
        height: 50px;
    }
    
    .logo-img {
        max-height: 40px;
    }
    
    /* Verbessertes Formular-Layout */
    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    /* Verbesserte Button-Darstellung */
    .btn {
        width: auto;
        max-width: 200px;
        min-width: 120px;
        margin: 0 auto;
        padding: 10px 20px;
    }
    
    /* Spezifische Hero-Button-Anpassungen */
    #home .hero-btns .primary-btn,
    #home .hero-btns .secondary-btn {
        width: auto;
        max-width: 200px;
        min-width: 120px;
        padding: 10px 15px;
        display: inline-block;
    }
    
    /* Service Cards Anpassungen */
    .service-card {
        padding: 30px 20px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    /* Timeline weiter optimieren */
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        padding: 20px;
    }
    
    .timeline-number {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Kontakt Anpassungen */
    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .info-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    /* Video Player Anpassungen */
    .video-controls {
        padding: 10px;
    }
    
    .time-display {
        display: none;
    }
    
    /* Newsletter Anpassung */
    .newsletter-form input {
        padding: 12px 15px;
    }
}

/* Touch Device Optimierungen */
@media (hover: none) {
    .nav-link:after {
        display: none;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
    
    .timeline-content:hover {
        transform: none;
    }
    
    .timeline-content:active {
        transform: scale(0.98);
    }
    
    .social-link:hover {
        transform: none;
    }
    
    .social-link:active {
        transform: scale(0.9);
        background-color: var(--primary-color);
        color: #333333;
    }
    
    /* Verbesserte Touch-Interaktionen für Buttons */
    .btn:active {
        transform: scale(0.95);
    }
    
    /* Verbessertes Touch-Feedback für Formulare */
    input:focus, textarea:focus {
        box-shadow: 0 0 0 3px rgba(244, 235, 198, 0.3);
    }
}

/* Fix für iOS Geräte: 100vh Problem */
@supports (-webkit-touch-callout: none) {
    .nav-menu {
        height: -webkit-fill-available;
        max-height: -webkit-fill-available;
    }
    
    .hero {
        min-height: 500px;
    }
    
    /* iOS-spezifische Anpassungen für Formulare */
    input, textarea, select, button {
        -webkit-appearance: none;
        border-radius: 5px;
    }
}

/* Orientierung: Landscape (Querformat) für Mobilgeräte */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 100px 0 50px;
    }
    
    .nav-menu {
        padding: 15px 0;
        overflow-y: scroll;
    }
    
    .nav-menu li {
        margin: 10px 0;
    }
    
    /* Bessere Layout-Anpassungen im Landscape-Modus */
    .contact-container,
    .about-content,
    .footer-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    /* Kleinere Abstände im Landscape-Modus */
    .section-padding {
        padding: 40px 0;
    }
}

/* Fix für Safari Mobile Menu */
@media not all and (min-resolution:.001dpcm) { 
    @media (max-width: 992px) {
        .nav-menu {
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
        }
    }
}

/* High DPI Screens (Retina) Optimierungen */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Schärfere Schatten für High-DPI-Displays */
    .service-card,
    .timeline-content,
    .contact-form,
    .about-services {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }
}

/* Zusätzliche Optimierungen für Touchgeräte und bessere mobile Interaktionen */
.is-mobile-device .btn,
.is-mobile-device .nav-link,
.is-mobile-device .service-card,
.is-mobile-device .social-link,
.is-mobile-device .form-group input,
.is-mobile-device .form-group textarea,
.is-mobile-device .newsletter-form input,
.is-mobile-device .newsletter-form button,
.is-mobile-device .project-card,
.is-mobile-device .about-me-image,
.is-mobile-device .tag {
    -webkit-tap-highlight-color: rgba(244, 235, 198, 0.2);
}

.is-mobile-device .form-group.focused-mobile input,
.is-mobile-device .form-group.focused-mobile textarea {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(244, 235, 198, 0.25);
}

/* Verhindert, dass der Inhalt bei geöffneter mobiler Navigation scrollbar ist */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Landscape-Modus spezifische Anpassungen */
.landscape-mode .hero-content {
    max-width: 100%;
    padding: 0 40px;
}

.landscape-mode .service-card {
    height: 100%;
    min-height: 250px;
}

/* Extra Small Devices (unter 400px) */
@media (max-width: 400px) {
    /* Anpassungen für sehr kleine Bildschirme */
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .hero-btns {
        padding: 0 40px;
        max-width: calc(100% - 80px);
        margin: 0 auto;
    }
    
    /* Extra spezifische Anpassungen für kleinste Bildschirme */
    #home .hero-btns .primary-btn,
    #home .hero-btns .secondary-btn {
        min-width: 120px;
        max-width: 180px;
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .section-subtitle {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }
    
    /* Bessere Anpassungen für kleine Elemente */
    .service-card {
        padding: 25px 15px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .service-icon i {
        font-size: 1.4rem;
    }
    
    /* Optimierte Navigationsmenü-Einträge */
    .nav-menu li a {
        min-width: 160px;
        font-size: 1.1rem;
    }
    
    /* Verbesserte Kontaktformularelemente */
    .contact-form {
        padding: 25px 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Besseres Footer-Layout */
    .footer {
        padding: 40px 0 15px;
    }
    
    .footer-policy-links {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* ===== MOBILE OPTIMIERUNGEN FÜR NEUE SEKTIONEN ===== */

/* Über mich Sektion - Mobile */
@media (max-width: 992px) {
    .about-me-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .about-me-image {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .about-me-text {
        text-align: left;
        padding: 10px 0;
    }
}

@media (max-width: 576px) {
    .about-me-image {
        max-width: 100%;
        margin: 0 auto 20px;
    }
    
    .overlay-content {
        padding: 15px;
    }
    
    .overlay-content h3 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
    
    .overlay-content p {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .about-me-text p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 18px;
    }
}

/* Projekte Sektion - Mobile */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 40px;
    }
    
    .project-card {
        max-width: 450px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: 20px 18px;
    }
    
    .project-content h3 {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }
    
    .project-description,
    .project-impact,
    .project-mission {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 10px;
    }
    
    .project-overlay {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .project-category,
    .project-status {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .project-tags {
        gap: 6px;
        margin-top: 15px;
    }
    
    .tag {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .projects-cta {
        margin-top: 35px;
        padding: 30px 20px;
    }
    
    .projects-cta h3 {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .projects-cta p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .project-image {
        height: 180px;
    }
    
    .project-content {
        padding: 18px 15px;
    }
    
    .project-content h3 {
        font-size: 1.15rem;
    }
    
    .coming-soon-placeholder {
        height: 180px;
    }
    
    .coming-soon-placeholder i {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }
    
    .coming-soon-placeholder p {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .projects-cta {
        padding: 25px 15px;
    }
    
    .projects-cta h3 {
        font-size: 1.25rem;
    }
    
    .projects-cta p {
        font-size: 0.9rem;
    }
}

/* Extra Small Devices (unter 400px) - Neue Sektionen */
@media (max-width: 400px) {
    .about-me-text p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 15px;
    }
    
    .project-image {
        height: 160px;
    }
    
    .project-content {
        padding: 15px 12px;
    }
    
    .project-content h3 {
        font-size: 1.1rem;
    }
    
    .project-description,
    .project-impact,
    .project-mission {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .project-mission {
        padding-left: 10px;
        margin-left: 5px;
    }
    
    .coming-soon-placeholder {
        height: 160px;
    }
    
    .coming-soon-placeholder i {
        font-size: 2rem;
    }
    
    .coming-soon-placeholder p {
        font-size: 0.85rem;
    }
}

/* Touch-optimierte Interaktionen für neue Sektionen */
@media (hover: none) {
    .about-me-image:active {
        transform: scale(0.98);
    }
    
    .project-card:active {
        transform: scale(0.98);
    }
    
    .tag:active {
        background-color: rgba(244, 235, 198, 0.2);
        transform: scale(0.95);
    }
    
    /* Overlay für Touch-Geräte immer sichtbar */
    .image-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.4), transparent);
    }
}

/* Performance-Optimierungen für mobile Geräte */
.is-mobile-device .about-me-image img,
.is-mobile-device .project-image img {
    will-change: auto;
    transform: none;
}

.is-mobile-device .project-card,
.is-mobile-device .about-me-image {
    will-change: auto;
    transform: none;
}

/* Landscape-Modus für neue Sektionen */
@media (max-height: 500px) and (orientation: landscape) {
    .about-me-content {
        grid-template-columns: 1fr 1.2fr;
        gap: 25px;
    }
    
    .about-me-image {
        max-width: 280px;
    }
    
    .project-image {
        height: 150px;
    }
    
    .project-content {
        padding: 15px;
    }
    
    .projects-cta {
        padding: 20px 15px;
    }
}
