/**
 * WordPress additions on top of index.css (which is the original static build,
 * left untouched so the design stays in sync with the HTML source).
 */

/* ---- mobile fixes ---- */

@media (max-width: 767px) {
	/* html is 62.5% so Bootstrap's 0.75rem gutter is only 7.5px; keep 16px. */
	.container,
	.container-fluid { --bs-gutter-x: 3.2rem; }

	.rr-about__eyebrow-row,
	.rr-services__text { padding-inline: 1.6rem; }

	/* Category tabs scroll sideways instead of cramming into one line. */
	.rr-projects__tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 2.4rem;
		padding-bottom: 0.4rem;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.rr-projects__tabs::-webkit-scrollbar { display: none; }
	.rr-projects__tabs .nav-item { flex: 0 0 auto; margin: 0 !important; }
	.rr-projects__tabs .nav-link { white-space: nowrap; }
	.rr-projects-archive__filters { justify-content: flex-start; }
}

/* "Get in Touch" inside the mobile drawer (the header button is hidden there). */
.rr-header__nav-cta { display: none; }

@media (max-width: 991px) {
	.rr-header__nav-cta { display: block; padding: 2.4rem 2.8rem 0; }

	.rr-header__nav-cta-btn {
		display: block;
		padding: 1.4rem 2rem;
		background: var(--primary);
		color: var(--black);
		font-family: var(--font-bold);
		font-size: 1.3rem;
		letter-spacing: 0.14em;
		text-align: center;
		text-transform: uppercase;
		text-decoration: none;
	}

	.rr-header__nav-cta-btn:hover { background: var(--primary-dark); color: var(--black); }
}

@media (max-width: 575px) {
	/* With an odd number of service cards the last one spans the row. */
	.rr-services__card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---- inner pages: the header is fixed, so push content below it ---- */

.rr-page {
	padding-block: clamp(12rem, 14vw, 16rem) clamp(6rem, 7vw, 9rem);
	min-height: 60vh;
}

@media (max-width: 991px) {
	/* The un-shrunk mobile header is ~13rem tall. */
	.rr-page { padding-top: 16rem; }
}

/* Inner pages have no dark hero behind the fixed header, so its translucent
   bar turns grey over white. Use the solid "scrolled" look from the start. */
body.rr-inner .rr-header .rr-header__bg {
	background: linear-gradient(180deg, rgba(8, 13, 24, 0.96) 0%, rgba(10, 16, 30, 0.96) 100%);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.rr-page__head { margin-bottom: 4rem; }
.rr-page__head .rr-section-head__title { color: var(--light-black); }

.rr-page__article + .rr-page__article { margin-top: 5rem; }

.rr-page__entry-title {
	font-size: 2.4rem;
	margin-bottom: 1rem;
}

.rr-page__entry-title a { color: var(--light-black); text-decoration: none; }
.rr-page__entry-title a:hover { color: var(--primary-dark); }

/* ---- editor content ---- */

.rr-page__content {
	max-width: 90rem;
	font-size: 1.6rem;
	line-height: 1.8;
	color: var(--gray);
}

.rr-page__content > * + * { margin-top: 1.6rem; }
.rr-page__content h2,
.rr-page__content h3,
.rr-page__content h4 { color: var(--light-black); margin-top: 3.2rem; }
.rr-page__content h2 { font-size: 3rem; }
.rr-page__content h3 { font-size: 2.4rem; }
.rr-page__content a { color: var(--primary-dark); }
.rr-page__content img { height: auto; }
.rr-page__content ul,
.rr-page__content ol { padding-left: 2.4rem; }

.rr-page__content .wp-block-image,
.rr-page__content figure { margin-inline: 0; }

/* ---- pagination / search ---- */

.rr-page .navigation.pagination { margin-top: 4rem; font-size: 1.5rem; }
.rr-page .nav-links { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.rr-page .page-numbers {
	display: inline-flex;
	align-items: center;
	padding: 0.6rem 1.2rem;
	border: 1px solid var(--border);
	color: var(--light-black);
	text-decoration: none;
}
.rr-page .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }

.rr-page .search-form { display: flex; gap: 0.8rem; max-width: 48rem; }
.rr-page .search-form input[type="search"] { flex: 1; padding: 1rem 1.4rem; border: 1px solid var(--border); font: inherit; }
.rr-page .search-form input[type="submit"] { padding: 1rem 2rem; background: var(--primary); border: 0; color: #fff; font: inherit; cursor: pointer; }

/* ---- breadcrumbs ---- */

.rr-breadcrumbs { margin-bottom: 2rem; font-size: 1.3rem; letter-spacing: 0.04em; }
.rr-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.rr-breadcrumbs li { color: var(--gray); }
.rr-breadcrumbs li + li::before { content: "/"; margin-right: 0.6rem; color: var(--primary); }
.rr-breadcrumbs a { color: var(--gray); text-decoration: none; }
.rr-breadcrumbs a:hover { color: var(--primary-dark); }
.rr-breadcrumbs li[aria-current] { color: var(--light-black); }
.rr-projects-archive .rr-breadcrumbs { justify-content: center; }
.rr-projects-archive .rr-breadcrumbs ol { justify-content: center; }

/* ---- 404 ---- */

.rr-404 { text-align: center; }
.rr-404 .rr-section-head { margin-bottom: 3.2rem; }
.rr-404__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2.4rem; }

.rr-hero__btn-solid {
	display: inline-block;
	padding: 1.4rem 3.2rem;
	background: var(--primary);
	color: var(--black);
	font-family: var(--font-bold);
	font-size: 1.3rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
}

.rr-hero__btn-solid:hover { background: var(--primary-dark); color: var(--black); }
.rr-404 .rr-about__link { color: var(--light-black); }

/* ---- projects: category tabs ---- */

/* Longer category names ("Upcoming Launches") wrapped onto two lines and
   pushed that tab's underline below the others. Keep labels on one line and
   let the row wrap as a whole if it ever runs out of room. */
.rr-projects__tabs { align-items: flex-end; }
.rr-projects__tabs .nav-item { flex: 1 1 0; min-width: max-content; }
.rr-projects__tabs .nav-link { white-space: nowrap; }

@media (min-width: 768px) and (max-width: 1199px) {
	/* Four tabs at tablet widths: tighter type and spacing rather than wrapping. */
	.rr-projects__tabs .nav-link { font-size: clamp(1.3rem, 1.5vw, 1.8rem); letter-spacing: 0.04em; }
	.rr-projects__tabs .nav-item:not(:last-child) { margin-right: 2rem; }
}

/* ---- projects: archive grid ---- */

.rr-projects-archive .rr-section-head { margin-bottom: 3.2rem; }

.rr-projects-archive__filters {
	justify-content: center;
	margin-bottom: 4rem;
}

.rr-projects-archive__clear { margin: 1.2rem 0 0; font-size: 1.4rem; }
.rr-projects-archive__clear a { color: var(--gray); text-decoration: none; }
.rr-projects-archive__clear a:hover { color: var(--primary-dark); }

.rr-projects-archive__empty { text-align: center; padding-block: 4rem; }
.rr-projects-archive__empty .rr-page__content { margin: 0 auto 2rem; }

.rr-projects-archive__filters .nav-item { flex: 0 1 auto; }
.rr-projects-archive__filters .nav-link { cursor: pointer; white-space: nowrap; }

.rr-projects-archive__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 3.2rem 2rem;
}

@media (min-width: 768px) {
	.rr-projects-archive__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4rem 2.4rem; }
}

