/* =========================================================================
   ServiceMaster Public Styles
   =========================================================================
   Matches the Hi5 Jamaica brand aesthetic established across the site:
     - Brand colors: #0e1a91 (deep navy) + #15b4ff (cyan)
     - Typography: Outfit (headings/UI) + DM Sans (body)
     - Soft gradient cards, rounded radii, generous whitespace
     - Subtle ambient glows in radial gradients
     - Mobile-first, fluid scaling

   Each section is a self-contained block. Add this CSS to a service page
   via wp_enqueue_style in the public template.
   ========================================================================= */

/* Import brand fonts (matches the rest of the site) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,500;0,9..40,700;1,9..40,300&family=Outfit:wght@300;500;600;700;800&display=swap');

/* =========================================================================
   Outer wrap
   ========================================================================= */
.sm-service-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 50px;
    font-family: 'DM Sans', sans-serif;
    color: #1e293b;
    line-height: 1.7;
    box-sizing: border-box;
}

.sm-service-wrap * { box-sizing: border-box; }

/* =========================================================================
   Hero (image + video, conditional)
   ========================================================================= */
.sm-hero {
    display: grid;
    gap: 18px;
    margin: 0 0 32px;
}

/* When both image and video present, sit side-by-side on wide screens */
.sm-hero:has(.sm-hero-image):has(.sm-hero-video) {
    grid-template-columns: 1fr 1fr;
}

.sm-hero-image,
.sm-hero-video {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(14, 26, 145, 0.16),
                inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    background: linear-gradient(160deg, #f0f5ff 0%, #ffffff 50%, #e8efff 100%);
}

.sm-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.sm-hero-video {
    aspect-ratio: 16 / 9;
    background: #0e1a91;
}

.sm-hero-video iframe,
.sm-hero-video video {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    position: absolute;
    inset: 0;
}

/* =========================================================================
   Quick-facts strip (cost + turnaround)
   ========================================================================= */
.sm-quick-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 0 0 36px;
}

.sm-fact {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    background: linear-gradient(160deg,
                #f0f5ff 0%,
                #ffffff 40%,
                #ffffff 70%,
                #e8efff 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(14, 26, 145, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.sm-fact::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(21, 180, 255, 0.18) 0%, rgba(21, 180, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sm-fact-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0e1a91 0%, #15b4ff 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(14, 26, 145, 0.25);
    position: relative;
    z-index: 1;
}

.sm-fact-icon svg {
    width: 22px;
    height: 22px;
}

.sm-fact-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.sm-fact-label {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #6b7299;
    margin-bottom: 4px;
}

.sm-fact-value {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0e1a91;
    line-height: 1.25;
    margin-bottom: 6px;
    word-break: break-word;
}

.sm-fact-caveat {
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.5;
    font-style: italic;
}

/* =========================================================================
   Prose body (rendered from Claude output)
   ========================================================================= */
.sm-prose {
    max-width: 760px;
    margin: 0 auto 40px;
    padding: 0 4px;
}

.sm-prose h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #0e1a91;
    margin: 36px 0 14px;
    line-height: 1.25;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sm-prose h2::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 26px;
    background: linear-gradient(180deg, #15b4ff 0%, #0e1a91 100%);
    border-radius: 3px;
    flex-shrink: 0;
}

.sm-prose h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #0e1a91;
    margin: 26px 0 10px;
    line-height: 1.3;
}

.sm-prose p {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #334155;
    margin: 0 0 18px;
    line-height: 1.75;
}

.sm-prose strong {
    color: #0e1a91;
    font-weight: 600;
}

.sm-prose ul {
    margin: 0 0 22px;
    padding-left: 0;
    list-style: none;
}

.sm-prose ul li {
    position: relative;
    padding: 6px 0 6px 28px;
    color: #334155;
    font-size: 16px;
    line-height: 1.7;
}

.sm-prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0e1a91, #15b4ff);
    box-shadow: 0 2px 4px rgba(14, 26, 145, 0.3);
}

/* =========================================================================
   Contact card (the big finale)
   ========================================================================= */
.sm-contact-card {
    position: relative;
    margin: 48px 0 0;
    padding: 44px 40px;
    background: linear-gradient(160deg,
                #f0f5ff 0%,
                #ffffff 35%,
                #ffffff 65%,
                #e8efff 100%);
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(14, 26, 145, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    text-align: center;
}

.sm-contact-card::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(21, 180, 255, 0.20) 0%, rgba(21, 180, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sm-contact-card::after {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(14, 26, 145, 0.10) 0%, rgba(14, 26, 145, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sm-contact-kicker {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #15b4ff;
    margin-bottom: 8px;
}

.sm-contact-title {
    position: relative;
    z-index: 1;
    font-family: 'Outfit', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: #0e1a91;
    margin: 0 0 12px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.sm-contact-intro {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto 28px;
    font-size: 15px;
    color: #475569;
    line-height: 1.65;
}

.sm-contact-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 24px;
    text-align: left;
}

.sm-contact-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(14, 26, 145, 0.08);
    border-radius: 14px;
    text-decoration: none;
    color: #1e293b;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.sm-contact-item:not(.sm-contact-static):hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(14, 26, 145, 0.16);
    border-color: rgba(21, 180, 255, 0.35);
}

.sm-contact-item.sm-contact-primary {
    background: linear-gradient(135deg, #0e1a91 0%, #15b4ff 100%);
    color: #ffffff;
    border-color: transparent;
}

.sm-contact-item.sm-contact-primary:hover {
    box-shadow: 0 12px 28px rgba(14, 26, 145, 0.35);
}

.sm-contact-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #15b4ff;
    margin-bottom: 4px;
}

.sm-contact-item.sm-contact-primary .sm-contact-icon {
    color: #ffffff;
}

.sm-contact-icon svg {
    width: 22px;
    height: 22px;
}

.sm-contact-label {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7299;
}

.sm-contact-item.sm-contact-primary .sm-contact-label {
    color: rgba(255, 255, 255, 0.85);
}

.sm-contact-value {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #0e1a91;
    line-height: 1.4;
    word-break: break-word;
}

.sm-contact-item.sm-contact-primary .sm-contact-value {
    color: #ffffff;
}

.sm-contact-hours {
    font-size: 12.5px;
    color: #6b7280;
    margin-top: 2px;
    font-style: italic;
}

/* =========================================================================
   Responsive scaling
   ========================================================================= */
@media (max-width: 900px) {
    .sm-hero:has(.sm-hero-image):has(.sm-hero-video) {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sm-service-wrap {
        padding: 20px 14px 36px;
    }
    .sm-fact {
        padding: 18px 18px;
        gap: 12px;
    }
    .sm-fact-icon {
        width: 38px;
        height: 38px;
    }
    .sm-fact-value {
        font-size: 17px;
    }
    .sm-prose h2 {
        font-size: 22px;
        margin: 28px 0 12px;
    }
    .sm-prose h3 {
        font-size: 17px;
    }
    .sm-prose p,
    .sm-prose ul li {
        font-size: 15px;
    }
    .sm-contact-card {
        padding: 32px 22px;
        border-radius: 18px;
    }
    .sm-contact-title {
        font-size: 24px;
    }
    .sm-contact-intro {
        font-size: 14px;
    }
    .sm-contact-grid {
        grid-template-columns: 1fr;
    }
}
