/**
* Theme Name: Aves Tres Tierras (Kinsey Child)
* Description: Tema hijo de Kinsey con los estilos de la web Aves Tres Tierras.
* Template: kinsey
* Version: 1.0.0
* Text Domain: aves-tres-tierras
*/

/* ---------- Colores del diseño ---------- */
:root {
	--tt-gris: #575756;
	--tt-gris-claro: #EFEFEF;
	--tt-verde: #9EB18D;
	--tt-dorado: #E2A853;
	--tt-azul: #84A3BB;
}

body {
	font-family: "Figtree", sans-serif;
	color: var(--tt-gris);
	background: #fff;
}

/* ---------- Los textos de Elementor mandan sobre los estilos de párrafo de Kinsey ---------- */
.elementor .elementor-widget-text-editor p {
	font: inherit; letter-spacing: inherit; color: inherit;
	margin-top: 0; margin-bottom: 1em;
}
.elementor .elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* ---------- Cabecera flotante sobre la primera sección ---------- */
.tt-header { position: relative; z-index: 100; }
/* La primera sección sube 100px por detrás de la cabecera (como en el original).
   Kinsey recorta su contenedor con overflow:hidden; "clip" solo en horizontal lo permite. */
#page-wrapper, .page-wrapper__content { overflow-x: clip; overflow-y: visible; }
.tt-header-bar .tt-logo-text .elementor-heading-title { white-space: nowrap; }

/* Proporciones del original: la barra ocupa el 90% del ancho, baja 38px y su alto
   (logo + 40px) crece con la pantalla: 72px a 1024px, 86px a 1440px, 103px a 1920px. */
@media (min-width: 768px) {
	:root { --tt-logo-h: calc(3.49vw - 4px); --tt-cab-h: calc(var(--tt-logo-h) + 40px); }
	.tt-header-bar { min-height: var(--tt-cab-h) !important; transform: translateY(38px); }
	.tt-header-bar > .e-con:first-child { padding-top: 0 !important; padding-bottom: 0 !important; }
	.tt-header-bar .tt-logo-img img { width: var(--tt-logo-h) !important; height: var(--tt-logo-h); }
	.tt-header-bar .tt-logo-text .elementor-heading-title { font-size: calc(var(--tt-logo-h) * .42) !important; }
	/* la portada de Inicio sube justo lo que mide la cabecera: la foto llena toda la ventana */
	.tt-portada { margin-top: calc(-1 * var(--tt-cab-h)) !important; }
}

/* ---------- Foto con crédito al pasar el ratón (como el "flip box" del original) ---------- */
.tt-photo { position: relative; overflow: hidden; }
.tt-photo .tt-photo-credit {
	position: absolute; inset: 0; display: flex; align-items: flex-end;
	padding: 14px; opacity: 0; transition: opacity .35s ease;
	background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.65) 100%);
}
.tt-photo:hover .tt-photo-credit { opacity: 1; }
.tt-photo .tt-photo-credit p { margin: 0; }
.tt-photo .tt-photo-info { position: relative; z-index: 1; }

/* ---------- Botones: pequeño salto al pasar el ratón ---------- */
.tt-btn > .elementor-widget-container { transition: transform .3s; }
.tt-btn:hover > .elementor-widget-container { transform: translateY(-4px); }
.tt-link .elementor-button { padding: 0 !important; }
.tt-link .elementor-button-icon svg { width: 9px; }
.elementor-widget-text-editor a { color: inherit; }

