/* =====================================================================
   Focus Ablak v4: product description accordions, FAQ polish and
   catalogue links (plain PDF links, no viewer). Loads after v2.css.
   ===================================================================== */

/* ---------- Long product descriptions (details.pi) ---------- */
.pi-stack { display: flex; flex-direction: column; gap: 14px; }
.pi-stack-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; }
.pi-stack-head h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.15; color: var(--ink); margin: 0; }
.pi-stack-head p { margin: 0; font-size: 15px; color: var(--muted); max-width: 46ch; }

.pi { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.pi:hover { border-color: #b9cad4; }
.pi[open] { border-color: rgba(0,136,204,.45); box-shadow: 0 14px 34px rgba(0,17,26,.07); }
.pi > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 20px 24px; min-height: 76px; }
.pi > summary::-webkit-details-marker { display: none; }
.pi > summary::marker { content: ''; }
.pi-ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; background: var(--primaryLight); color: var(--brand); display: grid; place-items: center; font-size: 17px; }
.pi-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pi-kicker { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.pi-title { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.pi-chev { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand); font-size: 13px; transition: transform .25s, background-color .2s, color .2s, border-color .2s; }
.pi > summary:hover .pi-chev { border-color: var(--brand); }
.pi[open] .pi-chev { transform: rotate(180deg); background: var(--brand); border-color: var(--brand); color: #fff; }
.pi > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; border-radius: 10px; }

.pi-body { border-top: 1px solid var(--line); padding: 30px 32px 32px; container-type: inline-size; }
.pi-grid { display: grid; gap: 26px; }
@container (min-width: 820px) { .pi-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 44px; align-items: start; } }
.pi-main { max-width: 68ch; }
.pi-body p { font-size: 15.5px; line-height: 1.75; color: var(--body); margin: 0 0 14px; }
.pi-body p:last-child { margin-bottom: 0; }
.pi-body h4 { font-family: var(--sans); font-size: 15px; font-weight: 800; line-height: 1.4; color: var(--ink); margin: 26px 0 10px; letter-spacing: 0; }
.pi-main > h4:first-child, .pi-aside > h4:first-child { margin-top: 0; }
.pi-lead { font-size: 16.5px !important; color: var(--ink) !important; }

.pi-list { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pi-list li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.65; color: var(--body); }
.pi-list li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--primaryLight); color: var(--brand); font-size: 9px; display: grid; place-items: center; }

.pi-aside { background: var(--lightBg); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.pi-aside h4 { display: flex; align-items: center; gap: 10px; }
.pi-aside h4 i { color: var(--brand); font-size: 14px; width: 16px; text-align: center; }
.pi-aside p { font-size: 15px; line-height: 1.7; margin-bottom: 12px; }
.pi-aside .pi-list + h4 { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }

.pi-tip { margin-top: 22px; background: var(--primaryLight); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 16px 20px; }
.pi-tip strong { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 4px; }
.pi-tip p { font-size: 15px !important; margin: 0 !important; }

.pi-src { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; font-size: 13.5px; color: var(--muted); }
.pi-src a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-dark); text-decoration: none; min-height: 44px; }
.pi-src a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.pi-src a i { font-size: 12px; }

@media (max-width: 640px) {
  .pi > summary { padding: 16px 18px; gap: 14px; min-height: 72px; }
  .pi-ico { flex-basis: 38px; width: 38px; height: 38px; font-size: 15px; }
  .pi-title { font-size: 16px; }
  .pi-chev { flex-basis: 34px; width: 34px; height: 34px; }
  .pi-body { padding: 22px 20px 24px; }
  .pi-aside { padding: 20px 18px; }
  .pi-body p { font-size: 15px; }
}