@media (min-width: 1200px) {
	.rr-projects-archive__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.rr-projects__card-title a { color: inherit; text-decoration: none; }
.rr-projects__card-title a:hover { color: var(--primary-dark); }

/* WordPress adds width/height attributes to the card image; without an explicit
   height the attribute wins and the 316:393 aspect-ratio in index.css is ignored. */
.rr-projects__card img { height: auto; }

/* ---- projects: category dropdown on phones ---- */

.rr-projects-archive__select { display: none; }

@media (max-width: 767px) {
	.rr-projects-archive__filters { display: none; }

	.rr-projects-archive__select {
		display: block;
		max-width: 36rem;
		margin: 0 auto 3.2rem;
	}

	.rr-projects-archive__select label {
		display: block;
		margin-bottom: 0.6rem;
		font-family: var(--font-regular);
		font-size: 1.2rem;
		letter-spacing: 0.12em;
		text-transform: uppercase;
		text-align: center;
		color: var(--gray);
	}

	/* Styled like the tabs: serif uppercase, gold rule underneath, gold chevron. */
	.rr-projects-archive__select select {
		width: 100%;
		appearance: none;
		-webkit-appearance: none;
		padding: 1rem 3.6rem 1rem 1.6rem;
		border: 1px solid var(--primary);
		border-radius: 9px;
		background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23D2AB67' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1.4rem center;
		color: var(--light-black);
		font-family: var(--sub-font-regular);
		font-size: 1.8rem;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		text-align: center;
		text-align-last: center;
		cursor: pointer;
	}

	.rr-projects-archive__select select:focus {
		outline: none;
		box-shadow: 0 0 0 3px rgba(210, 171, 103, 0.25);
	}
}

.rr-projects__card-placeholder {
	display: block;
	aspect-ratio: 316 / 393;
	background: var(--off-white);
}

/* "View all …" link beside the slider arrows on the homepage. */
.rr-projects__all {
	display: inline-flex;
	align-items: center;
	gap: 0.8rem;
	margin-left: 1.6rem;
	font-family: var(--font-medium);
	font-size: 1.4rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--light-black);
	text-decoration: none;
}

.rr-projects__all:hover { color: var(--primary-dark); }
.rr-projects__all i { font-size: 1.1rem; }

/* ---- "back" link (project archive empty state, single post) ---- */

.rr-project__back {
	color: var(--light-black);
	gap: 0.8rem;
}

