/* ==========================================================================
   CB Viladecans — estilos base del tema
   ========================================================================== */

/* Tipografia manuscrita dels titulars (Mistral). Si el dispositiu no la té instal·lada
   (mòbils, Mac...), es carrega una font web semblant allotjada al tema. */
@font-face {
	font-family: 'Mistral';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: local('Mistral'), local('Mistral Regular'), url('fonts/kaushan-script-latin.woff2') format('woff2');
}

:root {
	--cbv-dark: #182d30;
	--cbv-dark-2: #10201f;
	--cbv-green: #0a8650;
	--cbv-green-light: #1fae6d;
	--cbv-text: #222222;
	--cbv-text-light: #ffffff;
	--cbv-muted: #b7c2c1;
	--cbv-header-height: 76px;
	--cbv-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

a[href^="mailto:"] {
	color: var(--cbv-green);
	font-weight: 700;
}

body {
	font-family: var(--cbv-font);
	color: var(--cbv-text);
	margin: 0;
	padding-top: var(--cbv-header-height);
}

/* Plantilla "canvas" de Elementor (portada /app): sin cabecera fija, sin hueco superior. */
body.elementor-template-canvas {
	padding-top: 0;
}

a {
	text-decoration: none;
	color: inherit;
}

img {
	max-width: 100%;
	display: block;
}

/* ---------- Header ---------- */

.cbv-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background: var(--cbv-dark);
	height: var(--cbv-header-height);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.cbv-header__inner {
	max-width: 1280px;
	margin: 0 auto;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
	gap: 24px;
}

.cbv-header__logo img {
	height: 52px;
	width: auto;
}

.cbv-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

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

.cbv-menu > li {
	position: relative;
}

.cbv-menu > li > a,
.cbv-menu > li > a:visited {
	display: block;
	padding: 12px 16px;
	color: var(--cbv-text-light);
	font-size: 15px;
	font-weight: 500;
	border-radius: 6px;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.cbv-menu > li > a:hover,
.cbv-menu > li.current-menu-item > a {
	background-color: rgba(255, 255, 255, 0.08);
	color: var(--cbv-green-light);
}

.cbv-menu ul {
	list-style: none;
	margin: 0;
	padding: 8px;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 240px;
	background: var(--cbv-dark);
	border-radius: 8px;
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all 0.15s ease;
}

.cbv-menu > li:hover > ul,
.cbv-menu > li:focus-within > ul {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.cbv-menu ul li a {
	display: block;
	padding: 10px 12px;
	color: var(--cbv-muted);
	font-size: 14px;
	border-radius: 6px;
}

.cbv-menu ul li a:hover {
	background-color: rgba(255, 255, 255, 0.08);
	color: var(--cbv-text-light);
}

.cbv-header__actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.cbv-header__cart {
	position: relative;
	color: var(--cbv-text-light);
	display: flex;
}

.cbv-header__cart-count {
	position: absolute;
	top: -6px;
	right: -10px;
	background: var(--cbv-green);
	color: #fff;
	font-size: 11px;
	line-height: 1;
	padding: 3px 5px;
	border-radius: 999px;
	min-width: 16px;
	text-align: center;
}

.cbv-header__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px;
	height: 32px;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 0;
}

.cbv-header__toggle span {
	display: block;
	height: 2px;
	background: var(--cbv-text-light);
	border-radius: 2px;
}

/* ---------- Home: seccions "targeta" ---------- */

.cbv-card-section {
	background: #f2f5f4;
	border: 1.5px solid #d7ddd9;
	border-radius: 18px;
	box-shadow: 0 6px 22px rgba(16, 32, 31, 0.06);
	max-width: 1232px;
	margin: 18px auto !important;
}

.cbv-card-section--bottom {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	border-bottom: 0;
	margin-bottom: 0 !important;
	box-shadow: none;
}

/* Filas de las páginas resumen (Club, Esdeveniments): mismo separador que el borde de la tarjeta. */
.cbv-card-section.cbv-card-row {
	border-top: 1.5px solid #d7ddd9;
}

.cbv-card-section .elementor-column {
	padding-left: 14px;
	padding-right: 14px;
}

.cbv-info-card > .elementor-widget-wrap {
	background: #f2f5f4;
	border: 1.5px solid #d7ddd9;
	border-radius: 18px;
	box-shadow: 0 6px 22px rgba(16, 32, 31, 0.06);
	padding: 32px 24px !important;
	margin: 0 12px;
}

@media (max-width: 767px) {
	.cbv-info-card > .elementor-widget-wrap {
		margin: 0 0 20px;
	}
}

.cbv-card-section--top {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	border-top: 0;
	margin-top: 0 !important;
}

/* ---------- Home ---------- */

.cbv-hero-buttons .elementor-widget-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.cbv-hero-buttons .elementor-widget-button {
	width: auto;
	margin: 0 !important;
}

.cbv-hero-social-col {
	position: absolute;
	right: 32px;
	bottom: 28px;
	z-index: 5;
	width: auto !important;
	animation: cbv-slide-in-right 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes cbv-slide-in-right {
	from {
		transform: translateX(120px);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

.cbv-hero-social-col .elementor-social-icon {
	width: 46px;
	height: 46px;
	border: 2px solid #c7cdcb;
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.cbv-hero-social-col .elementor-social-icon:hover {
	transform: scale(1.15);
	border-color: #ffffff;
}

.cbv-hero-social-col .elementor-social-icon-instagram {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.cbv-hero-social-col .elementor-social-icon-whatsapp {
	background-color: #25d366;
}

.cbv-hero-social-col .elementor-social-icon-facebook {
	background-color: #1877f2;
}

.cbv-hero-social-col .elementor-social-icon-phone {
	background-color: #0a8650;
}

@media (max-width: 900px) {
	.cbv-hero-social-col {
		position: static;
		margin-top: 16px;
	}
}

.cbv-ig-feed {
	background: #fafbfa;
	padding: 20px 0 24px;
}

.cbv-ig-feed__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 24px 16px;
	max-width: 1280px;
	margin: 0 auto;
}

.cbv-ig-feed__icon {
	font-size: 26px;
}

.cbv-ig-feed__head strong {
	color: var(--cbv-dark);
	font-size: 15px;
}

.cbv-ig-feed__head span {
	color: #6b7876;
	font-size: 13px;
}

.cbv-ig-feed__scroll {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 0 24px 8px;
	-webkit-overflow-scrolling: touch;
}

.cbv-ig-feed__scroll::-webkit-scrollbar {
	height: 8px;
}

.cbv-ig-feed__scroll::-webkit-scrollbar-thumb {
	background: #d7ddd9;
	border-radius: 8px;
}

.cbv-ig-item {
	flex: 0 0 auto;
	scroll-snap-align: start;
	width: 220px;
	height: 220px;
	border-radius: 10px;
	overflow: hidden;
	display: block;
}

.cbv-ig-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.cbv-ig-item:hover img {
	transform: scale(1.05);
}

/* Smash Balloon Instagram feed - force horizontal scroll instead of the default grid */
#sb_instagram #sbi_images {
	display: flex !important;
	flex-wrap: nowrap !important;
	overflow-x: auto !important;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 5px;
	gap: 5px !important;
}

#sb_instagram #sbi_images .sbi_item {
	flex: 0 0 110px !important;
	width: 110px !important;
	scroll-snap-align: start;
}

#sb_instagram #sbi_images::-webkit-scrollbar {
	height: 6px;
}

#sb_instagram #sbi_images::-webkit-scrollbar-thumb {
	background: #d7ddd9;
	border-radius: 8px;
}

#sb_instagram #sbi_load {
	display: none;
}

/* Shrink the whole feed block (header + photos) to about half size */
#sb_instagram.sbi {
	max-width: 640px;
	margin: 0 auto;
}

