/* IAOM Event Accommodation — front end.
 * The design matches the original Cape Town 2026 accommodation page. Override any variable from
 * Elementor (Site Settings → Custom CSS) or Appearance → Customize → Additional CSS, e.g.
 *   .iaomac { --iaomac-gold: #D4A017; }
 */
.iaomac {
	--iaomac-maroon: #8B2C2C;
	--iaomac-gold: #D4A017;
	--iaomac-gold-soft: #f5e9c4;
	--iaomac-dark: #1a1a1a;
	--iaomac-text: #2d2d2d;
	--iaomac-muted: #555555;
	--iaomac-border: #ece5d3;
	--iaomac-soft: #faf7ef;
	--iaomac-surface: #ffffff;
	--iaomac-radius: 14px;
	--iaomac-media: 40%;
	--iaomac-frame: 320px;
	--iaomac-font: Arsenal, "Helvetica Neue", Arial, sans-serif;

	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	font-family: var(--iaomac-font);
	color: var(--iaomac-text);
	line-height: 1.7;
	box-sizing: border-box;
}
.iaomac *,
.iaomac *::before,
.iaomac *::after { box-sizing: inherit; }
.iaomac p { margin: 0; }
.iaomac a:not(.iaomac-pill):not(.iaomac-book) { color: var(--iaomac-maroon) !important; }
.iaomac .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Intro ---------- */
.iaomac-intro {
	background: var(--iaomac-soft);
	border-left: 5px solid var(--iaomac-gold);
	border-radius: 10px;
	padding: 22px 28px;
	margin-bottom: 32px;
}
.iaomac .iaomac-intro p {
	color: var(--iaomac-text);
	font-size: 16px;
	line-height: 1.65;
	text-align: justify;
	text-justify: inter-word;
}
.iaomac .iaomac-intro p + p { margin-top: 12px; }

/* ---------- Quick links + the gallery button (same pill) ---------- */
.iaomac-nav {
	display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
	margin-bottom: 32px; padding-bottom: 20px;
	border-bottom: 2px solid var(--iaomac-border);
}
.iaomac a.iaomac-pill,
.iaomac button.iaomac-pill {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 2px solid var(--iaomac-maroon);
	border-radius: 30px;
	background: #fff;
	color: var(--iaomac-maroon);
	font-family: var(--iaomac-font);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .4px;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease;
}
.iaomac a.iaomac-pill:hover,
.iaomac a.iaomac-pill:focus,
.iaomac button.iaomac-pill:hover,
.iaomac button.iaomac-pill:focus { background: var(--iaomac-maroon); color: #fff; }
.iaomac .iaomac-pill:focus-visible { outline: 3px solid var(--iaomac-gold); outline-offset: 2px; }
.iaomac .iaomac-count { font-weight: 400; opacity: .8; }

/* ---------- Hotel card ---------- */
.iaomac-hotel {
	border: 1px solid var(--iaomac-border);
	border-radius: var(--iaomac-radius);
	overflow: hidden;
	margin: 0 0 28px;
	background: var(--iaomac-surface);
	transition: border-color .3s ease;
	scroll-margin-top: 110px;
}
.iaomac-hotel:hover { border-color: var(--iaomac-gold); }
.iaomac-hotel__head {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
	padding: 18px 28px;
	background: var(--iaomac-dark);
	color: #fff;
	border-bottom: 4px solid var(--iaomac-gold);
}
.iaomac .iaomac-hotel__name {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .5px;
	color: var(--iaomac-gold);
}
.iaomac-badge {
	display: inline-block; padding: 4px 12px; border-radius: 30px;
	background: var(--iaomac-gold); color: var(--iaomac-dark);
	font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
}
.iaomac-hotel__body { padding: 24px 28px; }
.iaomac-hotel__text { min-width: 0; }
.iaomac-hotel__meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
	margin-bottom: 12px; color: var(--iaomac-muted); font-size: 13.5px;
}
.iaomac .iaomac-maplink { display: inline-flex; align-items: center; gap: 5px; color: var(--iaomac-maroon); font-weight: 700; text-decoration: none; }
.iaomac .iaomac-maplink:hover { text-decoration: underline; }
.iaomac .iaomac-maplink svg { flex: none; transform: translateY(.1em); }
.iaomac .iaomac-desc {
	font-size: 15px; color: var(--iaomac-text); line-height: 1.6;
	margin-bottom: 20px; text-align: justify; text-justify: inter-word;
}
.iaomac .iaomac-desc:last-child { margin-bottom: 0; }

