/* Services: square cards with a hairline border — photo, condensed title, short description, primary text link. */
.ocf-svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ocf-grid-gap); }

.ocf-svc-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: var(--card-border-width) solid var(--ocf-border);
    border-radius: var(--card-radius);
    background: var(--ocf-bg);
    color: var(--ocf-body);
}

.ocf-svc-card:hover { border-color: var(--ocf-heading); }

.ocf-svc-card-img { width: 100%; height: var(--ocf-service-image-height); object-fit: cover; }

.ocf-svc-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: calc(var(--ocf-space-unit) * 0.625);
    min-height: var(--ocf-service-card-body-height);
    padding: calc(var(--ocf-space-unit) * 1.625) calc(var(--ocf-space-unit) * 1.625) calc(var(--ocf-space-unit) * 1.75);
}

.ocf-svc-card-body h3 { color: var(--ocf-heading); }

.ocf-svc-card-body p {
    color: var(--ocf-body);
    font-size: calc(var(--font-body-size) * 0.889);
    line-height: 1.625;
}

.ocf-svc-card-body .ocf-text-link { margin-top: auto; padding-top: calc(var(--ocf-space-unit) * 0.25); }


.ocf-services-archive { background: var(--cardinal-bg-alt); }

.ocf-catalog-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--ocf-grid-gap) * 0.75);
    margin-bottom: var(--ocf-grid-gap);
    padding: calc(var(--ocf-grid-gap) * 0.875) var(--ocf-grid-gap);
    background: var(--cardinal-band);
    color: var(--ocf-heading-alt);
}

.ocf-catalog-help a { color: inherit; }
.ocf-catalog-help a:hover { color: inherit; text-decoration: underline; }

@media (max-width: 1000px) { .ocf-svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 600px) {
    .ocf-svc-grid { grid-template-columns: 1fr; }
    .ocf-svc-card-body { min-height: 0; }
    .ocf-catalog-help { flex-direction: column; align-items: start; }
}

