/*
 * Diamond Decks — Service City Page Stylesheet
 * city-page-style.css
 *
 * Typography:
 *   Display/Headings : Alegreya, serif
 *   Body             : Open Sans, sans-serif
 *
 * Colors:
 *   Red accent       : #dd3333
 *   Light bg         : #f5f5f5
 *   Title            : #484043
 *   Body text        : #898989
 *   White            : #ffffff
 */

/* ─────────────────────────────────────────────
   BASE RESET & TOKENS
───────────────────────────────────────────── */

.page-template-city-page-template .footer-top > .widget_custom_html {
    display: none !important;
}

.cp-main *,
.cp-main *::before,
.cp-main *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.cp-main {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: #898989;
}

/* ─────────────────────────────────────────────
   LAYOUT CONTAINERS
───────────────────────────────────────────── */

.cp-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.cp-container--narrow {
    max-width: 800px;
}

/* ─────────────────────────────────────────────
   SECTIONS — alternating background
───────────────────────────────────────────── */

.cp-section {
    padding-top: 72px;
    padding-bottom: 72px;
}

.cp-section--white {
    background-color: #ffffff;
}

.cp-section--gray {
    background-color: #f5f5f5;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY UTILITIES
───────────────────────────────────────────── */

.cp-heading {
    font-family: 'Alegreya', serif;
    font-size: 32px;
    font-weight: 700;
    color: #484043;
    line-height: 1.25;
    margin-bottom: 24px;
}

.cp-heading--center {
    text-align: center;
}

/* Red accent bar below headings where applicable */
.cp-heading--accented::after {
    content: '';
    display: block;
    width: 52px;
    height: 3px;
    background-color: #dd3333;
    margin-top: 12px;
}

.cp-body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    color: #898989;
    line-height: 1.8;
}

.cp-body p {
    margin-bottom: 16px;
}

.cp-body p:last-child {
    margin-bottom: 0;
}

.cp-body a,
.cp-link {
    color: #dd3333;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.cp-body a:hover,
.cp-link:hover {
    opacity: 0.75;
}

/* ─────────────────────────────────────────────
   SECTION 1: HERO
───────────────────────────────────────────── */

.cp-hero {
    position: relative;
    min-height: 60vh;
    background-color: #484043; /* fallback if no image */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.cp-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 20, 22, 0.62);
    z-index: 0;
}

.cp-hero__inner {
    position: relative;
    z-index: 1;
    padding-top: 64px;
    padding-bottom: 64px;
}

.cp-hero__breadcrumb {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cp-hero__breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.cp-hero__breadcrumb a:hover {
    color: #ffffff;
}

.cp-hero__headline {
    font-family: 'Alegreya', serif;
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    max-width: 720px;
    margin-bottom: 16px;
}

.cp-hero__accent-bar {
    width: 60px;
    height: 4px;
    background-color: #dd3333;
    border-radius: 2px;
}

/* ─────────────────────────────────────────────
   SECTION 2: INTRO
───────────────────────────────────────────── */

.cp-intro__inner {
    display: flex;
    align-items: center;
    gap: 56px;
}

.cp-intro__text {
    flex: 0 0 62%;
}

.cp-intro__image {
    flex: 1;
    align-self: flex-start;
    height: 330px;
}

.cp-intro__image img {
    width: 100%;
    height: 100%;
    display: block;
    border-left: 4px solid #dd3333;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
    object-fit: cover;
}

/* ─────────────────────────────────────────────
   SECTION 3: SERVICES INCLUDED
───────────────────────────────────────────── */

.cp-services__list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 40px;
    margin-top: 32px;
    margin-bottom: 28px;
}

.cp-services__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    color: #898989;
    line-height: 1.6;
}

