/* ==========================================================================
   Noroeste Memorial – color y contraste (v2), fotos y funciones de obituarios
   Se carga después de main.css y pages.css.
   ========================================================================== */
:root {
	--text: #14213d;
	--body: #3d322c;
	--muted: #675951;
	--line: #dccdc3;
	--accent: #a64f38;
	--accent-dark: #853b28;
	--accent-soft: #f4dfd6;
	--bg-alt: #efe3db;
}
.nm-field ::placeholder { color: #8d7d74; }
.product-card__meta, .fine-print { color: var(--muted); }
.card, .product-card, .option-card, .task, .question, .faq, .rights-list li, .form-card { border-color: #d9c8bd; }
.nav__list a { font-weight: 600; }
.hero__phone { color: var(--body); }

/* ---------- Barra superior ---------- */
.topbar { background: var(--navy); color: #dfe6f3; font-size: 13.5px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar a { color: #fff; font-weight: 700; }
.topbar a:hover { color: #f3c9b9; }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 18px; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; }
.topbar .nm-icon { width: 15px; height: 15px; }
.topbar__social { display: flex; gap: 12px; }
.topbar__social a { display: inline-flex; }
.topbar__social .nm-icon { width: 17px; height: 17px; }

/* ---------- Submenú ---------- */
.nav__list > li { position: relative; }
.nav__list .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav__list .sub-menu { display: block; list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%; min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 20; }
.nav__list li:hover > .sub-menu, .nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav__list .sub-menu a { padding: 10px 12px; white-space: normal; }
.nav__list .sub-menu a:hover { background: var(--accent-soft); }

/* ---------- Portada con fotografía ---------- */
.hero__photo { position: relative; width: min(100%, 480px); }
.hero__photo img { width: 100%; aspect-ratio: 1.2; object-fit: cover; border-radius: 58% 42% 55% 45% / 55% 50% 50% 45%; box-shadow: 0 30px 60px rgba(20, 33, 61, .18); }
.hero__photo::before { content: ""; position: absolute; inset: -14px -18px auto auto; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--accent-soft); z-index: -1; }
.hero__photo .hero__quote { position: absolute; left: -24px; bottom: -22px; max-width: 290px; margin: 0; padding: 18px 22px; background: var(--navy); color: #fff; border-radius: var(--radius); font-size: 18px; line-height: 1.4; box-shadow: 0 16px 36px rgba(20, 33, 61, .28); }
.photo-blob { width: min(100%, 420px); aspect-ratio: 1.15; object-fit: cover; border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%; box-shadow: 0 24px 50px rgba(20, 33, 61, .18); }
.tanato-band .split { grid-template-columns: .85fr 1.15fr; }
.tanato-band .photo-blob { border: 6px solid rgba(255, 255, 255, .12); }

/* ---------- Encabezados interiores con foto ---------- */
.page-hero--photo { background-size: cover; background-position: center; border-bottom: 0; isolation: isolate; padding: clamp(64px, 9vw, 120px) 0 clamp(52px, 7vw, 96px); }
.page-hero--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(13, 26, 54, .9) 0%, rgba(13, 26, 54, .72) 48%, rgba(13, 26, 54, .38) 100%); }
.page-hero--photo .page-hero__title { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.page-hero--photo .page-hero__lead { color: #eef1f7; }
.page-hero--photo .eyebrow { color: #f3c9b9; }
.page-hero--photo .back-link { color: #dfe6f3; }
.page-hero--photo .back-link:hover { color: #fff; }

/* ---------- Bandas en azul marino ---------- */
.stats-band { background: var(--navy); border: 0; }
.stat strong { color: #fff; }
.stat span { color: #c8d0e0; }
.section--navy .eyebrow--light, .tanato-band .eyebrow { color: #f3c9b9; }
.section--navy .section__lead { color: #dfe6f3; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--navy); border-top: 0; color: #c8d0e0; }
.site-footer__title { color: #fff; }
.site-footer__links a, .contact-list a, .site-footer .contact-list span { color: #dfe6f3; }
.site-footer__links a:hover, .contact-list a:hover { color: #f3c9b9; }
.site-footer .contact-list .nm-icon { color: #f3c9b9; }
.site-footer__small { color: #9eabc4; }
.site-footer .social a { border-color: rgba(255, 255, 255, .3); color: #fff; }
.site-footer__bottom { border-top-color: rgba(255, 255, 255, .16); color: #9eabc4; }

/* ---------- Obituarios ---------- */
.obit-card { padding: 0; gap: 0; align-items: stretch; overflow: hidden; }
.obit-card__photo { width: 120px; height: auto; min-height: 130px; border-radius: 0; align-self: stretch; }
.obit-card__body { padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; }
.obit-card__name { font-size: 20px; }
.section__head--row .obit-search { flex: 1 1 320px; max-width: 420px; }

.obit-hero.page-hero--photo { padding: clamp(48px, 6vw, 80px) 0; }
.obit-hero__photo { border-color: rgba(255, 255, 255, .9); }
.obit-hero .obit-hero__dates { color: #eef1f7; }

.obit-nav { position: sticky; top: var(--header-h); z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.admin-bar .obit-nav { top: calc(var(--header-h) + 32px); }
.obit-nav .container { display: flex; gap: 4px; overflow-x: auto; }
.obit-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 14px 16px; color: var(--body); font-weight: 700; font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; }
.obit-nav a:hover { color: var(--accent); border-color: var(--accent); }
.obit-nav__count { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; text-align: center; }
#historia, #grabacion, #velas, #recuerdos, #condolencias { scroll-margin-top: calc(var(--header-h) + 70px); }

.obit-block { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }
.obit-block .h-sub { display: flex; align-items: center; gap: 10px; }
.obit-block .h-sub .nm-icon, .obit-video .h-sub .nm-icon { color: var(--accent); }
.memory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 22px; }
.memory { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-alt); }
.memory img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.memory:hover img { transform: scale(1.05); }
.memory__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(13, 26, 54, .8)); color: #fff; font-size: 12.5px; line-height: 1.3; }
.upload-box { margin-top: 8px; }
.upload-box > summary { list-style: none; cursor: pointer; display: inline-flex; }
.upload-box > summary::-webkit-details-marker { display: none; }
.upload-form { margin-top: 18px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.upload-form input[type="file"] { width: 100%; padding: 14px; border: 1.5px dashed #c9b3a6; border-radius: var(--radius-sm); background: #fff; font: 14px var(--font-sans); }
.upload-form .btn { width: auto; }

.donation-card { background: var(--accent-soft); border-color: #e6c5b8; }
.donation-card .icon-badge { background: #fff; margin-bottom: 12px; }
.donation-card p { font-size: 14.5px; }
.donation-card .donation-card__note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

.candle-card__count { display: flex; align-items: center; gap: 12px; font-size: 15px; margin-bottom: 16px; }
.candle-card__count strong { font: 500 30px var(--font-serif); color: var(--text); }
.candle { position: relative; flex: none; width: 16px; height: 30px; margin-top: 16px; border-radius: 3px 3px 2px 2px; background: linear-gradient(#fff8ec, #ead9c4); box-shadow: inset 0 0 0 1px #dcc7ae; }
.candle::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 10px; height: 16px; margin: 0 0 2px -5px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(ellipse at 50% 75%, #fff3b0 0%, #ffb347 55%, #e8641b 100%); box-shadow: 0 0 14px 4px rgba(255, 179, 71, .55); animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.candle--sm { width: 9px; height: 16px; margin-top: 10px; }
.candle--sm::before { width: 6px; height: 10px; margin-left: -3px; box-shadow: 0 0 8px 2px rgba(255, 179, 71, .5); }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); opacity: 1; } 35% { transform: scale(1.08, .94) rotate(2deg); opacity: .92; } 70% { transform: scale(.95, 1.06) rotate(-1deg); } }
.candle-form .nm-field { margin-bottom: 10px; }
.candle-list { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; max-height: 320px; overflow-y: auto; }
.candle-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.candle-list strong { display: block; color: var(--text); }
.candle-list small { color: var(--muted); }

/* ---------- Equipo y perfil ---------- */
.team-card { padding: 0; overflow: hidden; }
.team-card .team-card__photo { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 0; margin: 0; object-fit: cover; }
.team-card .team-card__initial { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 0; margin: 0; font-size: 72px; background: linear-gradient(160deg, var(--navy), var(--navy-2)); }
.team-card h3, .team-card__role, .team-card .card__text { padding: 0 24px; }
.team-card h3 { margin-top: 20px; }
.team-card .card__text { padding-bottom: 24px; margin: 0; }
.profile-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.profile-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.profile-card figcaption { padding: 20px 24px 24px; }
.profile-card strong { display: block; font: 400 22px var(--font-serif); color: var(--text); }
.profile-card span { color: var(--accent); font-weight: 700; font-size: 13.5px; }
.profile-card p { margin: 10px 0 0; font-size: 14.5px; }
.question__mark .nm-icon { width: 13px; height: 13px; }

@media (max-width: 1024px) {
	.topbar { display: none; }
	.nav__list .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 0 16px; min-width: 0; }
	.nav__list .sub-menu a { font-size: 16px; padding: 12px 4px; }
	.nav__list .menu-item-has-children > a::after { display: none; }
	.hero__photo { width: min(100%, 380px); margin-bottom: 28px; }
	.hero__photo .hero__quote { left: 0; font-size: 16px; max-width: 250px; }
	.tanato-band .split { grid-template-columns: 1fr; }
	.tanato-band .split__visual { display: flex; }
	.admin-bar .obit-nav { top: calc(var(--header-h) + 46px); }
}
@media (max-width: 680px) {
	.memory-grid { grid-template-columns: repeat(2, 1fr); }
	.obit-card__photo { width: 96px; }
	.obit-nav a { padding: 12px 10px; font-size: 13px; }
}

/* Miniaturas del catálogo: siempre completas dentro de la tarjeta */
.woocommerce ul.products li.product.product-card .product-card__media img, .product-card .product-card__media img { height: 100% !important; width: 100%; object-fit: contain; }
