/*
Theme Name: Ohayō
Theme URI: https://ohayobrands.com
Author: Ohayō Brands
Description: Tema de bloques de Ohayō Brands. Bloques core y Greenshift/Greenlight, contenido con Pods y Polylang.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ohayo
*/

/* Estilos globales que theme.json no cubre. Los estilos de un bloque concreto viven en el bloque. */

/* Cabecera fija con panel lateral (parts/header.html, assets/js/panel.js) */
.wp-block-template-part:has(> .ohayo-cabecera) { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; }
.ohayo-cabecera { padding-top: 10px; transition: padding .3s; }
.ohayo-cabecera__barra { min-height: 100px; transition: min-height .3s; }
.ohayo-cabecera__logo img { transition: width .3s; }
.ohayo-compacta .ohayo-cabecera { padding-top: 0; border-bottom: 1px solid #ebebeb; }
.ohayo-compacta .ohayo-cabecera__barra { min-height: 55px; }
.ohayo-compacta .ohayo-cabecera__logo img { width: 78px !important; }
.ohayo-panel-boton {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer;
	color: var(--wp--preset--color--contrast);
}
.ohayo-panel-boton__icono,
.ohayo-panel-boton__icono::before,
.ohayo-panel-boton__icono::after { display: block; width: 24px; height: 4px; background: currentColor; }
.ohayo-panel-boton__icono { position: relative; }
.ohayo-panel-boton__icono::before,
.ohayo-panel-boton__icono::after { content: ""; position: absolute; left: 0; }
.ohayo-panel-boton__icono::before { top: -8px; }
.ohayo-panel-boton__icono::after { top: 8px; }
.ohayo-panel-boton:hover { color: var(--wp--preset--color--accent); }

.ohayo-panel {
	position: fixed; inset: 0 0 0 auto; z-index: 100; width: min(300px, 100vw); margin: 0 !important; overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .55s ease, visibility .55s;
}
.ohayo-panel-abierto .ohayo-panel { transform: none; visibility: visible; }
.wp-site-blocks > .wp-block-template-part:first-child + * { margin-block-start: 0; }
.wp-block-template-part:has(> .ohayo-cabecera)::after {
	content: ""; position: fixed; inset: 0; z-index: 99; background: rgb(0 0 0 / .8);
	opacity: 0; visibility: hidden; transition: opacity .55s, visibility .55s;
}
.ohayo-panel-abierto .wp-block-template-part:has(> .ohayo-cabecera)::after { opacity: 1; visibility: visible; }
.ohayo-panel-cerrar {
	position: absolute; top: 22px; right: 22px; width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer;
	color: rgb(255 255 255 / .3); font-size: 24px; line-height: 1;
}
.ohayo-panel-cerrar:hover { color: var(--wp--preset--color--base); }
.ohayo-panel .wp-block-image { margin-top: 5px; }
.editor-styles-wrapper .ohayo-panel { position: relative; transform: none; visibility: visible; width: 300px; margin-left: auto !important; }

/* Menús: bloques Navegación (inc/menus.php) */
.ohayo-contacto, .ohayo-redes { margin: 0; padding: 0; list-style: none; }
.ohayo-menu .wp-block-navigation__container { gap: 0; }
.ohayo-menu .wp-block-navigation-item { width: 100%; }
.ohayo-menu a { text-decoration: none; }
.ohayo-menu a, .ohayo-contacto a, .ohayo-redes a { color: inherit; text-decoration: none; }
.ohayo-menu--principal, .ohayo-menu--pie-1, .ohayo-menu--pie-2, .ohayo-menu--pie-3 {
	font-family: var(--wp--preset--font-family--ibm-plex-mono); font-size: 16px; font-weight: 700; line-height: 26px; text-transform: uppercase;
}
.ohayo-menu--principal li { padding: 7px 0; }
.ohayo-menu--principal a:hover, .ohayo-pie__principal a:hover { opacity: .7; }
.ohayo-menu--principal .sub-menu { margin: .5rem 0 0 1rem; padding: 0; list-style: none; font-weight: 400; }

/* Pie (parts/footer.html) */
.ohayo-pie__columnas { gap: 0 !important; margin: 0; }
.ohayo-pie__principal .ohayo-menu a { display: block; padding: 10px 14px; }
.ohayo-contacto { margin-top: 0; line-height: 26px; }
.ohayo-contacto li { margin-bottom: 8px; }
.ohayo-contacto a { display: block; }
.ohayo-redes { display: flex; justify-content: flex-start; gap: 16px; margin-top: 18px; }
.ohayo-redes a { display: flex; align-items: center; justify-content: flex-start; }
.ohayo-redes a:hover { opacity: .7; }
.ohayo-redes a::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--icono) center / contain no-repeat; mask: var(--icono) center / contain no-repeat; }
.ohayo-redes__linkedin { --icono: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.98 3.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zM3 9.5h4V21H3zM9.5 9.5h3.8v1.6h.06c.53-1 1.83-2.06 3.77-2.06 4.03 0 4.77 2.65 4.77 6.1V21h-4v-5.1c0-1.22-.02-2.78-1.7-2.78-1.7 0-1.95 1.32-1.95 2.7V21h-4z'/%3E%3C/svg%3E"); }
.ohayo-redes__instagram { --icono: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 8.2a3.2 3.2 0 1 1 0-6.4 3.2 3.2 0 0 1 0 6.4zM17.3 5.5a1.2 1.2 0 1 0 0 2.4 1.2 1.2 0 0 0 0-2.4zM12 2.5c-2.6 0-2.9 0-3.9.06C4.6 2.7 2.7 4.6 2.56 8.1 2.5 9.1 2.5 9.4 2.5 12s0 2.9.06 3.9c.15 3.5 2.04 5.4 5.54 5.54 1 .06 1.3.06 3.9.06s2.9 0 3.9-.06c3.5-.15 5.4-2.04 5.54-5.54.06-1 .06-1.3.06-3.9s0-2.9-.06-3.9C21.3 4.6 19.4 2.7 15.9 2.56 14.9 2.5 14.6 2.5 12 2.5zm0 1.7c2.55 0 2.85 0 3.86.06 2.6.12 3.8 1.35 3.92 3.92.05 1 .06 1.3.06 3.86s0 2.85-.06 3.86c-.12 2.56-1.32 3.8-3.92 3.92-1 .05-1.3.06-3.86.06s-2.85 0-3.86-.06c-2.6-.12-3.8-1.36-3.92-3.92C4.17 14.85 4.16 14.55 4.16 12s0-2.85.06-3.86C4.34 5.57 5.55 4.34 8.14 4.22 9.15 4.17 9.45 4.2 12 4.2z'/%3E%3C/svg%3E"); }
.ohayo-redes__facebook { --icono: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.5 21v-8h2.7l.4-3.2h-3.1V7.8c0-.92.26-1.55 1.58-1.55h1.68V3.4c-.3-.04-1.3-.12-2.45-.12-2.43 0-4.09 1.48-4.09 4.2v2.33H7.5V13h2.72v8z'/%3E%3C/svg%3E"); }
.ohayo-redes__email { --icono: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v14H3zm1.8 1.8v.4L12 12l7.2-4.8v-.4zm14.4 2.55L12 14.15 4.8 9.35v7.85h14.4z'/%3E%3C/svg%3E"); }
.ohayo-pie__legal { color: #bcbcbc; line-height: 22px; }
.ohayo-pie__legal p { margin: 0; }
.ohayo-menu--legal a { padding-bottom: 2px; color: #aaa; border-bottom: 1px solid rgb(255 255 255 / .07); }
.ohayo-menu--legal a:hover { color: var(--wp--preset--color--base); }
.ohayo-menu--legal .wp-block-navigation-item { width: auto; }
.ohayo-menu--legal .wp-block-navigation__container { gap: 15px; }
.ohayo-pie__legal-menu { gap: 15px; align-items: center; }
.ohayo-logo-pie { margin: 0; }
.ohayo-logo-pie img { display: block; width: 42px; height: auto; }
.ohayo-arriba {
	position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; background: rgb(0 0 0 / .4); color: var(--wp--preset--color--base); text-decoration: none;
	opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.ohayo-compacta .ohayo-arriba { opacity: 1; visibility: visible; }
.ohayo-arriba:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); }
.editor-styles-wrapper .ohayo-arriba { display: none; }
@media (max-width: 781px) {
	.ohayo-pie__principal .ohayo-menu a { padding-left: 0; padding-right: 0; }
	.ohayo-redes { justify-content: flex-start; }
}

/* Selector de idioma [ohayo_idiomas] */
.ohayo-idiomas { font-family: var(--wp--preset--font-family--ibm-plex-mono); font-size: var(--wp--preset--font-size--small); }
.ohayo-idiomas a { color: inherit; text-decoration: none; }
.ohayo-idiomas a:hover { color: var(--wp--preset--color--accent); }

/* Rejillas de proyectos (single-portfolio, taxonomy-portfolio_categories) */
.wp-block-post-template .wp-block-post-title a { color: inherit; text-decoration: none; }
.wp-block-post-template .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.wp-block-post-terms a { color: inherit; text-decoration: none; }

/* Carrusel [ohayo_galeria] */
.ohayo-carrusel { position: relative; }
.ohayo-carrusel__pista {
	display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto;
	scroll-snap-type: x mandatory; scrollbar-width: none;
}
.ohayo-carrusel__pista::-webkit-scrollbar { display: none; }
.ohayo-carrusel__slide { flex: 0 0 100%; scroll-snap-align: start; }
.ohayo-carrusel__slide img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.ohayo-carrusel__boton {
	position: absolute; top: 50%; width: 2.75rem; height: 2.75rem; margin-top: -1.375rem; border: 0; cursor: pointer;
	background: rgb(255 255 255 / .8); color: var(--wp--preset--color--contrast);
}
.ohayo-carrusel__boton::before { content: "←"; font-size: 1.25rem; }
.ohayo-carrusel__boton--prev { left: 0; }
.ohayo-carrusel__boton--next { right: 0; }
.ohayo-carrusel__boton--next::before { content: "→"; }
.ohayo-carrusel__boton:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); }

/* Ficha de créditos [ohayo_ficha] */
.ohayo-ficha { margin: 0; border: 1px solid var(--wp--preset--color--line); }
.ohayo-ficha__item + .ohayo-ficha__item { border-top: 1px solid var(--wp--preset--color--line); }
.ohayo-ficha dt { padding: .75rem 1.25rem; font-weight: 600; background: var(--wp--preset--color--base-2); border-bottom: 1px solid var(--wp--preset--color--line); }
.ohayo-ficha dd { margin: 0; padding: .75rem 1.25rem; }

/* Proyecto: columna de ficha y texto */
.ohayo-intro__titulo { margin: 1rem 0 .5rem; font-family: var(--wp--preset--font-family--ibm-plex-sans); font-size: var(--wp--preset--font-size--medium); font-weight: 600; }
.ohayo-intro__texto { margin: 0 0 1.5rem; }
.ohayo-entradilla { margin-top: 0; color: var(--wp--preset--color--accent); font-size: var(--wp--preset--font-size--large); line-height: 1.4; }
.ohayo-entradilla:empty, .ohayo-intro__titulo:empty, .ohayo-intro__texto:empty { display: none; }
.ohayo-proyecto__texto { line-height: 1.6; }
.ohayo-entradilla p, .ohayo-intro__texto p { margin-top: 0; }

strong { font-weight: 600; }

/* Página Proyectos: ancla de cada proyecto bajo la cabecera fija */
.ohayo-plista { scroll-margin-top: 110px; }
.ohayo-plista[hidden], .ohayo-plista + [hidden] { display: none !important; }
/* Filtros por categoría (assets/js/filtros.js) */
.ohayo-filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 0 0 45px; }
.ohayo-filtros button {
	padding: 0 0 2px; border: 0; border-bottom: 1px solid transparent; background: none; cursor: pointer;
	font-family: var(--wp--preset--font-family--ibm-plex-mono); font-size: var(--wp--preset--font-size--small); font-weight: 500;
	text-transform: uppercase; color: var(--wp--preset--color--contrast-2);
}
.ohayo-filtros button:hover, .ohayo-filtros button[aria-pressed="true"] { color: var(--wp--preset--color--accent); border-bottom-color: currentColor; }
.ohayo-filtros button[data-filtro="*"] { flex-basis: 100%; text-align: center; }
.ohayo-plista .ohayo-como-h4:empty { display: none; }
.ohayo-plista__subtitulo:empty { display: none; }
.ohayo-plista h2:has(+ .ohayo-plista__subtitulo:not(:empty)) { margin-bottom: 0; }
.ohayo-plista__subtitulo { margin-top: 0; }
.ohayo-plista .has-small-font-size p { margin: 0; }

/* Lightbox (assets/js/lightbox.js, plugin LightPress Lightbox) */
#jqlb_loading { display: none !important; }
a[rel^="lightbox"] { cursor: zoom-in; }
#overlay, #lightbox, #imageContainer #lightboxImage { cursor: zoom-out !important; }
#lightbox #imageDataContainer { background: transparent }
#lightbox #imageData { color: #ffffff; font-family: var(--wp--preset--font-family--ibm-plex-mono); font-size: 14px; line-height: 1.4; padding-left: 0; padding-right: 0;}
#lightbox #imageData #imageDetails #titleAndCaption #titleText {font-weight: 400;}
#lightbox #bottomNavClose {display: none !important; }
.ohayo-plista a[rel^="lightbox"] { display: block; }

/* Elementos de menú solo en escritorio o solo en móvil (clase en Avanzado > Clases CSS adicionales) */
@media (min-width: 782px) { .ohayo-solo-movil { display: none !important; } }
@media (max-width: 781px) { .ohayo-solo-escritorio { display: none !important; } }

/*
 * Encabezados que cambiaron de nivel para tener un H1 por página y niveles en orden (SEO), sin cambiar su aspecto:
 * .ohayo-como-hN reproduce los estilos de theme.json del nivel N original. Los estilos propios de cada bloque mandan.
 */
.ohayo-como-h1, .ohayo-como-h2, .ohayo-como-h3 { color: var(--wp--preset--color--contrast-3); font-family: var(--wp--preset--font-family--canela); font-weight: 400; line-height: 1.25; }
.ohayo-como-h1 { font-size: var(--wp--preset--font-size--xx-large); }
.ohayo-como-h2 { font-size: var(--wp--preset--font-size--x-large); }
.ohayo-como-h3 { font-size: var(--wp--preset--font-size--large); }
.ohayo-como-h4 { color: var(--wp--preset--color--accent); font-family: var(--wp--preset--font-family--ibm-plex-sans); font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.4), 1.125rem); font-weight: 400; line-height: 1.35; }
.ohayo-como-h5, .ohayo-como-h6 { color: var(--wp--preset--color--contrast-3); font-family: var(--wp--preset--font-family--ibm-plex-mono); font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.2), 1rem); }
.ohayo-como-h5 { font-weight: 500; line-height: 1.4; }
.ohayo-como-h6 { font-weight: 400; line-height: 1.5; }

