/*
Theme Name: Westy on the Road
Theme URI: https://westyontheroad.com
Author: Westy on the Road
Description: Tema de bloques retro-aventurero para westyontheroad.com. Viajar lento para vivir profundo. Paleta tierra inspirada en una VW Westfalia Helsinki de 1975.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: westy
*/

/* Textura de papel suave sobre el fondo arena */
body {
	background-image: radial-gradient(rgba(40, 54, 24, 0.035) 1px, transparent 1px);
	background-size: 4px 4px;
}

a { text-underline-offset: 0.18em; }

.wp-block-navigation a:hover { color: var(--wp--preset--color--mostaza); }

.westy-card {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.westy-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px -18px rgba(40, 54, 24, 0.55);
}

.westy-ficha {
	border-left: 6px solid var(--wp--preset--color--mostaza);
}

.westy-ficha ul { list-style: none; padding-left: 0; }
.westy-ficha li { padding: 0.35em 0; border-bottom: 1px dashed rgba(40, 54, 24, 0.2); }
.westy-ficha li:last-child { border-bottom: 0; }

.westy-stripes {
	height: 10px;
	background: linear-gradient(to bottom,
		var(--wp--preset--color--mostaza) 0 33%,
		var(--wp--preset--color--terracota) 33% 66%,
		var(--wp--preset--color--salvia) 66% 100%);
}

.wp-block-post-featured-image img { border-radius: 6px; }

/* Las tarjetas de relatos no usan el relleno por defecto de los grupos con fondo */
.wp-block-post .westy-card.has-background {
	padding: 0 0 1.5rem;
	overflow: hidden;
}
.wp-block-post .westy-card > .wp-block-group:first-child { padding-top: 1.5rem; }

/* El pie va pegado a la última sección */
.wp-site-blocks > footer { margin-block-start: 0; }
footer .wp-block-list { list-style: none; }

/* Formulario de contacto (Contact Form 7) */
.wpcf7 label { display: block; font-weight: 500; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.4em;
	padding: 0.75em 1em;
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--cafe);
	background: var(--wp--preset--color--blanco);
	border: 1px solid rgba(40, 54, 24, 0.25);
	border-radius: 6px;
}
.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	outline: 2px solid var(--wp--preset--color--mostaza);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--mostaza);
}
.wpcf7 input[type="submit"] {
	cursor: pointer;
	padding: 0.8em 1.8em;
	font: inherit;
	font-weight: 600;
	color: var(--wp--preset--color--cafe);
	background: var(--wp--preset--color--mostaza);
	border: 0;
	border-radius: 999px;
}
.wpcf7 input[type="submit"]:hover {
	color: var(--wp--preset--color--arena);
	background: var(--wp--preset--color--terracota);
}
.wpcf7 form .wpcf7-response-output {
	margin: 1.5em 0 0;
	padding: 0.8em 1em;
	border-radius: 6px;
}

/* Logo circular de acuarela */
.wp-block-site-logo img { border-radius: 50%; box-shadow: 0 4px 14px -6px rgba(40, 54, 24, 0.45); }

/* Carrusel de postales (portada) */
.westy-carrusel { position: relative; }
.westy-carrusel__pista {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 1.5rem 0 2rem;
}
.westy-carrusel__pista::-webkit-scrollbar { display: none; }
.westy-carrusel__slide {
	flex: 0 0 100%;
	margin: 0;
	padding: 0 1.25rem;
	box-sizing: border-box;
	scroll-snap-align: center;
}
.westy-carrusel__slide img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 18px 30px -16px rgba(40, 54, 24, 0.55), 0 2px 6px rgba(40, 54, 24, 0.15);
	transform: rotate(-1.2deg);
}
.westy-carrusel__slide:nth-child(even) img { transform: rotate(1deg); }
.westy-carrusel__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--wp--preset--color--cafe);
	background: var(--wp--preset--color--mostaza);
	box-shadow: 0 6px 14px -6px rgba(40, 54, 24, 0.6);
}
.westy-carrusel__btn:hover { background: var(--wp--preset--color--terracota); color: var(--wp--preset--color--arena); }
.westy-carrusel__btn--prev { left: -6px; }
.westy-carrusel__btn--next { right: -6px; }
.westy-carrusel__puntos { display: flex; justify-content: center; gap: 0.6rem; }
.westy-carrusel__punto {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 2px solid var(--wp--preset--color--terracota);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}
.westy-carrusel__punto[aria-current="true"] { background: var(--wp--preset--color--terracota); }
@media (max-width: 600px) {
	.westy-carrusel__btn { width: 40px; height: 40px; font-size: 1.3rem; }
	.westy-carrusel__slide { padding: 0 0.5rem; }
}

/* Galería estilo mosaico (masonry): Galería → Estilos → Mosaico */
.wp-block-gallery.has-nested-images.is-style-mosaico {
	display: block;
	columns: 3 220px;
	column-gap: 14px;
}
.wp-block-gallery.has-nested-images.is-style-mosaico figure.wp-block-image:not(#individual-image) {
	display: block;
	width: 100%;
	margin: 0 0 14px;
	break-inside: avoid;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 10px 22px -14px rgba(40, 54, 24, 0.55);
}
.wp-block-gallery.has-nested-images.is-style-mosaico figure.wp-block-image img {
	width: 100%;
	height: auto;
	transition: transform 0.4s ease;
}
.wp-block-gallery.has-nested-images.is-style-mosaico figure.wp-block-image:hover img { transform: scale(1.03); }
.wp-block-gallery.has-nested-images.is-style-mosaico figure.wp-block-image figcaption {
	font-family: var(--wp--preset--font-family--titulos);
	font-style: italic;
	font-size: 0.95rem;
}
/* Con JS el mosaico usa grilla en lugar de columnas CSS (Chrome a veces no pinta fotos dentro de columnas) */
.wp-block-gallery.has-nested-images.is-style-mosaico.westy-grilla {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	grid-auto-rows: 8px;
	column-gap: 14px;
	row-gap: 0;
	columns: auto;
}
.wp-block-gallery.has-nested-images.is-style-mosaico.westy-grilla figure.wp-block-image:not(#individual-image) {
	align-self: start;
}
.wp-block-gallery.is-style-mosaico figure.wp-block-image.westy-oculta { display: none !important; }
.westy-ver-mas { justify-content: center; margin-top: 1.5rem; }
