/* The Wine Pilot — Home a código (twp-home.php).
 * Réplica de la portada Elementor 17169: medidas tomadas del render a 1440 px (contenedor 1307)
 * y 375 px (contenedor 345). Puntos de corte de Elementor: tablet ≤ 1024, móvil ≤ 767.
 * Tipografías del tema: Libre Caslon Text (títulos) e Inter (texto). Las tarjetas de vino
 * usan la tarjeta común (.twpl / catalogo.css). */

.twph {
	--twph-navy: #12293E;
	--twph-gold-a: rgba(130, 115, 56, .75);
	font-family: Inter, sans-serif;
	color: #222222;
	margin-top: 32px;
}
.twph *, .twph *::before, .twph *::after { box-sizing: border-box; }
/* Igual que la portada Elementor: gris a todo el ancho y sin la caja del tema */
html body.twph-body { background-color: #F6F6F6; }
body.twph-body #content .col-full { background-color: transparent; }
.twph a { text-decoration: none; }
.twph img { max-width: 100%; }
.twph-sec { position: relative; }

/* Títulos de sección (Libre Caslon Text 1.6rem, mayúsculas, navy) */
.twph .twph-h {
	margin: 0;
	font-family: "Libre Caslon Text", serif;
	font-weight: 400;
	font-size: 25.6px;
	line-height: 33.28px;
	letter-spacing: -0.5px;
	text-transform: uppercase;
	text-align: center;
	color: var(--twph-navy);
}
.twph .twph-h--h1 { letter-spacing: -1.1px; }
.twph .twph-h--testi,
.twph .twph-h--blog { font-size: 32px; line-height: 41.6px; }

/* ---------------- Carrusel ---------------- */
.twph-car { position: relative; --per: 1; }
.twph-car-track {
	display: flex;
	align-items: stretch;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.twph-car-track::-webkit-scrollbar { display: none; }
.twph-car-slide { flex: 0 0 calc(100% / var(--per)); min-width: 0; scroll-snap-align: start; }
.twph-car-btn {
	position: absolute;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 100px;
	background: var(--twph-gold-a);
	color: #FFFFFF;
	cursor: pointer;
	top: var(--flecha-y, 50%);
	transform: translateY(-50%);
	transition: background-color .2s ease;
}
.twph-car-btn:hover { background: rgba(130, 115, 56, .95); }
.twph-car-btn.is-prev { left: 0; }
.twph-car-btn.is-next { right: 0; }
.twph-car.is-static .twph-car-btn { display: none; }
.twph-car-btn:focus-visible { outline: 2px solid var(--twph-navy); outline-offset: 2px; }

/* ---------------- 1. Banners ---------------- */
.twph-car--hero .twph-car-track { gap: 10px; }
.twph-car--hero .twph-car-slide { flex-basis: calc((100% - (var(--per) - 1) * 10px) / var(--per)); }
.twph-banner { display: block; }
.twph-banner img { display: block; width: 100%; height: auto; }
.twph-car--hero .twph-car-btn {
	width: 25px;
	height: 25px;
	background: none;
	border-radius: 0;
	color: rgba(238, 238, 238, .9);
}
.twph-car--hero .twph-car-btn:hover { background: none; color: #FFFFFF; }

/* ---------------- 2. Países ---------------- */
.twph-paises { padding: 35px 20px 20px; }
.twph-car--paises { --per: 7; --flecha-y: 31px; margin-top: 20px; }
.twph-car--paises .twph-car-slide { padding: 10px; }
.twph-pais {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 42px;
	padding: 10px;
	background: #FFFFFF;
	border: 1px solid #D8D8D8;
	border-radius: 100px;
	color: #222222;
	font-family: Inter, sans-serif;
	font-size: 12.8px;
	font-weight: 600;
	line-height: 20px;
	text-transform: uppercase;
	text-align: center;
}
.twph-pais-flag { display: block; flex: 0 0 auto; width: 20px; height: auto; }
.twph-car--paises .twph-car-btn,
.twph-car--regiones .twph-car-btn { width: 30px; height: 30px; }

/* ---------------- 3. Regiones ---------------- */
.twph-regiones { padding: 20px 20px 21px; }
.twph-car--regiones { --per: 8; --flecha-y: 79px; margin-top: 20px; }
.twph-car--regiones .twph-car-slide { padding: 20px; }
.twph-region { display: block; color: #222222; text-align: center; }
.twph-region-img { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #ECECEC; }
.twph-region-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.twph-region-name { display: block; margin-top: 10px; font-size: 14.4px; line-height: 23.04px; font-weight: 400; }

/* ---------------- 4-5. Vinos (tarjeta nueva) ---------------- */
.twph-prod { padding: 35px 0 50px; }
.twph-car--productos { --per: 4; margin: 40px 4px 0; }
.twph-car--productos .twph-car-slide { display: flex; padding: 10px; }
.twph-car--productos .twpl-card { width: 100%; }
.twph-car--productos .twph-car-btn { width: 40px; height: 40px; }

/* ---------------- 6. Testimonio ---------------- */
.twph-testi { height: 756px; padding: 0 52px; background: #FFFFFF; }
.twph-testi-f1,
.twph-testi-f2 { position: absolute; display: block; height: 470px; object-fit: cover; }
.twph-testi-f1 { left: 5.126%; top: 63px; width: 23.49%; }
.twph-testi-f2 {
	left: 11.86%;
	top: 208px;
	width: 29.38%;
	border: 15px solid #FFFFFF;
	box-shadow: 0 0 25px 17px rgba(211, 211, 211, .5);
}
.twph-testi-texto { position: absolute; left: 48.13%; top: 154px; width: 38.64%; }
.twph-testi-quote { margin: 20px 17px 0 8px; padding: 0; }
.twph-testi-cita { display: block; width: 50px; height: 50px; border-radius: 999px; object-fit: cover; }
.twph-testi-quote blockquote { margin: 25px 0 0; padding: 0; border: 0; }
.twph-testi-quote blockquote::before { content: none; }
.twph-testi-quote blockquote p { margin: 0; font-family: Inter, sans-serif; font-size: 16px; line-height: 24px; font-style: italic; color: #212121; }
.twph-testi-quote figcaption { margin-top: 25px; font-family: "Libre Caslon Text", serif; font-size: 16px; line-height: 25.6px; color: #212121; }

/* ---------------- 7. Blog (una sola lista: 1 grande + 3 en fila; en móvil 2 columnas) ---------------- */
.twph-blog { padding: 70px 14px 79px; }
.twph article.twph-post { margin: 0; padding: 0; } /* el tema pone 50 px abajo a cada <article> */
.twph-blog-list { display: grid; grid-template-columns: minmax(0, 447fr) minmax(0, 793fr); column-gap: 39px; row-gap: 25px; margin-top: 50px; align-items: start; }
.twph-blog-list > .twph-post:first-child { grid-column: 1; grid-row: 1 / span 3; }
.twph-blog-list > .twph-post:not(:first-child) { grid-column: 2; display: grid; grid-template-columns: 45% minmax(0, 1fr); column-gap: 20px; align-items: start; }
.twph-blog-list > .twph-post:nth-child(2) { grid-row: 1; }
.twph-blog-list > .twph-post:nth-child(3) { grid-row: 2; }
.twph-blog-list > .twph-post:nth-child(4) { grid-row: 3; }
.twph-blog-list > .twph-post:nth-child(n+5) { display: none; }
.twph-post-thumb { position: relative; display: block; overflow: hidden; border-radius: 10px; background: #ECECEC; aspect-ratio: 357 / 236; }
.twph-post:first-child .twph-post-thumb { aspect-ratio: 447 / 295; }
.twph-post-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.twph-post-thumb:hover img { transform: scale(1.03); }
.twph .twph-post-title { margin: 0; font-family: "Libre Caslon Text", serif; font-weight: 400; font-size: 18px; line-height: 26.1px; letter-spacing: normal; text-transform: none; color: #212121; }
.twph .twph-post-title a { color: inherit; font-family: inherit; } /* el kit de Elementor pone Inter a los enlaces */
.twph .twph-post:first-child .twph-post-title { margin-top: 19px; font-size: 32px; line-height: 38.4px; color: var(--twph-navy); }
.twph-post-date { margin: 0; font-family: Inter, sans-serif; font-size: 12px; line-height: 15.6px; color: #ADADAD; }
.twph-post:first-child .twph-post-date { margin-top: 5px; text-transform: uppercase; }
.twph-post-ex { margin: 13px 0 0; font-family: Inter, sans-serif; font-size: 14px; line-height: 21px; color: #777777; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------- Tablet (≤ 1024) ---------------- */
@media (max-width: 1024px) {
	.twph-car--hero { --per: 2; }
	.twph-car--paises { --per: 4; }
	.twph-car--regiones { --per: 6; }
	.twph-car--productos { --per: 3; }
	.twph-testi { height: auto; padding: 61px 20px 97px; display: flex; flex-direction: column; }
	.twph-testi-texto { position: static; width: auto; order: 1; }
	.twph-testi-fotos { position: relative; order: 2; height: 315px; margin-top: 50px; }
	.twph-testi-f1 { left: 10px; top: 0; width: 225px; height: 190px; }
	.twph-testi-f2 { left: 89px; top: 95px; width: 230px; height: 220px; }
}

/* ---------------- Móvil (≤ 767) ---------------- */
@media (max-width: 767px) {
	.twph { margin-top: 32px; }
	.twph-car--hero { --per: 1; }
	.twph-paises { padding: 35px 10px 20px; }
	.twph-car--paises { --per: 2; margin-inline: -2px; }
	.twph-regiones { padding: 20px 10px 21px; }
	.twph-car--regiones { --per: 3; }
	.twph-car--regiones .twph-car-slide { padding: 20px 10px; }
	.twph-car--regiones { --flecha-y: 64px; }
	.twph-prod { padding: 35px 10px 50px; }
	.twph-car--productos { --per: 2; margin: 40px -5px 0; }
	.twph .twph-h--testi { font-size: 27.2px; line-height: 35.36px; }
	.twph-testi-quote { margin: 19px 0 0 2px; max-width: 288px; }
	.twph-blog { padding: 70px 10px 80px; }
	.twph-blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; row-gap: 25px; }
	.twph-blog-list > .twph-post:first-child,
	.twph-blog-list > .twph-post:not(:first-child) { grid-column: auto; grid-row: auto; display: block; padding-bottom: 10px; }
	.twph .twph-blog-list > .twph-post { padding-bottom: 10px; }
	.twph-post .twph-post-thumb,
	.twph-post:first-child .twph-post-thumb { aspect-ratio: 1 / 0.89; }
	.twph .twph-post .twph-post-title,
	.twph .twph-post:first-child .twph-post-title { margin-top: 20px; font-size: 16px; line-height: 23.2px; color: #212121; }
	.twph-post .twph-post-date,
	.twph-post:first-child .twph-post-date { margin-top: 5px; text-transform: none; }
	.twph-post-ex { font-size: 11.2px; line-height: 16.8px; -webkit-line-clamp: 2; }
}

@media (prefers-reduced-motion: reduce) {
	.twph-car-track { scroll-behavior: auto; }
	.twph-post-thumb img { transition: none; }
}
