/* ============================================================================
   Solidum — GLOBAL footer compaction (Uncode block id=253, _footer_block=253).
   Applies site-wide (the footer is global, not landing-only). Managed by Claude Code.

   Problem: the upper contacts/columns row carries row_height_percent="60", so
   Uncode's JS writes an inline height (~60% of viewport) onto .row-inner. At
   1440×900 that's ~468px holding only ~192px of real content → ~276px of dead
   centered space, plus 36px+36px table padding. Total footer ~587px @1440.

   Fix (CSS-only): collapse that forced height to content, trim the table padding,
   and tighten the loose contacts/link line-height (1.75 → 1.5). No info removed;
   columns keep their layout and the dark/copyright bands keep their colors.
   ========================================================================== */

/* 1. Kill the row_height_percent dead space. Uncode sets the inline height on
   .row-inner; !important beats that inline declaration. Scoped to the dark
   contacts row (style-color-173718-bg) so the copyright bar is untouched. */
footer.site-footer .style-color-173718-bg .row-inner {
  height: auto !important;
  min-height: 0 !important;
}

/* 2. Trim the table padding on that row (was 36px top & bottom). */
footer.site-footer .style-color-173718-bg .row-parent {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

/* 2b. Desktop (≥960px): give the logo row clear breathing room below the red
   "Servisas" band that sits directly above the global footer. The base 20px top
   (rule 2) read too tight against that red section; 48px separates them tastefully.
   Bottom/copyright spacing is left untouched. Scoped to ≥960px so the narrower
   mobile padding (rule 4, 30px) is unaffected. */
@media (min-width: 960px) {
  footer.site-footer .style-color-173718-bg .row-parent {
    padding-top: 48px !important;
  }
}

/* 3. Tighten the contacts (Kontaktai) + link lists: the text <p>/<a> run at
   line-height 26.25px (1.75) — denser at 1.5 keeps the company/phone/address/
   email and the Produktai/Puslapiai lists compact but still legible. Desktop
   height is governed by the logo column, so this mainly compacts mobile. */
footer.site-footer .style-color-173718-bg .uncode_text_column p,
footer.site-footer .style-color-173718-bg .uncode_text_column a {
  line-height: 1.5 !important;
}

/* 4. Mobile (≤959px): columns stack, so height is content-driven. Reclaim the
   oversized table padding (the row_height_percent dead space is small here).
   Keep a roomier TOP padding so the logo doesn't feel stuck to the Servisas
   band directly above it. */
@media (max-width: 959px) {
  footer.site-footer .style-color-173718-bg .row-parent {
    padding-top: 30px !important;
    padding-bottom: 14px !important;
  }
}

/* Kontaktai (Uncode block 253, items in order: NAME, ADDRESS, EMAIL, PHONE) —
   stacked on desktop (narrow 4-up column). */
footer.site-footer .solidum-contact-item { display: block; }

@media (max-width: 959px) {
  /* The Kontaktai column is the only footer column with the builder's
     `pos-center` class → text-align:center is DECLARED on its .wpb_column (the
     link columns are left). Override it there (and explicitly on the heading) so
     the whole Kontaktai column — header + contacts — is left, like the others. */
  footer.site-footer .style-color-173718-bg .wpb_column:has(.solidum-contact-item),
  footer.site-footer .style-color-173718-bg .wpb_column:has(.solidum-contact-item) .vc_custom_heading_wrap,
  footer.site-footer .style-color-173718-bg .wpb_column:has(.solidum-contact-item) h4 {
    text-align: left !important;
  }
  /* Single full-width column (2026-06-19, Fix F): stack the 4 contact items
     vertically (NAME / ADDRESS / EMAIL / PHONE) — the mobile footer is now one
     long single column, so the old 2-up grid is dropped. The <p> is a plain
     block; `.solidum-contact-item{display:block}` (below) stacks the items. */
  footer.site-footer .style-color-173718-bg .uncode_text_column:has(.solidum-contact-item) > p {
    display: block;
    margin: 0;
    text-align: left;
  }
  /* items shrink to content (no stretch) so the inner <a> sits flush-left — the
     contact <p> still inherits text-align:center from the column, which would
     otherwise centre the link inside a stretched cell (the "email gap"). */
  footer.site-footer .solidum-contact-item {
    display: block;
    white-space: nowrap;
    text-align: left;
  }
}

/* ============================================================================
   5. Mobile footer declutter (2026-06-19). Mobile-only (≤959px) tweaks:
     #1 shorter tagline, #3 logo + socials on one row (logo left, socials right).
   (Fix F, 2026-06-19: the former #2 "hide brands column" and #4 "hide Puslapiai
   heading" rules were REMOVED — those sections are now restored as collapsible
   accordions; see §6/§7 below.)
   IMPORTANT: every column selector is pinned to `.column_child` (the INNER
   footer columns). The dark row's OUTER wrapper column also matches `:has(...)`
   (the links/socials are its descendants); without `.column_child` an unscoped
   `:has(a[href*=saunier-duval])` hid the ENTIRE row. `.column_child` excludes the
   `.column_parent` wrapper, so only the intended inner column is targeted.
   ========================================================================== */

/* #1 tagline: two copies live in block 253 (`.solidum-tag-full` /
   `.solidum-tag-short`); show the full one by default (desktop). */
.solidum-tag-short { display: none; }

@media (max-width: 959px) {
  /* #1 swap to the short tagline on mobile */
  .solidum-tag-full { display: none; }
  .solidum-tag-short { display: inline; }

  /* #3 (revised 2026-06-19, Fix G — was "logo + socials on one row"): the socials
     now sit UNDER the tagline, left-aligned, matching the DESKTOP placement. The
     former flex row pinned the logo to 62% and pushed the two icons to the cramped
     top-right of the logo row; that whole reorder is removed. Logo / tagline /
     socials now stack in natural DOM order. Even vertical rhythm is set here:
     12px under the logo, 16px under the tagline. The logo media is capped so it
     doesn't stretch full-width without the old 62% pin. */
  footer.site-footer .style-color-173718-bg .wpb_column.column_child:has(.uncode-vc-social) .uncont > .uncode-single-media {
    margin: 0 0 12px 0;
    max-width: 240px;
  }
  footer.site-footer .style-color-173718-bg .wpb_column.column_child:has(.uncode-vc-social) .uncont > .vc_custom_heading_wrap {
    margin: 0 0 16px 0;
  }
  /* Social group: left-aligned flex row, even 12px gaps, ≥44px tap targets.
     DOM: .uncode-vc-social > .social-icon > a > i.fa (icon font 18px, white@.85,
     contrast 6.98:1 on #0055BA — passes). The theme renders each <a> at 36×36
     with a 27px left margin / margin-left:auto from the old flex; reset both and
     grow the <a> to a 44×44 centered tap target. */
  footer.site-footer .style-color-173718-bg .uncode-vc-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    justify-content: flex-start;
  }
  footer.site-footer .style-color-173718-bg .uncode-vc-social .social-icon {
    margin: 0;
    width: 44px;
    height: 44px;
  }
  footer.site-footer .style-color-173718-bg .uncode-vc-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
  }
}

