/* ==========================================================================
   Commercial roofing guide - commercial-roofing.html
   1. Roofing system comparison table (.crt-*) inside the "Top 5" section
   2. Commercial Roofing FAQ section (.cfaq-*)
   ========================================================================== */

/* ---------- 1. Comparison table ---------- */
.crt-wrap {
    max-width: 1140px;
    margin: 0 auto 60px;
}

.crt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #dfe5ec;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(8, 44, 75, 0.08);
    font-size: 15px;
    line-height: 1.5;
}

    /* Bootstrap sets caption-side: bottom; keep the caption above the table */
    .crt-table caption {
        caption-side: top;
        padding: 0 0 14px;
        color: #082c4b;
        font-size: 20px;
        font-weight: 700;
        text-align: left;
    }

    .crt-table thead th {
        padding: 16px 18px;
        border-bottom: 3px solid #ee212b;
        background-color: #082c4b;
        color: #ffffff;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-align: left;
        text-transform: uppercase;
        vertical-align: bottom;
    }

    .crt-table tbody th,
    .crt-table tbody td {
        padding: 16px 18px;
        border-top: 1px solid #e8edf2;
        color: #333333;
        text-align: left;
        vertical-align: top;
    }

    .crt-table tbody tr:first-child th,
    .crt-table tbody tr:first-child td {
        border-top: 0;
    }

    .crt-table tbody tr:nth-child(even) th,
    .crt-table tbody tr:nth-child(even) td {
        background-color: #f7f9fb;
    }

    .crt-table tbody th {
        color: #082c4b;
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
    }

        .crt-table tbody th::before {
            content: "";
            display: inline-block;
            width: 4px;
            height: 16px;
            margin-right: 10px;
            border-radius: 2px;
            background-color: #ee212b;
            vertical-align: -2px;
        }

.crt-cost {
    color: #082c4b;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.crt-note {
    margin: 14px 0 0;
    color: #666666;
    font-size: 14px;
    line-height: 1.6;
}

/* Tablet and phone: each roof system becomes its own card with labelled values */
@media only screen and (max-width: 991px) {
    .crt-table,
    .crt-table tbody,
    .crt-table tr,
    .crt-table th,
    .crt-table td {
        display: block;
        width: 100%;
    }

    .crt-table {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background-color: transparent;
        box-shadow: none;
    }

        .crt-table caption {
            display: block;
        }

        .crt-table thead {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0 0 0 0);
            white-space: nowrap;
        }

        .crt-table tbody tr {
            margin-bottom: 16px;
            overflow: hidden;
            border: 1px solid #dfe5ec;
            border-radius: 10px;
            background-color: #ffffff;
            box-shadow: 0 6px 18px rgba(8, 44, 75, 0.07);
        }

            .crt-table tbody tr th,
            .crt-table tbody tr:nth-child(even) th {
                padding: 14px 18px;
                border-top: 0;
                border-bottom: 3px solid #ee212b;
                background-color: #082c4b;
                color: #ffffff;
                white-space: normal;
            }

                .crt-table tbody tr th::before {
                    display: none;
                }

            .crt-table tbody tr td,
            .crt-table tbody tr:first-child td,
            .crt-table tbody tr:nth-child(even) td {
                display: grid;
                grid-template-columns: 140px minmax(0, 1fr);
                gap: 12px;
                padding: 12px 18px;
                border-top: 1px solid #e8edf2;
                background-color: #ffffff;
            }

            .crt-table tbody tr th + td,
            .crt-table tbody tr:first-child th + td {
                border-top: 0;
            }

            .crt-table tbody td::before {
                content: attr(data-label);
                color: #6b7785;
                font-size: 13px;
                font-weight: 700;
                letter-spacing: 0.03em;
                text-transform: uppercase;
            }
}

@media only screen and (max-width: 575px) {
    .crt-table tbody tr td,
    .crt-table tbody tr:first-child td,
    .crt-table tbody tr:nth-child(even) td {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
}

/* ---------- 2. FAQ section ---------- */
.cfaq-section {
    padding: 9rem 0 7rem;
    background-color: #f4f6f9;
}

.cfaq-header {
    max-width: 820px;
    margin: 0 auto 44px;
    text-align: center;
}

.cfaq-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 16px;
    border: 1px solid rgba(238, 33, 43, 0.35);
    border-radius: 999px;
    background-color: rgba(238, 33, 43, 0.07);
    color: #d11a23;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

    .cfaq-eyebrow::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background-color: #ee212b;
    }

.cfaq-title {
    margin: 0 0 14px;
    color: #082c4b;
    font-family: 'Roboto', sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.15;
}

.cfaq-lead {
    margin: 0;
    color: #555555;
    font-size: 18px;
    line-height: 1.65;
}

.cfaq-list {
    max-width: 920px;
    margin: 0 auto;
}

.cfaq-item {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #dfe5ec;
    border-left: 4px solid transparent;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 4px 14px rgba(8, 44, 75, 0.05);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

    .cfaq-item[open] {
        border-left-color: #ee212b;
        box-shadow: 0 10px 26px rgba(8, 44, 75, 0.1);
    }

    .cfaq-item summary {
        position: relative;
        display: block;
        padding: 22px 64px 22px 24px;
        cursor: pointer;
        list-style: none;
    }

        .cfaq-item summary::-webkit-details-marker {
            display: none;
        }

        .cfaq-item summary:focus-visible {
            outline: 2px solid #ee212b;
            outline-offset: -2px;
        }

        .cfaq-item summary h3 {
            margin: 0;
            color: #082c4b;
            font-family: 'Roboto', sans-serif;
            font-size: 19px;
            font-weight: 700;
            line-height: 1.4;
        }

        /* Plus / minus toggle */
        .cfaq-item summary::before,
        .cfaq-item summary::after {
            content: "";
            position: absolute;
            top: 50%;
            right: 26px;
            width: 14px;
            height: 2px;
            border-radius: 1px;
            background-color: #ee212b;
            transition: transform 0.25s ease;
        }

        .cfaq-item summary::after {
            transform: rotate(90deg);
        }

    .cfaq-item[open] summary::after {
        transform: rotate(0deg);
    }

.cfaq-answer {
    padding: 0 24px 22px;
}

    .cfaq-answer p {
        margin: 0;
        color: #444444;
        font-size: 16px;
        line-height: 1.75;
    }

    .cfaq-answer a {
        color: #d11a23;
        font-weight: 600;
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 2px;
    }

        .cfaq-answer a:hover {
            color: #082c4b;
        }

@media only screen and (max-width: 767px) {
    .cfaq-section {
        padding: 6rem 0 5rem;
    }

    .cfaq-title {
        font-size: 32px;
    }

    .cfaq-lead {
        font-size: 16px;
    }

    .cfaq-item summary {
        padding: 18px 54px 18px 18px;
    }

        .cfaq-item summary h3 {
            font-size: 17px;
        }

        .cfaq-item summary::before,
        .cfaq-item summary::after {
            right: 20px;
        }

    .cfaq-answer {
        padding: 0 18px 18px;
    }

        .cfaq-answer p {
            font-size: 15px;
        }
}
