/* American Camino Outfitters - pilgrimage (tour) article page.
   (C) 2026 interGen. GPL v2 or later.
   Loaded by the com_content article override when the article has pilgrimage field values,
   after collage.css (paper ground, tacks, aged card, date stamp). */

.aco-tour { padding-block: 1.5rem 4rem; }
.aco-tour .page-header { margin-bottom: 1.5rem; }
.aco-tour .page-header .d-h { font-size: clamp(2.5rem, 5vw, 4.25rem); margin: 0; }
.aco-tour .tour-layout { --gutter-x: 3rem; }

/* Article photo, pinned like the home page cards (not the inner-page banner polaroid, styled in inner.css) */
.aco-tour .item-image:not(.ip-photo) { position: relative; margin: 0 0 2rem; padding: 14px 14px 18px; background: #fffdf8; box-shadow: 0 12px 22px rgba(20, 37, 66, .18); transform: rotate(-1deg); }
.aco-tour .item-image:not(.ip-photo) img { display: block; width: 100%; height: auto; }
.aco-tour .item-image:not(.ip-photo) figcaption { margin-top: .5rem; font-family: "Kalam", cursive; color: #1e355d; }

/* Booking ticket (layout aco.booking, styles in collage.css) above the facts card */
.tour-aside .ip-book { margin-bottom: 2.5rem; }

/* Facts card */
.aco-tour .tour-card { margin-top: 0; padding: 48px 32px 32px; transform: rotate(1deg); }
.tour-card .aco-eyebrow { font-size: .9375rem; }
.tour-card .date-stamp { font-size: 16px; margin: 0; }
.tour-facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid rgba(203, 189, 159, .6); }
.tour-facts > div:last-child { border-bottom: 0; }
.tour-facts dt { font-family: "Barlow Condensed", sans-serif; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .875rem; color: #4a5872; }
.tour-facts dd { margin: 0; font-weight: 600; text-align: right; color: #1b2433; }
.aco-tour .aco-price { font-family: var(--aco-font-display); font-size: 2.25rem; font-weight: 700; line-height: 1; color: #1e355d; }

@media (min-width: 992px) {
  .tour-aside__stick { position: sticky; top: 2rem; }
}

@media (max-width: 991.98px) {
  .aco-tour .item-image:not(.ip-photo) { transform: none; }
  .aco-tour .tour-card { transform: none; padding: 48px 24px 28px; }
}

/* ---------- Full itinerary popup (default_details.php + js/tour-details.js) ---------- */

/* Button row: the PDF link and the popup button side by side, wrapping on narrow screens */
.aco-tour .aco-tour-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 2rem 0 0; }
.aco-tour .aco-tour-actions > p { margin: 0; }
.aco-tour .aco-details-open button { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; border: 2px solid #1e355d; border-radius: 6px; background: #1e355d; color: #fff; font-weight: 600; line-height: 1.5; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.aco-tour .aco-details-open button:hover,
.aco-tour .aco-details-open button:focus-visible { background: #142542; border-color: #142542; }
.aco-tour .aco-details-open svg { flex: 0 0 auto; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The page behind stops scrolling while the popup is open */
html.aco-details-open { overflow: hidden; }

/* Full-screen sheet on the paper ground; the dialog itself scrolls, the title bar stays on top */
.aco-tour .aco-details { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; overflow-y: auto; overscroll-behavior: contain; background: #f6f1e7 url(../images/textures/paper.jpg) repeat; color: #1b2433; }
.aco-tour .aco-details::backdrop { background: rgba(20, 37, 66, .6); }
.aco-tour .aco-details[open] { animation: aco-details-in .25s ease-out; }
@keyframes aco-details-in { from { opacity: 0; transform: translateY(16px); } }

.aco-tour .aco-details__bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem max(1rem, calc((100% - 1240px) / 2 + 1.5rem)); background: #f6f1e7 url(../images/textures/paper.jpg) repeat; border-bottom: 2px dashed #cbbd9f; }
.aco-tour .aco-details__bar .d-h { margin: 0; font-size: clamp(1.75rem, 3.6vw, 3rem); }
.aco-tour .aco-details__close { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 2px solid #1e355d; border-radius: 50%; background: #fffdf8; color: #1e355d; cursor: pointer; transition: background .2s ease, color .2s ease; }
.aco-tour .aco-details__close:hover,
.aco-tour .aco-details__close:focus-visible { background: #1e355d; color: #fff; }
.aco-tour .aco-details__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }

.aco-tour .aco-details__body { display: grid; gap: 2.5rem; max-width: 1240px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.aco-tour .aco-details__main { min-width: 0; }
.aco-tour .aco-details__main section + section { margin-top: 2.5rem; padding-top: 2rem; border-top: 2px dashed #cbbd9f; }
.aco-tour .aco-details__main :is(h3, h4) { color: #1e355d; }
.aco-tour .aco-details__main h3 { font-family: var(--aco-font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: 1.75rem; margin: 2rem 0 1rem; }
.aco-tour .aco-details__main h4 { font-size: 1.125rem; margin: 1.5rem 0 .4rem; }
.aco-tour .aco-details__main section > :first-child { margin-top: 0; }

/* Right column: pricing grid + description on a pinned card */
.aco-tour .aco-details__price { padding: 48px 28px 28px; }
.aco-tour .aco-details__grid { width: 100%; border-collapse: collapse; }
.aco-tour .aco-details__grid caption { caption-side: top; padding: 0 0 .75rem; font-size: .9375rem; }
.aco-tour .aco-details__grid thead th { padding: 0 0 .4rem; font-family: "Barlow Condensed", sans-serif; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .8125rem; color: #4a5872; border-bottom: 2px solid #cbbd9f; }
.aco-tour .aco-details__grid :is(th, td) { text-align: left; vertical-align: baseline; }
.aco-tour .aco-details__grid :is(th, td):last-child { text-align: right; }
.aco-tour .aco-details__grid tbody :is(th, td) { padding: .55rem 0; border-bottom: 1px solid rgba(203, 189, 159, .6); }
.aco-tour .aco-details__grid tbody tr:last-child :is(th, td) { border-bottom: 0; }
.aco-tour .aco-details__grid tbody th { font-weight: 500; padding-right: 1rem; }
.aco-tour .aco-details__grid td { font-family: var(--aco-font-display); font-size: 1.375rem; font-weight: 700; color: #1e355d; white-space: nowrap; }
.aco-tour .aco-details__note { font-size: .9375rem; }
.aco-tour .aco-details__note > :last-child { margin-bottom: 0; }
.aco-tour .aco-details__note :is(ol, ul) { padding-left: 1.25rem; }
.aco-tour .aco-details__note :is(h2, h3, h4) { font-family: var(--aco-font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .9375rem; color: #b2292e; margin: 1.25rem 0 .5rem; }

@media (min-width: 992px) {
  .aco-tour .aco-details__body { padding: 2.5rem 1.5rem 5rem; }
  .aco-tour .aco-details__body.has-side { grid-template-columns: minmax(0, 1fr) 380px; gap: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .aco-tour .aco-details[open] { animation: none; }
  .aco-tour :is(.aco-details-open button, .aco-details__close) { transition: none; }
}