#sb_instagram .sb_instagram_header {
	padding: 6px 0 !important;
}

#sb_instagram .sbi_header_img,
#sb_instagram .sbi_header_img img {
	width: 40px !important;
	height: 40px !important;
}

#sb_instagram .sbi_header_link {
	font-size: 12px !important;
	gap: 6px;
}

#sb_instagram .sbi_bio {
	font-size: 11px !important;
}

@media (max-width: 600px) {
	.cbv-ig-item {
		width: 150px;
		height: 150px;
	}
}

.cbv-fcbq-col h3 {
	color: var(--cbv-dark);
	margin-bottom: 16px;
}

.cbv-fcbq-list {
	display: flex;
	flex-direction: column;
	gap: 0;
	border: 1px solid #b9d9c7;
	border-radius: 8px;
	overflow: hidden;
}

/* Cada partit: franja alterna en dos verds clars i una ratlla que el separa del següent */
.cbv-fcbq-row {
	background: #eef8f1;
	border-bottom: 1px solid #b9d9c7;
	padding: 12px 16px;
}

.cbv-fcbq-row:nth-child(even) {
	background: #dcefe3;
}

.cbv-fcbq-row:last-child {
	border-bottom: 0;
}

.cbv-fcbq-teams {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--cbv-dark);
}

.cbv-fcbq-teams--stack {
	justify-content: flex-start;
	font-weight: 500;
	color: #333;
}

