/*
 * Services page styles for the TalDav / WP Care portfolio website.
 */

/* ==================================================
   SERVICES - final typography and image behaviour
   ================================================== */

.wp-block-media-text.service-section {
    align-items: start;
    position: relative;
    min-height: 500px;
    margin: 0 0 52px;
    overflow: hidden;
    border: 1px solid #dce9f2;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(24, 43, 69, 0.08);
}

/* Blue accent */
.wp-block-media-text.service-section::before {
    content: "";
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(
        90deg,
        #0798df 0%,
        #21c4e8 55%,
        transparent 100%
    );
}

/* Alternate pale-blue background */
.wp-block-media-text.service-section:nth-of-type(even) {
    background: #f4faff;
}

/* Do not stretch the photograph when Details opens */
.wp-block-media-text.service-section .wp-block-media-text__media {
    align-self: start !important;
    width: 100%;
    height: 680px;
    min-height: 0 !important;
    overflow: hidden;
    background: #eaf2f7;
}

.wp-block-media-text.service-section .wp-block-media-text__media img {
    display: block;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.wp-block-media-text.service-section:hover .wp-block-media-text__media img {
    transform: scale(1.025);
}

/* Content column */
.wp-block-media-text.service-section .wp-block-media-text__content {
    padding: clamp(42px, 4.5vw, 76px);
}

/* Service name */
.wp-block-media-text.service-section h2 {
    margin: 0 0 12px;
    color: #172c49;
    font-size: clamp(38px, 3vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

/* Main promise */
.wp-block-media-text.service-section h3 {
    max-width: 900px;
    margin: 0 0 24px;
    color: #172c49;
    font-size: clamp(25px, 2.2vw, 36px);
    line-height: 1.22;
    letter-spacing: -0.015em;
}

/* What we do / How we work together */
.wp-block-media-text.service-section h4 {
    margin: 30px 0 12px;
    color: #172c49;
    font-size: 24px;
    line-height: 1.3;
}

/* Normal text */
.wp-block-media-text.service-section p {
    max-width: 920px;
    margin: 0 0 19px;
    color: #536174;
    font-size: 18px;
    line-height: 1.72;
}

/* Make the first explanatory paragraph more prominent */
.wp-block-media-text.service-section h3 + p {
    color: #34475f;
    font-size: 19px;
    line-height: 1.7;
}

/* Details container */
.wp-block-media-text.service-section details {
    margin-top: 32px;
    border: 1px solid #cfe3ef;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

/* Details title */
.wp-block-media-text.service-section details summary {
    padding: 19px 56px 19px 22px;
    color: #172c49;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    position: relative;
}

.wp-block-media-text.service-section details summary::-webkit-details-marker {
    display: none;
}

.wp-block-media-text.service-section details summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 20px;
    color: #0798df;
    font-size: 24px;
    font-weight: 400;
    transform: translateY(-50%);
}

.wp-block-media-text.service-section details[open] summary::after {
    content:  "-";
}

.wp-block-media-text.service-section details[open] summary {
    border-bottom: 1px solid #d8e8f1;
    background: #eef8fd;
}

/* Opened content */
.wp-block-media-text.service-section details > :not(summary) {
    margin-right: 22px;
    margin-left: 22px;
}

.wp-block-media-text.service-section details > p {
    font-size: 17px;
    line-height: 1.7;
}

.wp-block-media-text.service-section details ul {
    display: grid;
    gap: 12px;
    margin: 20px 22px 26px;
    padding: 0;
    list-style: none;
}

.wp-block-media-text.service-section details li {
    position: relative;
    margin: 0;
    padding-left: 32px;
    color: #4c5f76;
    font-size: 17px;
    line-height: 1.55;
}

.wp-block-media-text.service-section details li::before {
    content: "✓";
    position: absolute;
    top: 2px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(7, 152, 223, 0.12);
    color: #0798df;
    font-size: 12px;
    font-weight: 700;
}

/* Bottom explanatory note inside Details */
.wp-block-media-text.service-section details > p:last-child {
    margin-top: 23px;
    margin-bottom: 24px;
    padding: 15px 18px;
    border-left: 3px solid #0798df;
    border-radius: 0 8px 8px 0;
    background: #f4f9fc;
    color: #52657b;
}

/* Tablet */
@media (max-width: 1100px) {
    .wp-block-media-text.service-section .wp-block-media-text__media {
        height: 580px;
    }

    .wp-block-media-text.service-section p {
        font-size: 17px;
    }
}

/* Mobile */
@media (max-width: 781px) {
    .wp-block-media-text.service-section .wp-block-media-text__media {
        height: 360px;
    }

    .wp-block-media-text.service-section .wp-block-media-text__content {
        padding: 34px 25px 40px;
    }

    .wp-block-media-text.service-section h2 {
        font-size: 35px;
    }

    .wp-block-media-text.service-section h3 {
        font-size: 25px;
    }

    .wp-block-media-text.service-section h4 {
        font-size: 21px;
    }

    .wp-block-media-text.service-section p,
    .wp-block-media-text.service-section h3 + p,
    .wp-block-media-text.service-section details > p,
    .wp-block-media-text.service-section details li {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .wp-block-media-text.service-section .wp-block-media-text__media {
        height: 280px;
    }
}
