/* Base styles and box-sizing for all elements */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: white; /* Default text color for hero section */
}

/* --- Animations --- */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Hero Section Styling --- */
.hero {
    text-align: center;
    color: white;
    font-family: 'Albert Sans', sans-serif;
    background-size: cover;
    display: flex;
    flex-wrap: wrap; /* Allow rows to wrap */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    border-bottom: 5px solid #013153;
    min-height: 80vh; /* Ensure hero section takes up a good portion of viewport height */
    overflow: hidden; /* Hide overflow during animations */
}

/* Initial state for hero content before animation */
.hero-row h1,
.hero-row .hero-sub-title,
.hero-row-top-wrap .flex_horizontal,
.hero-row-bottom-wrap button,
.hero-row-bottom-wrap button-3 {
    opacity: 0;
    /* Transform will be set by specific animation keyframes */
}

/* Class added by JavaScript to trigger animations */
.hero.is-in-view .hero-row:first-child h1 {
    animation: slideInLeft 1s ease-out forwards;
}

.hero.is-in-view .hero-row:first-child .hero-sub-title {
    animation: slideInLeft 1s ease-out forwards 0.2s; /* Staggered */
}

.hero.is-in-view #hero-right-row-background {
    animation: slideInRight 1s ease-out forwards;
}

/* Staggered animations for elements within the right hero row */
.hero.is-in-view .flex_horizontal:nth-child(1) { animation: slideInUp 0.8s ease-out forwards 0.4s; }
.hero.is-in-view .flex_horizontal:nth-child(2) { animation: slideInUp 0.8s ease-out forwards 0.5s; }
.hero.is-in-view .flex_horizontal:nth-child(3) { animation: slideInUp 0.8s ease-out forwards 0.6s; }

.hero.is-in-view .hero-row-bottom-wrap button,
.hero.is-in-view .hero-row-bottom-wrap button-3 {
    animation: slideInUp 0.8s ease-out forwards 0.8s; /* Buttons animate together after icons */
}


.hero-row {
    flex: 1 1 450px; /* Flexible base width for each row */
    max-width: 600px; /* Max width for each row */
    text-align: left;
    padding: 20px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Align content to the left within the row */
}

#hero-right-row-background {
    background-color: rgba(1, 49, 83, 0.6);
    backdrop-filter: blur(2px);
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
}

.hero-row h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem); /* Fluid font size for main heading */
    margin-bottom: 1rem;
    line-height: 1.2;
    color: white;
}

.hero-sub-title {
    color: #3aab58;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem); /* Fluid font size */
    padding: 10px 0;
    line-height: 1.5;
    font-family: 'Barlow', sans-serif;
    max-width: 500px; /* Constrain width for readability */
}

.flex_horizontal.is-y-center.gap-xxsmall {
    display: flex;
    align-items: center;
    margin: 15px 0; /* Adjusted margin for better spacing */
    transition: transform 0.3s ease; /* Subtle hover effect */
}

.flex_horizontal.is-y-center.gap-xxsmall:hover {
    transform: translateX(5px); /* Slide slightly on hover */
}

.icon.on-inverse {
    width: 30px; /* Smaller icon size */
    height: 30px;
    min-width: 30px; /* Prevent shrinking */
    color: #09be3a; /* Icon color */
    margin-right: 10px; /* Space between icon and text */
}

.icon-text {
    font-size: clamp(1rem, 2vw, 1.2rem); /* Fluid font size */
    color: #fff;
    font-family: 'Barlow', sans-serif;
    transition: color 0.3s ease; /* Smooth color change on hover */
}

.flex_horizontal.is-y-center.gap-xxsmall:hover .icon-text {
    color: #e0f2ff; /* Lighter color on hover */
}

.hero-row-top-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%; /* Take full width of parent */
}

.hero-row-bottom-wrap {
    margin-top: 3rem; /* More space above buttons */
    display: flex; /* Arrange buttons horizontally */
    gap: 1.5rem; /* Space between buttons */
    width: 100%; /* Take full width of parent */
    justify-content: flex-start; /* Align buttons to the left */
}

/* Button Styling (assuming button-2 and button-3 are custom elements or classes) */
.button-sytle {
    padding: 0.8em 1.5em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem); /* Fluid font size */
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button-2.button-sytle {
    color: #013153; /* Dark text for contrast */
}

button-2.button-sytle:hover {
    background-color: #09be3a; /* Darker green on hover */
    transform: translateY(-3px); /* Lift more on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button-3.button-sytle {
    background-color: transparent;
    border: 2px solid #34944e; /* Green border */
    color: #34944e;
}

button-3.button-sytle:hover {
    border: 2px solid #09be3a;
    background-color: #09be3a; /* Fill with green on hover */
    color: #013153; /* Dark text */
    transform: translateY(-3px); /* Lift more on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}


/* --- Media Queries for Responsiveness --- */

/* Tablet and Smaller Desktops (approx. 992px and below) */
@media (max-width: 992px) {
    .hero {
        flex-direction: column; /* Stack rows vertically */
        padding: 3rem 1rem;
        min-height: auto; /* Allow height to adjust */
    }

    .hero-row {
        flex: 1 1 100%; /* Each row takes full width */
        max-width: 600px; /* Constrain max width for readability */
        padding: 1.5rem;
        align-items: center; /* Center content when stacked */
        text-align: center; /* Center text */
    }

    #hero-right-row-background {
        margin-top: 2rem; /* Space between stacked rows */
    }

    .hero-sub-title {
        max-width: 80%; /* Allow subtitle to take more width */
    }

    .hero-row-top-wrap {
        align-items: center; /* Center icons when stacked */
    }

    .flex_horizontal.is-y-center.gap-xxsmall {
        margin: 10px 0; /* Adjust margin */
    }

    .hero-row-bottom-wrap {
        justify-content: center; /* Center buttons when stacked */
    }
}

/* Mobile Phones (approx. 768px and below) */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 0.5rem;
    }

    .hero-row {
        padding: 1rem;
    }

    .hero-row h1 {
        font-size: 2.2rem; /* Fixed smaller size for very small screens */
    }

    .hero-sub-title {
        font-size: 1rem; /* Fixed smaller size */
        max-width: 95%; /* Take almost full width */
    }

    .icon-text {
        font-size: 1rem; /* Fixed smaller size */
    }

    .hero-row-bottom-wrap {
        flex-direction: column; /* Stack buttons vertically */
        gap: 1rem;
        width: 100%;
        max-width: 280px; /* Max width for stacked buttons */
        margin-left: auto; /* Center the button container */
        margin-right: auto;
    }

    .button-sytle {
        width: 100%; /* Buttons take full width when stacked */
        padding: 0.7em 1em;
        font-size: 1rem;
    }
}