/*
Theme Name: Josep Carrizo
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Tema fill de Hello Elementor per la web de Josep Carrizo.
Author: Ivan Santaolaria
Author URI: https://enraizandolanube.com
Template: hello-elementor
Version: 2.0.0
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
*/

/* ─── Design system — valors extrets de Fitline / yoga-instructor ────────── */

:root {
    /* Layout */
    --theme-var-page_width:          1290px;
    --theme-var-grid_gap:            30px;
    --theme-var-rad:                 0px;

    /* Colors principals */
    --theme-color-bg_color:          #F7F9F2;
    --theme-color-bd_color:          #E0E3D8;
    --theme-color-text:              #797C7F;
    --theme-color-text_light:        #A5A6AA;
    --theme-color-text_dark:         #18240A;

    /* Accent verd (primari) */
    --theme-color-text_link:         #7FB951;
    --theme-color-text_hover:        #62A230;

    /* Accent taronja (secundari) */
    --theme-color-text_link2:        #FFA01E;
    --theme-color-text_hover2:       #ED8A00;

    /* Accent taronja fosc (terciari) */
    --theme-color-text_link3:        #FF5C1E;
    --theme-color-text_hover3:       #DE4A13;

    /* Superfícies */
    --theme-color-alter_bg_color:    #FFFFFF;
    --theme-color-alter_text:        #797C7F;
    --theme-color-extra_bg_color:    #1E2B0E;
    --theme-color-extra_text:        #C6CEBA;

    /* Formularis */
    --theme-color-input_bg_color:    transparent;
    --theme-color-input_bd_color:    #E0E3D8;
    --theme-color-input_text:        #797C7F;

    /* Inversos (sobre fons fosc) */
    --theme-color-inverse_text:      #18240A;
    --theme-color-inverse_link:      #FFFFFF;
    --theme-color-inverse_hover:     #FFFFFF;

    /* Tipografia */
    --font-heading:                  'Semplicita Pro', sans-serif;
    --font-body:                     'Kumbh Sans', sans-serif;
    --theme-font-button_font-size:   16px;
    --theme-font-button_line-height: 21px;
    --theme-font-button_font-weight: 500;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */

html {
    font-size: 17px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.647em;
    font-weight: 400;
    color: var(--theme-color-text);
    background-color: var(--theme-color-alter_bg_color);
}

/* ─── Headings ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--theme-color-text_dark);
    margin-top: 0;
}

h1 { font-size: 3.352em; line-height: 1.12em; }
h2 { font-size: 2.764em; line-height: 1.12em; }
h3 { font-size: 2.058em; line-height: 1.09em; }
h4 { font-size: 1.647em; line-height: 1.214em; }
h5 { font-size: 1.411em; line-height: 1.208em; }
h6 { font-size: 1.117em; line-height: 1.473em; }

/* ─── Enllaços ───────────────────────────────────────────────────────────── */

a {
    color: var(--theme-color-text_link);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--theme-color-text_hover);
}

/* ─── Botons ─────────────────────────────────────────────────────────────── */

button,
input[type="submit"],
input[type="button"],
.theme_button,
.elementor-button {
    font-family:      var(--font-body);
    font-size:        var(--theme-font-button_font-size);
    font-weight:      var(--theme-font-button_font-weight);
    line-height:      var(--theme-font-button_line-height);
    text-transform:   none;
    border-radius:    30px;
    padding:          16px 60px 18px;
    background-color: var(--theme-color-text_link);
    color:            var(--theme-color-inverse_link);
    border:           0;
    cursor:           pointer;
    transition:       background-color 0.3s ease, color 0.3s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.theme_button:hover,
.elementor-button:hover {
    background-color: var(--theme-color-text_hover);
    color:            var(--theme-color-inverse_link);
}

/* ─── Formularis ─────────────────────────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
textarea,
select {
    font-family:      var(--font-body);
    font-size:        1rem;
    color:            var(--theme-color-input_text);
    background-color: var(--theme-color-input_bg_color);
    border:           1px solid var(--theme-color-input_bd_color);
    border-radius:    var(--theme-var-rad);
    padding:          12px 16px;
    width:            100%;
    transition:       border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    border-color:     var(--theme-color-text_link);
    outline:          none;
}

/* Formularios de Elementor */
.elementor-form {
	margin-top: -20px;
}
.elementor-form .elementor-field-group {
	margin-top: 20px;
}
.asterisc {
	color: red;
}

/* ─── Imatges ────────────────────────────────────────────────────────────── */

img {
    max-width: 100%;
    height:    auto;
}

/* ─── Taules ─────────────────────────────────────────────────────────────── */

table th {
    font-size:   19px;
    font-weight: 600;
}

table td {
    font-size: 16px;
}

/* ─── Blockquote ─────────────────────────────────────────────────────────── */

blockquote p {
    font-size:   18px;
    line-height: 30px;
    font-weight: 400;
}

/* ─── Figcaption ─────────────────────────────────────────────────────────── */

figcaption {
    font-size:   16px;
    line-height: 20px;
    font-weight: 400;
}

/* ─── Layout helpers ─────────────────────────────────────────────────────── */

.jc-container {
    max-width: var(--theme-var-page_width);
    margin-inline: auto;
    padding-inline: 30px;
}

/* ─── Plantilla por defecto ──────────────────────────────────────────────── */

.page-template-default #content {
	margin: 60px auto 100px;
	max-width: 900px;
}

