/*
Theme Name: José Marcelino
Theme URI: 
Author: 
Author URI: 
Description: 
Requires at least: 7.0
Tested up to: 7.0
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: jose-marcelino
Tags: one-column, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, blog

/* Crossfade page transition */

@view-transition {
	navigation: auto;
}

/* Font smoothing */
body {
	text-rendering: geometricprecision;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/*
 * 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;
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.1em
}

/*
 * 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;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/*
 * Make sure footers have no margin.
 * https://github.com/WordPress/gutenberg/issues/47637
 */
footer.wp-block-template-part {
	margin-block-start: 0 !important;
}

/* Utility classes for removing text decoration from link . */
.no-underline a {
	text-decoration: none;
}

/* Utility classes for custom ordering . */
.order-0 {
	order: 0;
}

.order-1 {
	order: 1;
}

.grow-0 {
	flex-grow: 0;
}

.grow {
	flex-grow: 1;
}

@media (min-width: 600px) {
	.md\:order-0 {
		order: 0;
	}

	.md\:order-1 {
		order: 1;
	}

	.md\:grow-0 {
		flex-grow: 0;
	}

	.md\:grow {
		flex-grow: 1;
	}
}

/* Header */
.jm-header-actions .jm-header-nav .wp-block-navigation-item__content {
	padding-block: 6px;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.25s ease;
}
.jm-header-actions .jm-header-nav .wp-block-navigation-item__content:hover,
.jm-header-actions .jm-header-nav .current-menu-item > .wp-block-navigation-item__content {
	background-size: 100% 1px;
	text-decoration: none;
}
@media (max-width: 1100px) {
	.jm-header-actions .jm-header-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
	.jm-header-actions .jm-header-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* Navigation overlay */
.jm-overlay .jm-overlay-nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	transition: opacity 0.2s ease, transform 0.25s ease;
}
.jm-overlay .jm-overlay-nav:hover .wp-block-navigation-item__content {
	opacity: 0.45;
}
.jm-overlay .jm-overlay-nav .wp-block-navigation-item__content:hover {
	opacity: 1;
	text-decoration: none;
}
.jm-overlay .wp-block-navigation-overlay-close,
.jm-overlay .wp-block-navigation-overlay-close button {
	color: var(--wp--preset--color--base);
}

/* Header: same height for CTA button and language switcher */
.jm-header-actions .wp-block-button__link,
.jm-header-actions .jpt-switcher {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* Keep overlay links in sentence case even when the header nav is uppercase */
.jm-overlay .jm-overlay-nav,
.jm-overlay .jm-overlay-nav .wp-block-navigation-item__content {
	text-transform: none;
	letter-spacing: -0.02em;
	font-weight: 400;
}
.jm-overlay {
	text-transform: none;
	letter-spacing: normal;
}

/* Overlay links: no header underline effect, tight hover underline */
.jm-overlay .jm-overlay-nav .wp-block-navigation-item__content {
	padding-block: 0;
	background-image: none;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.12em;
	text-decoration-color: transparent;
	transition: opacity 0.2s ease, text-decoration-color 0.2s ease;
}
.jm-overlay .jm-overlay-nav .wp-block-navigation-item__content:hover,
.jm-overlay .jm-overlay-nav .wp-block-navigation-item__content:focus-visible {
	text-decoration: underline;
	text-decoration-color: currentColor;
}

/* Testimonials slider (no plugin) */
.jm-testimonials {
	align-items: stretch;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}
.jm-testimonials::-webkit-scrollbar {
	display: none;
}
.jm-testimonials:focus-visible {
	outline: 1px solid var(--wp--preset--color--contrast);
	outline-offset: 8px;
}
.jm-testimonials > .jm-testimonial {
	flex: 0 0 100%;
	scroll-snap-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
}
.jm-testimonial-quote {
	font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	text-wrap: pretty;
}
.jm-testimonial-author {
	color: var(--wp--preset--color--custom-color-1);
	letter-spacing: 0.02em;
}
.jm-testimonials-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--40);
}
.jm-testimonials-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 20%, transparent);
	border-radius: 9999px;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.jm-testimonials-arrow:hover,
.jm-testimonials-arrow:focus-visible {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.jm-testimonials-dots {
	display: flex;
	gap: 8px;
}
.jm-testimonials-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 25%, transparent);
	cursor: pointer;
	transition: width 0.25s ease, background-color 0.25s ease;
}
.jm-testimonials-dot[aria-current="true"] {
	width: 24px;
	background: var(--wp--preset--color--contrast);
}
@media (prefers-reduced-motion: reduce) {
	.jm-testimonials {
		scroll-behavior: auto;
	}
}

/* Header on mobile: compact bar with name only, language + menu on the right */
@media (max-width: 600px) {
	.jm-header-bar {
		padding-top: 12px !important;
		padding-bottom: 12px !important;
	}
	.jm-header-bar .wp-block-site-tagline {
		display: none;
	}
	.jm-header-bar .wp-block-site-title {
		font-size: 1.25rem;
	}
	.jm-header-actions {
		gap: 12px !important;
	}
	.jm-header-actions .jm-header-nav {
		order: 2;
	}
	.jm-header-actions .jpt-switcher {
		height: 36px;
		padding-left: 12px !important;
		padding-right: 12px !important;
	}
	.jm-header-actions .jm-header-nav .wp-block-navigation__responsive-container-open {
		width: 36px;
		height: 36px;
		justify-content: center;
		align-items: center;
	}
}

/* Overlay links: more space between items, colour-only hover */
.jm-overlay .jm-overlay-nav .wp-block-navigation__container {
	row-gap: 8px !important;
}
.jm-overlay .jm-overlay-nav .wp-block-navigation-item__content,
.jm-overlay .jm-overlay-nav .wp-block-navigation-item__content:hover,
.jm-overlay .jm-overlay-nav .wp-block-navigation-item__content:focus-visible {
	text-decoration: none;
}

/* Areas of interest: each item turns dark blue on hover */
.jm-interest-list > p {
	position: relative;
	transition: color 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.jm-interest-list > p::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 0.9em;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.jm-interest-list > p:hover {
	color: var(--wp--preset--color--contrast);
	transform: translateX(1.2em);
}
.jm-interest-list > p:hover::before {
	transform: translateX(-1.2em) scaleX(1);
}


/* Header shrinks on scroll (desktop) */
@media (min-width: 601px) {
	.jm-header-bar {
		transition: padding 0.3s ease;
	}
	.jm-header-bar .wp-block-site-title {
		transition: font-size 0.3s ease;
	}
	.jm-header-bar .wp-block-site-tagline {
		max-height: 2em;
		overflow: hidden;
		transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
	}
	.jm-is-scrolled .jm-header-bar {
		padding-top: 12px !important;
		padding-bottom: 12px !important;
	}
	.jm-is-scrolled .jm-header-bar .wp-block-site-title {
		font-size: calc(var(--wp--preset--font-size--large) * 0.85);
	}
	.jm-is-scrolled .jm-header-bar .wp-block-site-tagline {
		max-height: 0;
		opacity: 0;
		margin-top: -6px !important;
	}
}
