/*
Theme Name: Hello Elementor Child
Theme URI: https://www.bylit.cat/themes/child-horacatalana
Description: Tema fill de Hello Elementor
Author: ByLit Studio Lab
Author URI: https://www.bylit.cat
Template: hello-elementor
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hello-elementor-child
*/

/* Personalització per al rellotge digital */
#rellotge-digital {
	font-family: Arial, sans-serif;
	font-size: 4rem;
	font-weight: bold;
	text-align: center;
	color: #333;
	background: #f4f4f4;
	padding: 20px;
	border-radius: 10px;
	display: inline-block;
	margin: 20px auto;
}
/* --- Seccions de contingut --- */
#speech .btn{
		border: 1px solid #6a0105;
}
#speech .btn:hover{
	border: 1px solid #ffffff;
	color:#ffffff;
	background-color: #6a0105;
}

/* --- Panell del campanar --- */
.slider-top.slider-campanar {
	max-width: 1180px;
	margin: 0 auto;
	padding: 4rem 1.25rem;
}

.slider-campanar #horacat {
	margin-bottom: 2rem;
	font-size: clamp(2.3rem, 5vw, 4.1rem);
	line-height: 1.08;
}

.slider-campanar #speech {
	margin-top: 1.25rem;
}

.campanar {
	--campanar-accent: #750b18;
	--campanar-active: #24613a;
	--campanar-ink: #211d1d;
	max-width: 960px;
	margin: 2.5rem auto 0;
	padding: clamp(1.5rem, 4vw, 3rem);
	text-align: left;
	color: var(--campanar-ink);
	background: #fffdf8;
	border: 1px solid rgba(117, 11, 24, .16);
	border-radius: 24px;
	box-shadow: 0 20px 50px rgba(78, 48, 0, .16);
}

.campanar-header {
	display: grid;
	grid-template-columns: 76px 1fr;
	align-items: center;
	gap: 1.25rem;
	padding-bottom: 1.75rem;
	border-bottom: 1px solid #eadfd7;
}

.campanar-icon {
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	color: #fff;
	background: var(--campanar-accent);
	border-radius: 22px;
	box-shadow: 0 10px 24px rgba(117, 11, 24, .22);
	transition: background .25s ease, transform .25s ease;
}