/* ---------- FAQ rows (gyik sections): same marker, real padding ---------- */
.faq-item summary { padding-top: 20px !important; padding-bottom: 20px !important; min-height: 64px; line-height: 1.45; transition: color .2s; }
.faq-item summary:hover { color: var(--brand-dark); }
.faq-item summary::after, .faq-item[open] summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 12px; line-height: 1; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand); background: #fff; transition: transform .25s, background-color .2s, color .2s, border-color .2s; }
.faq-item[open] summary::after { transform: rotate(180deg); background: var(--brand); border-color: var(--brand); color: #fff; }
.faq-item .faq-a { padding: 0 54px 24px 0 !important; max-width: 74ch; }
.faq-item .faq-a p, .faq-item .faq-a li { font-size: 15.5px; line-height: 1.75; color: var(--body); }
.faq-item .faq-a ul { list-style: disc; padding-left: 20px; margin: 0 0 10px; }
/* a white FAQ card outside a plain list keeps padding on every side */
.faq-item:not(.faq-list .faq-item) summary { padding-left: 24px !important; padding-right: 24px !important; }
.faq-item:not(.faq-list .faq-item) .faq-a { padding: 0 24px 24px !important; }
@media (max-width: 640px) {
  .faq-item summary { font-size: 16px; gap: 16px; padding-top: 18px !important; padding-bottom: 18px !important; }
  .faq-item .faq-a { padding-right: 0 !important; }
}

/* ---------- Catalogue links: plain PDF links in a new tab ---------- */
.cat-open { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--brand); }
.cat-open i { font-size: 12px; transition: transform .2s; }