/* Ohayō somos / We are: fichas del equipo (bucle [pods name="team"] en la página) */
.ohayo-equipo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 60px 50px; max-width: 680px; margin-inline: auto; }
.ohayo-equipo > *, .ohayo-equipo__ficha > * { margin-block: 0; }
.ohayo-equipo__ficha { scroll-margin-top: 110px; }
.ohayo-equipo__foto { margin: 0 0 22px; aspect-ratio: 1; overflow: hidden; background: var(--wp--preset--color--base-2); }
.ohayo-equipo__foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ohayo-equipo__nombre { font-family: var(--wp--preset--font-family--ibm-plex-mono); font-size: 18px; font-weight: 500; }
.ohayo-equipo__cargo { margin-top: 4px !important; color: #777; font-size: var(--wp--preset--font-size--small); }
.ohayo-equipo__redes { display: flex; gap: 14px; margin: 14px 0 0 !important; padding: 0 0 16px; list-style: none; border-bottom: 1px solid var(--wp--preset--color--line); }
.ohayo-equipo__redes:empty { display: none; }
.ohayo-equipo__redes a { display: flex; color: var(--wp--preset--color--contrast); transition: color .2s; }
.ohayo-equipo__redes a:hover { color: var(--wp--preset--color--accent); }
.ohayo-equipo__texto { margin-top: 16px !important; font-size: var(--wp--preset--font-size--small); line-height: 1.6; }
.ohayo-equipo__texto p { margin: 0 0 1em; }
@media (max-width: 767.98px) { .ohayo-equipo { grid-template-columns: 1fr; gap: 60px; } }
/* Página de cada persona (templates/single-team.html; no está enlazada desde Ohayō somos) */
.ohayo-persona__nombre { margin: 0; font-family: var(--wp--preset--font-family--ibm-plex-mono); font-size: 28px; font-weight: 600; color: var(--wp--preset--color--accent); }
.ohayo-persona .ohayo-equipo__cargo { margin: 6px 0 0; }
.ohayo-persona .ohayo-equipo__texto { margin-top: 22px; }
@media (min-width: 782px) { .ohayo-persona > .wp-block-column:first-child { position: sticky; top: 110px; align-self: flex-start; } }