.cbv-fcbq-teams--stack span:nth-child(2) {
	color: #8a9694;
	font-weight: 400;
	margin: 0 4px;
}

.cbv-fcbq-scores {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 20px;
	color: var(--cbv-green);
	margin-top: 4px;
}

.cbv-fcbq-date {
	font-size: 13px;
	font-weight: 700;
	color: var(--cbv-green);
	margin-bottom: 4px;
}

.cbv-fcbq-comp {
	font-size: 12px;
	color: #55625f;
	margin-top: 4px;
}

.cbv-fcbq-empty {
	color: #8a9694;
	font-size: 14px;
}

.cbv-event-card {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	padding-bottom: 24px !important;
	margin: 0 12px;
}

.cbv-event-card img {
	border-radius: 0;
}

@media (max-width: 767px) {
	.cbv-event-card {
		margin: 0 0 20px;
	}
}

/* ---------- Footer: patrocinadors i app ---------- */

.cbv-footer__sponsors {
	max-width: 1280px;
	margin: 0 auto;
	padding: 40px 24px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding-bottom: 40px;
}

.cbv-footer__sponsors-label {
	display: block;
	color: var(--cbv-text-light);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 12px;
}

.cbv-footer__sponsors-logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

.cbv-footer__sponsor-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 56px;
	background: #fff;
	border-radius: 6px;
	padding: 6px 14px;
}

.cbv-footer__sponsor-logo img {
	height: 100%;
	width: auto;
	max-width: 160px;
	object-fit: contain;
}

.cbv-footer__app img {
	height: 72px;
	width: auto;
	border-radius: 6px;
}

/* ---------- Footer ---------- */

.cbv-footer {
	background: var(--cbv-dark-2);
	color: var(--cbv-muted);
	margin-top: 64px;
}

.cbv-footer__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 56px 24px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 32px;
}

.cbv-footer__logo {
	height: 56px;
	width: auto;
}

.cbv-footer h3 {
	color: var(--cbv-text-light);
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin: 0 0 12px;
}

.cbv-footer p {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.6;
}

.cbv-footer a:hover {
	color: var(--cbv-green-light);
}

.cbv-footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cbv-footer-menu li {
	margin-bottom: 8px;
	font-size: 14px;
}

.cbv-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	text-align: center;
	padding: 20px 24px;
	font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.cbv-header__toggle {
		display: flex;
	}

	.cbv-header__nav {
		position: fixed;
		top: var(--cbv-header-height);
		left: 0;
		right: 0;
		bottom: 0;
		background: var(--cbv-dark);
		flex-direction: column;
		justify-content: flex-start;
		padding: 16px;
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform 0.2s ease;
	}

	.cbv-header__nav.is-open {
		transform: translateX(0);
	}

	.cbv-menu {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.cbv-menu ul {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		background: rgba(255, 255, 255, 0.04);
		display: none;
	}

	.cbv-menu > li.is-open > ul {
		display: block;
	}
}

/* ---------- Pàgines de contingut simples (plantilles PHP planes, sense Elementor) ---------- */

.cbv-page-hero {
	background: var(--cbv-dark);
	padding: 56px 24px;
	text-align: center;
}

.cbv-page-hero__inner {
	max-width: 900px;
	margin: 0 auto;
}

.cbv-page-hero h1 {
	color: #ffffff;
	font-size: 40px;
	font-weight: 800;
	margin: 0 0 8px;
}

.cbv-page-hero__tagline {
	color: #e7f5ee;
	font-size: 20px;
	font-style: italic;
	margin: 0;
}

/* ---------- Notícies ---------- */

.cbv-news-grid {
	padding: 40px 24px;
}

/* Llista de notícies sense fotografia: data a l'esquerra, text a la dreta. */
.cbv-news-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 920px;
	margin: 0 auto;
}

.cbv-news-item {
	display: flex;
	align-items: center;
	gap: 20px;
	color: inherit;
	text-decoration: none;
	background: #ffffff;
	border: 1px solid #e2e7e5;
	border-radius: 12px;
	padding: 18px 22px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cbv-news-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(16, 32, 31, 0.1);
}

.cbv-news-item__date {
	flex: 0 0 72px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 10px 0;
	border-radius: 10px;
	background: var(--cbv-green);
	color: #ffffff;
	line-height: 1.1;
	text-transform: uppercase;
}

.cbv-news-item__day {
	font-size: 26px;
	font-weight: 800;
}

.cbv-news-item__month {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
}

.cbv-news-item__year {
	font-size: 11px;
	opacity: 0.85;
}

.cbv-news-item__body {
	min-width: 0;
}

.cbv-news-item__title {
	color: var(--cbv-dark);
	font-size: 19px;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.3;
}