/* ─── Archive: capçalera ─────────────────────────────────────────────────── */

.jc-archive-header {
    padding: 80px 0 60px;
    text-align: center;
    background-color: var(--theme-color-alter_bg_color);
}

.jc-archive-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--theme-color-text_link);
    margin-bottom: 12px;
}

.jc-archive-title {
    font-size: 3rem;
    color: var(--theme-color-text_dark);
    margin-bottom: 16px;
}

.jc-archive-desc {
    max-width: 560px;
    margin-inline: auto;
    color: var(--theme-color-text);
}

/* ─── Blog section ───────────────────────────────────────────────────────── */

.jc-blog-section {
    padding: 60px 0 80px;
    background-color: var(--theme-color-alter_bg_color);
}

/* ─── Blog grid ──────────────────────────────────────────────────────────── */

.jc-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 1024px) {
    .jc-blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .jc-blog-grid { grid-template-columns: 1fr; }
}

/* ─── Post card ──────────────────────────────────────────────────────────── */

.jc-post-card {
    background-color: var(--theme-color-alter_bg_color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.jc-post-card__thumb-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.jc-post-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
    display: block;
}

.jc-post-card:hover .jc-post-card__thumb {
    transform: scale(1.05);
}

.jc-post-card__body {
    padding: 28px 28px 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.jc-post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.jc-post-card__cat {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--theme-color-alter_bg_color);
    background-color: var(--theme-color-text_link);
    padding: 4px 10px;
    border-radius: 20px;
    line-height: 1.4;
    transition: background-color 0.3s ease;
}

.jc-post-card__cat:hover {
    background-color: var(--theme-color-text_hover);
    color: var(--theme-color-alter_bg_color);
}

.jc-post-card__date,
.jc-post-card__comments {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--theme-color-text_light);
}

.jc-post-card__dot {
    color: var(--theme-color-text_light);
}

.jc-post-card__title {
    font-size: 1.6em;
    line-height: 1.25em;
    margin-bottom: 12px;
}

.jc-post-card__title a {
    color: var(--theme-color-text_dark);
    transition: color 0.3s ease;
}

.jc-post-card__title a:hover {
    color: var(--theme-color-text_link);
}

/* ─── Paginació ──────────────────────────────────────────────────────────── */

.jc-pagination {
    margin-top: 60px;
    text-align: center;
}

.jc-pagination .page-numbers {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.jc-pagination .page-numbers a,
.jc-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--theme-color-bd_color);
    border-radius: 50%;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--theme-color-text);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.jc-pagination .page-numbers a:hover {
    background-color: var(--theme-color-text_link);
    border-color: var(--theme-color-text_link);
    color: #fff;
}

.jc-pagination .page-numbers .current {
    background-color: var(--theme-color-text_link);
    border-color: var(--theme-color-text_link);
    color: #fff;
}

.jc-no-posts {
    text-align: center;
    color: var(--theme-color-text_light);
    font-size: 1.1rem;
}

/* ─── Single: capçalera ──────────────────────────────────────────────────── */

.jc-single-header {
    padding: 80px 0 60px;
    background-color: var(--theme-color-bg_color);
    position: relative;
}

