/* ===========================================================
   custom.css
   Site-specific additions: ADA/WCAG accessibility, FAQ accordion,
   tweaks to base template. Loaded AFTER style.css and responsive.css.
   =========================================================== */

/* ---------- ADA / WCAG ACCESSIBILITY ---------- */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ff7034;
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 4px 0;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Visible keyboard focus on all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
.faq-question:focus-visible {
    outline: 3px solid #ff7034;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Hide content visually but keep for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- FAQ ACCORDION ---------- */

.faq-section {
    margin: 50px 0 30px;
    padding: 40px 0;
    background: #f7f8fa;
    border-radius: 6px;
}
.faq-section .faq-inner {
    max-width: 100%;
    padding: 0 30px;
}
.faq-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
}
.faq-section .faq-intro {
    margin-bottom: 30px;
    color: #555;
    font-size: 16px;
    line-height: 1.7;
}
.faq-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #e3e6eb;
}
.faq-item {
    border-bottom: 1px solid #e3e6eb;
    background: #fff;
}
.faq-question {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 20px 50px 20px 20px;
    font-size: 17px;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    position: relative;
    display: block;
    line-height: 1.5;
    font-family: inherit;
}
.faq-question:hover {
    background: #f3f4f6;
    color: #ff7034;
}
.faq-question::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 400;
    color: #ff7034;
    transition: transform 0.2s ease;
    line-height: 1;
}
.faq-question[aria-expanded="true"]::after {
    content: "\2212";
}
.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #444;
    font-size: 16px;
    line-height: 1.75;
}
.faq-answer[aria-hidden="false"] {
    max-height: 2000px;
    padding: 0 20px 20px;
}
.faq-answer p {
    margin-bottom: 12px;
}
.faq-answer p:last-child {
    margin-bottom: 0;
}
.faq-answer ul, .faq-answer ol {
    margin: 10px 0 12px 20px;
}
.faq-answer li {
    margin-bottom: 6px;
}

/* ---------- CONTENT BODY (fix template lorem-ipsum-y look) ---------- */

.service-detail .lower-content h2,
.service-detail .lower-content h3 {
    color: #222;
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.3;
}
.service-detail .lower-content h2 { font-size: 28px; font-weight: 700; }
.service-detail .lower-content h3 { font-size: 22px; font-weight: 600; }
.service-detail .lower-content h4 { font-size: 19px; font-weight: 600; margin-top: 20px; margin-bottom: 10px; }
.service-detail .lower-content p {
    color: #555;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
}
.service-detail .lower-content ul,
.service-detail .lower-content ol {
    margin: 10px 0 20px 20px;
    color: #555;
    font-size: 16px;
    line-height: 1.8;
}
.service-detail .lower-content li {
    margin-bottom: 8px;
}

/* Highlighted callout box */
.callout-box {
    background: #fff5ef;
    border-left: 4px solid #ff7034;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 4px 4px 0;
}
.callout-box h3, .callout-box h4 {
    margin-top: 0;
    color: #c75620;
}
.callout-box p:last-child { margin-bottom: 0; }

/* Service area grid on location/service pages */
.service-area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 20px 0 30px;
    list-style: none;
    padding: 0;
}
.service-area-grid li a {
    display: block;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e3e6eb;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}
.service-area-grid li a:hover,
.service-area-grid li a:focus {
    border-color: #ff7034;
    background: #fff5ef;
    color: #ff7034;
}

/* Related services */
.related-services {
    margin: 40px 0;
    padding: 30px;
    background: #f7f8fa;
    border-radius: 6px;
}
.related-services h2 { margin-top: 0; font-size: 24px; }
.related-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}
.related-services-grid li a {
    display: block;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e3e6eb;
    border-radius: 4px;
    color: #222;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.related-services-grid li a:hover,
.related-services-grid li a:focus {
    border-color: #ff7034;
    color: #ff7034;
    transform: translateY(-2px);
}

/* Process steps */
.process-steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 25px 0;
}
.process-steps > li {
    counter-increment: step;
    position: relative;
    padding: 15px 15px 15px 65px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e3e6eb;
    border-radius: 4px;
}
.process-steps > li::before {
    content: counter(step);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: #ff7034;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}
.process-steps > li strong { display: block; margin-bottom: 4px; color: #222; }

/* Better contrast for footer links */
.main-footer .footer-widget a:focus-visible {
    outline-color: #fff;
}
