/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/*********
* Layout *
*********/

/* Container */
#content {
	padding-top: 0;
}
.site-header .inside-header {
	padding: 0;
}

.inside-article:not(:has(.featured)) {
	margin-top: 240px; /* Reserve space if no featured image */
}

/* Desktop: Overlay top bar over featured image */
@media (min-width: 769px) {
	/* Hide mobile "Book Now" button */
	.header-widget {
		display: none;
	}

	/* Hide mobile anv under featured image */
	.mobile-nav-under-featured {
		display: none !important;
	}

	/* Logo */
	.site-logo {
		position: absolute;
		top: -30px;
		left: 100px;
		z-index: 20;
		box-shadow: 0 4px 14px 0 grey;
	}

	/* Nav Bar */
	.site-header .inside-header {
		position: absolute;
		top: 50px;
		left: 0;
		right: 0;
		padding: 0;
	}
	.main-navigation {
		width: 100%;
		z-index: 10;
	}
	.site-header .inside-navigation {
		flex-direction: row-reverse;
	}

	/* Dynamic font sizing/padding */
	.site-header .main-nav > ul > li a {
		padding-left: clamp(0px, calc(2.5vw - 15px), 60px);
		padding-right: clamp(0px, calc(2.5vw - 15px), 60px);
		font-size: clamp(0.73em, calc(0.1em + 1.05vw), 1.3em);
		white-space: wrap;
	}
}

/* Tablet: Shrink logo down */
@media (min-width: 769px) and (max-width: 900px) {
	.site-logo {
		max-width: clamp(100px, 50%, 180px);
	}
}

/* Mobile: Toggle Nav and floating button */
@media (max-width: 768px) {
	/* Shrink logo further */
	.site-logo {
		max-width: clamp(100px, 30%, 150px);
	}

	/* "Book Now" button */
	.header-widget {
		margin-top: 0 !important;
	}
	.header-widget .wp-block-buttons {
		min-width: 85px;
		position: absolute;
		top: 0;
		bottom: 0;
		right: 100px;
		margin-left: 110px;
	}

	/* Style nav toggle button */
	.mobile-menu-control-wrapper {
		box-shadow: none !important;
	}
	.menu-toggle {
		font-size: 1.2em;
		background-color: transparent !important;
	}
	.menu-toggle::after {
		content: "Menu";
		display: block;
		line-height: 0;
		padding-bottom: 25px;
	}

	/* Mobile nav under featured image */
	.mobile-nav-under-featured {
		margin-bottom: 35px;
	}
	.mobile-nav-under-featured a {
		margin: 5px;
		padding: 4px 6px;
		font-size: 1.2em;
		box-shadow: 5px 5px 10px 0 grey;
	}
}

/* Small Mobile: Extend "mobile nav under featured image" to full width */
@media (max-width: 500px) {
	.mobile-nav-under-featured li {
		width: 100%;
	}
	.mobile-nav-under-featured a {
		width: 100%;
		text-align: center;
	}
}

/* Tiny Mobile: Hide "book now" button altogether */
@media (max-width: 305px) {
	.header-widget {
		display: none;
	}
}

/* Top Nav Styling */
.main-navigation {
	font-variant: small-caps;
	box-shadow: 0 4px 14px 0 grey;
}
.home .main-nav .check-availability {
	background-color: var(--accent);
}

/* Footer Nav */
.menu-bottom-nav-container {
	text-align: center;
	text-wrap: balance;
}
.menu-bottom-nav-container li {
	display: inline;
}
.menu-bottom-nav-container li + li {
	margin-left: 8px;
}
.menu-bottom-nav-container a {
	text-decoration: none;
}

/* Footer Bar */
.site-footer .inside-site-info {
	padding: 0;
}
.footer-bar {
	margin-bottom: 0 !important;
	font-variant: small-caps;
}
.footer-bar p {
	margin-left: 40px;
	white-space: nowrap;
}
.footer-bar a {
	display: block;
	padding: 8px 15px;
	background-color: #f5edd3;
	text-decoration: none;
}

