/* =============================================
   NOFA Solutions — Related Services Name Nav
   Sits inside .service-hero-content, names only
   ============================================= */

.rs-name-nav {
    margin-top: 44px;
    text-align: center;
}

.rs-name-label {
    display: block;
    font-family: 'Afacad Flux', 'Jost', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    background: linear-gradient(145deg, #E5C97A, #C8A75A, #8A6A2F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.rs-name-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 6px;
}

.rs-name-link {
    display: inline-block;
    font-family: 'Afacad Flux', 'Jost', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(145deg, #E5C97A, #C8A75A, #8A6A2F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 3px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.rs-name-link:hover {
    background: linear-gradient(145deg, #F0D88A, #E5C97A, #C8A75A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-color: rgba(212, 175, 55, 0.6);
}

/* ─── RS name nav responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .rs-name-nav { margin-top: 32px; }
    .rs-name-link { font-size: 0.73rem; padding: 5px 11px; letter-spacing: 1.5px; }
}

@media (max-width: 480px) {
    .rs-name-link { font-size: 0.71rem; padding: 5px 9px; letter-spacing: 1px; }
}

/* ─── Service page global responsive fixes (applied via this shared file) ───
   All service CSS files share the same layout classes but lack mobile overrides.
   ─────────────────────────────────────────────────────────────────────────── */

/* Push service hero below the fixed navbar (80px desktop, 65px tablet, 56px mobile) */
/* 125vh compensates for html { zoom: 0.8 } in bundle.min.css on desktop */
.service-hero {
    margin-top: 70px !important;
    min-height: calc(125vh - 80px) !important;
    box-sizing: border-box !important;
}

/* iPad landscape / touch devices at 1025-1400px: zoom resets to 1 in bundle.min.css,
   so 125vh would overshoot — cap the service-hero to normal viewport height */
@media (min-width: 1025px) and (max-width: 1400px) and (pointer: coarse) {
    .service-hero {
        margin-top: 65px !important;
        min-height: calc(100dvh - 65px) !important;
    }
}

@media (max-width: 1400px) and (orientation: landscape) and (pointer: coarse) {
    .service-hero {
        margin-top: 65px !important;
        min-height: calc(100dvh - 65px) !important;
    }
}

@media (max-width: 1024px) {
    .service-hero {
        margin-top: 65px !important;
        min-height: calc(100dvh - 65px) !important;
    }
}

@media (max-width: 768px) {
    .service-hero {
        margin-top: 56px !important;
        min-height: calc(100dvh - 56px) !important;
    }
}

/* Force all service containers to respect viewport width */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.service-hero,
.service-content,
.benefits-section,
.contact-section {
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Ensures container never exceeds viewport and always has box-sizing */
.container {
    box-sizing: border-box !important;
    max-width: 1200px;
    width: 100%;
}

/* contact-content: always fills container width, never overflows */
.contact-content {
    box-sizing: border-box;
    width: 100%;
}

/* All text in contact and section titles break safely */
.contact-title,
.contact-text,
.section-title,
.service-title,
.service-subtitle,
.feature-title,
.feature-description,
.benefit-text {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

/* ── 1024px and below ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px !important;
    }
}

/* ── 768px and below (tablets & large phones) ─────────────────────────────── */
@media (max-width: 768px) {
    .container {
        padding: 0 20px !important;
        width: 100% !important;
    }

    /* Belt-and-suspenders: pad the section itself too */
    .contact-section {
        padding: 55px 20px !important;
        box-sizing: border-box !important;
    }

    .contact-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        align-items: center;
    }

    .contact-title {
        font-size: 1.55rem !important;
        line-height: 1.3 !important;
        text-align: center;
        width: 100%;
    }

    .contact-text {
        font-size: 0.95rem !important;
        text-align: center;
        width: 100%;
    }

    .section-title {
        font-size: 1.85rem !important;
        line-height: 1.3 !important;
    }

    .service-title {
        font-size: 2.2rem !important;
    }

    /* Buttons — stack vertically, full width */
    .contact-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .contact-btn {
        justify-content: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center;
    }

    /* Features & benefits: single column */
    .features-grid {
        grid-template-columns: 1fr !important;
    }

    .benefits-list {
        grid-template-columns: 1fr !important;
    }
}

/* ── 480px and below (small phones) ──────────────────────────────────────── */
@media (max-width: 480px) {
    .container {
        padding: 0 16px !important;
        width: 100% !important;
    }

    .contact-section {
        padding: 40px 16px !important;
    }

    .contact-title {
        font-size: 1.3rem !important;
        line-height: 1.35 !important;
    }

    .contact-text {
        font-size: 0.9rem !important;
    }

    .section-title {
        font-size: 1.45rem !important;
    }

    .service-title {
        font-size: 1.8rem !important;
    }

    .service-subtitle {
        font-size: 0.95rem !important;
    }

    .contact-btn {
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
    }
}