/* ============================================================================
   6. Brand backgrounds (all widths, Fix F 2026-06-19). The dark contacts row
   paints its background-color directly on the `.vc_row.style-color-173718-bg`
   element (verified live: rgb(21,29,47), no background-image, NO separate
   overlay node and no ::before — so a plain background-color override is all
   that's needed). Repaint it brand blue; repaint the copyright band black.
   Light footer text stays legible on #0055BA (white ≈ 6:1, WCAG AA).
   ========================================================================== */
footer.site-footer .style-color-173718-bg {
  background-color: #0055ba !important;
  background-image: none !important;
}
footer.site-footer .style-color-179822-bg {
  background-color: #000000 !important;
  background-image: none !important;
}

/* ============================================================================
   7. Mobile single column + collapsible Produktai/Pages (Fix F 2026-06-19).
   ≤959px: stack every footer section into ONE full-width column (Produktai &
   Puslapiai previously rendered 2-up). The Produktai and Pages sections are made
   collapsible by `footer-accordion.js`, which adds `.solidum-acc` to the column
   and `.solidum-acc-head` / `.solidum-acc-body` to the heading-wrap / link list
   inside the column's single `.uncont`. Collapse is gated on
   `html.solidum-acc-ready` (set by the JS) so there is NO flash before JS runs
   and the footer stays fully expanded if JS is absent/disabled. All ≤959px, so
   desktop keeps its 4 columns, no chevrons, no toggles.
   ========================================================================== */