/* Vertical card (whole card is the link) */
.cat-doc { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: inherit; text-decoration: none; height: 100%; transition: border-color .2s, box-shadow .2s; }
.cat-doc:hover { border-color: var(--brand); box-shadow: 0 14px 34px rgba(0,17,26,.08); }
.cat-doc:hover .cat-open i { transform: translate(2px, -2px); }
.cat-doc:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.cat-doc-cover { display: flex; align-items: center; justify-content: center; height: 260px; padding: 24px; background: var(--lightBg); border-bottom: 1px solid var(--line); }
.cat-doc-cover img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 8px 22px rgba(0,17,26,.16); border-radius: 2px; }
.cat-doc-body { display: flex; flex-direction: column; gap: 8px; padding: 24px 26px 26px; flex: 1; }
.cat-doc-meta { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cat-doc-title { font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.cat-doc-text { font-size: 15px; line-height: 1.65; color: var(--body); margin: 0; }
.cat-doc-body .cat-open { margin-top: auto; padding-top: 14px; }

/* Compact row (list of catalogues) */
.cat-docs { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.cat-row { display: flex; align-items: center; gap: 16px; padding: 12px 18px 12px 12px; min-height: 76px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; text-align: left; transition: border-color .2s, background-color .2s; }
.cat-row:hover { border-color: var(--brand); background: #fbfdfe; }
.cat-row:hover .cat-open i { transform: translate(2px, -2px); }
.cat-row:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cat-row-cover { flex: 0 0 64px; width: 64px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--lightBg); border-radius: 4px; overflow: hidden; }
.cat-row-cover img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.cat-row-cover i { color: var(--brand); font-size: 20px; }
.cat-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-row-title { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.cat-row-meta { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.cat-row .cat-open { flex: 0 0 auto; font-size: 14px; }
@media (max-width: 480px) {
  .cat-row { gap: 12px; padding-right: 14px; }
  .cat-row-cover { flex-basis: 52px; width: 52px; height: 46px; }
  .cat-row .cat-open span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cat-row .cat-open { width: 36px; height: 36px; justify-content: center; border: 1px solid var(--line); border-radius: 50%; }
}

/* Product card with a catalogue (VEKA tiles) */
.catalog-card .cc-cover { width: 100%; height: 170px; margin-bottom: 22px; display: flex; align-items: center; justify-content: center; padding: 18px; background: var(--lightBg); border: 1px solid var(--line); border-radius: 6px; }
.catalog-card .cc-cover img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 6px 16px rgba(0,17,26,.14); }
.catalog-card .cc-link { margin-top: auto; width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; background: #fff; color: var(--brand); font-weight: 700; border: 1px solid var(--line); border-radius: var(--radius-global); text-decoration: none; transition: border-color .2s, color .2s; }
.catalog-card .cc-link:hover { border-color: var(--brand); color: var(--brand-dark); }
.catalog-card .cc-link i { font-size: 12px; }
@media (max-width: 640px) { .catalog-card { padding: 22px; } .catalog-card .cc-cover { height: 150px; } }

/* Brand catalogue panels (beltéri ajtók) */
.cat-brand { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 28px; display: flex; flex-direction: column; gap: 0; height: 100%; }
.cat-brand-media { height: 150px; background: var(--lightBg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 22px; }
.cat-brand h3 { font-size: 21px; line-height: 1.3; margin: 0 0 8px; }
.cat-brand > p { font-size: 15px; line-height: 1.65; color: var(--body); margin: 0 0 20px; }
@media (max-width: 640px) { .cat-brand { padding: 20px; } }

/* Inline PDF text links keep a full tap target */
a.link-arrow[href$=".pdf"] { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }

/* ---------- v5: gallery framing, variant B (chosen on the kepkezeles page) ----------
   .photo: real photos fill their frame (extended images where the original was portrait).
   .cutout: manufacturer door images sit on a dark navy frame with a thin accent line.
   changes.css forces contain on every .service-gallery image, hence the !important. */
.service-gallery .gallery-item.photo img { object-fit: cover !important; object-position: center 55%; background: none; }
.gallery-item.cutout, .service-gallery .gallery-item.cutout {
  position: relative; isolation: isolate; border: 1px solid #021521;
  background-color: #04202f; background-image: radial-gradient(120% 90% at 50% 0%, #0b3a54 0%, #04202f 60%, #021521 100%);
}
.gallery-item.cutout::before, .gallery-item.cutout::after { content: ''; position: absolute; pointer-events: none; z-index: 1; }
.gallery-item.cutout::before { inset: 0; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 1px, transparent 1px 11px); }
.gallery-item.cutout::after { inset: 9px; border: 1px solid rgba(0,136,204,.9); border-radius: 2px; box-shadow: inset 0 0 0 3px rgba(0,136,204,.12); }
.gallery-item.cutout img, .service-gallery .gallery-item.cutout img {
  position: relative; z-index: 2; object-fit: contain !important; padding: 26px 0; background: none !important;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.45));
}
.gallery-item.cutout:hover img { transform: scale(1.04); }
.gallery-item.cutout .expand-btn { z-index: 3; background: rgba(255,255,255,.18); }
#modellek .gallery-item.cutout img { padding: 22px 12px; }

/* ---------- v5: manufacturer partner strip centred (5 brands) ---------- */
.partners-v2 { grid-template-columns: repeat(5, 1fr); }
/* The global p { max-width: 70ch } kept the "Gyártói partnereink" label left of centre. */
p.m3-label.text-center { max-width: none; }
@media (max-width: 768px) {
  .partners-v2 { display: flex; flex-wrap: wrap; justify-content: center; }
  .partners-v2 span { flex: 0 0 33.333%; }
}

/* ---------- v5 QA corrections at phone width ---------- */
/* The mobile gallery slot is portrait, so cover would cut away half of the 3:2 photos (R9a/R9b). */
@media (max-width: 992px) { .service-gallery .gallery-item.photo img { object-fit: contain !important; background: #edf2f5; } }
/* changes.css pins the compact owner grid to 240px + rest, which beat v2.css's one-column rule below 1024px. */
@media (max-width: 1023px) { .owner-section-compact .owner-v2 { grid-template-columns: 1fr; } .owner-section-compact .owner-v2 figure { max-width: 240px; } }
/* CPL vs dekorfólia table: fit 390px viewports, scroll instead of clipping on anything narrower. */
.cmp-table { overflow-x: auto; }
@media (max-width: 480px) { .cmp-table th, .cmp-table td { padding: 8px; font-size: 14px; } }
