/*
Theme Name: Hello Child
Theme URI: https://compte-international.com/
Description: Child theme de Hello Elementor per a Compte International Business
Author: Compte International Business
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-child
*/

/* ── Variables de marca (canvia-ho aquí per re-temar tot el CSS del child) ── */
:root {
	--cib-gold: #E4A84C;
	--cib-gold-dark: #B8863B;
	--cib-dark: #1A1A1A;
	--cib-text: #4A4A4A;
	--cib-light: #F7F5F1;
}

::selection { background: var(--cib-gold); color: var(--cib-dark); }

/* Enllaços del contingut */
.elementor-widget-text-editor a,
.entry-content a {
	color: var(--cib-gold-dark);
	text-decoration: none;
	border-bottom: 1px solid rgba(184, 134, 59, .35);
	transition: color .2s ease, border-color .2s ease;
}
.elementor-widget-text-editor a:hover,
.entry-content a:hover { color: var(--cib-dark); border-color: var(--cib-dark); }

/* Animació d'entrada subtil, només CSS (scroll-driven; navegadors antics la ignoren) */
@supports (animation-timeline: view()) {
	.cib-card {
		animation: cib-rise both;
		animation-timeline: view();
		animation-range: entry 0% entry 45%;
	}
	@keyframes cib-rise {
		from { opacity: 0; transform: translateY(22px); }
		to   { opacity: 1; transform: none; }
	}
}
@media (prefers-reduced-motion: reduce) {
	.cib-card { animation: none !important; }
}

/* Targetes (contenidors amb classe cib-card) */
.cib-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.cib-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 40px rgba(0, 0, 0, .10) !important;
	border-color: var(--cib-gold) !important;
}

/* Targetes del loop amb la mateixa alçada i sense desbordaments */
.elementor-loop-container .e-loop-item { height: 100%; overflow: hidden; }
.elementor-loop-container .e-loop-item > .e-con,
.elementor-loop-container .e-loop-item > .e-con-inner { height: 100%; }
.e-loop-item img { max-width: 100% !important; }

/* Títols d'icon-box i targetes: mida continguda i sense talls lletjos */
.elementor-widget-icon-box .elementor-icon-box-title {
	font-size: 17px !important;
	overflow-wrap: break-word;
}
.e-loop-item h3 { overflow-wrap: break-word; }

/* Productes destacats (fitxa de representada) */
.cib-productes { margin: 10px 0 30px; }
.cib-productes h2 { margin-bottom: 20px; }
.cib-productes__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 18px;
}
.cib-producte {
	background: #fff;
	border: 1px solid #ECECEC;
	border-radius: 10px;
	padding: 20px 18px;
}
.cib-producte h3 { font-size: 16px; margin: 0 0 6px; }
.cib-producte p { font-size: 14px; color: var(--cib-text); margin: 0; }

/* Newsletter */
.cib-newsletter { max-width: 460px; }
.cib-newsletter .cib-nl-hp { position: absolute !important; left: -9999px; height: 0; width: 0; opacity: 0; }
.cib-newsletter__row { display: flex; gap: 8px; flex-wrap: wrap; }
.cib-newsletter__row button { flex-shrink: 0; }
.cib-newsletter__row input[type="email"] {
	flex: 1;
	min-width: 200px;
	background: #fff;
	border: 1px solid #E3DED4;
	border-radius: 6px;
	padding: 11px 14px;
	font-size: 14px;
}
.cib-newsletter__row input[type="email"]:focus {
	border-color: var(--cib-gold);
	box-shadow: 0 0 0 3px rgba(228, 168, 76, .18);
	outline: none;
}
.cib-newsletter__row button { border: 0; cursor: pointer; }
.cib-newsletter__consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 12.5px; color: #BBBBBB; }
.cib-newsletter__consent a { color: var(--cib-gold); }
.cib-newsletter__msg { margin: 8px 0 0; font-size: 13px; color: var(--cib-gold); min-height: 1em; }

