@charset "utf-8";

/* CSS Document */
/* Mina stilar från innan */

/* ── Self-hosted fonts (Inter + Montserrat, variable, latin + latin-ext) ──── */
/* Both are variable fonts — one file covers all weights. unicode-range lets
   the browser only fetch latin-ext when a glyph from that block is rendered. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/montserrat-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/montserrat-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Global: prevent HTML width/height attributes from stretching images ──── */
/* width/height HTML attributes are set for CLS prevention (aspect-ratio hint).
   Without this rule, browsers apply the HTML height as a presentational hint
   in contexts where CSS only sets width (e.g. Bootstrap's card-img-top),
   causing images to render at their original pixel height and appear stretched. */
picture img { height: auto; }

/* ── Hero (homepage) ──────────────────────────────────────────────────────── */
/* Background image is rendered as <picture>/<img> instead of CSS background
   so the browser preload scanner can discover and prioritize it (LCP). */
.hero-section { position: relative; overflow: hidden; }
.hero-section .hero-bg,
.hero-section .hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-section .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}
.hero-section .hero-content { position: relative; z-index: 2; }
.hero-section .hero-content h1,
.hero-section .hero-content p {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

/* ── Mortgage simulator highlight (homepage) ─────────────────────────────── */
.mortgage-highlight {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
}
/* Background photo (house on the right) under a blue gradient that keeps the
   left-hand text readable; the gradient fully covers it on narrow screens. */
.mortgage-highlight .mortgage-highlight-bg,
.mortgage-highlight .mortgage-highlight-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 20%;
}
.mortgage-highlight::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(23, 37, 84, 0.92) 0%, rgba(30, 58, 138, 0.82) 100%);
    pointer-events: none;
}
@media (min-width: 992px) {
    .mortgage-highlight::before {
        background: linear-gradient(90deg,
            rgba(23, 37, 84, 0.94) 0%,
            rgba(30, 58, 138, 0.85) 38%,
            rgba(30, 58, 138, 0.35) 62%,
            rgba(30, 58, 138, 0) 80%);
    }
}
.mortgage-highlight .container { position: relative; z-index: 2; }
.mortgage-highlight .mortgage-features li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}
.mortgage-highlight .mortgage-features i {
    color: #fbbf24; /* warning yellow */
}
/* Override Bootstrap btn-warning so it stays vivid on the dark blue gradient
   and inherits dark text instead of the section's white. */
.mortgage-highlight .btn-warning {
    color: #1e3a8a !important;
    background-color: #fbbf24;
    border-color: #fbbf24;
    padding: 0.85rem 2rem;
    font-size: 1.15rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.mortgage-highlight .btn-warning:hover,
.mortgage-highlight .btn-warning:focus {
    color: #1e3a8a !important;
    background-color: #fcd34d;
    border-color: #fcd34d;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

/* ── Provider logo ribbon ─────────────────────────────────────────────────── */

.provider-ribbon {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    justify-items: center;
    align-items: center;
}

.provider-ribbon-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.provider-ribbon-item img {
    max-height: 32px;
    max-width: 100px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.6);
}

/* Tablet: single row, overflow hidden */
@media (min-width: 768px) {
    .provider-ribbon {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 1.5rem;
        overflow: hidden;
        max-height: 48px;
    }

    .provider-ribbon-item {
        flex-shrink: 0;
    }
}

/* ── Loan Card ────────────────────────────────────────────────────────────── */

.loan-card-logo-col {
    min-width: 130px;
    max-width: 220px;
}

/* Default: wide/wordmark logos — width-first constraint */
.loan-card-logo {
    width: 100%;
    max-width: 180px;
    max-height: 90px;
    object-fit: contain;
}

/* Square/icon logos (aspect ratio ≤ 1.3) — taller but narrower */
.loan-card-logo.loan-card-logo-sq {
    max-width: 90px;
    max-height: 90px;
}

/* Mobile: scale down loan logos */
@media (max-width: 767.98px) {
    .loan-card-logo-col {
        min-width: auto;
        max-width: none;
    }
    .loan-card-logo {
        width: 100%;
        max-width: 150px;
        max-height: 55px;
    }
    .loan-card-logo.loan-card-logo-sq {
        max-width: 65px;
        max-height: 65px;
    }
}

.lc-stats .lc-label {
    font-size: 0.72rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1px;
}

.lc-stats .lc-value {
    font-weight: 600;
    font-size: 0.875rem;
}

.lc-features {
    background-color: #f8f9fa;
    padding: 6px 12px !important;
    text-align: center;
}

.lc-features .badge {
    margin: 2px 2px !important;
}

.loan-out-of-range {
    opacity: 0.45;
    transition: opacity 0.2s ease;
}

/* ── Ad disclosure badge ─────────────────────────────────────────────────── */

/* ── Feature icon (SVG variant) ──────────────────────────────────────────── */
.feature-icon-svg {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    display: inline-block;
}

.lc-ad-badge {
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 0.6rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* Loan card CTA — glow + scale hover instead of Bootstrap's color-shift */
.loan-card .btn-primary {
    transition: box-shadow 0.18s ease, transform 0.15s ease;
}
.loan-card .btn-primary:hover,
.loan-card .btn-primary:focus-visible {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.35), 0 4px 14px rgba(13, 110, 253, 0.25);
    transform: scale(1.04);
}

/* Logo sizing */
.navbar-brand img {
  height: 50px;
  /* Desktop default */
  width: auto;
  transition: height 0.3s ease;
}

.fade-line {
  width: 100%;
  height: 1px;
  margin: 1px 0;
}

/* Affiliate disclosure bar */
.affiliate-bar {
  color: #795548;
  font-size: 0.8125rem;
  padding: 0 0;
  text-align: center;
}

.disclosure-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid #dc2626;
  color: #dc2626;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  margin: 0 4px;
  vertical-align: 2px;
}

