@import url('styles.css');

h3 {
    font-weight: 400 !important;
}

/* -------------------------
    HOME SECTION (home)
------------------------- */
.home {
    display: flex;
    flex-direction: column;
    min-height: calc(80vh);
    background-color: var(--blue);
    position: relative;
}

body.high-contrast .home,
body.white-text-mode .home {
    background-color: #000 !important;
}

.home .title {
    margin-top: 1%;
    margin-left: 10%;
    max-width: 75%;
    color: var(--white);
    letter-spacing: 3px;
}

body.high-contrast .home .title,
body.white-text-mode .home .title {
    color: #FFF !important;
}

.home .images {
    display: flex;
    padding-top: 2%;
    position: relative;
    margin-top: auto;
    justify-content: flex-start;
    align-items: flex-end;
}

.home .image {
    margin-bottom: -5%;
    width: 55%;
    height: 30%;
    object-fit: cover;
    border-bottom-right-radius: 25px;
    border-top-right-radius: 25px;
    flex-shrink: 0;
}

.home .subimage {
    position: static;
    max-width: 22rem;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10%;
}

/* -------------------------
    SUBHOME SECTION (subhome)
------------------------- */
.subhome {
    display: flex;
    padding: 7% 0%;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

body.high-contrast .subhome,
body.white-text-mode .subhome {
    background-color: #000 !important;
}

.subhome .title {
    color: var(--blue);
    margin-left: 6%;
    flex: 1;
    min-width: 200px;
    max-width: 50%;
}

body.high-contrast .subhome .title,
body.white-text-mode .subhome .title {
    color: #BDF24B !important;
}

.subhome .image {
    width: 40%;
    max-width: 650px;
    height: auto;
    object-fit: cover;
    flex-shrink: 0;
    flex-grow: 0;
    margin-right: 0%;
    border-bottom-left-radius: 25px;
    border-top-left-radius: 25px;
}

/* -------------------------
    OUR BENEFITS SECTION
------------------------- */
.our-benefits {
    position: relative;
    display: flex;
    background-color: var(--light-yellow);
}

/* Main text (title and subtitle) */
.our-benefits-name {
    padding-left: 5rem;
    padding-top: 12rem;
    width: 50%;
}

.our-benefits-name .title {
    margin-bottom: 2rem;
    color: var(--yellow);
}

.our-benefits-name .subtitle {
    font-weight: lighter;
    color: var(--blue);
}

/* List of benefits (right part of 2x2 grid benefits) */
.our-benefits-list {
    width: 75%;
    padding-top: 2rem;
    padding-left: 3rem;
    padding-right: 3rem;
    display: block;
}

.our-benefits-list .field {
    display: flex;
}

.our-benefits-list .field .item {
    background-color: #e0eafe;
    margin: 1rem;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.our-benefits-list .field .item .title,
.our-benefits-list .field .item .subtitle,
.our-benefits-list .field .item .more {
    margin-left: 5%;
    margin-right: 15%;
}

.our-benefits-list .field .item .title {
    margin-top: 2rem;
    height: 2rem;
    color: #3154e1;
    display: flex;
    align-items: center;
}

.our-benefits-list .field .item .subtitle {
    height: 4rem;
    margin-top: 1rem;
    color: #6498ff;
    font-weight: normal;
}

.our-benefits-list .field .item .more {
    margin-top: 2rem;
    height: 3rem;
    color: #97e372;
}

.our-benefits-list .field .item .more-link {
    text-decoration: none;
}

.our-benefits-list .field .item .more-link:hover {
    text-decoration: underline;
}

/* -------------------------
    SERVICE-BENEFITS SECTION (service-benefits)
------------------------- */
.service-benefits {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

body.high-contrast .service-benefits,
body.white-text-mode .service-benefits {
    background-color: #000 !important;
}

.service-benefits .title {
    width: 100%;
    padding: 3rem;
    text-align: center;
}

body.high-contrast .service-benefits .title,
body.white-text-mode .service-benefits .title {
    background-color: #333 !important;
    color: #FFF !important;
    border-bottom: 1px solid #BDF24B !important;
}

/* --- CHANGES START HERE --- */

/* Fix for uneven heights and underlines */
.grid-container {
    position: static;
    display: grid;
    /* This ensures columns are equal and items stretch to fill the grid row height */
    grid-template-columns: repeat(2, 1fr);
    /* Add this to make grid items stretch equally within their rows */
    align-items: stretch;
}

.grid-item-link {
    /* Remove underline from the link */
    text-decoration: none;
    /* Make the link take up the full space of its grid cell */
    display: flex;
    flex-direction: column;
    height: 100%; /* Important for equal height */
}

.grid-item {
    padding: 20%; /* Adjusted padding for better control */
    padding-top: 0;
    display: flex;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
    height: 100%; /* Make grid-item fill the height of the link container */
    justify-content: space-between; /* Distribute space for image and text */
}

.grid-item:hover .image-container img {
    transform: scale(0.9); /* Zooms out to 90% of its original size */
}

.grid-item .image-container {
    width: 100%;
    overflow: hidden;
    margin-bottom: 0;
    flex-grow: 1; /* Allow image container to take up available space */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Add min-height to ensure it doesn't collapse too much */
    min-height: 150px; /* Adjust as needed, depends on image aspect ratio */
}

.grid-item .image-container img {
    width: 100%;
    height: 100%; /* Make image fill its container */
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease-in-out;
}

.grid-item .paragraph-bold {
    flex-shrink: 0; /* Prevent text from shrinking */
    padding: 2.2rem 1.5rem;
    /* Remove fixed height: 108px. Let content define height. */
    /* Add min-height instead to prevent it from becoming too small */
    min-height: 108px; /* Maintain a minimum height */
    color: var(--white);
    background-color: var(--yellow);
    margin-top: 0;
    display: flex; /* Use flexbox to center text vertically if needed */
    align-items: center; /* Vertically center text */
    justify-content: center; /* Horizontally center text */
}

/* This is a duplicate rule, remove it. The one above is sufficient. */
/* .grid-item .paragraph-bold {
    flex-shrink: 0;
    padding: 2.2rem 1.5rem;
    height: 108px;
    color: var(--white);
    background-color: var(--yellow);
    margin-top: 0;
} */

body.high-contrast .grid-item .paragraph-bold,
body.white-text-mode .grid-item .paragraph-bold {
    background-color: #555 !important;
    color: #FFF !important;
    border-top: 1px solid #BDF24B !important;
}

.grid-item-center .paragraph-bold {
    background-color: var(--darker-yellow);
}

body.high-contrast .grid-item-center .paragraph-bold,
body.white-text-mode .grid-item-center .paragraph-bold {
    background-color: #777 !important;
}

/* --- CHANGES END HERE --- */


/* -------------------------
    OUR LIFE SECTION (our-life)
------------------------- */
.our-life {
    display: flex;
    flex-direction: column;
    padding-top: 5%;
}

body.high-contrast .our-life,
body.white-text-mode .our-life {
    background-color: #000 !important;
}

.our-life .content {
    display: flex;
    flex-direction: row;
}

.our-life .content .title {
    padding-top: 5%;
    display: flex;
    flex-direction: column;
    padding-left: 10%;
    width: 45%;
}

.our-life .content .title h3 {
    padding: 25px 0px;
    color: var(--yellow);
}

body.high-contrast .our-life .content .title h3,
body.white-text-mode .our-life .content .title h3 {
    color: #BDF24B !important;
}

.our-life .content img {
    position: static;
    margin-left: auto;
    margin-right: 3%;
    margin-bottom: 8%;
    border-radius: 25px;
    width: 40%;
    z-index: 1;
}

.our-life .content .title .more {
    margin: 300px;
}

.our-life .more {
    text-decoration: none;
}

.our-life .more:hover {
    text-decoration: underline;
}


/* Simple responsive fix (example for smaller screens) */
/* Small devices (landscape phones, 576px and down) */
@media (max-width: 576px) {

    /* -------------------------
        OUR BENEFITS SECTIONS
    ------------------------- */
    .our-benefits-list .field .item .title {
        margin-top: 1rem;
        font-size: 1.2rem;
    }


    .our-benefits-list .field .item .subtitle {
        margin-top: 0.5rem;
    }

    .our-benefits-list .field .item .more {
        margin-top: 4rem;
        height: rem;
        bottom: 10rem;
    }
}

/* Small devices (phones, 768px and down) */
@media (max-width: 768px) {

    /* -------------------------
        HOME SECTION (home)
    ------------------------- */
    .home {
        min-height: auto;
        margin-bottom: 0rem;
        align-items: center;
        gap: 20px;
        display: flex;
        flex-direction: column;
        padding: 20px;
    }

    .home .title {
        text-align: center;
        max-width: 100%;
        margin-left: 0%
    }

    .home .images {
        flex-direction: column;
        align-items: center;
    }

    .home .image {
        width: 60%;
        margin-bottom: 1rem;
        padding: 0;
        left: auto;
        border-radius: 25px;
        right: auto;
    }

    .home .subimage {
        position: static;
        left: 0%;
        bottom: 1rem;
        margin-top: 1rem;
        right: 0%;
        width: 10rem;
    }

    /* -------------------------
        SUBHOME SECTION (subhome)
    ------------------------- */
    .subhome {
        align-items: center;
        flex-direction: column;
    }

    .subhome .title {
        position: static;
        text-align: center;
        margin-left: 0%;
        margin-top: 8%;
        min-width: 90%;
    }

    .subhome .image {
        position: static;
        padding-left: 0rem;
        width: 60%;
        height: auto;
        margin-top: 2rem;
        border-radius: 25px;
    }

    /* -------------------------
        OUR BENEFITS SECTIONS
    ------------------------- */
    .our-benefits {
        flex-direction: column;
        align-items: center;
    }

    .our-benefits-name {
        margin-top: -30%;
        padding-left: 2rem;
        padding-right: 2rem;
        min-width: 100%;
        text-align: center;
    }

    .our-benefits-list {
        min-width: 100%;
        padding-top: 10%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .our-benefits-list .field .item {
        margin: 0.5rem;
    }

    .our-benefits-list .field .item .subtitle {
        height: fit-content;
    }

    /* -------------------------
        SERVICE-BENEFITS SECTION (service-benefits)
    ------------------------- */

    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        max-width: 100%;
    }

    .grid-item .paragraph-bold {
        padding: 2.2rem 1rem;
    }

}

/* Large devices (desktops, 992px and down) */
@media (max-width: 992px) {

    /* -------------------------
        OUR BENEFITS SECTIONS
    ------------------------- */
    .our-benefits-name {
        width: 30%;
        padding-top: 10rem;
    }

    .our-benefits-list .field .item .more {
        margin-top: 2.4rem;
        height: 3.4rem;
    }

    .grid-item {
        padding: 0%;
    }
}

/* Mediums devices (desktops, 1080px and down) */
@media (max-width: 1080px) {

    /* -------------------------
        HOME SECTION (home)
    ------------------------- */
    .home {
        min-height: calc(40vh);
    }


    .home .subimage {
        max-width: 5rem;
    }

    /* -------------------------
        OUR  LIFE SECTION (our-life)
    ------------------------- */
    .our-life .content {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .our-life .content .title {
        padding-left: auto;
        width: 90%;
        align-items: center;
        text-align: center;
    }

    .our-life .content img {
        margin-right: auto;
        width: 70%;
        margin-top: 5%;
        margin-bottom: 10%;
    }

    .our-life .features {
        padding: 10% 10%;
    }

}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {

    /* -------------------------
        OUR BENEFITS SECTIONS
    ------------------------- */
    .our-benefits-list {
        width: 75%;
    }

    .our-benefits-list .field .item .title {
        height: 5rem;
    }

    .our-benefits-list .field .item .subtitle {
        height: 5rem;
    }
}