.cp-services__check {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background-color: #dd3333;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}

.cp-services__label {
    font-family: 'Alegreya', serif;
    font-size: 17px;
    font-weight: 700;
    color: #484043;
}

.cp-services__cta {
    margin-top: 8px;
    text-align: center;
}

/* ─────────────────────────────────────────────
   SECTION 4: WHY CHOOSE DIAMOND DECKS
───────────────────────────────────────────── */

.cp-why__grid {
    display: flex;
    gap: 24px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.cp-why__card {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    border: 1px solid #ebebeb;
    border-top: 3px solid #dd3333;
    background-color: #ffffff;
    transition: box-shadow 0.2s ease;
}

.cp-why__card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.cp-why__icon {
    width: 44px;
    height: 44px;
    color: #dd3333;
    margin-bottom: 16px;
}

.cp-why__icon svg {
    width: 100%;
    height: 100%;
}

.cp-why__label {
    font-family: 'Alegreya', serif;
    font-size: 18px;
    font-weight: 700;
    color: #484043;
    margin-bottom: 8px;
    line-height: 1.3;
}

.cp-why__desc {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #898989;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────
   SECTION 5: BUILT FOR TEXAS CLIMATE
   SECTION 6: SERVING [CITY]
───────────────────────────────────────────── */

/* Both use cp-container--narrow + cp-heading + cp-body
   Already covered by utilities above */

/* ─────────────────────────────────────────────
   SECTION 7: FAQ ACCORDION
───────────────────────────────────────────── */

.cp-faq__list {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #e0e0e0;
}

.cp-faq__item {
    border-bottom: 1px solid #e0e0e0;
}

.cp-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 4px;
    font-family: 'Alegreya', serif;
    font-size: 18px;
    font-weight: 700;
    color: #484043;
    cursor: pointer;
    list-style: none;
    transition: color 0.2s;
}

.cp-faq__question::-webkit-details-marker {
    display: none;
}

.cp-faq__question:hover {
    color: #dd3333;
}

/* + / − icon using CSS */
.cp-faq__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #dd3333;
    border-radius: 50%;
    position: relative;
    transition: background-color 0.2s;
}

.cp-faq__icon::before,
.cp-faq__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background-color: #dd3333;
    border-radius: 1px;
    transform: translate(-50%, -50%);
}

.cp-faq__icon::before {
    width: 10px;
    height: 2px;
}

.cp-faq__icon::after {
    width: 2px;
    height: 10px;
    transition: transform 0.2s, opacity 0.2s;
}

details[open] .cp-faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

details[open] .cp-faq__icon {
    background-color: #dd3333;
}

details[open] .cp-faq__icon::before,
details[open] .cp-faq__icon::after {
    background-color: #ffffff;
}

.cp-faq__answer {
    padding: 4px 4px 24px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    color: #898989;
    line-height: 1.75;
    max-width: 680px;
}

/* ─────────────────────────────────────────────
   SECTION 8: CTA BANNER
───────────────────────────────────────────── */

.cp-cta-banner {
    background-color: #dd3333;
    padding-top: 64px;
    padding-bottom: 64px;
}

.cp-cta-banner__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.cp-cta-banner__headline {
    font-family: 'Alegreya', serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.cp-cta-banner__sub {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.88);
    max-width: 560px;
}

.cp-cta-banner__btn {
    display: inline-block;
    margin-top: 8px;
    padding: 14px 36px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #dd3333;
    background-color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 3px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background-color 0.2s, color 0.2s;
}

.cp-cta-banner__btn:hover {
    background-color: transparent;
    color: #ffffff;
}

/* ─────────────────────────────────────────────
   SECTION 9 & 10: PILL LINKS (Services + Nearby)
───────────────────────────────────────────── */

.cp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    justify-content: center;
}

.cp-pill {
    display: inline-block;
    padding: 10px 24px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #dd3333;
    border: 2px solid #dd3333;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    letter-spacing: 0.01em;
}

.cp-pill:hover {
    background-color: #dd3333;
    color: #ffffff;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */

/* Tablet — 768px */
@media (max-width: 900px) {

    .cp-section {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .cp-intro__inner {
        flex-direction: column;
        gap: 36px;
    }

    .cp-intro__text {
        flex: none;
        width: 100%;
    }

    .cp-intro__image {
        width: 100%;
    }

    .cp-services__list {
        grid-template-columns: 1fr;
    }

    .cp-why__grid {
        gap: 16px;
    }

    .cp-why__card {
        flex: 1 1 calc(50% - 8px);
    }
}

/* Mobile — 600px */
@media (max-width: 600px) {

    .cp-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .cp-heading {
        font-size: 26px;
    }

    .cp-hero__headline {
        font-size: 32px;
    }

    .cp-hero {
        min-height: 280px;
    }

    .cp-why__card {
        flex: 1 1 100%;
    }

    .cp-cta-banner {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .cp-pills {
        flex-direction: column;
        align-items: stretch;
    }

    .cp-pill {
        text-align: center;
    }
}
