/* 
 * Layout Optimization Styles
 * For Jan Gessenhardt's Online Presentation
 * Fixes image-text alignment and layout issues
 */

/* General layout improvements */
.container {
    max-width: 1200px;
    padding: 0 20px;
    margin: 0 auto;
}

/* Fix image-text alignment */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
    padding-right: 20px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Expertise section alignment fixes */
.expertise-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin: 50px 0;
}

.expertise-image {
    flex: 1;
    max-width: 45%;
}

.expertise-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.expertise-text {
    flex: 1;
    max-width: 55%;
}

.expertise-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
}

.expertise-icon {
    min-width: 50px;
    height: 50px;
    background-color: #f0f4f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a5f;
    font-size: 20px;
}

.expertise-content-text {
    flex: 1;
}

/* Approach section alignment fixes */
.approach-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 50px 0;
}

.approach-text {
    flex: 1;
}

.approach-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.approach-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Timeline alignment fixes */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #c9a959;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-left {
    left: 0;
}

.timeline-right {
    left: 50%;
}

.timeline-content {
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.timeline-year {
    display: inline-block;
    padding: 5px 15px;
    background-color: #c9a959;
    color: #fff;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Challenge cards alignment */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.challenge-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.challenge-icon {
    width: 60px;
    height: 60px;
    background-color: #f0f4f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c9a959;
    font-size: 24px;
    margin-bottom: 20px;
}

/* Contact section alignment */
.contact-content {
    display: flex;
    gap: 40px;
    margin: 50px 0;
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 2;
}

/* Responsive fixes */
@media (max-width: 992px) {
    .hero-content, 
    .expertise-content, 
    .approach-content, 
    .contact-content {
        flex-direction: column;
    }
    
    .hero-text, 
    .hero-image, 
    .expertise-image, 
    .expertise-text, 
    .approach-text, 
    .approach-image, 
    .contact-info, 
    .contact-form {
        max-width: 100%;
        width: 100%;
    }
    
    .hero-image, 
    .expertise-image {
        order: -1;
        margin-bottom: 30px;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-right {
        left: 0;
    }
}

@media (max-width: 576px) {
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
}

/* Fix for image and text alignment */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Ensure images maintain aspect ratio */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix for footer alignment */
.footer {
    padding: 50px 0;
    background-color: #1e3a5f;
    color: #fff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-column {
    min-width: 150px;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* Performance optimizations */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}