.disclosure-icon--flipped {
  transform: rotate(180deg);
}

/* Reduce top margin on main content containers (disclaimer bar adds visual separation) */
.container.mt-4 {
  margin-top: 0.75rem !important; /* 12px, down from Bootstrap's 1.5rem (24px) */
}

/* Typography */
.label {
  font-size: 1rem;
  /* Default font size */
}

.navbar-nav .nav-link {
  font-size: 1rem;
  /* 16px */
  font-weight: 500;
  padding: 1rem 1.25rem;
  white-space: nowrap;
}

.custom-navbar {
  background-color: #FFFFFF !important;
}

.dropdown-item {
  font-size: 0.9375rem;
  /* 15px */
  padding: 0.5rem 1.5rem;
}
.icon-link i {
  transition: all 0.2s ease-in-out;
}
/* Typography END */

/* Hover states */
.nav-link:hover {
  color: #0056b3;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
}
.icon-link:hover i {
  color: #ff000d; /* Optional: change color on hover */
  transform: scale(1.1); /* Optional: make icon grow */
}
/* Hover states END */

.dropdown-menu .dropdown-toggle::after {
  border-top: .3em solid transparent;
  border-right: 0;
  border-bottom: .3em solid transparent;
  border-left: .3em solid;
}

.dropdown-menu .dropdown-menu {
  margin-left: 0;
  margin-right: 0;
}

.dropdown-menu li {
  position: relative;
}

.nav-item .submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: -7px;
}

.dropdown-menu>li:hover>.submenu {
  display: block;
}

/* Keep other nav items relative for proper dropdown positioning */
.navbar-nav .nav-item {
  position: relative;
}

/* Make only the megamenu parent static */
.navbar-nav .nav-item.megamenu-item {
  position: static;
}

.mega-menu {
  display: none;
  left: 0;
  position: absolute;
  width: 100%;
  padding: 20px 0;
  background-color: #f8f9fa;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.mega-menu h5 {
  color: #333;
  /*font-weight: bold;*/
  /*margin-bottom: 15px;*/
  /*font-size: 1.1rem;*/
  font-size: 1.125rem;
  /* 18px */
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 1.25rem;
}

/* No extra space above a root category when it's the first row in a column. */
.mega-menu .col-lg-4 > h5:first-child {
  margin-top: 0;
}

.mega-menu .list-unstyled {
  margin-bottom: 20px;
}

.mega-menu .list-unstyled li {
  margin-bottom: 10px;
}

.mega-menu a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mega-menu a:hover {
  color: #007bff;
}

