/* Dacametal — estils base dels substituts dels ginys de pagament.
   Els colors i mides concrets de cada pàgina venen de legacy-css/. */

/* ----- Menú ----- */
.elementor-nav-menu,
.elementor-nav-menu ul { list-style: none; margin: 0; padding: 0; }
.elementor-nav-menu li { position: relative; margin: 0; }
.elementor-nav-menu a { display: flex; align-items: center; padding: 13px 20px; line-height: 20px; text-decoration: none; transition: color .3s, background-color .3s; }
.elementor-nav-menu--layout-horizontal .elementor-nav-menu { display: flex; flex-wrap: wrap; }
.elementor-nav-menu__align-center .elementor-nav-menu--layout-horizontal .elementor-nav-menu { justify-content: center; }
.elementor-nav-menu__align-right .elementor-nav-menu--layout-horizontal .elementor-nav-menu { justify-content: flex-end; }
.elementor-nav-menu--main .sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 9997; min-width: 14em; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.elementor-nav-menu--main li:hover > .sub-menu,
.elementor-nav-menu--main li:focus-within > .sub-menu { display: block; }
.elementor-nav-menu--main .sub-menu a { white-space: nowrap; }
/* Indicador de submenú: va a ::before (amb order) perquè ::after és el fons de l'element actiu.
   Sense fons: els estils heretats pinten el ::before dels elements del menú i el triangle es veia com un quadrat. */
.elementor-nav-menu--main .menu-item-has-children > a.elementor-item::before { content: ""; order: 2; margin-left: 8px; border: 4px solid transparent; border-top-color: currentColor; border-bottom-width: 0; border-radius: 0 !important; width: 0; height: 0; background: none !important; }

