/*!
Theme Name: Artimedia Child Theme
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Kadence WP
Author URI: https://www.kadencewp.com/
Description: A child theme for the Kadence Theme.
Version: 1.0.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

/* Theme customization starts here
-------------------------------------------------------------- */

/* menu */
.header-navigation .header-menu-container ul ul.sub-menu, .header-navigation .header-menu-container ul ul.submenu {
    border-radius: 12px;
    border: 1px solid var(--global-palette6);
}

.header-navigation .header-menu-container ul ul li.menu-item:first-child > a {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.header-navigation .header-menu-container ul ul li.menu-item:last-child > a {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.wp-block-breadcrumbs a {
    text-decoration: none;
}
.wp-block-breadcrumbs a:hover {
    text-decoration: underline;
}
.wp-block-breadcrumbs li:not(:last-child):after {
    color: rgba(255,255,255,0.8);
}

/* Hero — Vanta.js DOTS canvas layering.
   Vanta injects a <canvas> directly as a child of #hero-vanta.
   Force the canvas behind and let row content sit on top. */
#hero-vanta {
    position: relative;
    overflow: hidden;
}
#hero-vanta > canvas {
    position: absolute !important;
    inset: 0;
    z-index: 0;
}
#hero-vanta > *:not(canvas) {
    position: relative;
    z-index: 1;
}

/* Inline emphasis inside post content uses brand primary. */
.entry-content strong,
.entry-content b {
    color: var(--global-palette1);
}

/* Contact form (HTML block fallback until Kadence Advanced Form is wired) */
.artimedia-contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 520px;
}
.artimedia-contact-form .acf-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.artimedia-contact-form .acf-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    letter-spacing: 0.4px;
    color: rgba(255,255,255,0.75);
}
.artimedia-contact-form .acf-input {
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.35);
    color: #ffffff;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    padding: 10px 0;
    outline: none;
    transition: border-color 200ms ease;
}
.artimedia-contact-form .acf-input:focus {
    border-bottom-color: #00d0ff;
}
.artimedia-contact-form .acf-textarea {
    resize: vertical;
    min-height: 120px;
    border: 1px solid rgba(255,255,255,0.35);
    padding: 12px;
}
.artimedia-contact-form .acf-submit {
    align-self: flex-start;
    margin-top: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.6);
    color: #ffffff;
    padding: 13.5px 49px;
    font-family: 'Roboto', system-ui, sans-serif;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 200ms ease, border-color 200ms ease;
}
.artimedia-contact-form .acf-submit:hover {
    background: rgba(255,255,255,0.08);
    border-color: #ffffff;
}

/* Transitions */
@view-transition {
    navigation: auto;
}
/*  Kadence css “fixings” */
body {
    text-wrap: pretty;
}
/* header mobile */
.popup-drawer .drawer-content.content-align-center {
    overflow-y: auto;
    max-width: 90vh;
}
.mobile-navigation {
    max-height: 100%;
}
.kt-btn-width-type-auto {
    width: auto;
}
.kb-adv-form-message.kb-adv-form-warning {
    padding: 0.1em 1em;
}
.new-row-diferent-height .kt-inner-column-height-full:not(.kt-row-layout-row) {
    grid-auto-rows: unset;
}
@media (max-width: 1024px) {
    #block-8 figure {
        margin: 0 auto;
    }
    .kt-inner-column-height-full.kt-tab-layout-equal, .kt-inner-column-height-full:not(.kt-tab-layout-inherit):not(.kt-tab-layout-row) {
        grid-auto-rows: unset;
    }
}

/* ── Checklist utility — apply .artimedia-checklist to any <ul>
   Replaces default bullets with a hexagon + checkmark SVG (gradient
   palette1 → #4E34BA). SVG embedded as data URI; no external request. */
ul.artimedia-checklist {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}
ul.artimedia-checklist > li {
    position: relative;
    padding-left: 40px;
    min-height: 28px;
    margin-bottom: 12px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none'><path d='M14 2L24 8V20L14 26L4 20V8L14 2Z' fill='url(%23g)'/><path d='M10 14L13 17L18 11' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/><defs><linearGradient id='g' x1='4' y1='2' x2='27.6066' y2='21.6721' gradientUnits='userSpaceOnUse'><stop stop-color='%2326117F'/><stop offset='1' stop-color='%234E34BA'/></linearGradient></defs></svg>");
    background-repeat: no-repeat;
    background-position: 0 0.15em;
    background-size: 28px 28px;
}
ul.artimedia-checklist > li:last-child { margin-bottom: 0; }

/* ── Image rollover 01 — apply .image-rollover01 to a Kadence image
   On hover: the image zooms in (clipped, never overflows) and the drop
   shadow shifts from neutral to brand violet (palette1 #26117f).
   Disable Kadence's own Box Shadow on the image so this one owns it. */