.jc-single-header--has-image {
    padding: 140px 0 80px;
    min-height: 480px;
    display: flex;
    align-items: flex-end;
}

.jc-single-header__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.jc-single-header__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(24,36,10,0.72) 0%, rgba(24,36,10,0.20) 60%, transparent 100%);
}

.jc-single-header__inner {
    position: relative;
    z-index: 1;
}

.jc-single-header__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.jc-single-header--has-image .jc-single-header__meta {
    color: rgba(255,255,255,0.8);
}

.jc-single-header__meta time {
    font-size: 14px;
    color: var(--theme-color-text_light);
}

.jc-single-header--has-image .jc-single-header__meta time {
    color: rgba(255,255,255,0.75);
}

.jc-single-header__title {
    font-size: 2.8rem;
    line-height: 1.1em;
    color: var(--theme-color-text_dark);
    max-width: 820px;
    margin-bottom: 0;
}

.jc-single-header--has-image .jc-single-header__title {
    color: #ffffff;
}

/* ─── Single: contingut ──────────────────────────────────────────────────── */

.jc-single-content-section {
    padding: 70px 0 60px;
}

.jc-single-content-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

.jc-single-content {
    max-width: 780px;
    margin-inline: auto;
    width: 100%;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.entry-content h2 { font-size: 1.5em; line-height: 1.3em; }
.entry-content h3 { font-size: 1.294em; line-height: 1.3em; }
.entry-content h4 { font-size: 1.117em; line-height: 1.35em; }
.entry-content h5,
.entry-content h6 { font-size: 1.05em; line-height: 1.4em; }

.entry-content ul,
.entry-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.entry-content li {
    margin-bottom: 0.4em;
}

.entry-content blockquote {
    border-left: 3px solid var(--theme-color-text_link);
    margin-left: 0;
    padding: 12px 0 12px 24px;
    color: var(--theme-color-text_dark);
}

/* ─── Single: etiquetes ──────────────────────────────────────────────────── */

.jc-single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--theme-color-bd_color);
}

.jc-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid var(--theme-color-bd_color);
    border-radius: 20px;
    color: var(--theme-color-text);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.jc-tag:hover {
    background-color: var(--theme-color-text_link);
    border-color: var(--theme-color-text_link);
    color: #fff;
}

/* ─── Single: navegació prev/next ────────────────────────────────────────── */

.jc-single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--theme-color-bd_color);
}

.jc-single-nav__next {
    text-align: right;
}

.jc-single-nav a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--theme-color-text_dark);
}

.jc-single-nav__next a {
    align-items: flex-end;
}

.jc-single-nav__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme-color-text_link);
}

.jc-single-nav__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-color-text_dark);
    transition: color 0.3s ease;
}

.jc-single-nav a:hover .jc-single-nav__title {
    color: var(--theme-color-text_link);
}

/* ─── Related posts ──────────────────────────────────────────────────────── */

.jc-related-section {
    padding: 60px 0 80px;
    background-color: var(--theme-color-bg_color);
    border-top: 1px solid var(--theme-color-bd_color);
}

.jc-related-title {
    font-size: 1.8rem;
    margin-bottom: 36px;
    color: var(--theme-color-text_dark);
}

/* ─── Comments ───────────────────────────────────────────────────────────── */

.jc-comments-section {
    padding: 60px 0 80px;
    border-top: 1px solid var(--theme-color-bd_color);
}

.jc-comments-wrap {
    max-width: 780px;
    margin-inline: auto;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */

.jc-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--theme-color-alter_bg_color);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.jc-header.is-scrolled {
    border-color: var(--theme-color-bd_color);
    box-shadow: 0 2px 16px rgba(24, 36, 10, 0.06);
}

.jc-header__inner {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 10px;
}

/* Logo */
.jc-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.jc-header__logo img {
    max-height: 48px !important;
    width: auto;
    height: auto;
    object-fit: contain;
}

.jc-header__site-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--theme-color-text_dark);
}

/* Nav */
.jc-header__nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.jc-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.jc-nav__list li a {
    display: block;
    padding: 8px 14px 10px;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 500;
    color: var(--theme-color-text_dark);
    border-bottom: 2px solid transparent;
    transition: border-color 0.25s ease;
}

