/* Reset Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.about-img-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.about-img {
    display: block;
    width: 100%;
    height: 50vh;
}

.about-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    z-index: 1;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
}


/* About Row: Image on Left, Text on Right */
.about-row {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 auto;  
    padding: 3% 5%;  
    width: 80%;
}


.about-row.reverse {
    flex-direction: row-reverse; 
}


.about-image {
    flex: 1; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img {
    width: 80%;
    height: auto;
    max-height: 50vh;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}


.about-text {
    flex: 1.5;
    max-width: 60%;
    font-size: 18px;
    line-height: 1.6;
    text-align: justify;
    color: black;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .about-overlay {
        font-size: 2rem;
        padding: 5%;
    }

    .about-row,
    .about-row.reverse {
        flex-direction: column; /* Stack image & text vertically */
        text-align: center;
        gap: 20px;
        width: 90%;
    }

    .about-image {
        max-width: 90%; /* Slightly larger width for tablets */
        display: flex;
        justify-content: center; /* Center image */
    }

    .about-image img {
        width: 100%; /* Full width inside .about-image */
        max-height: 40vh; /* Reduce height for better mobile fit */
        object-fit: contain; /* Ensures image scales properly */
    }

    .about-text {
        max-width: 100%;
        padding: 10px;
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .about-image {
        max-width: 100%; /* Full width on small screens */
    }

    .about-image img {
        max-height: 30vh; /* Reduce height further on mobile */
    }

    .about-text {
        font-size: 1rem;
        padding: 5%;
    }

    .about-row {
        width: 100%; /* Full width on mobile */
        padding: 5% 5%; /* Add slight padding for better readability */
    }
}