.cbv-news-item__excerpt {
	color: #5b6664;
	font-size: 14px;
	line-height: 1.55;
	margin: 0 0 8px;
}

.cbv-news-item__more {
	color: var(--cbv-green);
	font-size: 13px;
	font-weight: 700;
}

.cbv-news-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 32px;
}

.cbv-news-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 8px;
	background: #ffffff;
	border: 1px solid #e2e7e5;
	color: var(--cbv-dark);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.cbv-news-pagination .page-numbers.current {
	background: var(--cbv-green);
	border-color: var(--cbv-green);
	color: #ffffff;
}

@media (max-width: 600px) {
	.cbv-page-hero h1 {
		font-size: 30px;
	}

	.cbv-news-item {
		gap: 14px;
		padding: 14px;
	}

	.cbv-news-item__date {
		flex-basis: 58px;
	}

	.cbv-news-item__day {
		font-size: 22px;
	}

	.cbv-news-item__title {
		font-size: 17px;
	}
}

/* ---------- Patrocinadors ---------- */

.cbv-sponsor-logo {
	display: flex;
	align-items: center;
	justify-content: center;
}

.cbv-sponsor-logo img {
	max-width: 220px;
	height: auto;
}

/* ---------- Imatges històriques ---------- */

.cbv-gallery-back {
	display: inline-block;
	margin-top: 16px;
	color: #e7f5ee;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.cbv-gallery-back:hover {
	text-decoration: underline;
}

.cbv-decades-grid {
	padding: 40px 24px;
}

.cbv-decades-grid__list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.cbv-decade-card {
	display: block;
	color: inherit;
	text-decoration: none;
	background: #ffffff;
	border: 1px solid #e2e7e5;
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cbv-decade-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(16, 32, 31, 0.1);
}

.cbv-decade-card__image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #e2e7e5;
}

.cbv-decade-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cbv-decade-card__body {
	padding: 14px 16px;
	text-align: center;
}

.cbv-decade-card__body h3 {
	color: var(--cbv-dark);
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 4px;
}

.cbv-decade-card__body span {
	color: var(--cbv-green);
	font-size: 13px;
	font-weight: 600;
}

.cbv-gallery-grid {
	padding: 40px 24px;
}

.cbv-gallery-grid__list {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
}

.cbv-gallery-grid__item {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
	background: #e2e7e5;
	cursor: zoom-in;
}

.cbv-gallery-grid__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.cbv-gallery-grid__item:hover img {
	transform: scale(1.06);
}

.cbv-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(10, 16, 15, 0.92);
	align-items: center;
	justify-content: center;
}

.cbv-lightbox:not([hidden]) {
	display: flex;
}

.cbv-lightbox[hidden] {
	display: none;
}

.cbv-lightbox__img {
	max-width: 90vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 4px;
}

.cbv-lightbox__close,
.cbv-lightbox__nav {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #ffffff;
	cursor: pointer;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 22px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cbv-lightbox__close:hover,
.cbv-lightbox__nav:hover {
	background: rgba(255, 255, 255, 0.24);
}

.cbv-lightbox__close {
	top: 20px;
	right: 20px;
}

.cbv-lightbox__nav--prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.cbv-lightbox__nav--next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

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

	.cbv-gallery-grid__list {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.cbv-decades-grid__list {
		grid-template-columns: repeat(2, 1fr);
	}

	.cbv-gallery-grid__list {
		grid-template-columns: repeat(2, 1fr);
	}

	.cbv-lightbox__nav {
		width: 36px;
		height: 36px;
		font-size: 18px;
	}
}

/* Resultats i pròxims partits (dades de la Federació): llista amb scroll */
.cbv-fcbq-scroll {
	max-height: 380px;
	overflow-y: auto;
	padding-right: 4px;
	margin-bottom: 8px;
}

.cbv-fcbq-scores .is-win {
	color: var(--cbv-green);
}

.cbv-fcbq-scores strong:not(.is-win) {
	color: #5b6664;
}

.cbv-fcbq-comp a {
	color: var(--cbv-green);
	text-decoration: none;
}

.cbv-fcbq-comp a:hover {
	text-decoration: underline;
}

.cbv-fcbq-updated {
	font-size: 12px;
	color: #8a9694;
	margin: 0 0 12px;
}

/* Banda verda de tancament de les plantilles PHP (notícies, galeries) */
.cbv-cloenda {
	background: #0a8650;
	padding: 40px 24px;
	text-align: center;
}

.cbv-cloenda__title {
	margin: 0;
	color: #ffffff;
	font-family: "Mistral", cursive;
	font-size: 40px;
	font-weight: 400;
	line-height: 1.2;
}
