﻿
/* ==========================================================
   ECOMACCOUNTXPERT - PREMIUM SERVICES SECTION
   Emerald + Gold Interactive Theme
   Compact Cards + Repeat Scroll Animation
========================================================== */


/* ==========================================================
   MAIN SECTION
========================================================== */

.services-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 80px 0;
    background: radial-gradient( circle at 10% 50%, rgba(16, 185, 129, .12), transparent 30% ), radial-gradient( circle at 90% 50%, rgba(214, 173, 96, .15), transparent 30% ), linear-gradient( 135deg, #f0f8f3, #ffffff 50%, #f8f5ec );
}


    /* Background Decoration */

    .services-section::before,
    .services-section::after {
        content: "";
        position: absolute;
        z-index: -1;
        border-radius: 50%;
        pointer-events: none;
    }

    .services-section::before {
        width: 330px;
        height: 330px;
        top: -200px;
        right: -90px;
        border: 1px solid rgba(6, 95, 70, .12);
    }

    .services-section::after {
        width: 280px;
        height: 280px;
        bottom: -190px;
        left: -90px;
        border: 1px solid rgba(214, 173, 96, .22);
    }


/* ==========================================================
   SERVICES GRID
========================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}


/* ==========================================================
   SERVICE CARDS
========================================================== */

