/* General Fluidity & Box Model */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base animations (defined but not applied by default) */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInOverlay {
    0% { opacity: 0; }
    100% { opacity: 0.1; }
}

/* Main Container */
.about {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center; /* Align items vertically in center */
    border-bottom: 5px solid #013153;
    gap: 2rem;
    overflow: hidden; /* Important to prevent horizontal scroll from animations */
}

/* Initial state for elements to be animated by JS */
.about-image-adjust,
.about-body-adjust {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out; /* Base transition for when 'animate' class is added */
}

/* Class added by JavaScript to trigger animation */
.about-image-adjust.is-in-view,
.about-body-adjust.is-in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Image Container */
.about-image-adjust {
    position: relative;
    flex: 1 1 300px; /* Allows flexibility, minimum width 300px */
    max-width: 500px; /* Maximum width for the image container */
    transition: transform 0.4s ease; /* Hover transition */
}

.about-image-adjust.is-in-view {
    animation: slideUp 1s ease forwards; /* Apply animation when in view */
}

.about-image-adjust:hover {
    transform: scale(1.02);
}

.about-image-adjust img {
    display: block;
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    border-radius: 6px;
    transition: transform 0.4s ease;
}

/* Overlay for Image */
.about-image-adjust::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(1, 49, 83, 0.1);
    border-radius: 6px; /* Match image border-radius */
    transition: opacity 0.4s ease;
    opacity: 0.1; /* Default opacity, fades out on hover */
}

.about-image-adjust:hover::after {
    opacity: 0;
}

/* Text Body */
.about-body-adjust {
    flex: 1 1 450px; /* Allows flexibility, minimum width 450px */
    max-width: 650px; /* Max width to prevent excessive line length */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    color: #fff;
    padding: 1.5rem;
    /* Removed animation here, will be triggered by JS */
}

.about-body-adjust.is-in-view {
    animation: slideUp 1.2s ease forwards; /* Apply animation when in view */
    animation-delay: 0.2s; /* Slight delay for text to appear after image */
}

/* Title Styling */
.about-body-adjust h2 {
    font-size: clamp(2rem, 4vw, 3rem); /* Fluid font size for main title */
    margin-bottom: 1rem;
    padding-bottom: 1rem; /* Spacing below title */
}

.about-h3-title-adjust {
    font-size: clamp(1.8rem, 3vw, 2.5rem); /* Fluid font size for h3 */
    padding: 2rem 0 1rem; /* Adjust padding for h3 */
    transition: color 0.3s ease, transform 0.3s ease;
}

.about-h3-title-adjust:hover {
    color: #aad8ff;
    transform: scale(1.05);
}

/* Text Styling */
.about-text-adjust {
    font-size: clamp(1rem, 1.8vw, 1.3rem); /* Fluid font size for paragraphs */
    line-height: 1.6; /* Slightly increased line height for readability */
    padding-bottom: 1.5rem; /* Adjusted padding */
    transition: color 0.3s ease, transform 0.3s ease;
}

.about-text-adjust:hover {
    color: #aad8ff;
    transform: translateX(5px);
}

/* Button Styling (Assuming button-2 and button-3 are block-level or flex items) */
.about-button-adjust {
    display: flex; /* Arrange buttons side-by-side */
    gap: 1rem; /* Space between buttons */
    margin-top: 1rem; /* Space above buttons */
}

/* Ensure button styles are defined elsewhere or provide them here if missing */
/* Example placeholder styles for buttons */
.button-sytle {
    padding: 0.8em 1.5em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    }
    /* --- Media Queries for Responsiveness --- */

    /* Tablet and Smaller Desktops (approx. 992px and below) */
@media (max-width: 992px) {
    .about {
        padding: 2rem 1rem; /* Reduce overall padding */
    }

    .about-body-adjust {
        flex: 1 1 100%; /* Text takes full width on tablets */
        max-width: 700px; /* Still constrain max width for readability */
    }

    .about-image-adjust {
        flex: 1 1 100%; /* Image takes full width */
        max-width: 600px; /* Constrain max width for image */
        order: -1; /* Move image above text on smaller screens */
    }
}

/* Mobile Phones (approx. 768px and below) */
@media (max-width: 768px) {
    .about {
        flex-direction: column; /* Stack items vertically */
        padding: 1.5rem 1rem;
    }

    .about-body-adjust,
    .about-image-adjust {
        width: 100%; /* Ensure they take full width when stacked */
        max-width: none; /* Remove max-width constraints for full fluidity */
    }

    .about-body-adjust {
        padding: 1rem; /* Reduce padding on text body */
        text-align: center; /* Center text content */
        align-items: center; /* Center text items */
    }

    .about-h3-title-adjust {
        padding: 1.5rem 0 0.5rem; /* Adjust padding for h3 */
    }

    .about-text-adjust {
        padding-bottom: 1rem; /* Adjust padding */
    }

    .about-button-adjust {
        flex-direction: column; /* Stack buttons vertically */
        width: 100%;
        max-width: 280px; /* Max width for stacked buttons */
    }

    .button-sytle {
        width: 100%; /* Make buttons full width when stacked */
    }
}

/* Very Small Mobile Phones (approx. 480px and below) */
@media (max-width: 480px) {
    .about {
        padding: 1rem 0.5rem;
        gap: 1rem;
    }

    .about-body-adjust h2 {
        font-size: 1.8rem; /* Set fixed smaller size for very small screens */
    }

    .about-h3-title-adjust {
        font-size: 1.5rem; /* Set fixed smaller size */
    }

    .about-text-adjust {
        font-size: 0.95rem; /* Set fixed smaller size */
    }
}