.campanar-icon svg {
	width: 46px;
	height: 46px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.campanar.is-active .campanar-icon {
	background: var(--campanar-active);
	transform: rotate(-3deg);
}

.campanar-kicker {
	margin: 0 0 .3rem;
	color: var(--campanar-accent);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.campanar h2 {
	margin: 0 0 .45rem;
	color: var(--campanar-ink);
	font-size: clamp(1.65rem, 3vw, 2.35rem);
	line-height: 1.12;
}

.campanar-intro {
	max-width: 670px;
	margin: 0;
	color: #625958;
	font-size: 1rem;
	line-height: 1.55;
}

.campanar-controls {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
	gap: 2rem;
	align-items: stretch;
	padding: 2rem 0;
}

.campanar-stations {
	display: grid;
	gap: .75rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.campanar-stations legend {
	margin-bottom: .8rem;
	padding: 0;
	font-size: .95rem;
	font-weight: 800;
}

.campanar-station {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 1rem;
	min-height: 78px;
	padding: 1rem 1.1rem;
	cursor: pointer;
	background: #fff;
	border: 2px solid #e8dfda;
	border-radius: 14px;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.campanar-station:hover {
	border-color: #c9aaa9;
	transform: translateY(-1px);
}

.campanar-station:has(input:checked) {
	border-color: var(--campanar-accent);
	box-shadow: 0 6px 18px rgba(117, 11, 24, .1);
}

.campanar-station input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.campanar-station-copy {
	display: grid;
	gap: .2rem;
}

.campanar-station-copy strong {
	font-size: 1.05rem;
}

.campanar-station-copy small {
	color: #716765;
	font-size: .86rem;
}

.campanar-radio {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border: 2px solid #b6aaa7;
	border-radius: 50%;
}

.campanar-station input:checked ~ .campanar-radio {
	border-color: var(--campanar-accent);
}

.campanar-station input:checked ~ .campanar-radio::after {
	width: 10px;
	height: 10px;
	content: '';
	background: var(--campanar-accent);
	border-radius: 50%;
}

.campanar-station:has(input:focus-visible) {
	outline: 3px solid #f1bd33;
	outline-offset: 3px;
}

.campanar-actions {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: .75rem;
	padding: 1.25rem;
	text-align: center;
	background: #f5eee9;
	border-radius: 16px;
}

.campanar-selection {
	display: grid;
	gap: .2rem;
	margin-bottom: .25rem;
}

.campanar-selection > span,
.campanar-live span {
	color: #716765;
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.campanar-selection strong {
	font-size: 1.05rem;
	line-height: 1.3;
}

.campanar-selection small {
	color: #716765;
	font-size: .75rem;
}

.campanar-actions button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .65rem;
	min-height: 52px;
	padding: .8rem 1rem;
	cursor: pointer;
	font: inherit;
	font-weight: 800;
	border-radius: 10px;
	transition: transform .18s ease, background .18s ease;
}

.campanar-actions button[hidden] {
	display: none !important;
}

.campanar-actions button:hover {
	transform: translateY(-1px);
}

.campanar-toggle {
	color: #fff !important;
	background: var(--campanar-accent) !important;
	border: 2px solid var(--campanar-accent) !important;
}

.campanar-toggle[aria-pressed="true"] {
	background: var(--campanar-active) !important;
	border-color: var(--campanar-active) !important;
}

.campanar-toggle-icon {
	font-size: .8rem;
}

.campanar-prova {
	color: var(--campanar-accent) !important;
	background: #fff !important;
	border: 2px solid #caa7a7 !important;
}

.campanar-preview {
	display: grid;
	gap: .5rem;
}

.campanar-preview > strong {
	font-size: .85rem;
}

.campanar-preview > div {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .5rem;
}

.campanar-preview .campanar-prova {
	min-height: 44px;
	padding: .6rem;
	font-size: .78rem;
}

.campanar-live {
	display: grid;
	gap: .4rem;
	margin-top: .25rem;
	padding-top: .85rem;
	border-top: 1px solid #ded2ca;
}

.campanar-live p {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
}

.campanar-live p:first-child {
	min-height: 2.5em;
	align-items: center;
}

.campanar-live strong {
	font-size: .9rem;
	text-align: right;
}

#campanar-estat {
	display: flex;
	min-height: 2.5em;
	align-items: center;
	justify-content: flex-end;
	line-height: 1.25;
}

.campanar-fullscreen {
	color: var(--campanar-ink) !important;
	background: transparent !important;
	border: 1px solid #b9aaa3 !important;
}

.campanar-actions button:disabled,
.campanar-station:has(input:disabled) {
	cursor: wait;
	opacity: .55;
}

.campanar-estat {
	margin: .25rem 0 0;
	color: #554c4a;
	font-size: .92rem;
	font-weight: 800;
}

/* Mode per a instal·lacions i exposicions: conserva els controls útils i
   retira el marc de navegació i els elements redundants del rellotge. */
body.hc-exposicio {
	min-height: 100vh;
	background: #f5eee9;
}

body.hc-exposicio .elementor-location-footer,
body.hc-exposicio #site-footer,
body.hc-exposicio .site-footer,
body.hc-exposicio #hc-contrast-toggle {
	display: none !important;
}

body.hc-exposicio .elementor-location-header .elementor-widget:not(.elementor-widget-theme-site-logo),
body.hc-exposicio .elementor-location-header nav,
body.hc-exposicio .elementor-location-header .elementor-menu-toggle,
body.hc-exposicio #site-header nav,
body.hc-exposicio .site-header nav {
	display: none !important;
}

body.hc-exposicio .slider-top.slider-campanar {
	display: grid;
	min-height: 100vh;
	align-items: center;
	padding: 1.25rem;
}

body.hc-exposicio .slider-campanar > #horacat,
body.hc-exposicio .slider-campanar > #horanum,
body.hc-exposicio .slider-campanar > #diaespecial,
body.hc-exposicio .slider-campanar > #speech,
body.hc-exposicio .slider-campanar > br,
body.hc-exposicio .campanar-header,
body.hc-exposicio .campanar-schedule,
body.hc-exposicio .campanar-note {
	display: none !important;
}

body.hc-exposicio .campanar {
	width: min(960px, 100%);
	margin: 0 auto;
}

body.hc-exposicio .campanar-controls {
	padding: 0;
}

body.hc-exposicio .campanar-selection strong {
	font-size: clamp(1.3rem, 3vw, 2rem);
}

.campanar.is-active .campanar-estat {
	color: var(--campanar-active);
}

.campanar-schedule {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: .75rem;
	padding: 1.35rem 1rem;
	background: #241f1f;
	border-radius: 16px;
}

.campanar-schedule > div {
	position: relative;
	display: grid;
	grid-template-columns: 38px 1fr;
	align-items: center;
	gap: .65rem;
	color: #fff;
}

.campanar-schedule span {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	color: #211d1d;
	background: #f4c84b;
	border-radius: 50%;
	font-size: .78rem;
	font-weight: 900;
}

.campanar-schedule strong {
	font-size: .86rem;
}

.campanar-note {
	margin: 1rem 0 0;
	color: #716765;
	font-size: .82rem;
	text-align: center;
}

@media (max-width: 760px) {
	.campanar {
		border-radius: 18px;
	}

	.campanar-header {
		grid-template-columns: 58px 1fr;
	}

	.campanar-icon {
		width: 58px;
		height: 58px;
		border-radius: 16px;
	}

	.campanar-icon svg {
		width: 36px;
		height: 36px;
	}

	.campanar-controls {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.campanar-schedule {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 430px) {
	.campanar-header {
		grid-template-columns: 1fr;
	}

	.campanar-preview > div {
		grid-template-columns: 1fr;
	}

	.campanar-schedule {
		grid-template-columns: 1fr;
	}
}

.slider-top {
	text-align: center;
	padding: 6em 0;
}
.slider-top h1 {
	font-weight: 700;
	color: #010101;
}

#horacat{
	font-size: 3.1em;
	margin-bottom: 50px;
}
#horanum{
	font-weight: 700;
	font-size: 2.5em;
	color: #010101;
}

.numero {
	position: absolute;
	transform: translate(-50%, -50%);
	font-family: 'Courier New', monospace;
	font-size: 18px;
	z-index: 1;
	font-weight: bold;
	color: #333333;
}

.rellotge {
	position: relative;
	width: 250px;
	height: 250px;
	border: 2px solid #333333;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
}

.maneta {
	position: absolute;
	transform-origin: bottom;
	bottom: 50%;
	width: 50%;
	height: 5px;
	background-color: black;
	z-index: 2;
	border-radius: 3px;
	box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);

}

.centre {
	position: absolute;
	width: 10px;
	height: 10px;
	background-color: black;
	border-radius: 50%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
}

#hores {
	height: 60px; /* Ajusta l'alçada per fer-la més curta */
	width: 6px; /* Ample constant */

}