.image-rollover01 .kb-is-ratio-image {
    overflow: hidden; /* clip the zoom so the image never grows past the frame */
    border-radius: 8px; /* keep the rounded clip on the element that does the clipping */
    transform: translateZ(0); /* force own layer so WebKit honors the rounded clip while the img scales */
    box-shadow: 0 35px 30px -5px rgba(0, 0, 0, 0.2); /* replaces Kadence shadow */
    transition: box-shadow 350ms ease;
}
.image-rollover01.big-radius .kb-is-ratio-image {
    border-top-left-radius: 16px; /* keep the rounded clip on the element that does the clipping */
    border-top-right-radius: 16px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: none;
}
.image-rollover01:hover .kb-is-ratio-image {
    box-shadow: 0 30px 45px -5px rgba(38, 17, 127, 0.45); /* violet on hover */
}
.image-rollover01.big-radius:hover .kb-is-ratio-image {
    box-shadow: none;
}
.image-rollover01 .kb-img {
    transition: transform 500ms ease;
    transform-origin: center center;
    will-change: transform;
}
.image-rollover01:hover .kb-img {
    transform: scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
    .image-rollover01 .kb-img,
    .image-rollover01 .kb-is-ratio-image { transition: none; }
    .image-rollover01:hover .kb-img { transform: none; }
}

/* ── Zoom hover background — apply .zoom-hover-bg to a Kadence column whose
   .kt-inside-inner-col carries a background-image (set by Kadence's own CSS).
   Same zoom as .image-rollover01 but for CSS backgrounds: the background is
   mirrored onto a ::before (background: inherit) that scales on hover, while
   the col clips it so it never grows past the frame. Border-radius comes from
   the block settings; the clip follows it automatically. */
.zoom-hover-bg .kt-inside-inner-col {
    position: relative;
    overflow: hidden; /* clip the zoom so the background never escapes the column */
    transform: translateZ(0); /* force own layer so WebKit honors the rounded clip while ::before scales */
}
.zoom-hover-bg .kt-inside-inner-col::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* behind any content the column may hold, above the col's own background */
    background: inherit; /* mirrors the background-image Kadence sets on the col */
    transition: transform 500ms ease;
    transform-origin: center center;
    will-change: transform;
}
.zoom-hover-bg:hover .kt-inside-inner-col::before {
    transform: scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
    .zoom-hover-bg .kt-inside-inner-col::before { transition: none; }
    .zoom-hover-bg:hover .kt-inside-inner-col::before { transform: none; }
}

/* ── Card reveal: handled by Kadence's AOS via data-aos="fade-up" on the
   solucions cards (enqueued from blocks/solucions-grid/render.php). AOS
   animates both on scroll-in and when already in view on load/refresh. */

/* ── Card hover boxes (.oferim-box, .solucio-box) — apply either class to a
   Kadence column to turn it into a hover card. Shared below: the deep lift
   shadow on hover and the SVG-icon transition setup (icon can grow/slide past
   its ratio frame without clipping). Each variant adds its own accent further
   down. */
.oferim-box:hover,
.solucio-box:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.oferim-box .image-is-svg .kb-is-ratio-image,
.solucio-box .image-is-svg .kb-is-ratio-image {
    overflow: visible; /* let the icon move/scale past the frame edge */
}
.oferim-box .image-is-svg .kb-img,
.solucio-box .image-is-svg .kb-img {
    transition: transform 500ms ease;
    transform-origin: center center;
    will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
    .oferim-box,
    .oferim-box::after,
    .oferim-box .image-is-svg .kb-img,
    .solucio-box,
    .solucio-box .image-is-svg .kb-img { transition: none; }
    .oferim-box:hover .image-is-svg .kb-img,
    .solucio-box:hover .image-is-svg .kb-img { transform: none; }
}

/* Oferim variant — a soft cyan (palette2) gradient fades in on hover and the
   icon slides left. Gradient lives on ::after so it can fade via opacity;
   inner col is raised above it so text/image stay on top. */
.oferim-box {
    position: relative;
    overflow: hidden;
    /* Match Kadence's column radius (rounded-2xl = 16px) on the outer wrapper
       too, so overflow:hidden clips the ::after overlay to rounded corners. */
    border-radius: 16px;
    transition: box-shadow 500ms ease;
}
.oferim-box::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--global-palette2) 10%, transparent),
        color-mix(in srgb, var(--global-palette2) 5%, transparent));
    opacity: 0;
    transition: opacity 500ms ease;
    pointer-events: none;
    z-index: 0;
}
.oferim-box > .kt-inside-inner-col {
    position: relative;
    z-index: 1;
}
.oferim-box:hover::after {
    opacity: 1;
}
.oferim-box:hover .image-is-svg .kb-img {
    transform: translateX(-10px);
}

/* Solucio variant — background shifts to light gray (palette8) on hover and
   the icon grows (scale-110). */
.solucio-box {
    transition: box-shadow 500ms ease, background-color 500ms ease;
}
.solucio-box:hover {
    background-color: var(--global-palette8);
}
.solucio-box:hover .image-is-svg .kb-img {
    transform: scale(1.12);
}

/* Forms */
@media (max-width: 990px) {
    .contact-form .kt-btn-size-standard {
        width: 100%;
    }
}

.wp-block-kadence-advanced-form .kb-adv-form-required {
    color: rgba(255, 255, 255, 0.5);
}

/* ───────────────────────────────────────────────────────────
   Single cas_destacat — horizontal padding to cap content width.
   Desktop 138px · tablet half (69px) · mobile 0.
   ─────────────────────────────────────────────────────────── */
.entry.type-cas_destacat {
    padding-left: 138px;
    padding-right: 138px;
}
@media (max-width: 1024px) {
    .entry.type-cas_destacat {
        padding-left: 69px;
        padding-right: 69px;
    }
}
@media (max-width: 767px) {
    .entry.type-cas_destacat {
        padding-left: 0;
        padding-right: 0;
    }
}
