/*
Theme Name: Apple House Koh Tao
Description: Child theme for Apple House Koh Tao. All site-specific theme customizations belong here.
Author: Apple House Koh Tao
Template: palmeria
Version: 1.1.1
Text Domain: apple-house-kohtao
*/

:root {
	--apple-green: #315b45;
	--apple-green-dark: #203d30;
	--apple-cream: #f7f1e7;
	--apple-sand: #e8d8bf;
	--apple-terracotta: #bd6847;
	--apple-ink: #26332d;
}

html { scroll-behavior: smooth; }
body { color: var(--apple-ink); }
.home .site-content { max-width: none; padding: 0; }
.home .front-page .wrapper { max-width: none; padding: 0; }
.home .front-page .entry-content { margin: 0; }
.home .entry-footer { display: none; }

.apple-hero {
	position: relative;
	min-height: min(760px, 82vh);
	display: grid;
	align-items: end;
	background-position: center;
	background-size: cover;
	color: #fff;
}
.apple-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(18, 35, 28, .88) 0%, rgba(18, 35, 28, .55) 48%, rgba(18, 35, 28, .18) 100%);
}
.apple-hero__content { position: relative; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 110px 0 72px; }
.apple-eyebrow { margin: 0 0 14px; color: #f2d5a9; font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.apple-hero h1 { max-width: 760px; margin: 0; color: #fff; font-size: clamp(3rem, 7vw, 6rem); line-height: .98; }
.apple-nowrap { white-space: nowrap; }
.apple-hero__intro { max-width: 680px; margin: 24px 0 30px; color: #fff; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.65; }
.apple-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.apple-button, .apple-home .wp-block-button__link, .apple-dorm-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border: 2px solid var(--apple-terracotta);
	border-radius: 3px;
	background: var(--apple-terracotta);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
}
.apple-button--secondary { border-color: #fff; background: transparent; }
.apple-button:hover, .apple-button:focus, .apple-dorm-card__button:hover, .apple-dorm-card__button:focus { background: var(--apple-green-dark); border-color: var(--apple-green-dark); }
.apple-button--secondary:hover, .apple-button--secondary:focus { background: #fff; border-color: #fff; color: var(--apple-green-dark) !important; }

.apple-home section { scroll-margin-top: 92px; }
.apple-section { padding: clamp(64px, 8vw, 112px) 24px; }
.apple-section--cream { background: var(--apple-cream); }
.apple-section--green { background: var(--apple-green-dark); color: #fff; }
.apple-section--sand { background: var(--apple-sand); }
.apple-container { width: min(1120px, 100%); margin: 0 auto; }
.apple-section h2 { margin-top: 0; color: var(--apple-green-dark); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.12; }
.apple-section--green h2, .apple-section--green h3 { color: #fff; }
.apple-lead { max-width: 790px; font-size: 1.2rem; line-height: 1.75; }

.apple-search-wrap { position: relative; z-index: 2; width: min(1120px, calc(100% - 32px)); margin: -38px auto 0; padding: 28px; background: #fff; box-shadow: 0 16px 48px rgba(28, 45, 36, .16); }
.apple-search-wrap .mphb_sc_search-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 18px; align-items: end; margin: 0; }
.apple-search-wrap p { margin: 0; }
.apple-search-wrap .mphb-required-fields-tip, .apple-search-wrap .mphb_sc_search-children { display: none; }
.apple-search-wrap label { color: var(--apple-green-dark); font-size: .82rem; font-weight: 700; text-transform: uppercase; }
.apple-search-wrap input, .apple-search-wrap select { width: 100%; min-height: 46px; }
.apple-search-wrap .button { min-height: 46px; margin: 0; background: var(--apple-terracotta); }

.apple-photo-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; margin-top: 36px; }
.apple-photo-grid img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.apple-photo-grid img:first-child { grid-row: span 2; min-height: 540px; }

.apple-dorm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
.apple-dorm-card { overflow: hidden; border: 1px solid #e0d5c3; background: #fff; box-shadow: 0 10px 30px rgba(31, 53, 42, .08); }
.apple-dorm-card__image { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #ddd; }
.apple-dorm-card__image img { width: 100%; height: 100%; object-fit: cover; }
.apple-dorm-card__image span { position: absolute; right: 12px; bottom: 10px; padding: 5px 8px; background: rgba(20, 38, 30, .78); color: #fff; font-size: .72rem; }
.apple-dorm-card__body { padding: 28px; }
.apple-dorm-card h3 { margin: 0 0 10px; font-size: 1.55rem; }
.apple-dorm-card__meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 16px; color: var(--apple-green); font-weight: 700; }
.apple-dorm-card__price { font-size: 1.15rem; }
.apple-dorm-card__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 20px; }
.apple-text-link { color: var(--apple-green-dark); font-weight: 700; }

.apple-facility-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.apple-facility { padding: 24px; border-top: 4px solid var(--apple-terracotta); background: #fff; }
.apple-facility h3 { margin: 0 0 8px; font-size: 1.15rem; }
.apple-facility p { margin: 0; }

.apple-gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; margin-top: 34px; }
.apple-gallery a { grid-column: span 4; overflow: hidden; min-height: 230px; }
.apple-gallery a:nth-child(1), .apple-gallery a:nth-child(5) { grid-column: span 8; }
.apple-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.apple-gallery a:hover img, .apple-gallery a:focus img { transform: scale(1.025); }

.apple-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.apple-split img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.apple-business-sign, .apple-location-photo { margin: 0; }
.apple-business-sign { width: min(100%, 420px); justify-self: center; }
.apple-note { padding: 16px 18px; border-left: 4px solid var(--apple-terracotta); background: rgba(255,255,255,.1); }
.apple-location-panel { display: grid; place-items: center; min-height: 320px; padding: 36px; border: 2px dashed rgba(49,91,69,.35); background: rgba(255,255,255,.55); text-align: center; }
.apple-tattoo { max-width: 800px; }
.apple-bar-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.apple-final-cta { text-align: center; }
.apple-final-cta .apple-lead { margin-right: auto; margin-left: auto; }

.primary-menu > li:last-child > a { padding-right: 18px !important; padding-left: 18px !important; background: var(--apple-terracotta); color: #fff !important; }
.main-navigation:not(.mobile-navigation) .primary-menu { display: flex; flex-wrap: nowrap; align-items: center; }
.main-navigation:not(.mobile-navigation) .primary-menu > li > a { padding-right: 9px; padding-left: 9px; font-size: .78rem; white-space: nowrap; }
.site-footer { background: #172b22; color: #fff; }
.site-footer a { color: #fff; }
.footer-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; }

@media (max-width: 1024px) {
	.apple-search-wrap .mphb_sc_search-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.apple-facility-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	.apple-hero { min-height: 680px; }
	.apple-hero::before { background: linear-gradient(rgba(18,35,28,.72), rgba(18,35,28,.9)); }
	.apple-search-wrap { margin-top: 0; }
	.apple-search-wrap .mphb_sc_search-form, .apple-dorm-grid, .apple-split, .apple-photo-grid { grid-template-columns: 1fr; }
	.apple-photo-grid img:first-child { grid-row: auto; min-height: 320px; }
	.apple-gallery a, .apple-gallery a:nth-child(1), .apple-gallery a:nth-child(5) { grid-column: span 6; min-height: 190px; }
}
@media (max-width: 480px) {
	.apple-hero__content { width: min(100% - 28px, 1180px); padding-bottom: 46px; }
	.apple-actions, .apple-actions .apple-button { width: 100%; }
	.apple-section { padding-right: 18px; padding-left: 18px; }
	.apple-search-wrap { width: 100%; padding: 22px 18px; }
	.apple-search-wrap .mphb_sc_search-form, .apple-facility-grid { grid-template-columns: 1fr; }
	.apple-gallery { grid-template-columns: 1fr; }
	.apple-gallery a, .apple-gallery a:nth-child(1), .apple-gallery a:nth-child(5) { grid-column: auto; min-height: 230px; }
	.apple-dorm-card__body { padding: 22px; }
}

.theme-social-menu a[href*="wa.me"]:before { content: "\f232"; font-weight: normal; }

/* Approved responsive image layouts  2026-08-13 */
.apple-facility-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.apple-facility-photos figure, .apple-bar-photos figure { margin: 0; overflow: hidden; }
.apple-facility-photos img { display: block; width: 100%; height: 300px; object-fit: cover; }
.apple-bar-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.apple-bar-photos img { display: block; width: 100%; height: 360px; object-fit: cover; }
@media (max-width: 1024px) { .apple-facility-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .apple-bar-photos { grid-template-columns: 1fr 1fr; } .apple-bar-photos img { height: 280px; } }
@media (max-width: 480px) { .apple-facility-photos, .apple-bar-photos { grid-template-columns: 1fr; } .apple-facility-photos img, .apple-bar-photos img { height: 260px; } }

/* Facilities card layout - 2026-08-14 */
.apple-facility-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.apple-facility-card { overflow: hidden; border: 1px solid rgba(23, 43, 34, .12); border-top: 4px solid var(--apple-terracotta); background: #fff; }
.apple-facility-card__image { margin: 0; overflow: hidden; }
.apple-facility-card__image img { display: block; width: 100%; height: 240px; object-fit: cover; object-position: center; }
.apple-facility-card__body { padding: 24px; }
.apple-facility-card__body h3 { margin: 0 0 8px; font-size: 1.15rem; }
.apple-facility-card__body p { margin: 0; }
#facilities .apple-facility-grid .apple-facility:nth-child(-n+3) { display: none; }
@media (max-width: 1024px) { .apple-facility-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .apple-facility-cards { grid-template-columns: 1fr; } .apple-facility-card__image img { height: 230px; } }
