/* ═══════════════════════════════════════════
   ACT Power Services — Services Page
   styleServices.css
   ═══════════════════════════════════════════ */

/* ── Section wrapper ── */

.service-container {
    width: 100%;
    max-width: 124rem;
    margin: 0 auto;
    padding: 13rem 3rem 7rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: stretch;
}

/* ── Section heading ── */

.service-container h2 {
    grid-column: 1 / -1;
    font-size: 5rem;
    font-weight: 800;
    text-align: center;
    color: yellow;
    letter-spacing: .06rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 2rem;
}

.service-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 7rem;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--main-color), transparent);
}

/* ── Card ── */

.service-post {
    display: flex;
    flex-direction: column;
    background: var(--second-bg-color);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(0, 171, 240, 0.12);
    border-left: 3px solid var(--main-color);
    box-shadow: 0 .6rem 2.4rem rgba(0, 0, 0, 0.4);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    /* staggered entrance */
    opacity: 0;
    animation: cardReveal 0.55s ease forwards;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    align-items: stretch;
    height: 64rem;
}

.service-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 1.6rem 4.8rem rgba(0, 171, 240, 0.2);
    border-left-color: #00d4ff;
}

/* Staggered animation delays for each card */
.service-post:nth-child(2)  { animation-delay: 0.05s; }
.service-post:nth-child(3)  { animation-delay: 0.15s; }
.service-post:nth-child(4)  { animation-delay: 0.25s; }
.service-post:nth-child(5)  { animation-delay: 0.35s; }
.service-post:nth-child(6)  { animation-delay: 0.45s; }
.service-post:nth-child(7)  { animation-delay: 0.55s; }

/* ── Image panel ── */

.service-post_img {
    position: relative;
    width: 100%;
    height: 22rem;
    overflow: hidden;
    /* reset old transform */
    transform: none;
    min-width: unset;
    max-width: unset;
    flex-shrink: 0;
}

.service-post_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.45s ease;
    border-radius: 0;
}

.service-post:hover .service-post_img img {
    transform: scale(1.06);
}

/* gradient overlay: bottom of image fades into card bg */
.service-post_img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(17, 46, 66, 0.7) 75%,
        var(--second-bg-color) 100%
    );
    pointer-events: none;
}

/* ── Text panel ── */

.service-post_info {
    padding: 2.8rem 3rem 3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--main-color) rgba(0, 171, 240, 0.08);
}

.service-post_info::-webkit-scrollbar {
    width: 4px;
}

.service-post_info::-webkit-scrollbar-track {
    background: rgba(0, 171, 240, 0.08);
}

.service-post_info::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 2px;
}

/* ── Title & subtitle ── */

.service-post_date {
    margin-bottom: 1.4rem;
}

.service-post_title {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: yellow;
    letter-spacing: .06rem;
    margin: 0 0 .7rem;
    line-height: 1.3;
}

.service-post_date span {
    display: inline-block;
    color: var(--main-color);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: .14rem;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
}

/* ── Body text ── */

.service-post_text {
    font-size: 1.45rem;
    color: #c8dce8;
    line-height: 1.82;
    margin: 0;
    font-style: normal;
}

/* ── Entrance animation ── */

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ── */

@media screen and (max-width: 900px) {
    .service-container {
        grid-template-columns: 1fr;
        padding: 10rem 2rem 5rem;
        gap: 2.4rem;
    }

    .service-container h2 {
        font-size: 4rem;
        margin-bottom: 1.5rem;
    }

    .service-post {
        height: auto;
    }

    .service-post_info {
        overflow-y: visible;
    }

    .service-post_img {
        height: 20rem;
    }
}

@media screen and (max-width: 480px) {
    .service-container {
        padding: 10rem 1.2rem 4rem;
        gap: 2rem;
    }

    .service-post_img {
        height: 17rem;
    }

    .service-post_info {
        padding: 2.2rem 2rem 2.4rem;
    }

    .service-post_title {
        font-size: 1.8rem;
    }

    .service-post_text {
        font-size: 1.4rem;
    }
}