.services-section .service-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 245px;
    padding: 25px 24px;
    text-align: left;
    border: 1px solid rgba(6, 95, 70, .12);
    border-radius: 18px;
    background: linear-gradient( 145deg, #ffffff, #eaf7ef );
    box-shadow: 0 8px 25px rgba(5, 46, 43, .07), inset 0 1px 0 rgba(255, 255, 255, .9);
    /* Initial Animation State */
    opacity: 0;
    visibility: hidden;
    translate: 0 45px;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), background .4s ease, box-shadow .4s ease, border-color .4s ease;
}


    /* Different Card Shades */

    .services-section .service-card:nth-child(2) {
        background: linear-gradient( 145deg, #fffdf5, #f8efd9 );
    }

    .services-section .service-card:nth-child(3) {
        background: linear-gradient( 145deg, #f1fbf8, #dff3eb );
    }

    .services-section .service-card:nth-child(4) {
        background: linear-gradient( 145deg, #fffaf0, #f6edda );
    }

    .services-section .service-card:nth-child(5) {
        background: linear-gradient( 145deg, #ffffff, #eaf7ef );
    }

    .services-section .service-card:nth-child(6) {
        background: linear-gradient( 145deg, #fffdf5, #f8efd9 );
    }

    .services-section .service-card:nth-child(7) {
        background: linear-gradient( 145deg, #f1fbf8, #dff3eb );
    }


    /* Gold Top Line */

    .services-section .service-card::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: 0;
        left: 20%;
        width: 60%;
        height: 4px;
        border-radius: 0 0 8px 8px;
        background: linear-gradient( 90deg, transparent, #d6ad60, transparent );
        transition: width .4s ease, left .4s ease;
    }


    /* Shine Effect */

    .services-section .service-card::after {
        content: "";
        position: absolute;
        top: -100%;
        left: -60%;
        width: 45%;
        height: 300%;
        transform: rotate(25deg);
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, .35), transparent );
        transition: left .7s ease;
        pointer-events: none;
    }


    /* ==========================================================
   CARD HOVER ANIMATION
========================================================== */

    .services-section .service-card:hover {
        transform: translateY(-8px) scale(1.025);
        border-color: #d6ad60;
        background: linear-gradient( 135deg, #064e3b, #08785a );
        box-shadow: 0 20px 40px rgba(5, 46, 43, .20), 0 0 18px rgba(214, 173, 96, .20);
    }


        /* Gold Line Hover */

        .services-section .service-card:hover::before {
            left: 10%;
            width: 80%;
        }


        /* Shine Hover */

        .services-section .service-card:hover::after {
            left: 130%;
        }


/* ==========================================================
   SERVICE NUMBER / ICON
========================================================== */

.services-section .service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 17px;
    border-radius: 14px;
    color: #075c48;
    background: linear-gradient( 145deg, #e4f5eb, #fff4dc );
    box-shadow: inset 0 1px rgba(255, 255, 255, .9), 0 6px 15px rgba(5, 46, 43, .07);
    font-size: 17px;
    font-weight: 900;
    transition: transform .35s ease, border-radius .35s ease, background .35s ease, color .35s ease;
}


/* Icon Hover */

.services-section .service-card:hover .service-icon {
    transform: rotate(-7deg) scale(1.08);
    border-radius: 17px;
    color: #075c48;
    background: linear-gradient( 145deg, #f0d79d, #ffffff );
}


/* ==========================================================
   CARD CONTENT
========================================================== */

.services-section .service-card h3 {
    min-height: 50px;
    margin-bottom: 9px;
    color: #075c48;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.4;
    transition: color .35s ease, transform .35s ease;
}


.services-section .service-card p {
    min-height: 72px;
    margin-bottom: 16px;
    color: #647a70;
    font-size: 14px;
    line-height: 1.7;
    transition: color .35s ease;
}


/* Hover Text */

.services-section .service-card:hover h3 {
    color: #f0d79d;
    transform: translateY(-2px);
}

.services-section .service-card:hover p {
    color: #ffffff;
}


/* ==========================================================
   CARD LINK
========================================================== */

.services-section .service-card a {
    display: inline-block;
    align-self: flex-start;
    color: #075c48;
    font-size: 14px;
    font-weight: 700;
    transition: color .25s ease, letter-spacing .25s ease;
}

    .services-section .service-card a:hover {
        color: #a77b2e;
        letter-spacing: .3px;
    }

.services-section .service-card:hover a {
    color: #f0d79d;
}


/* ==========================================================
   VIEW ALL SERVICES BUTTON
========================================================== */

.services-action {
    margin-top: 38px;
    text-align: center;
}

.services-button {
    position: relative;
    display: inline-block;
    overflow: hidden;
    padding: 13px 28px;
    border: 0;
    border-radius: 30px;
    color: #ffffff;
    background: linear-gradient( 110deg, var(--brand-800), var(--brand-500) );
    box-shadow: 0 10px 24px rgba(4, 120, 87, .18);
    font-weight: 700;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

    .services-button:hover {
        color: #ffffff;
        transform: translateY(-4px);
        box-shadow: 0 16px 30px rgba(4, 120, 87, .25);
    }


/* ==========================================================
   STAGGERED REPEAT SCROLL ANIMATION
========================================================== */

.services-section.is-visible .service-card {
    animation: serviceCardReveal 850ms cubic-bezier(.16, 1, .3, 1) both;
}


/* Card 01 */

.services-section.is-visible .services-grid > .service-card:nth-child(1) {
    animation-delay: 0ms;
}


/* Card 02 */

.services-section.is-visible .services-grid > .service-card:nth-child(2) {
    animation-delay: 500ms;
}


/* Card 03 */

.services-section.is-visible .services-grid > .service-card:nth-child(3) {
    animation-delay: 1000ms;
}


/* Card 04 */

.services-section.is-visible .services-grid > .service-card:nth-child(4) {
    animation-delay: 1500ms;
}


/* Card 05 */

.services-section.is-visible .services-grid > .service-card:nth-child(5) {
    animation-delay: 2000ms;
}


/* Card 06 */

.services-section.is-visible .services-grid > .service-card:nth-child(6) {
    animation-delay: 2500ms;
}


/* Card 07 */

.services-section.is-visible .services-grid > .service-card:nth-child(7) {
    animation-delay: 3000ms;
}


/* Animation Keyframes */

@keyframes serviceCardReveal {

    from {
        opacity: 0;
        visibility: visible;
        translate: 0 45px;
        scale: .94;
    }

    to {
        opacity: 1;
        visibility: visible;
        translate: 0 0;
        scale: 1;
    }
}


/* ==========================================================
   TABLET RESPONSIVE
========================================================== */

@media (max-width: 991px) {

    .services-section {
        padding: 65px 0;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .services-section .service-card {
        min-height: 230px;
        padding: 23px 21px;
    }
}


/* ==========================================================
   MOBILE RESPONSIVE
========================================================== */

@media (max-width: 575px) {

    .services-section {
        padding: 50px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .services-section .service-card {
        min-height: auto;
        padding: 22px 19px;
    }

        .services-section .service-card h3 {
            min-height: auto;
            font-size: 18px;
        }

        .services-section .service-card p {
            min-height: auto;
        }

        .services-section .service-card:hover {
            transform: translateY(-5px) scale(1.01);
        }
}


/* ==========================================================
   ACCESSIBILITY
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .services-section .service-card,
    .services-section .service-card::before,
    .services-section .service-card::after,
    .services-section .service-icon,
    .services-section .service-card h3,
    .services-section .service-card p,
    .services-section .service-card a {
        transition: none !important;
    }

        .services-section .service-card:hover {
            transform: none;
        }

    .services-section.is-visible .service-card {
        animation: none;
        opacity: 1;
        visibility: visible;
        translate: none;
        scale: 1;
    }
}