/* OCF_AGENT_BLOCK:home-roof-replacement-feature START */
.ocf-home-service-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--ocf-border);
    border-top: 5px solid var(--ocf-primary);
    background: var(--ocf-bg);
}
.ocf-home-service-feature__media { min-width: 0; min-height: 0; margin: 0; background: var(--ocf-bg-alt); }
.ocf-home-service-feature__media img { display: block; width: 100%; height: 100%; min-height: 390px; object-fit: cover; }
.ocf-home-service-feature__copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1rem; padding: clamp(28px, 5vw, 64px); }
.ocf-home-service-feature__copy h3 { margin: 0; color: var(--ocf-heading); font-size: clamp(28px, 3vw, 38px); line-height: 1.1; }
.ocf-home-service-feature__copy p { margin: 0 0 .5rem; color: var(--ocf-body); }
.ocf-home-service-feature__copy .btn-primary { background: #D99A2B; border-color: #D99A2B; color: #10243E; }
.ocf-home-service-feature__copy .btn-primary:hover { background: #A8660A; border-color: #A8660A; color: #FFFFFF; }
.ocf-home-service-feature__copy .btn-primary:focus-visible { outline: 3px solid #1F3E90; outline-offset: 3px; }
@media (max-width: 800px) {
    .ocf-home-service-feature { grid-template-columns: 1fr; }
    .ocf-home-service-feature__media img { min-height: 0; height: clamp(230px, 55vw, 340px); }
    .ocf-home-service-feature__copy { padding: clamp(24px, 6vw, 36px); }
}
/* OCF_AGENT_BLOCK:home-roof-replacement-feature END */

/* OCF_AGENT_BLOCK:home-services-balanced-grid START */
.ocf-home-services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .ocf-home-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ocf-home-services-grid { grid-template-columns: 1fr; } }
/* OCF_AGENT_BLOCK:home-services-balanced-grid END */

/* OCF_AGENT_BLOCK:fixed-regional-home-services-grid START */
.ocf-home-services-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: calc(var(--ocf-grid-gap) * 0.75); }
.ocf-home-services-grid > .ocf-svc-card { grid-column: span 2; }
.ocf-home-services-grid > .ocf-svc-card:nth-child(4) { grid-column: 2 / span 2; }
.ocf-home-services-grid > .ocf-svc-card:nth-child(5) { grid-column: 4 / span 2; }
.ocf-home-services-grid .ocf-svc-card-img { height: clamp(170px, 18vw, 220px); }
.ocf-home-services-grid .ocf-svc-card-body { min-height: 0; gap: calc(var(--ocf-space-unit) * 0.5); padding: calc(var(--ocf-space-unit) * 1.125); }
@media (max-width: 1000px) {
  .ocf-home-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ocf-home-services-grid > .ocf-svc-card,
  .ocf-home-services-grid > .ocf-svc-card:nth-child(4),
  .ocf-home-services-grid > .ocf-svc-card:nth-child(5) { grid-column: auto; }
}
@media (max-width: 600px) {
  .ocf-home-services-grid { grid-template-columns: 1fr; }
}
/* OCF_AGENT_BLOCK:fixed-regional-home-services-grid END */

/* OCF_AGENT_BLOCK:homepage-services-sentence-case START */
.ocf-services .heading-2, .ocf-home-services-grid .ocf-svc-card-body h3 { text-transform: none; }
/* OCF_AGENT_BLOCK:homepage-services-sentence-case END */

/* OCF_AGENT_BLOCK:homepage-service-groups START */
.ocf-home-service-groups {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.9fr);
    align-items: start;
    gap: calc(var(--ocf-grid-gap) * 1.25);
}
.ocf-home-service-group { min-width: 0; }
.ocf-home-service-group__heading {
    margin: 0 0 calc(var(--ocf-grid-gap) * 0.625);
    color: var(--ocf-heading);
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.2;
}
.ocf-home-service-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(var(--ocf-grid-gap) * 0.75);
}
.ocf-home-service-cards .ocf-svc-card-img { height: clamp(145px, 14vw, 190px); }
.ocf-home-service-cards .ocf-svc-card-body,
.ocf-home-service-card--business .ocf-svc-card-body {
    min-height: 0;
    gap: calc(var(--ocf-space-unit) * 0.5);
    padding: calc(var(--ocf-space-unit) * 1.125);
}
.ocf-home-service-cards .ocf-svc-card-body h4,
.ocf-home-service-card--business .ocf-svc-card-body h4 {
    color: var(--ocf-heading);
    font-size: 20px;
    line-height: 1.25;
}
.ocf-home-service-cards .ocf-svc-card-body p,
.ocf-home-service-card--business .ocf-svc-card-body p { font-size: var(--font-small-size); line-height: 1.5; }
.ocf-home-service-card--business { max-width: 100%; }
.ocf-home-service-card--business .ocf-svc-card-img { height: clamp(190px, 22vw, 270px); }
@media (max-width: 900px) {
    .ocf-home-service-groups { grid-template-columns: 1fr; }
    .ocf-home-service-card--business { max-width: 560px; }
}
@media (max-width: 600px) {
    .ocf-home-service-cards { grid-template-columns: 1fr; }
    .ocf-home-service-cards .ocf-svc-card-img { height: clamp(190px, 55vw, 260px); }
    .ocf-home-service-card--business .ocf-svc-card-img { height: clamp(210px, 60vw, 280px); }
}
/* OCF_AGENT_BLOCK:homepage-service-groups END */

/* OCF_AGENT_BLOCK:home-residential-overview-link START */
.ocf-home-service-groups .ocf-home-service-group--home .ocf-home-service-group__link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ocf-secondary);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.ocf-home-service-groups .ocf-home-service-group--home .ocf-home-service-group__link:hover {
  color: var(--ocf-primary);
}
.ocf-home-service-groups .ocf-home-service-group--home .ocf-home-service-group__link:focus-visible {
  outline: 2px solid var(--ocf-primary);
  outline-offset: 3px;
}
/* OCF_AGENT_BLOCK:home-residential-overview-link END */
