/* ==========================================================================
   CDTH Web · Estil del web per als mòduls heretats
   Slider de notícies [noticies_slider] i feed d'Instagram [instagram_feed],
   amb el mateix sistema que el redisseny (portada, patrocinadors, peu, Promo):
   Montserrat · #CC0033 / #A3002A · #1F1A1B · grisos #F5F6F7 / #E6E8EB ·
   radi 12 px · títols de secció en majúscules espaiades amb filet vermell de 36 px.
   Es tria a CDTH → Opcions → «Disseny de notícies i Instagram» (Nou / Antic).
   ========================================================================== */

/* ── Títol de secció de la portada (com Patrocinadors i Institucions) ── */
.home7_section_area .centertitle h2 {
	margin: 0 0 30px !important; padding: 0 !important;
	font: 800 15px/1.3 Montserrat, "Helvetica Neue", Arial, sans-serif !important;
	letter-spacing: .16em !important; text-transform: uppercase; color: #1F1A1B !important;
}
.home7_section_area .centertitle h2 span { color: inherit !important; }
.home7_section_area .centertitle h2::after { content: ""; display: block; width: 36px; height: 3px; margin: 12px auto 0; border-radius: 2px; background: #CC0033; }
.home7_section_area { padding: 56px 0 60px !important; background: #FFFFFF !important; }
.home1_section_area { background: #F5F6F7 !important; }

/* ==========================================================================
   NOTÍCIES
   ========================================================================== */
.rps-wrap {
	--cdt-red: #CC0033; --cdt-text: #1F1A1B; --cdt-muted: #5E6168; --cdt-border: #E6E8EB; --cdt-bg: #F5F6F7; --cdt-cat-text: #CC0033;
	padding: 56px 0 60px !important; background: #F5F6F7 !important;
	font-family: Montserrat, "Helvetica Neue", Arial, sans-serif; color: #1F1A1B;
}
.rps-wrap .rps-inner { max-width: 1180px; padding: 0 20px; }

/* Capçalera: avantítol, títol amb filet i, a la dreta, «Totes» + fletxes */
.rps-wrap .rps-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 26px; }
.rps-wrap .rps-k { margin: 0 0 6px !important; font: 800 12.5px/1.3 Montserrat, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #CC0033; }
.rps-wrap .rps-h { margin: 0 !important; padding: 0 !important; font: 800 clamp(24px, 2.4vw, 30px)/1.15 Montserrat, sans-serif !important; letter-spacing: -.01em !important; text-transform: none !important; color: #1F1A1B !important; }
.rps-wrap .rps-h::after { content: ""; display: block; width: 36px; height: 3px; margin-top: 12px; border-radius: 2px; background: #CC0033; }
.rps-wrap .rps-head-r { display: flex; align-items: center; gap: 18px; }
.rps-wrap .rps-all { display: inline-flex; align-items: center; gap: 8px; font: 800 13px/1 Montserrat, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #CC0033 !important; text-decoration: none !important; white-space: nowrap; transition: gap .2s; }
.rps-wrap .rps-all svg { width: 15px; height: 15px; }
.rps-wrap .rps-all:hover { gap: 12px; }
.rps-wrap .rps-nav-bar { margin: 0; gap: 8px; }
.rps-wrap .rps-btn { width: 44px; height: 44px; border: 1px solid #E6E8EB !important; border-radius: 50% !important; background: #FFFFFF !important; color: #1F1A1B !important; box-shadow: 0 2px 6px rgba(31,26,27,.05); transition: background .2s, border-color .2s, color .2s, box-shadow .2s; }
.rps-wrap .rps-btn:hover, .rps-wrap .rps-btn:focus-visible { background: #CC0033 !important; border-color: #CC0033 !important; color: #FFFFFF !important; box-shadow: 0 8px 18px rgba(204,0,51,.25); }
.rps-wrap .rps-btn:focus-visible { outline: 3px solid rgba(204,0,51,.35); outline-offset: 2px; }
.rps-wrap .rps-btn:disabled { opacity: .4; box-shadow: none; }

/* Pista i targetes */
.rps-wrap .rps-overflow { margin: -8px; padding: 8px; } /* que l'ombra no es talli */
.rps-wrap .rps-track { gap: 24px !important; }
.rps-wrap .rps-card { flex: 0 0 calc((100% - 48px) / 3); border: 1px solid #E6E8EB; border-radius: 12px !important; background: #FFFFFF; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.rps-wrap .rps-card:hover, .rps-wrap .rps-card:focus-within { border-color: #CC0033; box-shadow: 0 10px 24px rgba(31,26,27,.12); transform: translateY(-3px); }
.rps-wrap .rps-card-link:focus-visible { outline: 3px solid #CC0033; outline-offset: -3px; border-radius: 12px; }
.rps-wrap .rps-thumb { position: relative; aspect-ratio: 16 / 9; background: #E6E8EB; }
.rps-wrap .rps-thumb img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; transition: transform .5s cubic-bezier(.22,.61,.36,1); }
.rps-wrap .rps-card:hover .rps-thumb img { transform: scale(1.05); }

/* Etiqueta de secció: blanca sobre la foto, com a la Promo i la guia */
.rps-wrap .rps-cat { top: 12px; bottom: auto; left: 12px; padding: 6px 10px 5px; border-radius: 6px; background: #FFFFFF !important; color: #CC0033 !important; font: 800 11px/1.2 Montserrat, sans-serif; letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 4px 12px rgba(31,26,27,.15); }

/* Cos: títol, entradeta i peu amb data */
.rps-wrap .rps-body { padding: 18px 20px 18px !important; gap: 10px; }
.rps-wrap .rps-divider { display: none; }
.rps-wrap .rps-post-title { order: 1; font: 800 16.5px/1.32 Montserrat, sans-serif !important; letter-spacing: 0; color: #1F1A1B; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rps-wrap .rps-card:hover .rps-post-title { color: #CC0033; }
.rps-wrap .rps-excerpt { order: 2; font-size: 14px !important; line-height: 1.55; color: #5E6168; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rps-wrap .rps-meta { order: 3; margin-top: auto; padding-top: 14px; border-top: 1px solid #E6E8EB; gap: 16px; font-size: 12.5px !important; font-weight: 600; color: #5E6168; }
.rps-wrap .rps-meta svg { width: 13px; height: 13px; color: #CC0033; }
.rps-wrap .rps-read-more { display: none; } /* tota la targeta ja és l'enllaç */

/* Punts: barretes arrodonides */
.rps-wrap .rps-dots { margin-top: 26px; gap: 6px; }
.rps-wrap .rps-dot { width: 8px; height: 8px; border-radius: 4px; background: #D5D8DD; transform: none !important; transition: width .3s, background .3s; }
.rps-wrap .rps-dot.is-active { width: 26px; background: #CC0033; }

@media (max-width: 900px) {
	.rps-wrap .rps-card { flex: 0 0 calc((100% - 24px) / 2); }
}
@media (max-width: 700px) {
	.rps-wrap .rps-head { flex-wrap: wrap; align-items: flex-end; }
	.rps-wrap .rps-all { order: 2; }
}
@media (max-width: 560px) {
	.rps-wrap { padding: 40px 0 44px !important; }
	.rps-wrap .rps-inner { padding: 0 4px; }
	.rps-wrap .rps-card { flex: 0 0 100%; }
	.rps-wrap .rps-head { margin-bottom: 20px; }
	.rps-wrap .rps-head-r { width: 100%; justify-content: space-between; }
	.rps-wrap .rps-btn { width: 40px; height: 40px; }
}

/* ==========================================================================
   INSTAGRAM
   ========================================================================== */
.cdt-ig-wrap { --ig-accent: #CC0033; max-width: 1180px; margin: 0 auto; padding: 0 20px; font-family: Montserrat, "Helvetica Neue", Arial, sans-serif; }
.cdt-ig-wrap.cdt-ig-fullwidth { max-width: none; padding: 0 20px; }

/* Capçalera: compte i botó */
.cdt-ig-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.cdt-ig-acc { display: inline-flex; align-items: center; gap: 12px; color: #1F1A1B !important; text-decoration: none !important; }
.cdt-ig-acc-i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #CC0033; color: #FFFFFF; transition: transform .2s; }
.cdt-ig-acc:hover .cdt-ig-acc-i { transform: rotate(-8deg) scale(1.05); }
.cdt-ig-acc-t { display: flex; flex-direction: column; line-height: 1.2; }
.cdt-ig-acc-t b { font-size: 16px; font-weight: 800; }
.cdt-ig-acc-t small { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5E6168; }
.cdt-ig-follow { display: inline-flex; align-items: center; justify-content: center; gap: .34em; min-height: 44px; white-space: nowrap; padding: 0 20px; border-radius: 8px; background: #CC0033; color: #FFFFFF !important; font: 800 13px/1 Montserrat, sans-serif; letter-spacing: .04em; text-transform: uppercase; text-decoration: none !important; transition: background .2s, box-shadow .2s; }
.cdt-ig-follow:hover, .cdt-ig-follow:focus-visible { background: #A3002A; box-shadow: 0 8px 18px rgba(204,0,51,.25); }

/* Graella: separació i radi del web */
.cdt-ig-wrap .cdt-ig-grid { gap: 14px !important; }
.cdt-ig-wrap .cdt-ig-item { border-radius: 12px; background: #E6E8EB; isolation: isolate; transition: box-shadow .25s, transform .25s; }
.cdt-ig-wrap .cdt-ig-item:hover, .cdt-ig-wrap .cdt-ig-item:focus-visible { box-shadow: 0 12px 26px rgba(31,26,27,.16); transform: translateY(-3px); }
.cdt-ig-wrap .cdt-ig-item:focus-visible { outline: 3px solid #CC0033; outline-offset: 3px; }
.cdt-ig-wrap .cdt-ig-thumb img { transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.cdt-ig-wrap .cdt-ig-item:hover .cdt-ig-thumb img { transform: scale(1.05); }

/* Capa: degradat vermell des de baix amb el text de la publicació */
.cdt-ig-wrap .cdt-ig-overlay { justify-content: flex-end; align-items: flex-start; gap: 8px; padding: 18px; background: linear-gradient(180deg, rgba(163,0,42,0) 35%, rgba(163,0,42,.92)) !important; opacity: 0; }
.cdt-ig-wrap .cdt-ig-item:hover .cdt-ig-overlay, .cdt-ig-wrap .cdt-ig-item:focus-visible .cdt-ig-overlay { opacity: 1; }
.cdt-ig-wrap .cdt-ig-overlay-cap { order: 1; max-width: none; font-size: 13px; font-weight: 600; line-height: 1.45; text-align: left; text-shadow: none; -webkit-line-clamp: 3; }
.cdt-ig-wrap .cdt-ig-overlay-icon { position: absolute; top: 14px; right: 14px; }
.cdt-ig-wrap .cdt-ig-overlay-icon svg { width: 22px; height: 22px; }
.cdt-ig-wrap .cdt-ig-badge { top: 12px; left: 12px; right: auto; border-radius: 6px; background: rgba(31,26,27,.65) !important; backdrop-filter: blur(4px); }

/* Emojis del text: en línia (el CSS antic posava totes les <img> de la foto a tota la mida) */
.cdt-ig-wrap .cdt-ig-thumb img.emoji, .cdt-ig-wrap .cdt-ig-overlay img { position: static !important; display: inline !important; width: 1.1em !important; height: 1.1em !important; margin: 0 .1em !important; vertical-align: -.15em; transform: none !important; }

/* Opció «sense text»: cap capa, la foto només s'amplia */
.cdt-ig-wrap.cdt-ig-net .cdt-ig-overlay { display: none; }

/* Lightbox amb el radi i els colors del web */
.cdt-ig-lb-box { border-radius: 12px; overflow: hidden; }
.cdt-ig-lb-close:hover, .cdt-ig-lb-nav:hover { background: #CC0033 !important; }
.cdt-ig-lb-nav { border-radius: 50% !important; }

/* Botó del peu (si es fa servir sense la capçalera) */
.cdt-ig-wrap .cdt-ig-follow-btn { border-radius: 8px; background: #CC0033 !important; }

@media (hover: none) {
	/* Mòbil: sense capa, que tapa la foto en tocar */
	.cdt-ig-wrap .cdt-ig-overlay { display: none; }
}
@media (max-width: 900px) {
	.cdt-ig-wrap .cdt-ig-grid { gap: 10px !important; }
}
@media (max-width: 560px) {
	.home7_section_area { padding: 40px 0 44px !important; }
	.cdt-ig-wrap { padding: 0 4px; }
	.cdt-ig-wrap .cdt-ig-grid { gap: 8px !important; }
	.cdt-ig-wrap .cdt-ig-item { border-radius: 10px; }
	.cdt-ig-head { margin-bottom: 16px; }
	.cdt-ig-acc-i { width: 40px; height: 40px; }
	.cdt-ig-acc-t b { font-size: 15px; }
	.cdt-ig-follow { min-height: 40px; padding: 0 16px; font-size: 12px; }
	.cdt-ig-follow-x { display: none; }
}

/* Files senceres a cada pantalla: el PHP marca les publicacions que sobren
   a tauleta (.cdt-ig-xt) i a mòbil (.cdt-ig-xm) segons les columnes de cada una */
@media (min-width: 561px) and (max-width: 900px) { .cdt-ig-wrap .cdt-ig-xt { display: none; } }
@media (max-width: 560px) { .cdt-ig-wrap .cdt-ig-xm { display: none; } }

@media (prefers-reduced-motion: reduce) {
	.rps-wrap *, .cdt-ig-wrap * { transition: none !important; }
}
