/* =========================================================
   AeroCapital Website
   Services Page Stylesheet
   ---------------------------------------------------------
   Description: contains styles for the services page
   Author: Shayan Bhatti https://github.com/Shayan-Bhatti
   ========================================================= */

#top_info_bar_services {
    width: 90%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    margin-top: 3rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 44px;
}

#services_tagline {
    font-size: clamp(0.8rem, 1.2vw, 1.2rem);
    font-weight: 800;
    color: #AD080C;
    text-align: left;
    margin-top: 0;
    margin-bottom: var(--basic_vertical_space);
    margin-left: 0;
    margin-right: 0;
}

#services_title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.3;
    font-weight: 800;
    color: #003852;
    text-align: left;
    margin-top: 0;
    margin-bottom: var(--basic_vertical_space);
    margin-left: 0;
    margin-right: 0;
    width: 90%;
}

#top_info_bar_services_divider {
    width: 50px;
    height: 6px;
    background-color: #AD080C;
    margin-top: 0px;
    margin-bottom: var(--basic_vertical_space);
    margin-left: 0px;
    margin-right: 0px;
}

#right_part_services {
    display: flex;
    align-items: center;
    justify-content: center;
}

#services_text {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: black;
    font-weight: 400;
    margin-top: auto;
    margin-bottom: auto;
    text-align: justify;
}

/* Outer container */
#card_grid {
    width: 95%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 50px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    position: relative;
    width: 90%;
    margin: auto;
    aspect-ratio: 3 / 4;
    perspective: 1000px;
}


.card_inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}


.card:hover .card_inner {
    transform: rotateY(180deg);
}


.card_front,
.card_back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    backface-visibility: hidden;
}


.card_front img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
}

.card_title {
    position: absolute;
    bottom: 12.5%;
    transform: translateY(+50%);
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: clamp(0.8rem, 1.4vw, 1rem);
    font-weight: bold;
}

.card_back {
    background: #003852;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 25px;
}

.card_back h3 {
    margin-bottom: 15px;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
}

.card_back p {
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
}


.help_card {
    display: none;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.help_bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.help_content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10%;
}

.help_title {
    color: white;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-top: 40%;
    margin-bottom: 0;
}

.help_text {
    color: white;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 15%;
}

.help_btn {
    background-color: #ff0038;
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-top: auto;
    margin-bottom: 5%;
    transition: background-color 0.3s ease;
}

.help_btn:hover {
    background-color: #cc0029;
}
.help_card:hover .card_inner {
    transform: none;
}

@media (max-width: 1024px) {
    #top_info_bar_services {
        gap: 3vw;
    }

    #services_title {
        width: 100%;
    }

    #card_grid {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 40px;
    }

    .help_card {
        display: block;
    }

    .card {
        width: 100%;
        max-width: 320px;
    }

    .card_back h3 {
        font-size: clamp(1rem, 1.6vw, 1.4rem);
    }

    .card_back p {
        font-size: clamp(1rem, 1.5vw, 1.4rem);
    }


}

@media (max-width: 832px) {
    .card_back h3 {
        margin-bottom: 15px;
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    }

    .card_back p {
        margin-bottom: 20px;
        line-height: 1.5;
        font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    }
}

@media (max-width: 800px) {
    .help_title {
        font-size: clamp(1.1rem, 1.6vw, 1.2rem);
    }

    .help_text {
        font-size: 0.8rem;
    }

    .help_btn {
        font-size: 0.8rem;
        margin-top: auto;
        margin-bottom: 1%;
    }
}

@media (max-width: 768px) {
    #top_info_bar_services {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 30px;
    }

    #right_part_services {
        justify-content: flex-start;
    }

    #services_text {
        text-align: left;
    }

    .card {
        width: 100%;
        max-width: 320px;
    }

    .card_title {
        font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    }
    
}
@media(max-width: 700px) {
    .help_title {
        font-size: clamp(1rem, 1.6vw, 1.2rem);
    }

    .help_text {
        font-size: 0.7rem;
    }

    .help_btn {
        font-size: 0.7rem;
        margin-top: auto;
        margin-bottom: 1%;
    }
}

@media (max-width: 600px) {
    #card_grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 40px;
    }

    .help_card {
        display: none;
    }

    .card_title {
        font-size: clamp(0.85rem, 1.4vw, 1rem);
    }

    .card_back h3 {
        font-size: clamp(1rem, 1.6vw, 1.4rem);
    }

    .card_back p {
        font-size: clamp(1rem, 1.5vw, 1.4rem);
    }
}

@media (max-width: 528px) {
    .card_back h3 {
        margin-bottom: 15px;
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    }

    .card_back p {
        margin-bottom: 20px;
        line-height: 1.5;
        font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    }
}

@media (max-width: 512px) {
    .card_title {
        font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    }
}

@media (max-width: 450px) {
    .card_title {
        font-size: clamp(0.6rem, 1.2vw, 0.9rem);
    }

    .card_back h3 {
        margin-bottom: 15px;
        font-size: clamp(0.6rem, 1.2vw, 0.9rem);
    }

    .card_back p {
        margin-bottom: 20px;
        line-height: 1.5;
        font-size: clamp(0.6rem, 1.2vw, 0.9rem);
    }
}