/* 
Theme Name: eleven (Hello Elementor Child)
Theme URI: https://github.com/elementor/hello-theme/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 1.0.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/*
    Add your custom styles here
*/

/* ==========================================================================
   Projectes relacionats + navegació (shortcodes [projectes_navegacio] i
   [projectes_relacionats] — functions.php)

   Paleta i tipografia extretes de la captura del disseny original
   (grid de /contento): fons menta, text gairebé negre, tipografia
   monoespaiada. Ajusta les variables si el design system real fa
   servir altres valors exactes.
   ========================================================================== */

:root {
    --jp-bg: #d2fdea;
    --jp-text: #111111;
    --jp-font: 'Space Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --jp-gap: 32px;
}

/* Fons general de la zona on viuen aquests components (el "Casos" single).
   Si el disseny original té aquest verd a tota la pàgina i no només aquí,
   millor aplicar-ho al wrapper de la plantilla d'Elementor en lloc
   d'aquí — deixo-ho preparat igualment per si es vol fer servir puntual. */
.jp-casos-bg {
    background-color: var(--jp-bg);
}

.jp-project-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    padding: 40px 10px;
    font-family: var(--jp-font);
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: var(--jp-text);
}
.jp-project-nav__back {
    text-decoration: none;
    color: var(--jp-text);
}
.jp-project-nav__back:hover {
    text-decoration: underline;
}
.jp-project-nav__prevnext {
    display: flex;
    gap: 0.5em;
}
.jp-project-nav__prevnext a {
    text-decoration: none;
    color: var(--jp-text);
}
.jp-project-nav__prevnext a:hover {
    text-decoration: underline;
}
.jp-project-nav__prevnext .jp-project-nav__disabled {
    opacity: 0.35;
}

.jp-related-projects {
    margin-top: 3rem;
    padding: 0;
    font-family: var(--jp-font);
    color: var(--jp-text);
}
.jp-related-projects__title {
    margin-bottom: 1.5rem;
    font-family: var(--jp-font);
    font-size: 1rem;
    font-weight: 400;
    text-transform: none;
    color: var(--jp-text);
}
.jp-related-projects__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    .jp-related-projects__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .jp-related-projects__grid {
        grid-template-columns: 1fr;
    }
    .jp-project-nav {
        padding: 24px 24px 0;
    }
    .jp-related-projects {
        padding: 0 24px 24px;
    }
}
.jp-related-projects__item {
    text-decoration: none;
    color: var(--jp-text);
    display: block;
}
.jp-related-projects__thumb {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #ffffff;
}
.jp-related-projects__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.jp-related-projects__item:hover .jp-related-projects__thumb img {
    transform: scale(1.03);
}
.jp-related-projects__name {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-family: "Source Code Pro", sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.84px;
    text-transform: uppercase;
    color: #000000;
}

.jp-case-videos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--jp-gap);
    margin: 2rem 0;
    padding: 0 48px;
}
@media (max-width: 900px) {
    .jp-case-videos {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .jp-case-videos {
        grid-template-columns: 1fr;
        padding: 0 24px;
    }
}
.jp-case-videos__item {
    display: flex;
    flex-direction: column;
}
.jp-case-videos__player {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background-color: #000000;
    display: block;
}
.jp-case-videos__label {
    margin-top: 0.6rem;
    font-family: var(--jp-font);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--jp-text);
}


/* ===================================================================
   Casos — Bloques destacados
   Patrón imagen/vídeo + tarjeta de texto alterna (sección "Digital
   Content Marketing" de joaquinprior.com). Va con el shortcode/función
   jp_render_bloques_destacados() de functions.php.

   Medidas de la tarjeta (ancho, solapamiento, centrado) aproximadas
   por muestreo de píxeles sobre capturas reales del sitio, no del
   CSS fuente de Squarespace. Título y botón usan Source Code Pro
   (el botón en mayúsculas), el texto usa Courier New.
   =================================================================== */