/* Media and Text block - spacing */
.wp-block-media-text {
	margin-bottom: 40px;
}

/* Hide reCaptcha badge */
.grecaptcha-badge {
	visibility: hidden;
}


/*****************
* Helper Classes *
*****************/

.nomargin {
	margin: 0;
}

/* Multi-column lists */
@media (min-width: 769px) {
	.list-horizontal {
		column-count: 2;
	}
}


/***********
* Elements *
***********/

/* Featured Image */
.featured {
	position: relative;
	margin-bottom: 20px;
}
.featured img {
	object-fit: cover;
	min-height: 300px;
}
/* Fix featured image margins after update */
.featured .wp-block-group__inner-container {
	padding: 0 40px 0 40px;
}
@media (max-width: 768px) {
	.featured .wp-block-group__inner-container {
		padding: 0 0 0 0;
	}
}

/* Featured Home Hero Slider */
@media (min-width: 769px) {
	.home .featured img {
		height: calc(100vh - 50px) !important;
	}
	/* Positioning each slide by ID */
	.home .featured .slide-184 { /* Rocks */
		object-position: 80% center;
	}
	.home .featured .slide-186 { /* Pool */
		object-position: 45% center;
	}
	.home .featured .slide-187 { /* Bed */
		object-position: 10% center;
	}
	.home .featured .slide-185 { /* Beach */
		object-position: 59% center;
	}
}
/* About page */
.page-id-408 .featured .wp-block-image img {
	object-position: 85% 30%;
}

/* Social Media Links */
.featured .wp-block-social-links {
	position: absolute;
	left: 30px;
	bottom: 30px;
	margin: 0;
}
/* Vertically align footer social media links */
.wp-block-social-links li {
	margin-bottom: 0 !important;
}

/* Float images in sidebar (Cannon Beach, Oregon Coast pages) */
.image-sidebar {
	width: 200px;
	float: left;
	margin: 0 20px 20px 0;
}

/* Column Headers (Guest Rooms, About Us) */
.col-entry h2 {
	display: inline-block;
	padding: 8px;
	background-color: var(--accent);
	font-variant: small-caps;
}

/* Column Description (Guest Rooms, About Us) */
.col-entry > .wp-block-column:nth-of-type(2) p,
.col-entry > .wp-block-media-text__content p {
	max-width: 600px;
	text-align: justify;
}

/* Gallery - 1 Column on Mobile */
@media (max-width: 900px) {
	.gallery-responsive figure {
		width: 100% !important;
	}
}

/* Guest Rooms - Slideshows */
.guest-room-unit .metaslider {
	padding-bottom: 0 !important;
}
.guest-room-unit .flex-direction-nav a {
	background: rgba(255, 255, 255, 0.3) !important;
	opacity: 0.7 !important;
}

/* Contact - CF7 Form */
.wpcf7-form {
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0px 0px 14px grey;
}
.wpcf7-form input:not([type="submit"]) {
	width: 100%;
}
.wpcf7-form textarea {
	height: 120px;
}
.wpcf7-form input[type="submit"] {
	background-color: #0086e7;
	border: 1px solid #274795;
	float: right;
}

/* Contact - Properties List */
.contact-properties {
	list-style: none;
	margin-left: 0;
}
.contact-properties a {
	display: inline-block;
	margin-bottom: 15px;
	text-decoration: none;
	background-color: var(--accent);
	padding: 7px;
	font-variant: small-caps;
}
.contact-properties em {
	color: #979797;
	font-style: normal;
}

/* Footer Nav Links */
.footer-widgets-container {
	max-width: 780px;
}
.footer-widgets-container .menu-item {
	white-space: nowrap;
}

/* Sticky Footer on desktop */
@media (min-width: 769px) {
	.site-footer {
		/* Reserve space for fixed element */
		margin-bottom: 50px;
	}
	footer.site-info {
		position: fixed;
		bottom: 0;
		width: 100%;
		max-width: inherit;
	}
}