/* Fons de l'element actiu i en passar-hi el ratolí (el color concret ve de legacy-css). */
.e--pointer-background .elementor-item { position: relative; z-index: 1; }
.e--pointer-background .elementor-item::after { content: ""; position: absolute; inset: 0; z-index: -1; background-color: #3f444b; opacity: 0; transform: scale(.85); transition: opacity .3s, transform .3s; }
.e--pointer-background .elementor-item:hover::after,
.e--pointer-background .elementor-item:focus-visible::after,
.e--pointer-background .elementor-item.elementor-item-active::after,
.e--pointer-background li:hover > .elementor-item::after,
.e--pointer-background li:focus-within > .elementor-item::after { opacity: 1; transform: none; }
.elementor-widget-nav-menu .e--pointer-background .elementor-item:hover,
.elementor-widget-nav-menu .e--pointer-background .elementor-item:focus-visible,
.elementor-widget-nav-menu .e--pointer-background .elementor-item.elementor-item-active,
.elementor-widget-nav-menu .e--pointer-background li:hover > .elementor-item,
.elementor-widget-nav-menu .e--pointer-background li:focus-within > .elementor-item { color: #fff; }
.elementor-nav-menu--main .sub-menu a:hover,
.elementor-nav-menu--main .sub-menu a:focus-visible,
.elementor-nav-menu--main .sub-menu a.elementor-item-active { background-color: rgba(209, 69, 0, .73); color: #fff; }
@media (prefers-reduced-motion: reduce) { .e--pointer-background .elementor-item::after { transition: none; } }

.elementor-menu-toggle { display: flex; align-items: center; justify-content: center; margin: 0 auto; padding: .25em; width: 2.2em; height: 2.2em; cursor: pointer; border-radius: 3px; background-color: rgba(0, 0, 0, .05); color: #494c4f; box-sizing: content-box; }
.dacametal-burger { display: block; width: 22px; }
.dacametal-burger span { display: block; height: 2px; margin: 5px 0; background: currentColor; transition: transform .25s, opacity .25s; }
.elementor-menu-toggle.elementor-active .dacametal-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.elementor-menu-toggle.elementor-active .dacametal-burger span:nth-child(2) { opacity: 0; }
.elementor-menu-toggle.elementor-active .dacametal-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.elementor-menu-toggle ~ .elementor-nav-menu--dropdown { display: none; background: #fff; }
.elementor-menu-toggle.elementor-active ~ .elementor-nav-menu--dropdown { display: block; }
nav.elementor-nav-menu--dropdown .elementor-nav-menu { display: block; }
nav.elementor-nav-menu--dropdown .sub-menu { position: static; display: block; box-shadow: none; }
nav.elementor-nav-menu--dropdown .sub-menu a { padding-left: 36px; }
.elementor-nav-menu__text-align-center nav.elementor-nav-menu--dropdown a { justify-content: center; }

/* ----- Carrusel ----- */
.elementor-widget-slides .elementor-swiper { position: relative; }
.elementor-widget-slides .elementor-main-swiper { overflow: hidden; }
.elementor-widget-slides .swiper-slide { position: relative; height: 400px; overflow: hidden; }
.elementor-widget-slides .swiper-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: 50%; background-repeat: no-repeat; }
.elementor-widget-slides .elementor-background-overlay { position: absolute; inset: 0; }
.elementor-widget-slides .swiper-slide-inner { position: absolute; inset: 0; display: flex; padding: 50px; color: #fff; text-align: center; background-repeat: no-repeat; background-position: 50%; }
.elementor--h-position-center .swiper-slide-inner { justify-content: center; }
.elementor--v-position-middle .swiper-slide-inner { align-items: center; }
.elementor-widget-slides .swiper-slide-contents { max-width: 66%; }
.elementor-widget-slides .elementor-slide-heading { font-size: 35px; font-weight: 700; line-height: 1; }
.elementor-widget-slides .elementor-slide-description { font-size: 17px; line-height: 1.4; }
.elementor-widget-slides .swiper-slide-contents > :not(:last-child) { margin-bottom: 30px; }
.elementor-widget-slides .elementor-swiper-button { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); display: inline-flex; padding: 0; border: 0; background: none; color: hsla(0, 0%, 93%, .9); font-size: 25px; cursor: pointer; }
.elementor-widget-slides .elementor-swiper-button-prev { left: 10px; }
.elementor-widget-slides .elementor-swiper-button-next { right: 10px; }
.elementor-widget-slides .elementor-swiper-button svg { width: 1em; height: 1em; fill: currentColor; }
.elementor-widget-slides .swiper-pagination { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2; text-align: center; }
.elementor-widget-slides .swiper-pagination-bullet { display: inline-block; width: 8px; height: 8px; margin: 0 4px; padding: 0; border: 0; border-radius: 50%; background: #fff; opacity: .4; cursor: pointer; }
.elementor-widget-slides .swiper-pagination-bullet-active { opacity: 1; }
@media (max-width: 767px) {
	.elementor-widget-slides .swiper-slide-inner { padding: 30px; }
	.elementor-widget-slides .swiper-slide-contents { max-width: 100%; }
}

/* ----- Targetes amb imatge (antic «banner») ----- */
.premium-banner-ib { position: relative; display: block; overflow: hidden; margin: 0; }
.premium-banner-ib img { display: block; width: 100%; height: auto; transition: transform .4s; }
.premium-banner-ib:hover img { transform: scale(1.05); }
.premium-banner-ib-desc { position: absolute; left: 0; right: 0; bottom: 0; padding: 15px; background: rgba(0, 0, 0, .55); color: #fff; }
.premium-banner-ib-title { margin: 0 0 4px; font-size: 1.15em; color: #fff; }
.premium-banner-ib-content p { margin: 0; }

/* ----- Formulari ----- */
.elementor-form-fields-wrapper { display: flex; flex-wrap: wrap; margin: 0 -5px; }
.elementor-form .elementor-field-group { display: flex; flex-wrap: wrap; align-items: center; padding: 0 5px; margin-bottom: 10px; box-sizing: border-box; }
.elementor-form .elementor-col-100 { width: 100%; }
.elementor-form .elementor-col-50 { width: 50%; }
.elementor-form .elementor-col-40 { width: 40%; }
.elementor-form .elementor-field-label { flex-basis: 100%; }
.elementor-form .elementor-field-textual { width: 100%; flex-basis: 100%; padding: 5px 14px; min-height: 40px; border: 1px solid #818a91; border-radius: 3px; background: #fff; box-sizing: border-box; font-size: 15px; }
.elementor-form .elementor-field-option { display: flex; gap: 8px; align-items: flex-start; }
.elementor-form .elementor-button { width: 100%; min-height: 40px; cursor: pointer; }
.dacametal-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dacametal-form-msg { margin: 0 0 16px; padding: 12px 16px; border-radius: 3px; }
.dacametal-form-ok { background: #e7f6ea; color: #14532d; }
.dacametal-form-ko { background: #fde8e8; color: #7f1d1d; }
@media (max-width: 767px) {
	.elementor-form .elementor-col-50,
	.elementor-form .elementor-col-40 { width: 100%; }
}

/* ----- Graella de projectes ----- */
.elementor-posts-container.elementor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px 30px; }
.elementor-grid-tablet-2 .elementor-posts-container.elementor-grid { }
.elementor-widget-posts::after { display: none; }
.elementor-post__thumbnail__link { display: block; margin-bottom: 20px; }
.elementor-post__thumbnail { position: relative; overflow: hidden; padding-bottom: 66%; }
.elementor-post__thumbnail img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.elementor-post__title { margin: 0 0 10px; font-size: 18px; }
.elementor-post__title a { text-decoration: none; }
.elementor-post__meta-data { margin-bottom: 10px; font-size: 12px; color: #adadad; }
.elementor-post__excerpt p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: #777; }
.elementor-post__read-more { font-size: 12px; font-weight: 700; text-decoration: none; }
@media (max-width: 1024px) { .elementor-posts-container.elementor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .elementor-posts-container.elementor-grid { grid-template-columns: 1fr; } }

/* ----- Entrades de projectes (capçalera del tema) ----- */
.single-post .featured-image.page-header-image-single img { display: block; width: 100%; aspect-ratio: 22 / 5; object-fit: cover; }
.single-post .entry-meta .byline { display: none; }

/* ----- Avís de galetes ----- */
.dcm-galetes { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 99999; max-width: 760px; margin: 0 auto; padding: 18px 20px; box-sizing: border-box; background: #002647; color: #fff; border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); font-size: 15px; line-height: 1.45; }
.dcm-galetes[hidden] { display: none; }
.dcm-galetes__titol { margin: 0 0 6px; font-weight: 700; font-size: 16px; outline: none; }
.dcm-galetes__text { margin: 0 0 14px; }
.dcm-galetes__text a { color: #fff; text-decoration: underline; }
.dcm-galetes__botons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
/* Els dos botons tenen exactament el mateix aspecte: cap opció destaca sobre l'altra. */
.dcm-galetes__boto { min-width: 130px; margin: 0; padding: 10px 18px; border: 2px solid #fff; border-radius: 4px; background: #fff; color: #002647; font: inherit; font-weight: 600; cursor: pointer; }
.dcm-galetes__boto:hover { background: #e9edf1; }
.dcm-galetes__boto:focus-visible, .dcm-embed__accepta:focus-visible, .dcm-galetes-config:focus-visible { outline: 3px solid #e56300; outline-offset: 2px; }
@media (max-width: 600px) {
	.dcm-galetes { left: 8px; right: 8px; bottom: 8px; padding: 16px; }
	.dcm-galetes__boto { flex: 1 1 0; min-width: 0; }
}
.dcm-galetes-config { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* ----- Mapa i vídeos bloquejats fins al consentiment ----- */
.dcm-embed { position: relative; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 24px; background: #e9edf1; border: 1px solid #c9d2db; color: #1b2530; text-align: center; }
.dcm-embed--video { aspect-ratio: 16 / 9; padding: 16px; }
.dcm-embed--mapa { height: var(--dcm-h, 448px); }
.dcm-embed__in { max-width: 440px; }
.dcm-embed__text { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.dcm-embed__accions { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; }
.dcm-embed__accepta { margin: 0; padding: 9px 16px; border: 0; border-radius: 4px; background: #d85600; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.dcm-embed__accepta:hover { background: #b84900; }
.dcm-embed__enllac { font-size: 14px; color: #002647; text-decoration: underline; }
.dcm-embed.is-loaded { padding: 0; border: 0; background: none; }
.dcm-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ----- Galeries de les pàgines de serveis (abans FooGallery) ----- */
.dcm-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.dcm-galeria__item { display: block; overflow: hidden; aspect-ratio: 1 / 1; background: #e9edf1; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.dcm-galeria__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.dcm-galeria__item:hover .dcm-galeria__img, .dcm-galeria__item:focus-visible .dcm-galeria__img { transform: scale(1.06); }
.dcm-galeria__item:focus-visible { outline: 3px solid #e56300; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .dcm-galeria__img { transition: none; } }

/* SEO: els títols que han passat de H2 a H1 conserven la mida dels H2 del tema */
h1.elementor-heading-title { font-size: 30px; }
@media (max-width: 768px) { h1.elementor-heading-title { font-size: 25px; } }
h1.elementor-slide-heading { margin-bottom: 0; }

/* Avís legal: un sol format per a tot el text (abans barrejava Times, Calibri i Roboto d'un Word enganxat). */
.dcm-legal { text-align: left; }
.dcm-legal h2 { margin: 2em 0 .6em; font-family: inherit; font-size: 1em; font-weight: 700; line-height: 1.5; letter-spacing: normal; text-transform: uppercase; color: inherit; }
.dcm-legal h2:first-child { margin-top: 0; }
.dcm-legal p { margin: 0 0 1em; }
.dcm-legal ul { margin: 0 0 1em 1.4em; padding: 0; }
.dcm-legal li { margin: 0 0 .4em; }
.dcm-legal table { width: 100%; margin: 0 0 1em; border-collapse: collapse; border: 0; }
.dcm-legal td { padding: .6em .8em; vertical-align: top; border: 1px solid #e3e6ea; }
.dcm-legal td:first-child { width: 32%; }
.dcm-legal td p { margin: 0 0 .6em; }
.dcm-legal td p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
	.dcm-legal table, .dcm-legal tbody, .dcm-legal tr, .dcm-legal td { display: block; width: auto; }
	.dcm-legal tr { margin-bottom: .8em; border: 1px solid #e3e6ea; }
	.dcm-legal td { border: 0; padding: .4em .8em; }
	.dcm-legal td:first-child { width: auto; padding-bottom: 0; }
}
@media (max-width: 600px) { .dcm-legal { padding: 0 6px; } } /* marge lateral de 16 px al mòbil */

/* Peu de la portada: «Avís Legal – Política de protecció de dades» subratllat com «Configuració de galetes», perquè es vegi que és un enllaç. */
.elementor-element-bb18fb9 a { text-decoration: underline; text-decoration-color: #fff; }
.elementor-element-bb18fb9 a:focus-visible { outline: 3px solid #e56300; outline-offset: 2px; }