/* Crèdit de l'agència al footer */
.cib-credit a { color: #777; text-decoration: none; border-bottom: 1px dotted #555; }
.cib-credit a:hover { color: var(--cib-gold); border-color: var(--cib-gold); }

/* Loop grid de representades: logo amb transició */
.e-loop-item img { transition: transform .3s ease, filter .3s ease; }
.e-loop-item:hover img { transform: scale(1.04); }

/* Menú de navegació */
.elementor-nav-menu--main .elementor-item { letter-spacing: .03em; transition: color .2s ease; }
.elementor-nav-menu--dropdown { border-top: 3px solid var(--cib-gold); box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.elementor-nav-menu--dropdown a { padding: 11px 18px; font-size: 13px; }

/* Formularis Elementor */
.elementor-form .elementor-field-textual {
	background: #fff;
	border: 1px solid #E3DED4;
	border-radius: 6px;
	padding: 12px 14px;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.elementor-form .elementor-field-textual:focus {
	border-color: var(--cib-gold);
	box-shadow: 0 0 0 3px rgba(228, 168, 76, .18);
	outline: none;
}
.elementor-form .elementor-button {
	transition: background-color .25s ease, transform .15s ease;
}
.elementor-form .elementor-button:hover { transform: translateY(-1px); }

/* Botons Elementor: micro-interacció */
.elementor-button { transition: background-color .25s ease, color .25s ease, transform .15s ease, box-shadow .25s ease; }
.elementor-button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.14); }

/* Breadcrumb de Rank Math */
.rank-math-breadcrumb { font-size: 13px; letter-spacing: .02em; }
.rank-math-breadcrumb a { color: var(--cib-gold); text-decoration: none; }
.rank-math-breadcrumb .separator { margin: 0 6px; opacity: .6; }

/* ── Contingut ric a les pàgines interiors (.cib-rich) ── */
.cib-rich .elementor-widget-text-editor > .elementor-widget-container > p:first-child,
.cib-rich .elementor-widget-text-editor p:first-of-type {
	font-size: 19px;
	line-height: 1.65;
	color: #333;
}
.cib-rich h2 {
	position: relative;
	padding-bottom: 12px;
	margin-top: 42px;
}
.cib-rich h2::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0;
	width: 56px; height: 3px;
	background: var(--cib-gold);
	border-radius: 2px;
}
.cib-rich h3 { margin-top: 30px; color: #2a2a2a; }
.cib-rich ul {
	list-style: none;
	padding: 0;
	margin: 22px 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
}
.cib-rich ul li {
	position: relative;
	background: #fff;
	border: 1px solid #EDEAE3;
	border-left: 3px solid var(--cib-gold);
	border-radius: 8px;
	padding: 13px 16px 13px 42px;
	font-size: 15px;
	line-height: 1.5;
	box-shadow: 0 3px 10px rgba(0,0,0,.04);
}
.cib-rich ul li::before {
	content: "✓";
	position: absolute;
	left: 15px; top: 12px;
	color: var(--cib-gold);
	font-weight: 700;
}
.cib-rich ul ul { display: block; margin: 6px 0 0; }
.cib-rich ul ul li { border: 0; box-shadow: none; padding: 2px 0 2px 20px; }
.cib-rich blockquote {
	border-left: 4px solid var(--cib-gold);
	background: var(--cib-light);
	margin: 24px 0;
	padding: 18px 22px;
	font-style: italic;
	border-radius: 0 8px 8px 0;
}

/* Imatge de capçalera de les pàgines interiors */
.cib-page-img img {
	width: 100%;
	height: 300px;
	object-fit: cover;
	border-radius: 14px;
	box-shadow: 0 18px 45px rgba(0,0,0,.12);
}

/* Botons-anchor de les plantilles (cib_link) */
a.cib-btn {
	display: inline-block;
	padding: 12px 28px;
	font-family: Montserrat, sans-serif;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: .02em;
	border-radius: 2px;
	text-decoration: none;
	border-bottom: none !important;
	transition: background-color .25s ease, color .25s ease, transform .15s ease, box-shadow .25s ease;
}
a.cib-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.14); }
a.cib-btn--gold { background: var(--cib-gold); color: var(--cib-dark) !important; }
a.cib-btn--gold:hover { background: var(--cib-dark); color: #fff !important; }
a.cib-btn--dark { background: var(--cib-dark); color: #fff !important; }
a.cib-btn--dark:hover { background: var(--cib-gold); color: var(--cib-dark) !important; }
a.cib-btn--ghost { background: transparent; color: var(--cib-dark) !important; border: 1px solid var(--cib-dark); }
a.cib-btn--ghost:hover { background: var(--cib-gold); border-color: var(--cib-gold); }

/* Selector d'idiomes WPML */
.cib-lang-switcher { display: flex; gap: 2px; align-items: center; font-size: 13px; font-weight: 600; }
.cib-lang-switcher a {
	padding: 4px 8px; border-radius: 4px; text-decoration: none;
	color: var(--cib-dark); text-transform: uppercase; letter-spacing: .05em;
	transition: background .2s ease, color .2s ease;
}
.cib-lang-switcher a:hover { background: var(--cib-light); }
.cib-lang-switcher .cib-lang-actiu a,
.cib-lang-switcher a.actiu { background: var(--cib-gold); color: var(--cib-dark); }

/* Al topbar fosc del header, el selector ha de ser clar */
.cib-lang-topbar .cib-lang-switcher a { color: #DDDDDD; }
.cib-lang-topbar .cib-lang-switcher a:hover { background: rgba(255,255,255,.12); color: #fff; }
.cib-lang-topbar .cib-lang-switcher a.actiu { background: var(--cib-gold); color: var(--cib-dark); }

