/* ==========================================================================
   Home page ([dt_home], see inc/home.php)
   ========================================================================== */
.dt-home {
    --home-cream: #F8F6F2;
    --home-ink: #1F2937;
    --home-muted: #4B5563;
    --home-line: #ECE8E1;
    --home-amber: #F59E0B;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--home-ink);
    font-size: 17px;
    line-height: 1.65;
}
.dt-home *,
.dt-home *::before,
.dt-home *::after { box-sizing: border-box; }
.dt-home p { margin: 0; }
.dt-home h1,
.dt-home h2,
.dt-home h3 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-weight: 600; text-transform: none; letter-spacing: normal; }

.dt-home-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 1190px keeps the content in line with the header logo and menu */
.dt-home-wrap { max-width: 1190px; margin: 0 auto; padding: 0 32px; }
.dt-home-section { padding: 104px 0; background: #FFFFFF; }
.dt-home-section--cream { background: var(--home-cream); }

.dt-home .dt-home-h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.2; color: var(--ridt-navy); }
.dt-home-lead { font-size: 18px; color: var(--home-muted); }
.dt-home-eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ridt-red); }
.dt-home-head { display: flex; flex-direction: column; gap: 14px; max-width: 680px; margin-bottom: 44px; }
.dt-home-head--row { max-width: none; flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.dt-home-head--row > div { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }

.dt-home-link { font-weight: 600; color: var(--ridt-navy); text-decoration: none; }
.dt-home-link:hover { color: var(--ridt-red); }

.dt-home-btn { display: inline-block; padding: 16px 30px; border-radius: 8px; font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; transition: background-color .2s, color .2s, transform .2s; }
.dt-home-btn:hover { transform: translateY(-2px); }
.dt-home-btn--red { background: var(--ridt-red); color: #FFFFFF; }
.dt-home-btn--red:hover { background: var(--ridt-red-dark); color: #FFFFFF; }
.dt-home-btn--navy { background: var(--ridt-navy); color: #FFFFFF; }
.dt-home-btn--navy:hover { background: #0E2340; color: #FFFFFF; }
.dt-home-btn--ghost { border: 1.5px solid #FFFFFF; color: #FFFFFF; padding: 15px 28px; }
.dt-home-btn--ghost:hover { background: #FFFFFF; color: var(--ridt-navy); }

/* Cards overlapping the bottom of the hero. The three card frames stay put; inside each, the quick link and the
   gift area share one grid cell and swap with the slider (js/home.js), one card after another */
/* flow-root stops the cards' negative margin collapsing into the band, so only the cards (not the cream) rise over the hero's fade */
.dt-home-explore-band { background: var(--home-cream); position: relative; z-index: 2; display: flow-root; padding-bottom: 104px; }
.dt-home-explore { margin-top: -110px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.dt-home-explore__card { display: grid; background: #FFFFFF; border-radius: 16px; box-shadow: 0 18px 40px rgba(20, 49, 87, .12); transition: transform .3s ease, box-shadow .3s ease; }
.dt-home-explore__card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(20, 49, 87, .18); }
/* on page load the cards rise into place one after another; 'backwards' hands transform back to the hover lift afterwards */
.dt-home-explore__card { animation: dt-home-card-in .8s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: calc(.25s + var(--i, 0) * .12s); }
@keyframes dt-home-card-in { from { opacity: 0; transform: translateY(40px); } }
/* with Reduce Motion on, a plain fade without the movement */
@keyframes dt-home-card-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .dt-home-explore__card { animation-name: dt-home-card-fade; }
}
.dt-home-explore__item { grid-area: 1 / 1; padding: 32px; text-decoration: none; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; transition: opacity .45s ease, transform .45s cubic-bezier(.22, 1, .36, 1), visibility .45s; transition-delay: calc(var(--i, 0) * 110ms); }
.dt-home-explore__item.is-off { opacity: 0; transform: translateY(14px); visibility: hidden; transition-duration: .3s; }
/* room under the slider, on the banner pattern, for the top half of the cards */
body.home .elementor-111 .elementor-element.elementor-element-1f13513b,
body.home .elementor-111 .elementor-element.elementor-element-693639c { padding-bottom: 140px; position: relative; }
/* the pattern fades into the cream of the section below instead of stopping at a hard edge */
body.home .elementor-111 .elementor-element.elementor-element-1f13513b::after,
body.home .elementor-111 .elementor-element.elementor-element-693639c::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; background: linear-gradient(to bottom, rgba(248, 246, 242, 0), #F8F6F2); pointer-events: none; z-index: 0; }
body.home .elementor-111 .elementor-element.elementor-element-1f13513b > *,
body.home .elementor-111 .elementor-element.elementor-element-693639c > * { position: relative; z-index: 1; }
.dt-home .dt-home-explore__icon { width: 56px; height: 56px; object-fit: contain; }
.dt-home .dt-home-explore__title { font-size: 24px; line-height: 1.3; color: var(--ridt-navy); transition: color .2s; }
.dt-home-explore__card:hover .dt-home-explore__title { color: var(--ridt-red); }
.dt-home-explore__item p { font-size: 16px; color: var(--home-muted); }
.dt-home-explore__more { margin-top: auto; font-weight: 600; color: var(--ridt-red); }
/* the gift areas keep their red line icons from the old Where your gift goes cards, in a 56px box so titles line up */
.dt-home-explore__glyph { height: 56px; display: flex; align-items: center; color: var(--ridt-red); }

/* Featured story */
.dt-home-story { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.dt-home-story__media,
.dt-home-story__body { flex: 1 1 460px; min-width: 0; }
.dt-home-story__media { border-radius: 20px; overflow: hidden; }
.dt-home .dt-home-story__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; display: block; }
.dt-home-story__body { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.dt-home-story__text { font-size: 18px; color: #374151; }
.dt-home-story__quote { margin: 8px 0 0; padding: 0; border: 0; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 24px; line-height: 1.5; color: var(--ridt-navy); }
.dt-home-story__by { font-size: 15px; font-weight: 600; color: var(--home-muted); }

/* Research cards */
.dt-home-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: -12px 0 36px; }
.dt-home .dt-home-filter { font: inherit; font-size: 15px; font-weight: 500; padding: 10px 18px; min-height: 44px; border-radius: 999px; border: 1.5px solid #CBD2DC; background: #FFFFFF; color: var(--ridt-navy); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.dt-home .dt-home-filter:hover { border-color: var(--ridt-navy); }
.dt-home .dt-home-filter.is-active { background: var(--ridt-navy); border-color: var(--ridt-navy); color: #FFFFFF; font-weight: 600; }
.dt-home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.dt-home-card { background: #FFFFFF; border-radius: 16px; overflow: hidden; isolation: isolate; text-decoration: none; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(20, 49, 87, 0.06); transition: transform var(--dt-card-speed, .35s) var(--dt-card-ease, ease), box-shadow var(--dt-card-speed, .35s) var(--dt-card-ease, ease); }
.dt-home-card[hidden] { display: none; }
.dt-home-card:hover { transform: translateY(-6px); box-shadow: var(--dt-card-shadow-hover, 0 20px 40px rgba(28, 53, 94, .14)); }
.dt-home-card__img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; transition: transform 0.6s var(--dt-card-ease, ease); }
/* same image zoom as the other cards on the site */
.dt-home-card:hover .dt-home-card__img { transform: scale(1.05); }
.dt-home-card__body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.dt-home-tag { font-size: 13px; font-weight: 600; color: var(--ridt-navy); background: #E8EDF4; padding: 5px 12px; border-radius: 999px; line-height: 1.4; }
.dt-home .dt-home-card__title { font-size: 23px; line-height: 1.3; color: var(--ridt-navy); transition: color .2s; }
.dt-home-card:hover .dt-home-card__title { color: var(--ridt-red); }
.dt-home-card p { font-size: 16px; line-height: 1.6; color: var(--home-muted); }

/* Latest news */
.dt-home-news { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.dt-home-news__item { background: #FFFFFF; border: 1px solid var(--home-line); border-radius: 16px; padding: 30px; text-decoration: none; display: flex; flex-direction: column; gap: 14px; transition: transform .3s ease, box-shadow .3s ease; }
.dt-home-news__item:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(20, 49, 87, .08); }
.dt-home-news__meta { font-size: 14px; color: var(--home-muted); }
.dt-home .dt-home-news__title { font-size: 22px; line-height: 1.35; color: var(--ridt-navy); }
.dt-home-news__more { margin-top: auto; font-weight: 600; color: var(--ridt-red); }

/* Closing band + newsletter */
.dt-home-close { background: var(--ridt-navy); padding: 96px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.dt-home-close__inner { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.dt-home-close__text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.dt-home .dt-home-close .dt-home-h2 { color: #FFFFFF; }
.dt-home-close__text p { font-size: 18px; color: #D5DCE6; }
.dt-home-newsletter { flex: 1 1 420px; min-width: 0; background: #1C3D69; border-radius: 16px; padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.dt-home .dt-home-newsletter h3 { font-size: 24px; color: #FFFFFF; }
.dt-home-newsletter p { font-size: 15px; color: #D5DCE6; }
.dt-home-newsletter label { font-size: 14px; font-weight: 600; color: #FFFFFF; }
.dt-home-newsletter__row { display: flex; flex-wrap: wrap; gap: 10px; }
.dt-home .dt-home-newsletter input[type="email"] { flex: 1 1 220px; min-width: 0; height: auto; margin: 0; font: inherit; font-size: 16px; padding: 14px 16px; border-radius: 8px; border: 1px solid #8FA3BF; background: #FFFFFF; color: var(--home-ink); }
.dt-home .dt-home-newsletter button { font: inherit; font-size: 16px; font-weight: 600; padding: 14px 24px; min-height: 48px; border-radius: 8px; border: 0; background: var(--home-amber); color: var(--home-ink); cursor: pointer; transition: background-color .2s; }
.dt-home .dt-home-newsletter button:hover { background: #FBBF24; }
.dt-home .dt-home-newsletter__msg { padding: 12px 14px; border-radius: 8px; background: #DCFCE7; color: #14532D; font-weight: 600; }
.dt-home .dt-home-newsletter__msg--error { background: #FEE2E2; color: #7F1D1D; }
.dt-home-newsletter__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* The header template's original Elementor hero (#111, desktop and mobile copies) stays hidden; the slider takes its place */
body.home .elementor-111 .elementor-element.elementor-element-1e51e55,
body.home .elementor-111 .elementor-element.elementor-element-f9bb135 { display: none; }

/* The footer's amber "Join us" band repeats the closing band above, so it is hidden on the home page */
body.home .elementor-64 .elementor-element.elementor-element-c7a5ebf { display: none; }

@media (max-width: 767px) {
    .dt-home-wrap { padding: 0 20px; }
    .dt-home-section { padding: 72px 0; }
    .dt-home-explore-band { padding-bottom: 72px; }
    .dt-home-explore { margin-top: -64px; }
    body.home .elementor-111 .elementor-element.elementor-element-1f13513b,
    body.home .elementor-111 .elementor-element.elementor-element-693639c { padding-bottom: 96px; }
    .dt-home-story { gap: 36px; }
    .dt-home-close { padding: 72px 0; }
    .dt-home-newsletter { padding: 28px 22px; }
}

/* Phones: topic filters in one row that scrolls sideways, instead of stacking on three lines */
@media (max-width: 767px) {
    .dt-home-filters { flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin: -8px -20px 28px; padding: 2px 20px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding: 0 20px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
    .dt-home-filters::-webkit-scrollbar { display: none; }
    .dt-home .dt-home-filter { flex: none; font-size: 14px; padding: 8px 15px; min-height: 40px; white-space: nowrap; }
}

/* Hero slider title: the first word of each line carries a fixed 25px gap (set in Slider Revolution), sized for the
   50px desktop title; on phones the title is 34px, so use a normal word space instead */
@media (max-width: 767px) {
    sr7-module[data-alias="home-hero"] span[style*="margin-right"] { margin-right: 0.28em !important; }
}
