/* Contact page (2026 look): three cards with soft icon badges, a labelled phone row and tap-friendly e-mail pills.
   Same text and layout as before: Publisher on top, Principal and Support Contact side by side (stacked below 768px).
   Selectors start with "html body ..." so they beat the global page-spacing rules (GitHub #764). */

/* rows become grids: 24px between cards (the cards carry their own padding) */
html body .layout-section .container .row:not(.ftr):has(> [class*="col-"] > h2) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start !important; margin-left: 0; margin-right: 0; }
html body .layout-section .container .row:not(.ftr):has(> .col-md-6 > h2) { margin-top: 24px !important; }
@media (min-width: 768px) { html body .layout-section .container .row:not(.ftr):has(> .col-md-6 > h2) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* card: badge | title on the first line, details below (each card is only as tall as its content) */
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) { display: grid !important; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 16px !important; row-gap: 20px !important; align-items: center; width: auto !important; max-width: none !important; min-width: 0; padding: 32px !important; margin: 0 !important; background: #fff; border: 1px solid color-mix(in srgb, var(--primary-color) 12%, #fff); border-radius: 12px; box-shadow: 0 1px 2px rgba(26, 56, 121, 0.05), 0 14px 30px -22px rgba(26, 56, 121, 0.35); }
html body .layout-section .container .row:not(.ftr) > [class*="col-"] + [class*="col-"]:has(> h2) { margin: 0 !important; }

/* soft icon badge */
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2)::before { content: ""; grid-column: 1; grid-row: 1; width: 56px; height: 56px; border-radius: 16px; background-color: color-mix(in srgb, var(--primary-color) 9%, #fff); background-repeat: no-repeat; background-position: center; background-size: 28px; }
html body .layout-section .container .row:not(.ftr) > .col-md-12:has(> h2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%231a3879'%3E%3Cpath d='M24 4 3 14v4h42v-4L24 4zm0 5.4L34.5 14h-21L24 9.4zM7 21v15h6V21H7zm10 0v15h6V21h-6zm10 0v15h6V21h-6zm10 0v15h6V21h-6zM3 39v5h42v-5H3z'/%3E%3C/svg%3E"); }
html body .layout-section .container .row:not(.ftr) > .col-md-6:first-child:has(> h2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%231a3879' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='16' r='9'/%3E%3Cpath d='M6 43c0-10 8-16 18-16s18 6 18 16z'/%3E%3C/svg%3E"); }
html body .layout-section .container .row:not(.ftr) > .col-md-6:last-child:has(> h2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%231a3879' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 28v-5a16 16 0 0 1 32 0v5'/%3E%3Crect x='6' y='26' width='8' height='13' rx='3' fill='%231a3879'/%3E%3Crect x='34' y='26' width='8' height='13' rx='3' fill='%231a3879'/%3E%3Cpath d='M38 39c0 4-4 6-10 6'/%3E%3C/svg%3E"); }

/* title: no green bar or underline */
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) > h2 { grid-column: 2; grid-row: 1; display: block !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; color: var(--primary-color); font-size: 26px !important; font-weight: 700 !important; line-height: 1.2 !important; }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) > h2::after { content: none !important; }

/* details */
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) > .lc-text-block-content { grid-column: 1 / -1; grid-row: 2; align-self: stretch; display: flex !important; flex-direction: column; gap: 12px; margin: 0 !important; padding: 20px 0 0 !important; background: none !important; border: 0 !important; border-top: 1px solid color-mix(in srgb, var(--primary-color) 9%, #fff) !important; border-radius: 0 !important; box-shadow: none !important; }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p { margin: 0 !important; color: #4b5563; font-size: 16px; line-height: 1.7; }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> strong:first-child) { margin-top: 0 !important; }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p > strong:first-child { display: block; margin-bottom: 2px; color: var(--primary-color); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p > strong + br { display: none; }

/* e-mail pill: whole pill is the tap target (stretched link); the "Email:" text in the Publisher block is replaced by the icon */
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"]) { position: relative; display: flex !important; align-items: center; align-self: flex-start; max-width: 100%; min-height: 52px; margin-top: 0 !important; padding: 6px 16px 6px 6px; border: 1px solid color-mix(in srgb, var(--primary-color) 16%, #fff); border-radius: 14px; background: color-mix(in srgb, var(--primary-color) 4%, #fff); font-size: 0 !important; transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s, transform 0.2s; }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"])::before { content: ""; flex: 0 0 36px; height: 36px; margin-right: 10px; border-radius: 10px; background-color: color-mix(in srgb, var(--primary-color) 10%, #fff); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a3879' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 18px; }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"]) > a { min-width: 0; color: var(--primary-color); font-size: 16px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"]) > a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"]):hover { border-color: var(--primary-color); background: #fff; box-shadow: 0 10px 22px -14px rgba(26, 56, 121, 0.5); transform: translateY(-1px); }
html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"]):has(> a:focus-visible) { outline: 2px solid var(--primary-color); outline-offset: 2px; }

/* Publisher card, 768px and up: address on the left, e-mail pill on the right */
@media (min-width: 768px) {
  html body .layout-section .container .row:not(.ftr) > .col-md-12:has(> h2) > .lc-text-block-content { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 32px; }
  html body .layout-section .container .row:not(.ftr) > .col-md-12:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"]) { margin-top: 0 !important; align-self: end; }
}

/* below 1200px */
@media (max-width: 1199.98px) {
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) { padding: 28px !important; }
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2)::before { width: 52px; height: 52px; border-radius: 14px; background-size: 26px; }
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) > h2 { font-size: 24px !important; }
}
/* two narrow cards side by side (768-991px): slightly smaller padding so the longest address fits on one line */
@media (min-width: 768px) and (max-width: 991.98px) {
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) { padding: 24px !important; }
}
/* stacked cards (below 768px) */
@media (max-width: 767.98px) {
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) { padding: 24px !important; }
}
/* phones */
@media (max-width: 575.98px) {
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) { padding: 20px !important; column-gap: 14px !important; row-gap: 16px !important; }
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2)::before { width: 46px; height: 46px; border-radius: 13px; background-size: 22px; }
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) > h2 { font-size: 21px !important; }
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content { padding-top: 16px !important; }
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p { font-size: 15px; }
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"]) > a { font-size: 15px; }
}
/* very narrow phones: drop the pill icon so the longest address always fits on one line */
@media (max-width: 359.98px) {
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) { padding: 16px !important; }
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"]) { padding: 6px 14px; }
  html body .layout-section .container .row:not(.ftr) > [class*="col-"]:has(> h2) .lc-text-block-content p:has(> a[href^="mailto:"])::before { display: none; }
}