.jp-bloques {
    display: flex;
    flex-direction: column;
    gap: clamp(56px, 8vw, 120px);
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}
.jp-bloque {
    position: relative;
}
.jp-bloque__media {
    position: relative;
    z-index: 1;
    width: 78%;
}
.jp-bloque--card-left .jp-bloque__media {
    margin-left: auto;
}
.jp-bloque__media img {
    display: block;
    width: 100%;
    height: auto;
}
.jp-bloque__video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}
.jp-bloque__video iframe,
.jp-bloque__video embed,
.jp-bloque__video object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.jp-bloque__card {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    width: 38%;
    box-sizing: border-box;
    background: #fff;
    padding: clamp(20px, 2.6vw, 42px) clamp(22px, 2.9vw, 46px);
}
.jp-bloque--card-right .jp-bloque__card {
    right: 0%;
}
.jp-bloque--card-left .jp-bloque__card {
    left: 0%;
}
.jp-bloque__titulo {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: clamp(19px, 2.1vw, 28px);
    line-height: 1.2;
    color: #000;
    margin-bottom: 12px;
}
.jp-bloque__texto {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    line-height: 1.35;
    color: #111;
}
.jp-bloque__texto p {
    margin: 0;
}
.jp-bloque__texto em {
    font-style: italic;
}
.jp-bloque__boton {
    display: inline-block;
    margin-top: 20px;
    padding: .7em 1.75em;
    border: 2px solid #000;
    border-radius: 0em;
    background-color: transparent;
    font-family: "Courier New", Courier, monospace;
    font-size: 8px;
    font-weight: 400;
    font-style: normal;
    letter-spacing: .1em;
    line-height: 0em;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.jp-bloque__boton:hover {
    background: #000;
    color: #fff;
}

/* Mobile: columna única, la tarjeta pasa a flujo normal debajo de
   la imagen/vídeo pero mantiene el solapamiento hacia arriba
   (igual que en las capturas móviles reales del sitio: la tarjeta
   blanca sigue "mordiendo" el borde inferior de la imagen, solo que
   ya no hay columna izq/dcha). */
@media (max-width: 767px) {
    .jp-bloques {
        gap: 64px;
    }
    .jp-bloque__media {
        width: 100%;
        margin-left: 0 !important;
    }
    .jp-bloque__card {
        position: relative;
        z-index: 2;
        transform: none;
        width: 86%;
        max-width: 480px;
        margin: -56px auto 0;
        right: auto;
        left: auto;
        padding: 28px 28px 26px;
    }
    .jp-bloque__titulo {
        font-size: 22px;
    }
    .jp-bloque__texto {
        font-size: 15px;
    }
}

/* ===================================================================
   Marquee ondulant — banda de text en bucle sobre una corba SVG
   (textPath + SMIL <animate>), tant a la capçalera de cada Cas
   ([projecte_marquee]) com a la home ([jp_home_marquee]).
   Va amb jp_render_wave_marquee() de functions.php.
   =================================================================== */
.jp-marquee-wave {
	overflow: hidden;
	width: 100%;
	line-height: 0;
}
.jp-marquee-wave__svg {
	max-width: none;
}


.elementor-widget-theme-post-featured-image .elementor-widget-container a,
.elementor-widget-theme-post-featured-image img {
    width: 400px !important;
    max-width: 400px !important;
    height: 400px !important;
    object-fit: cover !important;
}

@media (max-width: 767px) {
    .elementor-widget-theme-post-featured-image .elementor-widget-container a,
    .elementor-widget-theme-post-featured-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
    }
}

/* ------------------------------------------------------------------ */
/* Loop de Casos per categoria/subgrup (shortcode [jp_casos_loop])     */
/* Mateix tractament 400x400 que la graella d'Elementor (Contento/     */
/* Bonito), perquè els GIFs animats no es perdin en passar per cap     */
/* redimensionament de WordPress.                                      */
/* ------------------------------------------------------------------ */
.jp-casos-loop {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.jp-casos-loop__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	width: 100%;
}

.jp-casos-loop__thumb {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.jp-casos-loop__thumb img {
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}

.jp-casos-loop__titulo {
	margin-top: 10px;
	text-align: center;
	font-family: "Source Code Pro", sans-serif;
	font-weight: 400;
	font-size: 14px;
	letter-spacing: 0.84px;
	text-transform: uppercase;
	color: #000000;
}

@media (max-width: 991px) {
	.jp-casos-loop {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.jp-casos-loop {
		grid-template-columns: 1fr;
	}
}