#minuts {
	height: 90px; /* Una mica més llarga que la de les hores */
	width: 4px; /* Una mica més estreta que la de les hores */
}

#segons {
	height: 100px; /* La més llarga */
	width: 2px;
	background-color: red;
}
/* --- Endevina l'hora --- */
#hora-practica {
	max-width: 600px;
	margin: 40px auto;
	padding: 30px;
	text-align: center;
	background: #f9f9f9;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#hora-practica h3 {
	font-size: 1.8rem;
	color: #333;
	margin-bottom: 20px;
}

#hora-aleatoria {
	font-size: 3.5rem;
	font-weight: bold;
	text-align: center;
	color: #fcba03;
	background: #fff;
	padding: 15px 25px;
	border-radius: 8px;
	display: inline-block;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	margin-bottom: 20px;
}

#resposta-usuari {
	font-size: 1.2rem;
	padding: 12px;
	width: 80%;
	max-width: 350px;
	border: 2px solid #ddd;
	border-radius: 5px;
	text-align: center;
	transition: border-color 0.3s;
}

#resposta-usuari:focus {
	border-color: #fcba03;
	outline: none;
}

.buttons-container {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 15px;
}

#comprovar-btn {
	font-size: 1.2rem;
	font-weight: bold;
	background: #fcba03;
	color: #fff;
	border: none;
	padding: 12px 25px;
	border-radius: 5px;
	cursor: pointer;
	transition: background 0.3s ease;
}

