/* Modules opt into this layer from site_head.php. Tailwind utilities still own the grids and fields. */
.v3-interior {
  --font-display: var(--font);
  --font-body: var(--font);
  --color-ink: var(--navy);
  --color-ink-soft: #344f6f;
  --color-ink-faint: #4d6886;
  --color-brand-50: #eaf6ff;
  --color-brand-100: #d4edfb;
  --color-brand-500: #0874ba;
  --color-brand-600: #07559a;
  --color-brand-700: #104a87;
  --color-brand-900: #092952;
  --color-ivory: #f3f9ff;
  --color-ivory-soft: #eef7ff;
  --color-line: #cfe1f2;
  --radius-card: 1.1rem;
  --shadow-card: 0 .7rem 1.7rem #0d4b8411;
  --shadow-card-lg: 0 1rem 2rem #0d4b841c;
  font-family: var(--font);
  background: radial-gradient(ellipse at 92% 12%, #e0f2ff, transparent 36rem), var(--page);
  color: var(--navy);
}

.v3-interior h1, .v3-interior h2, .v3-interior h3 { font-family: var(--font); font-weight: 800; letter-spacing: -.035em; }
.v3-interior .container { width: min(84rem, calc(100% - 2 * clamp(1rem, 3.75vw, 3.75rem))); max-width: none; margin-inline: auto; padding-inline: 0; }
.v3-interior .main > .section { padding-top: clamp(1rem, 3vw, 2.5rem); padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.v3-interior .main .reveal { opacity: 1; transform: none; }
.v3-interior .main [id] { scroll-margin-top: 1.1rem; }
.v3-interior .scroll-progress { background: linear-gradient(90deg, #064ea4, #00cbe8); }
.v3-interior .header svg, .v3-interior [data-v3-dialog] svg { flex: none; }
.v3-interior :focus-visible { outline: 3px solid #087fb9; outline-offset: 3px; }

/* A lighter version of the homepage composition: soft blue ribbons, one title and a clear next step. */
.v3-page-intro { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(15rem, 1fr); align-items: stretch; isolation: isolate; overflow: hidden; position: relative; margin-bottom: clamp(1.4rem, 3vw, 2.5rem); border: 1px solid #c7e1f4; border-radius: clamp(1rem, 2.3vw, 1.7rem); background: linear-gradient(123deg, #fff 8%, #e6f5ff 67%, #d5edff); box-shadow: 0 .75rem 2.2rem #12447413; }
.v3-page-intro::after { content: ''; pointer-events: none; position: absolute; z-index: -1; width: 82%; height: 80%; right: 4%; bottom: -62%; transform: rotate(-10deg); border: 1px solid #9edbfa; border-radius: 50%; box-shadow: 0 0 0 1.6rem #a5ddfd30, 0 0 0 4.1rem #a7dcf42b; }
.v3-page-intro-copy { align-self: center; padding: clamp(1.35rem, 4.4vw, 4rem); }
.v3-kicker { display: inline-flex; align-items: center; gap: .45rem; color: #0b5792; font-size: .72rem; font-weight: 800; letter-spacing: .105em; text-transform: uppercase; }
.v3-kicker::before { content: ''; width: .48rem; height: .48rem; border-radius: 50%; background: #0787bc; box-shadow: 0 0 0 .18rem #b7e5fb; }
.v3-page-intro h1 { margin: .5rem 0 .65rem; font-size: clamp(2.35rem, 4.3vw, 4.68rem); line-height: 1.02; letter-spacing: -.062em; word-spacing: .055em; text-wrap: balance; }
.v3-page-intro-copy > p { max-width: 54ch; color: #28496e; font-size: clamp(.95rem, 1.28vw, 1.16rem); line-height: 1.55; }
.v3-page-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.v3-page-visual { display: flex; align-items: end; gap: .55rem; position: relative; min-height: clamp(13rem, 21vw, 20rem); margin: clamp(.7rem, 1.5vw, 1.25rem); margin-left: 0; padding: 1rem; isolation: isolate; overflow: hidden; border-radius: clamp(.72rem, 1.55vw, 1.4rem); color: #fff; background: #164885; }
.v3-page-visual::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #061b3deb, transparent 68%); }
.v3-page-visual img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% center; }
.v3-page-visual img[src$='familia.webp'] { object-position: right center; }
.v3-visual-symbol { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border: 1px solid #ddf3ff86; border-radius: .69rem; background: #ffffff1d; }
.v3-visual-symbol svg { width: 1.28rem; height: 1.28rem; }
.v3-visual-label { align-self: center; margin-top: auto; margin-bottom: .62rem; font-size: .79rem; font-weight: 800; }
.v3-page-graphic { align-items: center; justify-content: center; flex-direction: column; gap: .9rem; background: radial-gradient(ellipse at 82% 125%, #14c8ee, transparent 61%), linear-gradient(135deg, #062652, #075cad); }
.v3-page-graphic::after { inset: auto -12% -61%; height: 100%; border-radius: 50%; border: 1px solid #c2f9ffad; background: none; box-shadow: 0 0 0 1.35rem #62ddf12a, 0 0 0 2.9rem #62ddf117; transform: rotate(-16deg); }
.v3-page-graphic .v3-visual-symbol { width: clamp(3.6rem, 6vw, 5.5rem); height: clamp(3.6rem, 6vw, 5.5rem); border-radius: 25%; }
.v3-page-graphic .v3-visual-symbol svg { width: 47%; height: 47%; }
.v3-page-graphic .v3-visual-label { margin: 0; text-align: center; }

/* Content surfaces, controls, and poster previews. */
.v3-interior .main .badge:not(.v3-status), .v3-interior .main .eyebrow { color: #07558c; background-color: #e5f4ff; }
.v3-interior .main .badge-gold { color: #155681; background-color: #e7f4ff; }
.v3-interior .main .btn-primary, .v3-interior .main .btn-outline, .v3-interior .main .btn-outline-light { min-height: 2.75rem; border-radius: 5rem; font-size: .87rem; font-weight: 800; line-height: 1.25; }
.v3-interior .main .btn-primary { background: linear-gradient(143deg, #0976b6, #063a93); box-shadow: 0 .46rem 1.25rem #0750ae20; }
.v3-interior .main .btn-primary:hover { background: #083e87; }
.v3-interior .main .btn-primary[class~='!bg-white'] { background-image: none; }
.v3-interior .main .btn-primary[class~='!bg-[#1fae5c]'] { background-image: linear-gradient(#08764b, #08764b); }
.v3-interior .main .badge-gold[class~='!bg-white/15'] { background-image: linear-gradient(#12385e, #12385e); }
.v3-interior .main .btn-outline { color: #0b4d89; border-color: #b3d2ef; background: #f8fcff; }
.v3-interior .main .btn-outline:hover { background: #e7f5ff; }
.v3-interior .main .filter-glass { align-items: center; margin-bottom: 1.15rem; padding: clamp(.9rem, 2vw, 1.4rem); border-color: #cde2f4; background: #fff; backdrop-filter: none; }
.v3-interior .filter-glass > div:first-child { max-width: 28ch; }
.v3-interior .filter-bar { min-width: 0; }
.v3-interior .form-input { min-height: 2.75rem; border-radius: .58rem; border-color: #adcae6; box-shadow: none; }
.v3-interior textarea.form-input { resize: vertical; }
.v3-interior .form-input:focus { border-color: #087fb9; box-shadow: 0 0 0 3px #c8eafa; }
.v3-interior .form-label, .v3-interior .filter-bar label { color: #153851; font-size: .85rem; font-weight: 800; }
.v3-interior .v3-form-card { border-top: .24rem solid #178cc5; }
.v3-interior .v3-list-card { position: relative; grid-column: auto; border-color: #cbdef2; }
.v3-interior .v3-list-card .badge-gold { position: absolute; top: .65rem; left: .65rem; border: 1px solid #c7def1; background: #fff; }
.v3-interior .v3-list-card > a:first-child { height: auto; aspect-ratio: 2.05; background: linear-gradient(135deg, #e9f4fd, #e1effc); }
.v3-interior .v3-list-card > a:first-child img { object-fit: contain; transition: none; }
.v3-interior .v3-list-card h2 { font-size: clamp(1.05rem, 1.85vw, 1.35rem); overflow-wrap: anywhere; }
.v3-interior .v3-list-card p { flex: 1; }
.v3-interior .v3-list-grid { gap: clamp(.85rem, 2vw, 1.5rem); }
.v3-interior .v3-service-card { border: 1px solid #cde1f2; }
.v3-interior .v3-service-card h2 { font-size: clamp(1.26rem, 2.3vw, 1.95rem); }
.v3-interior .v3-service-photo-secondary { height: clamp(12rem, 19vw, 17.5rem); }
.v3-interior #gerontologia img { object-position: center 40%; }
.v3-interior #adorables-pet img { object-position: center 50%; }
.v3-interior .detail-card { padding: clamp(1.1rem, 3.6vw, 2.75rem); }
.v3-interior .detail-card h1 { font-size: clamp(1.8rem, 3.7vw, 3.55rem); line-height: 1.09; overflow-wrap: anywhere; }
.v3-interior .detail-card > img { height: auto; object-fit: contain; border: 1px solid #dceafa; }
.v3-interior .prose-content { max-width: 72ch; color: #264363; line-height: 1.7; overflow-wrap: anywhere; }
.v3-interior .prose-content img { max-width: 100%; height: auto; }
.v3-interior .detail-side-card.text-white { background: linear-gradient(145deg, #092952, #105798); }

/* The founding year anchors the institutional story; the original photo and content remain editable. */
.v3-foundation-year { font-size: clamp(3.5rem, 8vw, 8.5rem); font-weight: 800; line-height: .9; letter-spacing: -.07em; color: #fff; }
.v3-interior .v3-history-story { align-items: start; padding: clamp(1rem, 2.5vw, 2rem); border: 1px solid var(--color-line); }
.v3-interior .v3-history-photo { position: relative; aspect-ratio: 4 / 3; isolation: isolate; background: #e0eefb; }
.v3-history-photo figcaption { position: absolute; inset: auto 0 0; padding: 1.5rem .85rem .8rem; background: linear-gradient(transparent, #081d3ce8); color: #fff; font-size: .78rem; font-weight: 800; }
.v3-history-copy h2 { margin-top: .6rem; font-size: clamp(1.6rem, 2.8vw, 2.7rem); line-height: 1.12; overflow-wrap: anywhere; }
.v3-history-pillar { border-top: .2rem solid #168bc5; }
.v3-history-pillar > span { color: #096ba7; font-weight: 800; }
.v3-history-purpose > article { background: linear-gradient(145deg, #fff, #eaf6ff); }
.v3-history-values .grid > div { min-width: 0; background: #f1f9ff; overflow-wrap: anywhere; }

/* Document cards keep metadata and accessible PDF actions separate. */
.v3-interior .v3-legal-meta { flex-wrap: wrap; justify-content: flex-start; gap: .5rem; }
.v3-legal-meta > span:last-child:not(.badge) { margin-left: auto; }
.v3-legal-card h2 { overflow-wrap: anywhere; }
.v3-legal-actions { margin-top: auto; padding-top: 1rem; }
.v3-legal-actions svg, .v3-doc-mark svg { flex: none; width: 1rem; height: 1rem; }
.v3-doc-mark { display: inline-flex; align-items: center; gap: .3rem; color: #0b5087; font-size: .72rem; font-weight: 800; }
.v3-legal-preview { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: .4rem; min-height: 0; height: 11rem; margin-bottom: .95rem; padding: .7rem; background: radial-gradient(ellipse at 50% 35%, #fff, #e3f0fc); border: 1px solid #d6e5f4; border-radius: .75rem; }
.v3-legal-preview img { display: block; width: auto; max-width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #fff; border: 1px solid #d1dfed; box-shadow: 0 3px 10px #123d6325; }
.v3-legal-preview figcaption { font-size: .68rem; color: #274d70; font-weight: 700; }
.v3-legal-preview-placeholder { display: inline-flex; align-self: center; align-items: center; gap: .4rem; color: #245c86; font-weight: 800; font-size: .83rem; }
.v3-legal-preview-placeholder svg { width: 1.1rem; height: 1.1rem; }

@media (min-width: 48.01rem) {
  .v3-page-intro-compact .v3-page-intro-copy { padding-block: clamp(1.4rem, 2.8vw, 2.4rem); }
  .v3-page-intro-compact .v3-page-visual { min-height: 12rem; }
}

@media (max-width: 48rem) {
  .v3-page-intro { grid-template-columns: minmax(0, 1fr); }
  .v3-page-intro-copy { padding-bottom: 1.05rem; }
  .v3-page-visual { min-height: 8rem; margin: 0 .7rem .7rem; }
  .v3-page-graphic { min-height: 4.55rem; flex-direction: row; }
  .v3-page-graphic .v3-visual-symbol { width: 2.45rem; height: 2.45rem; }
  .v3-interior .filter-glass { align-items: stretch; flex-direction: column; }
  .v3-interior .filter-glass > div:first-child { max-width: none; }
  .v3-interior .filter-bar .field { min-width: min(100%, 11rem); }
  .v3-interior .v3-history-photo { aspect-ratio: 16 / 10; }
  .v3-foundation-year { font-size: 2.45rem; }
}