.rr-project__back:hover { color: var(--primary-dark); }

/* The project page itself (hero, amenities, gallery…) is styled in pages.css. */

/* ---- "Get in Touch" popup ---- */

.rr-modal { z-index: 1200; }
.modal-backdrop.show { opacity: 0.7; }

.rr-modal__content {
	border: 1px solid rgba(210, 171, 103, 0.35);
	border-radius: 0;
	background: linear-gradient(180deg, #121826 0%, #0b0f18 100%);
	color: var(--white);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.rr-modal__close {
	position: absolute;
	top: 1.6rem;
	right: 1.6rem;
	z-index: 2;
	width: 4rem;
	height: 4rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	background: transparent;
	color: var(--white);
	font-size: 1.6rem;
	cursor: pointer;
	transition: all 0.3s ease;
}

.rr-modal__close:hover { background: var(--primary); border-color: var(--primary); color: var(--black); }

.rr-modal__body { padding: clamp(3.2rem, 5vw, 5.6rem); }

.rr-modal__head { margin-bottom: 3.2rem; }
.rr-modal__head .rr-section-head__tag { color: var(--primary); }
.rr-modal__title { color: var(--white); margin-top: 0.4rem; font-size: clamp(2.8rem, 3.5vw, 4.2rem); }
.rr-modal__text { margin: 1.2rem 0 0; color: rgba(255, 255, 255, 0.7); font-size: 1.5rem; }

/* CF7 form inside the popup. */
.rr-form__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 2.4rem;
}

@media (min-width: 768px) {
	.rr-form__grid { grid-template-columns: 1fr 1fr; }
}

.rr-form__field { margin: 0 0 2rem; }

.rr-form__field label {
	display: block;
	margin-bottom: 0.6rem;
	font-family: var(--font-medium);
	font-size: 1.2rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

.rr-form__field label span { color: var(--primary); }

.rr-form .wpcf7-form-control-wrap { display: block; }

.rr-form input[type="text"],
.rr-form input[type="email"],
.rr-form input[type="tel"],
.rr-form select,
.rr-form textarea {
	width: 100%;
	padding: 1.1rem 0;
	border: 0;
	border-bottom: 1px solid rgba(210, 171, 103, 0.45);
	border-radius: 0;
	background: transparent;
	color: var(--white);
	font-family: var(--font-regular);
	font-size: 1.6rem;
	line-height: 1.4;
	outline: none;
	transition: border-color 0.3s ease;
}

.rr-form input:focus,
.rr-form select:focus,
.rr-form textarea:focus { border-bottom-color: var(--primary); }

.rr-form input::placeholder,
.rr-form textarea::placeholder { color: rgba(255, 255, 255, 0.35); }

.rr-form select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 2.4rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23D2AB67' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.4rem center;
	cursor: pointer;
}

.rr-form select option { color: var(--light-black); background: var(--white); }

.rr-form textarea { min-height: 9rem; resize: vertical; }

/* Country code + number on one line. */
.rr-form__phone { display: flex; gap: 1.2rem; }
.rr-form__phone .wpcf7-form-control-wrap[data-name="country_code"] { flex: 0 0 15rem; }
.rr-form__phone .wpcf7-form-control-wrap[data-name="your-phone"] { flex: 1; min-width: 0; }

.rr-form__submit { margin: 1.2rem 0 0; }

.rr-form .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	padding: 1.4rem 3.2rem;
	border: 1px solid var(--primary);
	background: var(--primary);
	color: var(--black);
	font-family: var(--font-bold);
	font-size: 1.3rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s ease;
}

.rr-form .wpcf7-submit:hover { background: transparent; color: var(--primary); }
.rr-form .wpcf7-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.rr-form .wpcf7-spinner { margin-left: 1rem; }

.rr-form .wpcf7-not-valid { border-bottom-color: #e5484d; }

.rr-form .wpcf7-not-valid-tip {
	display: block;
	margin-top: 0.5rem;
	font-size: 1.2rem;
	color: #f08a8e;
}

.rr-form .wpcf7-response-output {
	margin: 2rem 0 0;
	padding: 1.2rem 1.6rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 1.4rem;
}

.rr-form.sent .wpcf7-response-output { border-color: var(--primary); color: var(--primary); }
.rr-form.invalid .wpcf7-response-output,
.rr-form.failed .wpcf7-response-output,
.rr-form.aborted .wpcf7-response-output { border-color: #e5484d; color: #f08a8e; }
.rr-form.init .wpcf7-response-output { display: none; }

/* ---- footer ---- */

/* Extra contact rows (email) use a Font Awesome icon instead of an inline SVG. */
.rr-footer__contact li i { font-size: 1.5rem; color: #fff; }

/* WordPress flags anchor links to the homepage (#about, #projects…) as the
   "current" item; the design gives every footer link the same colour. */
.rr-footer__links .current-menu-item > a:not(:hover),
.rr-footer__links .current_page_item > a:not(:hover) { color: var(--white); }