#comprovar-btn:hover {
	background: #e0a800;
}
#reload-btn {
	font-size: 1.2rem;
	background: #ddd;
	color: #333;
	border: none;
	padding: 9px;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.3s ease;
	margin-left: 30px;
}

#reload-btn:hover {
	background: #bbb;
}

#resultat {
	font-size: 1.3rem;
	text-align: center;
	background: #f9f9f9;
	padding: 20px;
	margin-top: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* === Mode Contrast Alt (fons negre, text blanc) === */
/* Paleta base amb variables (no trenca el que ja tens) */
:root {
  --hc-bg: #000;
  --hc-fg: #fff;
  --hc-muted: #cfcfcf;
  --hc-border: #444;
}

/* Estat activat: <html data-contrast="high"> */
html[data-contrast="high"] body {
  background: var(--hc-bg) !important;
  color: var(--hc-fg) !important;
}

/* Enllaços i focus visibles */
html[data-contrast="high"] a { color: var(--hc-fg) !important; text-decoration: underline; }
html[data-contrast="high"] a,
html[data-contrast="high"] button,
html[data-contrast="high"] a { text-decoration: none !important; }
html[data-contrast="high"] [role="button"] {
  outline: 2px dashed #fff; outline-offset: 2px;
}

/* --- Components que ja tens al tema --- */

/* Rellotge digital */
html[data-contrast="high"] #rellotge-digital {
  color: var(--hc-fg) !important;
  background: var(--hc-bg) !important;
  border: 2px solid var(--hc-fg);
}

/* Hero/top */
html[data-contrast="high"] .slider-top { background: var(--hc-bg) !important; }
html[data-contrast="high"] .slider-top h1,
html[data-contrast="high"] #horacat,
html[data-contrast="high"] #horanum,
html[data-contrast="high"] #diaespecial {
  color: var(--hc-fg) !important;
}

/* Botó de veu */
html[data-contrast="high"] #speech .btn {
  border-color: var(--hc-fg) !important;
  color: var(--hc-fg) !important;
  background: transparent !important;
}
html[data-contrast="high"] #speech .btn:hover {
  background: var(--hc-fg) !important;
  color: #000 !important;
}

