/* === SERVICES SECTION === */

.services-section {
    width: 100%;
    padding: 5rem 2rem;
    position: relative;
    z-index: 3;
    display: flex;
    font-family: 'Poppins', sans-serif;
    flex-direction: column;
    gap: 5rem;
    background: linear-gradient(to bottom, #0e0e0e, #1b1b1b);
}

.service-intro {
    width: 100%;
    height: auto;
    justify-items: center;
    justify-content: center;
    text-align: justify;
    display: flex;
    flex-direction: column;
    gap: 5px;
}


/* === SERVICES SECTION HEADINGS === */

.section-title {
    font-size: 2rem;
    font-weight: 500;
    text-align: center;
    color: white;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.68rem;
    color: #fff;
    /* subtitle white */
    text-align: center;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 800px;
}

.service-info {
    font-size: small;
    width: 95%;
    text-align: center;
    /* justified */
    margin: 0 auto;
    color: #ddd;
    /* less eye-catching */
    font-weight: 300;
    line-height: 1.4;
}


/* Highlighted text in subtitle */

.section-subtitle .highlight {
    color: #4dc9ff;
    font-weight: 800;
}

.services-section h2,
.services-section p {
    margin-top: 0;
    margin-bottom: 0.5rem;
}


/* === SERVICE BLOCKS === */

.service-block {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.service-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-block:nth-of-type(odd) {
    flex-direction: row;
}

.service-block:nth-of-type(even) {
    flex-direction: row-reverse;
}

.service-text {
    flex: 1 1 500px;
    padding: 1rem;
}

.service-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #4dc9ff;
}

.service-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #ccc;
}

.service-features {
    list-style: none;
    padding-left: 0;
}

.service-features li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 1rem;
    color: #90cdf4;
}

.service-features li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}


/* === VIDEO PLACEHOLDER === */

.service-video {
    flex: 1 1 600px;
    min-height: 500px;
    height: 500px;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.service-video video,
.service-video iframe,
.service-video-player {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: contain;
    display: block;
}


/* === FOOTER CTA === */

.services-footer {
    margin-top: 4rem;
    text-align: center;
}

.services-footer button {
    background-color: #4dc9ff;
    color: #0e0e0e;
    padding: 1rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.services-footer button:hover {
    background-color: #00a4d6;
}

.services-footer p {
    margin-top: 1rem;
    color: #aaa;
    font-size: 0.9rem;
}


/* Desktop CTA centering */

.bottom-cta {
    display: flex;
    justify-content: center;
    /* centers horizontally */
    align-items: center;
    /* vertically aligns if needed */
    width: 100%;
}


/* Ensure button stays inline-block */

.cta-button {
    display: inline-block;
    z-index: 3;
}

.cta-button:hover {
    cursor: pointer;
}

#quote {
    font-size: large;
    font-weight: 900;
    color: white;
}


/* ------------------ MOBILE OPTIMIZATION ------------------ */

@media (max-width: 768px) {
    .services-section {
        padding: 3rem 1rem;
        background: transparent;
    }
    .service-block {
        flex-direction: column !important;
        /* stack vertically */
        align-items: center;
        gap: 1rem !important;
        /* smaller gap */
        justify-content: flex-start !important;
    }
    .service-text {
        padding: 50px 0;
        width: 95%;
        flex: 1 1 00px !important;
        text-align: justify;
        margin: 0 auto;
    }
    .service-video {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-height: auto;
        margin: 0 auto;
    }
    .service-video video {
        height: 70vh;
        /* taller videos for mobile */
        object-fit: cover;
    }
    .service-info {
        width: 95%;
        text-align: justify;
        margin: 0 auto;
        font-weight: 300;
        line-height: 1.4;
        color: #ddd;
    }
    /* Move enroll button & quote to bottom */
    .bottom-cta {
        order: 999;
        width: 100%;
        text-align: center;
        margin-top: 4rem;
    }
    .cta-button {
        width: 80%;
        max-width: 300px;
        font-size: 0.95rem;
        margin: 0 auto;
        padding: 0.8rem 1.5rem;
    }
    #quote {
        display: block;
        font-size: 0.85rem;
        margin-top: 0.5rem;
        font-weight: 600;
    }
    /* Hide duplicate enroll buttons */
    .service-block .bottom-cta:not(:last-of-type) {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    .section-subtitle {
        font-size: clamp(1.2rem, 5vw, 1.68rem);
    }
    .service-info {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    .cta-button {
        font-size: 0.9rem;
        padding: 0.7rem 1.3rem;
        margin-top: 80px;
    }
    #quote {
        font-size: 0.8rem;
    }
}