/* ---------- Interruptor Mapa / Listado ---------- */
.tt-ml-switch {
	display: flex; align-items: center; justify-content: center; gap: 15px;
	padding: 6px 0 20px; font: 500 16px/1 "Figtree", sans-serif; color: var(--tt-gris);
}
.tt-ml-lbl { cursor: pointer; }
.tt-ml-toggle {
	position: relative; width: 60px; height: 34px; border-radius: 34px; border: 0;
	background: var(--tt-gris); cursor: pointer; padding: 0;
}
.tt-ml-toggle span {
	position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%;
	background: #fff; transition: transform .25s;
}
.tt-ml.es-lista .tt-ml-toggle span { transform: translateX(26px); }
#tt-mapa { height: 600px; width: 100%; z-index: 1; }
@media (max-width: 767px) { #tt-mapa { height: 420px; } }
.tt-ml-lista { padding: 10px 60px 60px; }
@media (max-width: 767px) { .tt-ml-lista { padding: 10px 20px 40px; } }
.tt-ml-filtros { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 30px; }
.tt-ml-filtros button {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 60px;
	border: 2px solid var(--c, var(--tt-gris)); background: #fff; color: var(--tt-gris);
	font: 600 14px/1.4 "Figtree", sans-serif; cursor: pointer;
}
.tt-ml-filtros button img { width: 28px; height: auto; }
.tt-ml-filtros button.is-on { background: var(--c, var(--tt-gris)); color: #fff; }
.tt-ml-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1024px) { .tt-ml-items { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px)  { .tt-ml-items { grid-template-columns: 1fr; } }
.tt-ml-item {
	display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; background: #fff;
	border-bottom: 3px solid var(--c); text-decoration: none; color: var(--tt-gris);
	transition: transform .3s;
}
.tt-ml-item:hover { transform: translateY(-4px); color: var(--tt-gris); }
.tt-ml-sec { font: 700 12px/1 "Figtree", sans-serif; text-transform: uppercase; letter-spacing: .5px; color: var(--c); }
.tt-ml-nom { font: 600 17px/1.35 "Figtree", sans-serif; }
.tt-ml-ver { font: 500 14px/1 "Figtree", sans-serif; margin-top: auto; padding-top: 8px; }

/* ---------- Menú: el desplegable de idioma (último elemento) se abre hacia la izquierda ---------- */
@media (min-width: 1025px) {
	.tt-header .hfe-nav-menu > li:last-child > .sub-menu { left: auto; right: 0; }
	.tt-header .hfe-nav-menu > li:last-child > .sub-menu,
	.tt-header .hfe-nav-menu > li:last-child > .sub-menu a { min-width: 0; width: 120px; }
}

/* ---------- Menú móvil/tableta: el desplegable ocupa todo el ancho de la barra ---------- */
@media (max-width: 1024px) {
	.tt-header-bar { position: relative; }
	.tt-header-bar .hfe-nav-menu__toggle { margin-left: auto !important; margin-right: 0 !important; }
	.tt-header-bar .tt-menu-col,
	.tt-header-bar .elementor-widget-navigation-menu,
	.tt-header-bar .elementor-widget-navigation-menu .elementor-widget-container,
	.tt-header-bar .hfe-nav-menu { position: static !important; }
	.tt-header-bar nav.hfe-dropdown {
		left: 0 !important; right: 0 !important; width: auto !important; top: 100% !important;
		border-radius: 0 0 10px 10px; overflow: hidden;
	}
}
@media (max-width: 767px) {
	.tt-header-bar nav.hfe-dropdown { border-radius: 0; }
}

/* ---------- Menú de escritorio: el logo ocupa lo justo y el menú el resto, sin saltar de línea ---------- */
@media (min-width: 1025px) {
	/* como el original: logo en el primer 25% de la pantalla y menú centrado en el resto */
	.tt-header-bar > .e-con:first-child { --width: 27.78%; flex: 0 0 27.78%; }
	.tt-header-bar > .tt-menu-col { --width: auto; flex: 1 1 auto; min-width: 0; align-items: center !important; padding-right: 20px !important; }
	.tt-header .hfe-nav-menu { flex-wrap: nowrap; }
	.tt-header .hfe-nav-menu > li { white-space: nowrap; }
}
@media (min-width: 1025px) and (max-width: 1300px) {
	.tt-header .hfe-nav-menu > li a.hfe-menu-item { padding-left: 9px !important; padding-right: 9px !important; }
}
@media (min-width: 1440px) {
	/* hueco entre logo y menú (14% de la pantalla en el original) */
	.tt-header-bar > .tt-menu-col { padding-left: 15.6% !important; }
}
@media (min-width: 1025px) and (max-width: 1100px) {
	.tt-header-bar > .e-con:first-child { gap: 12px !important; padding-left: 18px !important; }
	.tt-header .hfe-nav-menu > li a.hfe-menu-item { padding-left: 7px !important; padding-right: 7px !important; }
}

/* =========================================================================
   PÁGINA ESPECIES
   ========================================================================= */
/* Carrusel: foto alta, pie de foto sobre la imagen, puntos dorados */
.tt-carrusel .swiper-slide { position: relative; }
.tt-carrusel .swiper-slide-image { width: 100%; height: 500px; object-fit: cover; }
@media (max-width: 1024px) { .tt-carrusel .swiper-slide-image { height: 420px; } }
@media (max-width: 767px)  { .tt-carrusel .swiper-slide-image { height: 246px; } }
.tt-carrusel .elementor-image-carousel-caption {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 20px; text-align: left !important;
	font: 600 16px/1.3 "Figtree", sans-serif; letter-spacing: -.2px; color: #fff;
	background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.45) 100%);
}
@media (max-width: 767px) { .tt-carrusel .elementor-image-carousel-caption { font-size: 14px; } }
.tt-carrusel .swiper-pagination-bullet { width: 10px; height: 10px; background: rgba(226,168,83,.47) !important; opacity: 1 !important; }
.tt-carrusel .swiper-pagination-bullet-active { background: var(--tt-dorado) !important; }