/* ---------- Photo + gallery button ---------- */
/* Every photo sits in a frame of the same height (set in the editor, --iaomac-frame).
 * Which part of the photo shows is the focal point chosen per hotel, written on the <img>
 * as object-position. On narrow screens the frame shrinks with the width so it never
 * takes over the card. */
.iaomac-media { margin: 0; min-width: 0; }
.iaomac-media__frame {
	position: relative;
	height: min(var(--iaomac-frame, 320px), 62vw);
	overflow: hidden;
	background: var(--iaomac-soft);
}
.iaomac .iaomac-media__img {
	display: block; width: 100%; height: 100%; max-width: none;
	object-fit: cover;
	object-position: 50% 50%;
}
.iaomac-media__actions { margin: 0; display: flex; justify-content: center; }

/* Full width above / under the text: edge to edge inside the card. */
.iaomac-hotel--above > .iaomac-media .iaomac-media__actions { padding: 18px 28px 0; }
.iaomac-hotel--below > .iaomac-media .iaomac-media__actions { padding: 0 28px 22px; }
.iaomac-hotel--below > .iaomac-media { display: flex; flex-direction: column-reverse; }

/* Beside the text: a rounded photo in its own column. */
.iaomac-hotel--left .iaomac-media,
.iaomac-hotel--right .iaomac-media,
.iaomac-hotel--gallery-only .iaomac-media { display: flex; flex-direction: column; gap: 14px; }
.iaomac-hotel--left .iaomac-media__frame,
.iaomac-hotel--right .iaomac-media__frame { border-radius: 10px; }
.iaomac-hotel--gallery-only .iaomac-media { margin-bottom: 18px; }
.iaomac-hotel--gallery-only .iaomac-media__actions { justify-content: flex-start; }

@media (min-width: 900px) {
	.iaomac-hotel--left .iaomac-hotel__body,
	.iaomac-hotel--right .iaomac-hotel__body { display: flex; align-items: flex-start; gap: 26px; }
	.iaomac-hotel--right .iaomac-hotel__body { flex-direction: row-reverse; }
	.iaomac-hotel--left .iaomac-media,
	.iaomac-hotel--right .iaomac-media { flex: 0 0 var(--iaomac-media); width: var(--iaomac-media); }
	.iaomac-hotel--left .iaomac-hotel__text,
	.iaomac-hotel--right .iaomac-hotel__text { flex: 1 1 auto; }
	/* The text column is narrower there, so let the info boxes reflow. */
	.iaomac-hotel--left .iaomac-info-grid,
	.iaomac-hotel--right .iaomac-info-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
@media (max-width: 899px) {
	.iaomac-hotel--left .iaomac-media,
	.iaomac-hotel--right .iaomac-media { margin-bottom: 20px; }
}

/* ---------- Rates ---------- */
.iaomac-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 22px; }
.iaomac .iaomac-rates {
	width: 100%; border-collapse: collapse; margin: 0;
	border: 1px solid var(--iaomac-border);
	border-radius: 10px;
	overflow: hidden;
	background: var(--iaomac-surface);
}
.iaomac .iaomac-rates thead { background: var(--iaomac-maroon); color: #fff; }
.iaomac .iaomac-rates th {
	padding: 11px 16px; text-align: left; border: 0;
	font-weight: 700; font-size: 13px; letter-spacing: .4px; text-transform: uppercase;
	color: #fff;
}
.iaomac .iaomac-rates td {
	padding: 12px 16px; text-align: left; border: 0;
	border-top: 1px solid var(--iaomac-border);
	font-size: 15px; color: var(--iaomac-dark);
}
.iaomac .iaomac-rates .iaomac-price { font-weight: 700; color: var(--iaomac-maroon); white-space: nowrap; }

/* ---------- Info boxes ---------- */
.iaomac-info-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
	margin-bottom: 22px;
}
.iaomac-info {
	background: var(--iaomac-soft);
	border-radius: 10px;
	padding: 16px 18px;
	border-top: 3px solid var(--iaomac-gold);
}
.iaomac .iaomac-info__title {
	margin: 0 0 8px;
	font-size: 13px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
	color: var(--iaomac-maroon);
}
.iaomac .iaomac-info ul { list-style: none; padding: 0; margin: 0; }
.iaomac .iaomac-info li {
	position: relative; padding: 3px 0 3px 16px;
	font-size: 13.5px; color: var(--iaomac-text); line-height: 1.55; text-align: left;
}
.iaomac .iaomac-info li::before {
	content: ""; position: absolute; left: 0; top: 11px;
	width: 5px; height: 5px; border-radius: 50%;
	background: var(--iaomac-gold);
}