/* Mobile menu adjustments */
@media (max-width: 991.98px) {

  .label {
    font-size: 0.9rem;
  }

  .navbar-brand img {
    height: 37px;
    /* Smaller logo on mobile */
  }

  .navbar-toggler {
    margin-left: auto;
    padding-right: 15px;
  }

  .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-item .submenu {
    position: static;
    /* Stack sub-menus vertically */
    left: auto;
    top: auto;
    width: 100%;
    /* Full-width to match parent */
    display: none;
    /* Keep hidden until toggled */
  }

  .dropdown-menu>li:hover>.submenu,
  .dropdown-menu>li.show>.submenu {
    display: block;
    /* Show sub-menu when parent is hovered or toggled */
  }

  .dropdown-menu .dropdown-toggle::after {
    border-left: 0;
    /* Adjust arrow to point down */
    border-right: .3em solid transparent;
    border-top: 0;
    border-bottom: .3em solid;
    vertical-align: middle;
    /* Align arrow with text */
  }

  header {
    flex-shrink: 0;
    /* Prevents header from expanding */
  }

  .mega-menu {
    position: static;
    padding: 10px 0;
  }
}

/* Small mobile devices */
@media (max-width: 575.98px) {
  .navbar-brand img {
    height: 28px;
    /* Even smaller logo on small mobile */
  }
}

/* Medium mobile devices */
@media (min-width: 576px) and (max-width: 767.98px) {
  .col-sm-6 {
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
  }
}

/* General Styles */
body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
}

