:root {
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}


@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleInCenter {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-360deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}


.animate-slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
    opacity: 0;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease forwards;
    opacity: 0;
}

.animate-slide-in-up {
    animation: slideInUp 0.8s ease forwards;
    opacity: 0;
}

.animate-scale-in-center {
    animation: scaleInCenter 0.8s ease forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease forwards;
    opacity: 0;
}


.delay-500 {
    animation-delay: 500ms;
}
.delay-600 {
    animation-delay: 600ms;
}
.delay-700 {
    animation-delay: 700ms;
}

.main-container {
    padding: 3rem 0;
    position: relative;
    max-width: var(--max-width);
    margin: 3rem auto 0;
}


.outer-title-box,
.text-container-title-box,
.image-container-title-box {
    margin-bottom: 3rem;
    font-size: var(--title-font-size);
    color: var(--black-color);
    font-weight: 700;
    position: relative;
}
.text-container-title-box {
    width: 100%;
    text-align: left;
}
.outer-title-box {
    width: fit-content;
    margin: 0 auto 3rem;
}
.underline::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 4px;
    background-color: var(--first-color);
    border-radius: 2px;
}

.image-container-title-box {
    position: absolute;
    bottom: 0;
    left: 5%;
    color: var(--black-color);
}


.layout-row,
.layout-column {
    display: flex;
    flex-wrap: wrap;
    gap: 2%;
    align-items: stretch;
    height: auto;
}
.layout-column {
    flex-direction: column;
    gap: 20px;
}
.layout-grid-2,
.layout-grid-3 {
    display: grid;
    gap: 2rem;
    position: relative;
    z-index: 1;
}
.layout-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.layout-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.image-container {
    position: relative;
    flex: 0 0 49%;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.image-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.image-container img {
    width: 100%;
    height: 100%;
    display: block;
    transition: var(--transition);
}

.image-container:hover img {
    transform: scale(1.05);
}


.text-container {
    flex: 0 0 49%;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.text-container p {
    color: var(--dark-color);
    font-size: var(--content-font-size);
    line-height: var(--line-height);
    margin-bottom: 1.5rem;
}

.text-container p:last-child {
    margin-bottom: 0;
}


@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem 1rem;
    }

    
    .image-container.animate-slide-in-left {
        animation-name: slideInUp;
    }

    .text-container.animate-slide-in-right {
        animation-name: slideInUp;
        animation-delay: 0.2s;
    }

    .layout-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .image-container,
    .text-container {
        min-width: 100%;
    }

    .text-container {
        padding: 1.25rem;
    }
    .outer-title-box,
    .text-container-title-box,
    .image-container-title-box {
        font-size: var(--mobile-title-font-size);
    }
    .image-container-title-box {
        top: 0;
    }
    .layout-grid-2,
    .layout-grid-3 {
        grid-template-columns: 1fr;
    }
}