/* ---------- Contact + booking ---------- */
.iaomac-hotel__foot {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
	padding-top: 18px; border-top: 1px solid var(--iaomac-border);
}
.iaomac-contact {
	flex: 1 1 0%; min-width: 280px;
	font-size: 13.5px; color: var(--iaomac-muted); line-height: 1.6; text-align: left;
}
.iaomac .iaomac-contact a,
.iaomac .iaomac-contact a:visited,
.iaomac .iaomac-contact a:hover,
.iaomac .iaomac-contact a:focus { color: var(--iaomac-maroon) !important; font-weight: 700; text-decoration: none; }
.iaomac .iaomac-contact a:hover { text-decoration: underline; }
.iaomac .iaomac-note { font-style: italic; }
.iaomac a.iaomac-book {
	all: unset;
	box-sizing: border-box;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 12px 26px;
	border: 2px solid var(--iaomac-gold);
	border-radius: 8px;
	background: var(--iaomac-gold);
	color: var(--iaomac-dark);
	font-family: var(--iaomac-font);
	font-size: 14px; font-weight: 700; line-height: 1.2;
	letter-spacing: .8px; text-transform: uppercase;
	text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.iaomac a.iaomac-book:hover,
.iaomac a.iaomac-book:focus { background: var(--iaomac-dark); color: var(--iaomac-gold); border-color: var(--iaomac-dark); }
.iaomac a.iaomac-book:focus-visible { outline: 3px solid var(--iaomac-gold); outline-offset: 2px; }

/* ---------- Closing note ---------- */
.iaomac-disclaimer {
	text-align: center; font-size: 13px; color: var(--iaomac-muted); font-style: italic;
	margin-top: 24px; padding: 16px 20px;
	background: var(--iaomac-soft); border-radius: 10px; line-height: 1.6;
}

/* ---------- Editor-only notice ---------- */
.iaomac-notice {
	margin: 16px auto; max-width: 900px; padding: 16px 20px;
	border: 1px solid #f0c3bf; border-left: 5px solid var(--iaomac-maroon, #8B2C2C);
	border-radius: 10px; background: #fdf1f0; color: #4a2320; font-size: 14px;
}
.iaomac-notice ul { margin: 8px 0 0; padding-left: 20px; }
.iaomac-notice code { background: #fff; padding: 1px 5px; border-radius: 4px; }

/* ---------- Gallery pop-up ---------- */
.iaomac-lightbox {
	position: fixed; inset: 0; z-index: 99999;
	display: flex; flex-direction: column;
	padding: 24px clamp(12px, 4vw, 48px);
	background: rgba(15, 15, 15, .96);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: #fff;
	font-family: var(--iaomac-font, "Helvetica Neue", Arial, sans-serif);
}
.iaomac-lightbox[hidden] { display: none; }
.iaomac-lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.iaomac-lightbox__title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .5px; color: #D4A017; }
.iaomac-lightbox__counter { font-size: 14px; opacity: .8; letter-spacing: .4px; }
.iaomac-lightbox button.iaomac-lb-btn {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 999px; color: #fff;
	font-family: inherit;
	transition: background-color .2s ease, border-color .2s ease;
}
.iaomac-lightbox button.iaomac-lb-btn:focus-visible { outline: 3px solid #D4A017; outline-offset: 2px; }
.iaomac-lightbox button.iaomac-lb-btn[hidden] { display: none; }
.iaomac-lightbox .iaomac-lb-btn svg { display: block; flex: none; }

/* Doubled selectors so an Elementor kit's button styles can't reach them. */
.iaomac-lightbox button.iaomac-lightbox__close {
	width: 48px; height: 48px;
	border: 2px solid rgba(255, 255, 255, .45);
}
.iaomac-lightbox button.iaomac-lightbox__close:hover { background: rgba(255, 255, 255, .15); border-color: #D4A017; }
.iaomac-lightbox__stage { position: relative; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 0; }
.iaomac-lightbox__img {
	max-width: 100%; max-height: 100%;
	width: auto; height: auto; object-fit: contain;
	border-radius: 8px; background: rgba(0, 0, 0, .3);
	transition: opacity .15s ease;
}
/* Shown only while a photo is genuinely slow: the current one dims and a ring spins over it,
 * so the frame never goes blank. */
.iaomac-lightbox.is-loading .iaomac-lightbox__img { opacity: .45; }
.iaomac-lightbox__spinner {
	position: absolute; top: 50%; left: 50%;
	width: 46px; height: 46px; margin: -23px 0 0 -23px;
	border: 3px solid rgba(255, 255, 255, .25);
	border-top-color: #D4A017;
	border-radius: 50%;
	opacity: 0; pointer-events: none;
	transition: opacity .15s ease;
}
.iaomac-lightbox.is-loading .iaomac-lightbox__spinner {
	opacity: 1;
	animation: iaomac-spin .8s linear infinite;
}
@keyframes iaomac-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.iaomac-lightbox.is-loading .iaomac-lightbox__spinner { animation: none; }
}
.iaomac-lightbox button.iaomac-lightbox__nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 58px; height: 58px;
	background: rgba(0, 0, 0, .55);
	border: 2px solid rgba(255, 255, 255, .35);
}
.iaomac-lightbox button.iaomac-lightbox__nav:hover { background: var(--iaomac-maroon, #8B2C2C); border-color: #D4A017; }
.iaomac-lightbox button.iaomac-lightbox__nav--prev { left: 0; }
.iaomac-lightbox button.iaomac-lightbox__nav--next { right: 0; }
.iaomac-lightbox__thumbs {
	flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
	margin-top: 14px; padding-bottom: 8px;
	overflow-x: auto; scrollbar-width: thin;
}
.iaomac-lightbox button.iaomac-lb-thumb {
	flex: none; width: 92px; height: 62px; padding: 0; border-radius: 6px; overflow: hidden;
	border: 2px solid transparent; opacity: .65;
}
.iaomac-lightbox button.iaomac-lb-thumb[aria-current="true"] { border-color: #D4A017; opacity: 1; }
.iaomac-lightbox__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iaomac-lightbox__hint { margin: 10px 0 0; font-size: 12.5px; opacity: .6; text-align: center; }
body.iaomac-lightbox-open { overflow: hidden; }

/* ---------- Responsive (same breakpoints as the original page) ---------- */
@media (max-width: 900px) {
	.iaomac-info-grid { grid-template-columns: 1fr; }
	.iaomac-hotel__body { padding: 20px; }
	.iaomac-hotel__head { padding: 16px 20px; }
	.iaomac .iaomac-hotel__name { font-size: 20px; }
	.iaomac-hotel--above > .iaomac-media .iaomac-media__actions { padding: 16px 20px 0; }
	.iaomac-hotel--below > .iaomac-media .iaomac-media__actions { padding: 0 20px 18px; }
}
@media (max-width: 600px) {
	.iaomac { padding: 0 16px; }
	.iaomac-intro { padding: 18px 16px; }
	.iaomac-hotel__foot { flex-direction: column; align-items: stretch; }
	.iaomac a.iaomac-book { width: 100%; text-align: center; }
	.iaomac .iaomac-rates th,
	.iaomac .iaomac-rates td { padding: 10px; font-size: 13px; }
	.iaomac-lightbox button.iaomac-lb-thumb { width: 70px; height: 48px; }
	.iaomac-lightbox button.iaomac-lightbox__nav { width: 46px; height: 46px; }
	.iaomac-lightbox button.iaomac-lightbox__close { width: 42px; height: 42px; }
}

@media print {
	.iaomac-nav, .iaomac-media__actions, .iaomac-lightbox { display: none !important; }
	.iaomac-hotel { break-inside: avoid; }
}
