/* FAQ block on the service pages (markup and schema code: -faq.php)
   Loaded only on pages that call show_faq() (see "page_css" in -desktop-inside.php).
   Uses the site's color palette, shadows and rounded corners from -desktop-style.css.
-----------------------------------------------------------------------------*/

/* questions
-----------------------------------------------------------------------------*/
.faq {
clear: both;
margin: 1.9rem 0px 2.6rem 0px;
}
.faq h2 { padding: 0px 0px 1rem 0px; }
.faq_item {
margin: 0px 0px 1rem 0px;
overflow: hidden;
border: 1px solid #e3d78b;
border-radius: 20px;
background: #fff;
box-shadow: 5px 5px 5px rgba(131, 149, 16, 0.3);
}
.faq_item:last-child { margin-bottom: 0px; }

/* the whole row is the button */
.faq_question {
display: flex;
align-items: center;
gap: 1.1rem;
min-height: 48px;
padding: 1rem 1.4rem;
list-style: none;
cursor: pointer;
background: linear-gradient(to bottom, #fff 0px, #f7f4e3 100%);
}
.faq_question::-webkit-details-marker { display: none; }
.faq_question::marker { content: ""; }
.faq_question:hover { background: #f7f4e3; }
.faq_question:focus-visible {
outline: 3px solid #3a4209;
outline-offset: -6px;
border-radius: 20px;
}

/* open question: green gradient row */
.faq_item[open] > .faq_question {
background:
radial-gradient(circle at 90% 0%, rgba(247, 235, 161, 0.28) 0%, rgba(247, 235, 161, 0) 42%),
linear-gradient(135deg, #3a4209 0%, #646c2e 48%, #839510 100%);
}
.faq_item[open] > .faq_question:focus-visible {
outline-color: #f7eba1;
border-radius: 20px 20px 0px 0px;
}

.faq_num {
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
width: 40px;
height: 40px;
border-radius: 50%;
color: #f7eba1;
background: linear-gradient(to bottom, #646c2e 0px, #76841d 100%);
font-size: 0.95rem;
line-height: 1;
font-weight: 800;
}
.faq_item[open] > .faq_question .faq_num {
color: #3a4209;
background: #f7eba1;
}
.faq .faq_question h3 {
flex: 1 1 auto;
min-width: 0;
color: #3a4209;
font-size: 1.15rem;
line-height: 1.4;
font-weight: 700;
padding: 0px;
}
.faq .faq_item[open] > .faq_question h3 {
color: #fff;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.45);
}

/* plus sign, turns into a minus when the answer is open */
.faq_toggle {
position: relative;
flex: 0 0 auto;
width: 36px;
height: 36px;
box-sizing: border-box;
border: 2px solid #839510;
border-radius: 50%;
color: #646c2e;
transition: transform 250ms ease-in;
}
.faq_toggle:before, .faq_toggle:after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 14px;
height: 2px;
margin: -1px 0px 0px -7px;
border-radius: 2px;
background: currentColor;
transition: transform 250ms ease-in;
}
.faq_toggle:after { transform: rotate(90deg); }
.faq_question:hover .faq_toggle { border-color: #3a4209; color: #3a4209; }
.faq_item[open] > .faq_question .faq_toggle {
color: #3a4209;
border-color: #f7eba1;
background: #f7eba1;
transform: rotate(180deg);
}
.faq_item[open] > .faq_question .faq_toggle:after { transform: rotate(0deg); }

/* answers:*/
.faq_answer {
padding: 1.2rem 4.6rem 1.4rem calc(40px + 2.5rem);
background: #fff;
}
.faq_answer p {
margin: 0px;
color: #1a3a14;
font-size: 1rem;
line-height: 1.85;
}

/* smooth open / close height where the browser supports it; elsewhere it simply opens */
@supports (interpolate-size: allow-keywords) {
.faq { interpolate-size: allow-keywords; }
.faq_item::details-content {
height: 0px;
overflow: clip;
transition: height 280ms ease, content-visibility 280ms allow-discrete;
}
.faq_item[open]::details-content { height: auto; }
}

/* tablet */
@media screen and (max-width: 1140px) {
.faq_answer { padding-right: 1.6rem; }
}

/* mobile */
@media screen and (max-width: 640px) {
.faq { margin: 1.5rem 0px 2rem 0px; }
.faq_item { margin-bottom: 0.7rem; border-radius: 14px; }
.faq_question { gap: 0.75rem; padding: 0.9rem 0.8rem; }
.faq_question:focus-visible { border-radius: 14px; }
.faq_item[open] > .faq_question:focus-visible { border-radius: 14px 14px 0px 0px; }
.faq_num { display: none; }
.faq .faq_question h3 { font-size: 1rem; }
.faq_toggle { width: 32px; height: 32px; }
.faq_toggle:before, .faq_toggle:after { width: 12px; margin-left: -6px; }
.faq_answer { padding: 0.9rem 0.9rem 1.1rem 0.9rem; }
.faq_answer p { line-height: 1.75; }
}

@media (prefers-reduced-motion: reduce) {
.faq_toggle, .faq_toggle:before, .faq_toggle:after, .faq_item::details-content { transition: none; }
}

/* printing: no gradient, so the open question stays readable */
@media print {
.faq_toggle { display: none; }
.faq_item { box-shadow: none; }
.faq_item[open] > .faq_question { background: none; }
.faq .faq_item[open] > .faq_question h3 { color: #3a4209; text-shadow: none; }
}