/* Fotos de especies redondas, con un pequeño zoom al pasar el ratón */
.tt-especie-foto img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; transition: transform .3s; }
.tt-especie-foto:hover img { transform: scale(1.04); }

/* Botón blanco con borde (sobre fondo dorado) */
.tt-btn-blanco .elementor-button { border-color: #fff !important; }

/* Fichas: al llegar desde "Ver especie" queda un margen bajo la parte superior de la pantalla */
.tt-ficha { scroll-margin-top: 30px; }
.tt-ficha:target { box-shadow: 0 0 0 3px var(--tt-dorado); }
.tt-ficha .elementor-icon-list-text strong { font-weight: 700; }

/* =========================================================================
   PÁGINA EXPERIENCIAS: tarjetas en 3 / 2 / 1 columnas, filtro por sector y paginación
   ========================================================================= */
.tt-exp-grid > .tt-exp { --width: calc((100% - 40px) / 3) !important; }
@media (max-width: 1024px) { .tt-exp-grid > .tt-exp { --width: calc((100% - 20px) / 2) !important; } }
@media (max-width: 767px)  { .tt-exp-grid > .tt-exp { --width: 100% !important; } }

/* =========================================================================
   ========================================================================= */
.tt-exp-filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; padding-bottom: 10px; scroll-margin-top: 30px; }
.tt-exp-filtros button {
	display: inline-flex; align-items: center; gap: 12px; padding: 10px 15px; border-radius: 60px;
	border: 2px solid var(--tt-gris-claro); background: #fff; color: var(--tt-gris);
	font: 600 15px/1.3 "Figtree", sans-serif; letter-spacing: -.2px; cursor: pointer; transition: border-color .2s;
}
.tt-exp-filtros button:hover { border-color: #C2C2C2; }
.tt-exp-filtros button img { width: 35px; height: auto; }
.tt-exp-filtros button.is-on { background: var(--tt-gris); border-color: var(--tt-gris); color: #fff; }
.tt-exp-filtros button[data-s="todos"] { padding-left: 22px; padding-right: 22px; }
@media (max-width: 767px) { .tt-exp-filtros button { font-size: 14px; padding: 10px; } }

.tt-pag { display: flex; justify-content: center; gap: 6px; padding-top: 20px; }
.tt-pag:empty { display: none; }
.tt-pag button {
	min-width: 40px; padding: 10px; border: 0; background: none; cursor: pointer;
	font: 500 16px/1 "Figtree", sans-serif; color: var(--tt-gris);
}
.tt-pag button:hover { color: var(--tt-dorado); }
.tt-pag button.is-on { color: var(--tt-dorado); font-weight: 700; }

/* =========================================================================
   CABECERA FIJA AL HACER SCROLL (todas las páginas; la activa js/aves.js)
   ========================================================================= */
.tt-header.tt-sticky {
	position: fixed !important; top: var(--wp-admin--admin-bar--height, 0px); left: 0; right: 0;
	background: var(--tt-gris); animation: tt-baja .35s ease;
}
.tt-header.tt-sticky .tt-header-bar { border-radius: 0; transform: none; }
@media (max-width: 767px) { .tt-header.tt-sticky { top: var(--wp-admin--admin-bar--height, 0px); } }
@keyframes tt-baja { from { transform: translateY(-100%); } to { transform: none; } }
.tt-scroll-x, .tt-scroll-x-neg { will-change: translate; }

/* =========================================================================
   PÁGINA INICIO
   ========================================================================= */
/* Portada: carrusel a pantalla completa con el título encima */
.tt-portada { position: relative; }
.tt-carrusel-portada .swiper-slide { position: relative; }
.tt-carrusel-portada .swiper-slide-image { width: 100%; height: 100vh; min-height: 560px; object-fit: cover; }
.tt-carrusel-portada .swiper-slide::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.15); pointer-events: none; }
.tt-carrusel-portada .elementor-image-carousel-caption {
	position: absolute; left: 50px; bottom: 52px; z-index: 2; margin: 0;
	font: 400 16px/1.3 "Figtree", sans-serif; color: #fff; text-align: left !important;
}
.tt-portada-titulo { position: absolute !important; left: 50px; bottom: 89px; z-index: 3; width: 42% !important; max-width: 42% !important; pointer-events: none; }
.tt-portada-titulo .elementor-heading-title { text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.tt-carrusel-portada .swiper-pagination-bullet { width: 13px; height: 13px; background: rgba(255,255,255,.48) !important; opacity: 1 !important; }
.tt-carrusel-portada .swiper-pagination-bullet-active { background: #fff !important; }
.tt-carrusel-portada .elementor-swiper-button { font-size: 18px; }
@media (max-width: 767px) {
	.tt-carrusel-portada .swiper-slide-image { height: 75vh; min-height: 420px; }
	.tt-portada-titulo { left: 20px; right: 20px; bottom: 105px; width: auto !important; max-width: none !important; }
	.tt-carrusel-portada .elementor-image-carousel-caption { left: 20px; right: 20px; bottom: 40px; font-size: 13px; }
}

/* Tres sectores: gráfico y etiquetas */
.tt-sectores { position: relative; }
.tt-sector-grafico { position: absolute !important; left: 0; top: 0; width: 600px !important; max-width: 100%; }
.tt-sector-etiqueta { position: absolute !important; width: auto !important; z-index: 2; }
.tt-sector-etiqueta--montana { left: 245px; top: 30px; }
.tt-sector-etiqueta--secanos { left: 375px; top: 110px; }
.tt-sector-etiqueta--delta   { left: 40px;  top: 190px; }
@media (max-width: 767px) {
	/* posiciones calculadas para el gráfico al 85 % del ancho del móvil */
	.tt-sector-grafico { width: 85% !important; }
	.tt-sector-etiqueta--montana { left: 140px; top: 12px; }
	.tt-sector-etiqueta--secanos { left: 192px; top: 64px; }
	.tt-sector-etiqueta--delta   { left: 10px;  top: 102px; }
}

/* 5 motivos: carrusel vertical */
.tt-carrusel-motivos .swiper-slide { position: relative; }
.tt-carrusel-motivos .swiper-slide-image { width: 100%; height: 700px; object-fit: cover; }
@media (max-width: 1024px) { .tt-carrusel-motivos .swiper-slide-image { height: 520px; } }
@media (max-width: 767px)  { .tt-carrusel-motivos .swiper-slide-image { height: 420px; } }
.tt-carrusel-motivos .elementor-image-carousel-caption {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 50px 20px 20px; text-align: left !important;
	white-space: pre-line; font: 600 16px/1.5 "Figtree", sans-serif; letter-spacing: -.2px; color: #fff;
	background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.45) 100%);
}
.tt-carrusel-motivos .swiper-pagination { position: static; padding-top: 12px; }
.tt-carrusel-motivos .swiper-pagination-bullet { width: 10px; height: 10px; margin: 0 4px !important; background: rgba(226,168,83,.47) !important; opacity: 1 !important; }
.tt-carrusel-motivos .swiper-pagination-bullet-active { background: var(--tt-dorado) !important; }