@media (max-width: 959px) {
  /* Single full-width column. Pinned to `.column_child` (outer `.column_parent`
     also matches and would collapse the whole row). */
  footer.site-footer .style-color-173718-bg .wpb_column.column_child {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  /* Accordion heading = tappable, with a chevron. Only the JS-marked sections.
     min-height:44px + flex centering gives an easy ≥44px tap target (Fix G;
     header rows were ~23px). */
  footer.site-footer .style-color-173718-bg .wpb_column.column_child.solidum-acc .solidum-acc-head {
    cursor: pointer;
    position: relative;
    user-select: none;
    padding-right: 1.4em;   /* room for the chevron */
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  footer.site-footer .style-color-173718-bg .wpb_column.column_child.solidum-acc .solidum-acc-head::after {
    content: "";
    position: absolute; right: .25em; top: calc(50% - .25em);  /* vertically centered in the 44px row */
    width: .5em; height: .5em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);          /* chevron points down = collapsed */
    transition: transform .2s ease;
    opacity: .85;
  }
  /* Expanded: heading carries aria-expanded="true" → chevron points up. */
  footer.site-footer .style-color-173718-bg .wpb_column.column_child.solidum-acc .solidum-acc-head[aria-expanded="true"]::after {
    transform: rotate(-135deg);
  }

  /* The link list collapses ONLY once the JS is ready (no FOUC, no-JS safe). */
  html.solidum-acc-ready footer.site-footer .style-color-173718-bg .wpb_column.column_child.solidum-acc .solidum-acc-body {
    display: none;
  }
  html.solidum-acc-ready footer.site-footer .style-color-173718-bg .wpb_column.column_child.solidum-acc.is-open .solidum-acc-body {
    display: block;
  }
}

/* ============================================================================
   8. Mobile footer polish (Fix G, 2026-06-19). ≤959px only — desktop untouched.
   Normalizes label/contact font sizes onto one scale, matches the always-open
   Kontaktai header to the two collapsible ones, sets one even column rhythm, and
   lifts the only faint text (the 50%-opacity "Privatumo politika" link). No band
   recolor — the black copyright band is intentional (Fix F); contacts (white@.85,
   ~5.5:1) and all labels (white, 6.98:1) already pass 4.5:1.

   Measured BEFORE (390, both engines): section labels 11px, tagline 12px,
   copyright 11px (one-off small sizes); Produktai/Puslapiai/Kontaktai header rows
   ~23px tall; "Privatumo politika" white@.5 on #000 (~5.3:1, faint).
   ========================================================================== */
@media (max-width: 959px) {
  /* Font scale: section labels → 14px, tagline → 13px (was 11 / 12). An existing
     Additional-CSS rule pins Produktai/Puslapiai to 11px !important via
     `.style-color-173718-bg .column_child:nth-child(2|3) h4` (specificity 0,3,1)
     and the rest to 13px — so this override must reach 0,3,2 (add `.column_child`)
     AND use !important to beat it. Result: all four labels a uniform 14px. */
  footer.site-footer .style-color-173718-bg .column_child h4 {
    font-size: 14px !important;
  }
  footer.site-footer .style-color-173718-bg .solidum-tag-short {
    font-size: 13px !important;
  }
  /* Copyright fine print 11 → 12px (clean scale; already passes contrast). */
  footer.site-footer .style-color-179822-bg .uncode_text_column {
    font-size: 12px !important;
  }

  /* Kontaktai (always-open, not collapsible) — match the collapsible heads:
     ≥44px row, flex-centered label. No chevron, no cursor (it never toggles). */
  footer.site-footer .style-color-173718-bg .wpb_column:has(.solidum-contact-item) .vc_custom_heading_wrap {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* One even column rhythm: equal gap below each stacked footer column so the
     logo group, the two accordion header rows, and Kontaktai sit on a consistent
     vertical beat. */
  footer.site-footer .style-color-173718-bg .wpb_column.column_child {
    margin-bottom: 8px;
  }

  /* Full-opacity copyright band (black). The © line + "Privatumo politika" link
     rendered white@.5 (theme rule `.style-color-179822-bg p, …​ a {color:rgba(
     255,255,255,.5)!important}`, spec 0,1,1) — both needlessly faint. Repaint the
     WHOLE band solid white; the band-prefixed selectors below sit at (0,2,2)+ so
     they beat the theme. (Supersedes the earlier white@.9 Privatumo-only lift.) */
  footer.site-footer .style-color-179822-bg,
  footer.site-footer .style-color-179822-bg p,
  footer.site-footer .style-color-179822-bg .uncode_text_column,
  footer.site-footer .style-color-179822-bg .uncode_text_column p,
  footer.site-footer .style-color-179822-bg a {
    color: #ffffff !important;
    opacity: 1 !important;
  }
}

/* ============================================================================
   9. Mobile footer text — full-opacity white (2026-06-19). ≤959px only.
   The theme/Uncode fades the blue contacts-row text for no real reason, via
   DEEP !important selectors that out-specify a plain band-scoped rule:
     • headings  `.style-color-173718-bg .column_child h4 {opacity:.6!important}`
       and `…​ .column_child:nth-child(2|3) h4 {opacity:.5!important}`  (0,2-3,1)
     • tagline   `.style-color-173718-bg .column_child:nth-child(1) h6
                  {opacity:.7!important}`                               (0,3,1)
     • body text `.style-color-173718-bg .uncol .uncoltable .uncell .column_child
                  p/li {color:rgba(255,255,255,.85)!important}`         (0,5,1)
   So every override below mirrors Uncode's own `.column_child` /
   `.uncol .uncoltable .uncell .column_child` chain to reach (0,4,2)/(0,6,2) and
   win. On the brand-blue (#0055BA) band the result is solid, full-opacity white.
   (The black copyright band is handled in §8.) Desktop — signed off
   pixel-perfect — is untouched (all ≤959px).
   ========================================================================== */
@media (max-width: 959px) {
  /* Kill the element-opacity fade on all four headings + the short tagline.
     Mirrors the :nth-child competitors so specificity (0,4,2) beats their (0,3,1). */
  footer.site-footer .style-color-173718-bg .column_child h4,
  footer.site-footer .style-color-173718-bg .column_child:nth-child(1) h4,
  footer.site-footer .style-color-173718-bg .column_child:nth-child(2) h4,
  footer.site-footer .style-color-173718-bg .column_child:nth-child(3) h4,
  footer.site-footer .style-color-173718-bg .column_child h6,
  footer.site-footer .style-color-173718-bg .column_child:nth-child(1) h6 {
    opacity: 1 !important;
  }
  /* Solid white for every text node on the blue band (was white@.85 via the deep
     `.uncol .uncoltable .uncell .column_child` chain — mirror it to win at 0,6,2). */
  footer.site-footer .style-color-173718-bg .uncol .uncoltable .uncell .column_child p,
  footer.site-footer .style-color-173718-bg .uncol .uncoltable .uncell .column_child li,
  footer.site-footer .style-color-173718-bg .uncol .uncoltable .uncell .column_child a,
  footer.site-footer .style-color-173718-bg .uncol .uncoltable .uncell .column_child h4,
  footer.site-footer .style-color-173718-bg .uncol .uncoltable .uncell .column_child h6,
  footer.site-footer .style-color-173718-bg .solidum-contact-item {
    color: #ffffff !important;
  }
}