html[data-contrast="high"] .campanar {
  background: var(--hc-bg) !important;
  border-color: var(--hc-fg) !important;
  box-shadow: none !important;
}
html[data-contrast="high"] .campanar-header { border-color: var(--hc-fg) !important; }
html[data-contrast="high"] .campanar-icon {
  color: #000 !important;
  background: var(--hc-fg) !important;
  box-shadow: none !important;
}
html[data-contrast="high"] .campanar-station,
html[data-contrast="high"] .campanar-actions,
html[data-contrast="high"] .campanar-schedule {
  background: var(--hc-bg) !important;
  border: 2px solid var(--hc-fg) !important;
}
html[data-contrast="high"] .campanar-station:has(input:checked) {
  box-shadow: 0 0 0 3px var(--hc-fg) !important;
}
html[data-contrast="high"] .campanar-radio { border-color: var(--hc-fg) !important; }
html[data-contrast="high"] .campanar-station input:checked ~ .campanar-radio::after {
  background: var(--hc-fg) !important;
}
html[data-contrast="high"] .campanar-toggle,
html[data-contrast="high"] .campanar-prova,
html[data-contrast="high"] .campanar-fullscreen {
  color: #000 !important;
  background: var(--hc-fg) !important;
  border-color: var(--hc-fg) !important;
}
html[data-contrast="high"] .campanar-selection > span,
html[data-contrast="high"] .campanar-selection small,
html[data-contrast="high"] .campanar-live span {
  color: var(--hc-fg) !important;
}
html[data-contrast="high"] .campanar-live { border-color: var(--hc-fg) !important; }
html[data-contrast="high"] .campanar-schedule span {
  color: #000 !important;
  background: var(--hc-fg) !important;
}

/* Rellotge analògic */
html[data-contrast="high"] .rellotge {
  border-color: var(--hc-fg) !important;
  box-shadow: none !important;
}
html[data-contrast="high"] .numero { color: var(--hc-fg) !important; }
html[data-contrast="high"] .maneta { background: var(--hc-fg) !important; }
html[data-contrast="high"] #segons { background: var(--hc-fg) !important; }
html[data-contrast="high"] .centre { background: var(--hc-fg) !important; }

/* Endevina l’hora (targeta + inputs + botons) */
html[data-contrast="high"] #hora-practica {
  background: var(--hc-bg) !important;
  color: var(--hc-fg) !important;
  box-shadow: none !important;
  border: 1px solid var(--hc-border);
}
html[data-contrast="high"] #hora-aleatoria {
  color: var(--hc-fg) !important;
  background: var(--hc-bg) !important;
  border: 1px solid var(--hc-border);
  box-shadow: none !important;
}
html[data-contrast="high"] #resposta-usuari {
  background: var(--hc-bg) !important;
  color: var(--hc-fg) !important;
  border-color: var(--hc-border) !important;
}
html[data-contrast="high"] #resposta-usuari::placeholder { color: #aaa; }

html[data-contrast="high"] #comprovar-btn {
  background: var(--hc-fg) !important;  /* blanc per contrast */
  color: #000 !important;
}
html[data-contrast="high"] #comprovar-btn:hover { filter: brightness(0.85); }

html[data-contrast="high"] #reload-btn {
  background: #222 !important;
  color: var(--hc-fg) !important;
}
html[data-contrast="high"] #reload-btn:hover { background: #2d2d2d !important; }

/* Si tens un logo fosc i el vols invertir només en contrast alt:
   afegeix la classe .invertible a la imatge del logo */
html[data-contrast="high"] img.invertible { filter: invert(1) hue-rotate(180deg); }

/* Sense línies d'outline ni contorns en contrast alt */
html[data-contrast="high"] a,
html[data-contrast="high"] button,
html[data-contrast="high"] [role="button"],
html[data-contrast="high"] .elementor-button {
  outline: none !important;
  box-shadow: none !important;
}
/* Textos base en blanc en mode contrast */
html[data-contrast="high"] body,
html[data-contrast="high"] p,
html[data-contrast="high"] h1,
html[data-contrast="high"] h2,
html[data-contrast="high"] h3,
html[data-contrast="high"] h4,
html[data-contrast="high"] h5,
html[data-contrast="high"] h6,
html[data-contrast="high"] li,
html[data-contrast="high"] .elementor-widget-text-editor,
html[data-contrast="high"] .elementor-heading-title,
html[data-contrast="high"] .elementor-icon-list-text { color: var(--hc-fg) !important; }