/* Mapa de la portada */
.tt-mapa-inicio { height: 600px; width: 100%; z-index: 1; }
@media (max-width: 767px) { .tt-mapa-inicio { height: 400px; } }

/* Carrusel de especies (una cada vez) */
.tt-spc { position: relative; display: flex; align-items: center; gap: 10px; color: #fff; }
.tt-spc-pista { position: relative; flex: 1; min-height: 470px; }
.tt-spc-item {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s;
}
.tt-spc-item.is-on { opacity: 1; visibility: visible; }
.tt-spc-foto img { width: 300px; height: 300px; border-radius: 50%; object-fit: cover; transition: transform .3s; }
.tt-spc-foto:hover img { transform: scale(1.03); }
.tt-spc-nombre { margin: 22px 0 4px !important; font: 600 16px/1.3 "Figtree", sans-serif; color: #fff !important; }
.tt-spc-cientifico { margin: 0 0 22px !important; font: italic 400 15px/1.3 "Figtree", sans-serif; color: #fff !important; }
.tt-spc-boton {
	display: inline-flex; gap: 35px; align-items: center; padding: 12px 24px; border: 2px solid #fff; border-radius: 60px;
	font: 600 14px/1.4 "Figtree", sans-serif; color: #fff; text-decoration: none; transition: background .3s, color .3s, transform .3s;
}
.tt-spc-boton:hover { background: #fff; color: var(--tt-dorado); transform: translateY(-4px); }
.tt-spc-flecha { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; position: relative; flex: none; }
.tt-spc-flecha::before {
	content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px;
	border-top: 2px solid #fff; border-right: 2px solid #fff;
}
.tt-spc-ant::before { transform: translate(-30%, -50%) rotate(-135deg); }
.tt-spc-sig::before { transform: translate(-70%, -50%) rotate(45deg); }
@media (max-width: 767px) { .tt-spc-pista { min-height: 400px; } .tt-spc-foto img { width: 220px; height: 220px; } }

/* Fotos redondas (consulta al ornitólogo) */
.tt-redonda img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; }

/* Formulario de consulta (Contact Form 7) con el aspecto del original */
.tt-consulta-form .wpcf7 form > p, .tt-consulta-form .wpcf7 .tt-form-fila { margin: 0 0 10px; }
.tt-consulta-form .tt-form-fila { display: flex; gap: 10px; }
.tt-consulta-form .tt-form-fila > .wpcf7-form-control-wrap { flex: 1; }
.tt-consulta-form .tt-form-fila br, .tt-consulta-form form > p br { display: none; }
.tt-consulta-form input[type=text], .tt-consulta-form input[type=email], .tt-consulta-form textarea {
	width: 100%; background: #fff; border: 0; border-bottom: 1px solid var(--tt-gris); border-radius: 0;
	padding: 8px 15px; font: 500 14px/38px "Figtree", sans-serif; color: var(--tt-gris); box-shadow: none; outline: none;
}
.tt-consulta-form textarea { height: 162px; line-height: 1.5; padding-top: 14px; resize: vertical; }
.tt-consulta-form .wpcf7-acceptance { font: 400 13px/1.4 "Figtree", sans-serif; color: var(--tt-gris); }
.tt-consulta-form .wpcf7-acceptance a { color: inherit; text-decoration: underline; }
.tt-consulta-form input[type=submit] {
	display: block; margin: 20px 0 0 auto; padding: 18px 70px 18px 25px; border: 0; border-bottom: 1px solid transparent;
	border-radius: 0; cursor: pointer; font: 600 15px/1 "Figtree", sans-serif; color: var(--tt-gris);
	background: var(--tt-gris-claro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23575756' d='M285 273 91 467c-9 9-24 9-34 0l-22-23c-10-9-10-24 0-34l154-154L35 102c-10-9-10-24 0-34l22-22c10-10 25-10 34 0l194 193c9 10 9 25 0 34z'/%3E%3C/svg%3E") no-repeat right 22px center / 9px;
	border-bottom-color: var(--tt-gris); transition: border-color .6s;
}
.tt-consulta-form input[type=submit]:hover { border-bottom-color: var(--tt-dorado); }
.tt-consulta-form .wpcf7-spinner { display: block; margin: 8px 0 0 auto; }
@media (max-width: 767px) { .tt-consulta-form .tt-form-fila { flex-direction: column; } }

/* Franja con fondo móvil: un poco más ancha que la pantalla para que pueda desplazarse */
.tt-bg-scroll { background-size: 118% auto !important; }
@media (max-width: 767px) { .tt-bg-scroll { background-size: cover !important; } }
