/*
Theme Name: Chateau Montmuran
Theme URI: 
Author: Perfecto Breizh
Author URI: 
Description: 
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chateau-montmuran
Tags: 

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */

a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
	transition: color 0.3s ease;
}

.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content:focus,
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content:focus-visible,
.wp-block-site-logo a:focus,
.wp-block-site-logo a:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content:hover {
	color: #808B63 !important;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

.is-foreground-block {
	position: relative;
	z-index: 1;
}

.wp-block-button__link {
	justify-content: center;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background-color: #632A13 !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	color: #C5C5C5 !important;
}

.gform-footer.gform_footer.top_label {
	justify-content: center !important;
	margin-bottom: 35px !important;

}

.gform_button.button {
	width: 50% !important; 
	font-size: 24px !important;
	padding: 10px !important;
}

.gfield_description {
	display: none !important;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
	background: transparent !important;
}

.gslider-list-content {
	display: flex;
	flex-direction: column-reverse;
}

.gslider-title-wrapper {
	margin-top: 85px;
}

footer {
	margin-top: 0 !important;
}

@media all and (max-width: 900px) {
	body .is-layout-grid {
		grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
	}
}

/*
 * Query Loop cards (.wp-block-post-template)
 * Same padding, height and "Lire la suite" position with or without a featured image.
 */
.wp-block-post-template > .wp-block-post {
	--card-padding: 24px;
	--card-radius: 12px;

	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
	box-sizing: border-box;
	padding: var(--card-padding);
	background-color: #fff;
	border-radius: var(--card-radius);
	overflow: hidden;
}

/* The card may wrap its content in a single group: let it fill the card. */
.wp-block-post-template > .wp-block-post > .wp-block-group:only-child {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 12px;
	padding: 0;
}

/* Spacing is handled by the flex gap. */
.wp-block-post-template > .wp-block-post > *,
.wp-block-post-template > .wp-block-post > .wp-block-group:only-child > * {
	margin-block: 0;
}

/* Featured image: 16/9, bleeds to the card edges when it opens the card. */
.wp-block-post-template .wp-block-post-featured-image {
	aspect-ratio: 16 / 9;
	width: auto;
	overflow: hidden;
}

.wp-block-post-template .wp-block-post-featured-image :where(a, img) {
	display: block;
	width: 100%;
	height: 100%;
}

.wp-block-post-template .wp-block-post-featured-image img {
	object-fit: cover;
}

.wp-block-post-template > .wp-block-post > .wp-block-post-featured-image:first-child,
.wp-block-post-template > .wp-block-post > .wp-block-group:only-child > .wp-block-post-featured-image:first-child {
	margin: calc(var(--card-padding) * -1) calc(var(--card-padding) * -1) 8px;
	border-radius: var(--card-radius) var(--card-radius) 0 0;
}

/* No featured image: the first text element (date/title) never touches the top edge. */
.wp-block-post-template > .wp-block-post:not(:has(.wp-block-post-featured-image)) > :first-child:not(.wp-block-group:only-child),
.wp-block-post-template > .wp-block-post:not(:has(.wp-block-post-featured-image)) > .wp-block-group:only-child > :first-child {
	padding-top: 8px;
}

/* "Lire la suite" always sits at the bottom of the card. */
.wp-block-post-template > .wp-block-post > :last-child,
.wp-block-post-template > .wp-block-post > .wp-block-group:only-child > :last-child {
	margin-top: auto;
}
