/* motion.css - Stile für die Motion Design Seite */

/* Hauptcontainer für Motion-Seite */
#motion {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Typewriter Container */
.content-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    border: 2px solid var(--green);
    border-radius: var(--border-radius-md);
    background-color: transparent; /* Kein Hintergrund im hellen Modus */
    transition: all var(--transition-medium);
    opacity: 0.8;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Haupttitel mit Typewriter */
.main-title {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.typing-animation {
    font-family: 'JosefinSlab-SemiBold', serif;
    font-size: 4rem; /* Größerer Typewriter-Text */
    color: var(--green);
    text-align: center;
    margin: 40px 0;
    min-height: 80px; /* Verhindert Springen beim Typewriter-Effekt */
}

/* Intro-Text Sektion */
.motion-intro {
    max-width: 900px;
    margin: 30px auto;
    text-align: center;
    opacity: 0.8;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.motion-intro h2 {
    color: var(--green);
    margin-bottom: 15px;
    font-size: 3.5rem; /* Größer */
}

.motion-intro p {
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.2rem; /* Größer */
}

/* Animations Grid */
.animations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    opacity: 0.8;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animation-box {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    position: relative;
}

.animation-box:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.animation-box:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--green);
}

.motion-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.animation-box:hover .motion-image {
    transform: scale(1.02);
}

/* Motion Showcase */
.motion-showcase {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    opacity: 0.8;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header.green h2 {
    color: var(--green);
    font-size: 3rem; /* Größer */
    margin-bottom: 20px;
}

.motion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.motion-box {
    background-color: transparent; /* Kein Hintergrund im hellen Modus */
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border-top: 3px solid var(--green);
    transition: all var(--transition-medium);
}

.motion-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.motion-box h4 {
    color: var(--green);
    margin-bottom: 20px;
    text-align: center;
    font-size: 2rem; /* Größer */
}

/* Transition Demo */
.transition-demo, .timing-demo, .principles-demo, .micro-demo {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
    margin-top: 20px;
}

.transition-element, .timing, .demo-element {
    width: 120px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
    color: white;
    background-color: var(--green);
    font-size: 1.1rem; /* Größer */
    font-weight: 500;
}

/* Transition Animations */
.fade {
    animation: fadeAnimation 2s infinite alternate;
}

.slide {
    animation: slideAnimation 2s infinite alternate;
}

.scale {
    animation: scaleAnimation 2s infinite alternate;
}

/* Timing Animations */
.ease {
    animation: moveRight 2s ease infinite alternate;
}

.linear {
    animation: moveRight 2s linear infinite alternate;
}

.bounce {
    animation: moveRight 2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite alternate;
}

/* Principles Demo */
.principle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.principle-item span {
    font-size: 1.1rem; /* Größer */
    color: var(--text-primary);
}

.anticipation {
    width: 40px;
    height: 40px;
    background-color: var(--green);
    border-radius: 50%;
    animation: anticipationAnim 2s infinite;
}

.follow-through {
    width: 40px;
    height: 40px;
    background-color: var(--green);
    border-radius: 50%;
    animation: followThroughAnim 2s infinite;
}

/* Microinteractions */
.micro-button {
    padding: 12px 24px;
    background-color: var(--green);
    border: none;
    border-radius: var(--border-radius-md);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem; /* Größer */
    font-weight: 500;
}

.micro-button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(95, 114, 86, 0.3);
}

.micro-toggle {
    position: relative;
    width: 70px;
    height: 35px;
    margin-top: 20px;
}

.micro-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.micro-toggle label {
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 35px;
    background-color: #ccc;
    border-radius: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.micro-toggle label:after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background-color: white;
    transition: all 0.3s ease;
}

.micro-toggle input:checked + label {
    background-color: var(--green);
}

.micro-toggle input:checked + label:after {
    left: 39px;
}

/* Animation Keyframes */
@keyframes fadeAnimation {
    0% { opacity: 1; }
    100% { opacity: 0.3; }
}

@keyframes slideAnimation {
    0% { transform: translateX(0); }
    100% { transform: translateX(50px); }
}

@keyframes scaleAnimation {
    0% { transform: scale(1); }
    100% { transform: scale(0.8); }
}

@keyframes moveRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(100px); }
}

@keyframes anticipationAnim {
    0% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(50px); }
    100% { transform: translateX(0); }
}

@keyframes followThroughAnim {
    0% { transform: translateX(0); }
    50% { transform: translateX(50px); }
    65% { transform: translateX(60px); }
    80% { transform: translateX(45px); }
    90% { transform: translateX(52px); }
    100% { transform: translateX(50px); }
}

/* Besucherzähler-Stil */
.visitor-counter {
    background-color: var(--green);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: default;
    font-size: 14px;
    transition: all var(--transition-medium);
}

[data-theme="dark"] .visitor-counter {
    background-color: var(--lowred);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.visitor-counter:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

#count {
    font-weight: bold;
    margin-left: 4px;
}

/* Dark Mode Anpassungen */
[data-theme="dark"] .content-wrapper {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .motion-box {
    background-color: var(--bg-secondary);
}

/* Scroll-Animationen */
.content-wrapper.visible,
.motion-intro.visible,
.animations-grid.visible,
.motion-showcase.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .animations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .motion-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .typing-animation {
        font-size: 3.5rem; /* Angepasst für kleinere Bildschirme */
    }
    
    .motion-intro h2 {
        font-size: 3rem;
    }
    
    .section-header.green h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .typing-animation {
        font-size: 3rem; /* Angepasst für kleinere Bildschirme */
    }
    
    .motion-intro h2 {
        font-size: 2.5rem;
    }
    
    .motion-box h4 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .animations-grid {
        grid-template-columns: 1fr;
    }
    
    .typing-animation {
        font-size: 2.5rem; /* Angepasst für sehr kleine Bildschirme */
    }
    
    .motion-intro h2 {
        font-size: 2.2rem;
    }
    
    .section-header.green h2 {
        font-size: 2rem;
    }
    
    .motion-box h4 {
        font-size: 1.6rem;
    }
    
    .transition-element, .timing, .demo-element {
        width: 100px;
        height: 40px;
        font-size: 1rem;
    }
}


/* Besucherzähler-Stil */
.visitor-counter {
    background-color: var(--bloodred);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: default;
    font-size: 14px;
    transition: all var(--transition-medium);
}

[data-theme="dark"] .visitor-counter {
    background-color: var(--green);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.visitor-counter:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

#count {
    font-weight: bold;
    margin-left: 4px;
}