.jc-nav__list li a:hover,
.jc-nav__list li.current-menu-item > a {
    color: var(--theme-color-text_dark);
    border-bottom-color: var(--theme-color-text_dark);
}

/* CTA */
.jc-header__cta {
    flex-shrink: 0;
    display: inline-block;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 11px 28px;
    background-color: var(--theme-color-text_link);
    color: #fff !important;
    border-radius: 30px;
    transition: background-color 0.3s ease;
}

.jc-header__cta:hover {
    background-color: var(--theme-color-text_hover);
    color: #fff;
}

/* Accions */
.jc-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Hamburger */
.jc-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.jc-hamburger span {
    display: block;
    height: 2px;
    background-color: var(--theme-color-text_dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.jc-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.jc-hamburger.is-active span:nth-child(2) { opacity: 0; }
.jc-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.jc-footer {
    background-color: var(--theme-color-extra_bg_color);
    color: var(--theme-color-extra_text);
}

.jc-footer__main {
    padding: 80px 0 60px;
}

.jc-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
}

.jc-footer__logo img {
    max-height: 48px;
    width: auto;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.jc-footer__logo--custom img {
    filter: none;
    opacity: 1;
}

.jc-footer__site-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--theme-color-inverse_link);
}

.jc-footer__subtitle {
    margin-top: 14px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: #E8B395;
}

.jc-footer__desc {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.7em;
    color: var(--theme-color-extra_text);
    max-width: 280px;
}

.jc-footer__desc--white {
    color: var(--theme-color-inverse_link);
}

/* Social */
.jc-footer__social {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.jc-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(198, 206, 186, 0.25);
    border-radius: 50%;
    color: var(--theme-color-extra_text);
    transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.jc-footer__social-link:hover {
    border-color: var(--theme-color-text_link);
    background-color: var(--theme-color-text_link);
    color: #fff;
}

/* Columnes nav/contacte */
.jc-footer__heading {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--theme-color-inverse_link);
    margin-bottom: 20px;
}

.jc-footer__nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jc-footer__nav-list li a {
    font-size: 15px;
    color: var(--theme-color-inverse_link);
    transition: color 0.25s ease;
}

.jc-footer__nav-list li a:hover {
    color: var(--theme-color-text_link);
}

/* Bar copyright */
.jc-footer__bar {
    border-top: 1px solid rgba(198, 206, 186, 0.15);
    padding: 20px 0;
}

.jc-footer__bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.jc-footer__copy {
    font-size: 13px;
    color: var(--theme-color-extra_text);
    opacity: 0.7;
    margin: 0;
}

.jc-footer__copy a {
    color: inherit;
}

.jc-footer__legal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.jc-footer__legal-list li a {
    font-size: 13px;
    color: var(--theme-color-extra_text);
    opacity: 0.7;
    transition: opacity 0.25s ease;
}

.jc-footer__legal-list li a:hover {
    opacity: 1;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .jc-footer__grid { grid-template-columns: repeat(3, 1fr); }
    .jc-footer__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .jc-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Header */
    .jc-header__nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--theme-color-alter_bg_color);
        border-bottom: 1px solid var(--theme-color-bd_color);
        padding: 16px 20px 24px;
    }
    .jc-header__nav.is-open { display: block; }
    .jc-nav__list           { flex-direction: column; gap: 0; }
    .jc-nav__list li a      { padding: 12px 8px; }
    .jc-header__cta         { display: none; }
    .jc-hamburger           { display: flex; }
    .jc-header__inner       { position: relative; }

    /* Footer */
    .jc-footer__grid   { grid-template-columns: 1fr; gap: 36px; }
    .jc-footer__main   { padding: 60px 0 40px; }
    .jc-footer__bar-inner { flex-direction: column; align-items: flex-start; }

    /* Blog/single */
    .jc-archive-header  { padding: 50px 0 40px; }
    .jc-archive-title   { font-size: 2.2rem; }
    .jc-blog-section    { padding: 40px 0 60px; }
    .jc-single-header--has-image { padding: 100px 0 50px; min-height: 360px; }
    .jc-single-header__title { font-size: 2rem; }
    .jc-single-nav      { grid-template-columns: 1fr; }
    .jc-single-nav__next { text-align: left; }
    .jc-single-nav__next a { align-items: flex-start; }
    .jc-container       { padding-inline: 20px; }
}