/* Card Styles for Loan Boxes */
.card {
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-body {
  padding: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .navbar-nav {
    text-align: center;
  }

  .card {
    margin-bottom: 1rem;
  }
}

/* Footer Styles */
footer a {
  color: #fff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Bootstrap */
.col-md-4 {
  padding-bottom: 31px;
  /* Adds space inside each column */
}

/* Desktop sub-menu adjustments */
@media (min-width: 992px) {
  .dropdown-menu .submenu {
    position: absolute;
    right: auto;
    /* Default to right-side opening */
    left: 100%;
    /* Original behavior */
    top: 0;
  }

  /* Target deeper sub-menus (e.g., América → EE.UU) */
  .dropdown-menu .submenu .submenu {
    left: auto;
    right: 100%;
    /* Open to the left for deeper sub-menus */
  }

  .dropdown-menu>li:hover>.submenu,
  .dropdown-menu>li.show>.submenu {
    display: block;
  }
}

/* ─── Image attribution — reveal-on-hover/click camera icon ─── */
.img-figure {
  margin: 0;
  position: relative;        /* anchor for the absolutely-positioned credit */
}

/* Corner control + sliding panel. Lives over the bottom-right of the image.
   row-reverse keeps the icon (first child) pinned to the right while the panel
   expands to its left — so the icon never moves out from under the cursor
   (which would otherwise cause an open/close flicker loop). */
.img-credit {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0;
  max-width: calc(100% - 12px);
  margin: 0;
}
.img-credit-toggle {
  position: relative;        /* anchor for the enlarged hit area */
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.62rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.35;             /* subtle by default */
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
/* Invisible ~35px-radius hover/tap zone around the icon, so the credit
   reveals only near the icon — not when hovering anywhere on the image. */
.img-credit-toggle::before {
  content: "";
  position: absolute;
  /* Biased up/left (into the image, where the cursor comes from); minimal
     spill down/right so it doesn't intercept clicks below the image. */
  inset: -30px -8px -8px -30px;
}
.img-credit-toggle:hover,
.img-credit-toggle:focus-visible,
.img-credit.is-open .img-credit-toggle {
  opacity: 0.9;
  outline: none;
}
/* Hidden text panel that slides out to the left of the icon. */
.img-credit-panel {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  font-size: 0.7rem;
  line-height: 1.2;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 11px 0 0 11px;
  padding: 0;
  margin-right: -11px;       /* tuck behind the round icon when closed */
  transition: max-width 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  pointer-events: none;
}
/* Tap (JS toggles .is-open) and keyboard focus reveal on every device. */
.img-credit:focus-within .img-credit-panel,
.img-credit.is-open .img-credit-panel {
  max-width: min(420px, 80vw);
  opacity: 1;
  padding: 4px 18px 4px 10px;
  pointer-events: auto;
}
/* Hover reveal only where hover truly exists — prevents the panel sticking
   open after a tap on touch devices. Triggered by hovering the icon (incl. its
   enlarged ::before hit area), not the whole image. */
@media (hover: hover) {
  .img-credit:hover .img-credit-panel {
    max-width: min(420px, 80vw);
    opacity: 1;
    padding: 4px 18px 4px 10px;
    pointer-events: auto;
  }
}
.img-credit-panel a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.img-credit-panel a:hover {
  color: #e9ecef;
}

/* Hero variant — sits in the homepage hero's bottom-right, above the overlay. */
.hero-section .img-credit--hero {
  right: 12px;
  bottom: 12px;
  z-index: 4;                /* above .hero-overlay (1) and .hero-content (2) */
}

/* ─── Attributions page — credit groups + thumbnails ─── */
.attr-credit {
  font-weight: 600;
}
.attr-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attr-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
}

@media (min-width: 1200px) {
  .col-xl-3 {
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 31px;
  }
}

/* ─── Article hero image ─── */
/* Fills the Bootstrap container width at all screen sizes. */
.img-breakout-outer picture {
  display: block;
}
.img-breakout-outer picture img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

/* ─── Hero image (renderHeroImage) ─── */
.hero-image picture { display: block; }
.hero-image picture img,
.hero-image figure { margin: 0; }
.hero-image + .lead { margin-top: 15px; }

/* ─── Image gallery carousel ─── */
.image-gallery .carousel-item picture { display: block; }
.image-gallery .carousel-item img {
  max-height: 500px;
  object-fit: contain;
  background: #f8f9fa;
}
.image-gallery .gallery-single picture { display: block; }

/* ── Brand logo box ───────────────────────────────────────────────────────── */
/* Constrains logos (including SVGs). Works for both square icons and wide wordmarks.
   Explicit width is required so that SVGs with only viewBox (no width/height in the
   SVG element) have a concrete pixel value to resolve width:auto / max-width:100%
   against inside a flex item. Without it the browser gets a circular dependency and
   collapses the image to 0×0. */
.brand-logo-sm { width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.brand-logo-sm picture { display: contents; }
.brand-logo-sm img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Wide wordmark logo on brand detail page.
   Height-driven sizing: the img is always 60px tall and its width follows the
   natural aspect ratio — no object-fit letterboxing / side margins. */
.brand-logo-wide { display: inline-block; max-width: 100%; }
.brand-logo-wide picture { display: block; }
.brand-logo-wide img {
  display: block;
  height: 60px;
  width: auto;
  max-width: 280px;
}

/* ── Loan provider logos (/entidades/) ───────────────────────────────────── */
/* Index card: logo area constrained to a fixed height, width is natural */
.provider-index-logo-wrap {
  display: flex;
  align-items: center;
  height: 56px;
}
.provider-index-logo {
  max-height: 56px;
  width: auto;
  max-width: 180px;
}

/* Detail page: larger logo beside the provider name */
.provider-detail-logo-wrap {
  display: flex;
  align-items: center;
  height: 80px;
}
.provider-detail-logo {
  max-height: 80px;
  width: auto;
  max-width: 260px;
}

/* ── Brand logo in product cards ─────────────────────────────────────────── */
.card-brand-logo { display: inline-block; vertical-align: middle; line-height: 0; }
.card-brand-logo picture { display: inline-block; line-height: 0; }
.card-brand-logo img {
  display: block;
  height: 24px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
}

/* ── Brand card grid ─ adaptive layout based on logo aspect ratio ───────── */
/* Square icon cards: logo left + name right */
.brand-card-logo-sq { width: 48px; height: 48px; }
.brand-card-logo-sq picture,
.brand-card-logo-sq img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* ── Purpose cards (homepage section 5) ─────────────────────────────────── */

.purpose-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.purpose-card:hover {
  box-shadow: 0 6px 20px rgba(65, 113, 184, 0.18);
  transform: translateY(-3px);
}

.purpose-card-header {
  background: linear-gradient(135deg, #4171b8 0%, #498ecc 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.purpose-card-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.purpose-card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.purpose-card-desc {
  color: #475569;
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.55;
  margin: 0 0 auto;
  padding-bottom: 14px;
}

.purpose-card-cta {
  color: #4171b8;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-block;
  margin-top: auto;
  transition: color 0.15s ease;
}

.purpose-card-cta:hover {
  color: #2c5a96;
  text-decoration: none;
}

.purpose-card-img-wrap {
  display: block;
  line-height: 0;
}
.purpose-card-img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
}

/* ── Child purpose cards (Opciones Relacionadas) ────────────────────────── */

.child-purpose-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
}
.child-purpose-card:hover {
  box-shadow: 0 6px 20px rgba(65, 113, 184, 0.18);
  transform: translateY(-3px);
}
.child-purpose-card-header {
  background: linear-gradient(135deg, #4171b8 0%, #498ecc 100%);
  padding: 16px 20px;
  min-height: 56px;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.child-purpose-card-header:hover {
  text-decoration: none;
}
.child-purpose-card-header h3 {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin: 0;
}
.child-purpose-card-img-link {
  display: block;
  line-height: 0;
  position: relative;
}
/* When renderImageTag wraps in <figure>, ensure it fills the card width */
.child-purpose-card-img-link .img-figure {
  margin: 0;
  position: relative;
}
/* ── Glossary term tooltips ──────────────────────────────────────────────── */
.glossary-term {
  border-bottom: 1px dotted #6c757d;
  cursor: help;
}
/* When nested inside a link, drop the extra underline + override cursor
   so the link's own styling wins. */
a .glossary-term {
  border-bottom: 0;
  cursor: inherit;
}
.glossary-tooltip {
  position: fixed;
  width: 280px;
  max-width: 90vw;
  background: #fff;
  color: #333;
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 1050;
  pointer-events: auto;
}
.glossary-tooltip a {
  color: #0d6efd;
  text-decoration: underline;
}.child-purpose-card-img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
}
.child-purpose-card-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.child-purpose-card-body p {
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0 0 12px;
}
.child-purpose-card-body .grandchild-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.child-purpose-card-body .grandchild-list li a {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #4171b8;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.child-purpose-card-body .grandchild-list li a:hover {
  background: #4171b8;
  color: #fff;
}
.child-purpose-card-footer {
  padding: 0 20px 16px;
  margin-top: auto;
}
.child-purpose-card-footer .card-cta {
  color: #4171b8;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
}
.child-purpose-card-footer .card-cta:hover {
  color: #2c5a96;
}

/* ── Article Quote Card ──────────────────────────────────────────────────── */

.article-quote {
  position: relative;
  background: linear-gradient(135deg, #f0f5fb 0%, #f8fafd 100%);
  border: none;
  border-left: 4px solid #4171b8;
  border-radius: 8px;
  padding: 28px 28px 24px 28px;
  margin: 1.75rem 0;
  box-shadow: 0 2px 10px rgba(65, 113, 184, 0.08);
}

.article-quote-icon {
  color: #4171b8;
  font-size: 1.4rem;
  opacity: 0.35;
  margin-bottom: 8px;
  line-height: 1;
}

.article-quote-text {
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.65;
  color: #2d3748;
  margin: 0;
}

.article-quote-author {
  margin-top: 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4171b8;
  font-style: normal;
}

/* ─── Image gallery: zoomable images + lightbox (scripts.src.js) ───
   Lives here, not in Tailwind classes: the dialog is created by JS, which the
   Tailwind build doesn't scan. */
.gallery-zoomable { cursor: zoom-in; }
.gallery-zoomable:focus-visible { outline: 3px solid #498ecc; outline-offset: 2px; }

.img-lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.img-lightbox::backdrop { background: rgba(15, 23, 42, .9); }
.img-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.img-lightbox img {
  max-width: calc(100vw - 7rem);
  max-height: calc(100vh - 5rem);
  object-fit: contain;
  border-radius: .375rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.img-lightbox button {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  cursor: pointer;
}
.img-lightbox button:hover,
.img-lightbox button:focus-visible { background: rgba(255, 255, 255, .28); }
.img-lightbox-close { top: 1rem; right: 1rem; }
.img-lightbox-prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.img-lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.img-lightbox-count {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #cbd5e1;
  font-size: .875rem;
}
@media (max-width: 575.98px) {
  .img-lightbox img { max-width: 100vw; border-radius: 0; }
  .img-lightbox-prev, .img-lightbox-next { top: auto; bottom: .5rem; transform: none; }
}

/* Matomo opt-out box ([matomo-optout:] on /politica-de-cookies/) */
#matomo-opt-out input[type="checkbox"] {
    float: left;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0.2rem 0.6rem 0 0;
    cursor: pointer;
}
#matomo-opt-out label { display: block; overflow: hidden; cursor: pointer; } /* text wraps beside the checkbox */