/*
Theme Name: Concussion Recovery
Theme URI: https://theconcussionrecoverycentre.com
Description: Tema a blocchi per The Concussion Recovery Centre. Ricostruisce l'aspetto del vecchio tema Themify Fullpane con blocchi nativi di Gutenberg: sezioni a tutta pagina, navigazione a pallini, menu in alto o in basso.
Author: numaber.it
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: concussion-recovery
*/

/* ---------- base (valori del tema originale Fullpane) ---------- */
html { scroll-behavior: smooth; }
@media (min-width: 681px) { html { scroll-snap-type: y proximity; } }
body {
	margin: 0;
	background: #222527;
	color: #aaa;
	font: 400 16px/1.7em Roboto, sans-serif, Arial;
	-webkit-font-smoothing: antialiased;
	word-wrap: break-word;
}
a { color: #ff3150; text-decoration: none; }
a:hover { text-decoration: underline; }
.wp-site-blocks { padding: 0 !important; }
.cg-page, .cg-page * { box-sizing: border-box; }
.cg-page h1, .cg-page h2, .cg-page h3, .cg-page h4, .cg-page h5, .cg-page h6 { margin: 0 0 .4em; }
.cg-page p { margin: 0 0 1.2em; }
.cg-page ul { margin: 0 0 1.4em; padding-left: 24px; }
.cg-page ul ul { margin: 10px 0 18px; }
/* liste nei moduli come Themify: 20px sopra, 28px sotto; sottoliste a cerchio */
.cg-page .cg-m ul.wp-block-list:not(.cg-icons) { margin: 20px 0 28px; }
.cg-page .cg-m ul.wp-block-list ul.wp-block-list { margin: 20px 0 28px; }
.cg-page .cg-m ul ul li { list-style-type: circle !important; }
.cg-page li { margin: 0 0 10px; }
/* immagini dei moduli: centrate e mai più larghe del contenitore */
.cg-page .cg-m .wp-block-image { margin-left: 0; margin-right: 0; }
.cg-page :where(.cg-m .wp-block-image) img { display: block; margin-left: auto; margin-right: auto; max-width: 100%; height: auto; }
/* SYMPTOMS: i quattro riquadri della stessa altezza quando sono affiancati */
@media (min-width: 681px) {
  .cg-cols.cg-sub-yyw736 { align-items: stretch !important; }
  .cg-sub-yyw736 > .cg-col { display: flex; flex-direction: column; }
  .cg-sub-yyw736 > .cg-col > .cg-m.cg-m:nth-child(2) { flex-grow: 1; margin-bottom: 0 !important; }
  .cg-sub-yyw736 > .cg-col > .cg-m.cg-m:nth-child(3) { margin-top: 0 !important; margin-bottom: 0 !important; }
}
/* mappe e altri embed: centrati e mai più larghi del contenitore */
.cg-page .cg-m iframe { display: block; margin-left: auto; margin-right: auto; max-width: 100%; }
/* link dentro i titoli: colore del titolo (come l'originale) */
.cg-page .cg-m :is(h1, h2, h3, h4, h5, h6) a { color: inherit; }
.cg-page figure { margin: 0; }
.cg-page img { max-width: 100%; height: auto; vertical-align: bottom; }
.cg-page .wp-block-image.aligncenter { display: block; text-align: center; margin-left: auto; margin-right: auto; }
.cg-page .wp-block-image.aligncenter img { margin-left: auto; margin-right: auto; display: block; }
.cg-page mark.has-inline-color { background: transparent; }

/* ---------- sezioni a tutta pagina (al posto di fullPage.js) ---------- */
.cg-section {
	position: relative;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	scroll-snap-align: start;
	overflow: hidden;
}
.cg-section > .cg-rowcol { width: 100%; }
/* come i moduli Themify: i margini interni non escono dal modulo */
.cg-m, .cg-rowcol { display: flow-root; }
.cg-rowcol { background-repeat: no-repeat; }

/* immagini */
.cg-img-circle img { border-radius: 800px; }

/* ---------- pulsanti ---------- */
.cg-page .cg-btn .wp-block-button__link {
	display: inline-block;
	font-family: Roboto, sans-serif, Arial;
	color: #ffeeed;
	background: #e8311f;
	text-align: center;
	white-space: nowrap;
	text-decoration: none;
	transition: all .2s ease-in-out;
}
.cg-page .cg-btn .wp-block-button__link:hover { filter: brightness(1.12); text-decoration: none; }
.cg-btn-arrow .wp-block-button__link::after {
	content: "";
	display: inline-block;
	width: 22px; height: 16px;
	margin-left: 9px;
	vertical-align: -2px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M0 7.3h21.2l-5.6-5.6 1-1L24 8l-7.4 7.3-1-1 5.6-5.6H0z'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M0 7.3h21.2l-5.6-5.6 1-1L24 8l-7.4 7.3-1-1 5.6-5.6H0z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- icone telefono / fax (pagina Contact) ---------- */
.cg-page ul.cg-icons { list-style: none; padding: 0; margin: 0; }
.cg-page ul.cg-icons li {
	display: flex; align-items: center; gap: 11px;
	min-height: 50px; margin: 0 0 6px;
	font-family: Roboto, sans-serif, Arial; font-size: 25px; line-height: 27.2px; color: #fff;
}
.cg-icons li::before {
	content: ""; flex: 0 0 50px; width: 50px; height: 50px; border-radius: 50%;
	background: #4d7de1 center / 24px no-repeat;
}
.cg-icons li.cg-ic-phone::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%23fff'%3E%3Cpath d='M497.4 361.8l-112-48a24 24 0 0 0-28 6.9l-49.6 60.6A370.7 370.7 0 0 1 130.6 204.1l60.6-49.6a23.9 23.9 0 0 0 6.9-28l-48-112A24.2 24.2 0 0 0 122.6.6l-104 24A24 24 0 0 0 0 48c0 256.5 207.9 464 464 464a24 24 0 0 0 23.4-18.6l24-104a24.3 24.3 0 0 0-14-27.6z'/%3E%3C/svg%3E"); }
.cg-icons li.cg-ic-fax::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%23fff'%3E%3Cpath d='M64 128H32a32 32 0 0 0-32 32v320a32 32 0 0 0 32 32h32a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32zm416 32V77.3a32 32 0 0 0-9.4-22.6L425.4 9.4A32 32 0 0 0 402.7 0H160a32 32 0 0 0-32 32v448a32 32 0 0 0 32 32h320a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32zM288 432a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm128 128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-112H192V64h160v48a16 16 0 0 0 16 16h48z'/%3E%3C/svg%3E"); }
@media (max-width: 1280px) {
	.cg-page ul.cg-icons li { flex-direction: column; align-items: flex-start; gap: 1px; margin-bottom: 6px; }
}
@media (max-width: 680px) {
	.cg-page ul.cg-icons li { flex-direction: row; align-items: center; gap: 11px; font-size: 20px; }
}

/* ---------- intestazione / menu ---------- */
.cg-header {
	position: fixed; left: 0; right: 0; top: -5px; z-index: 999;
	height: 70px; margin: 0;
	background: #1c1b2e;
}
.admin-bar .cg-header { top: 27px; }
.cg-menu-bottom .cg-header { top: auto; bottom: 0; }
.cg-header .cg-nav { position: absolute; right: 3%; top: 0; }
.cg-nav .wp-block-navigation__container { gap: 0; }
.cg-nav .wp-block-navigation-item__content {
	display: block;
	font-family: "Roboto Condensed", Arial, sans-serif; font-weight: 300; font-size: 16px; line-height: 16px;
	color: #757575 !important;
	padding: 20px 15px; margin: 0 0 0 1px;
	border-top: 4px solid #fff;
	text-decoration: none;
	transition: all .2s ease-in-out;
}
.cg-nav .wp-block-navigation-item__content:hover,
.cg-nav .wp-block-navigation-item__content:focus { border-top-color: #ee2c49; color: #ff3150 !important; text-decoration: none; }

/* sopra i 900px il menu e' sempre visibile; sotto diventa il pulsante MENU con pannello laterale */
@media (min-width: 901px) {
	.cg-nav .wp-block-navigation__responsive-container-open { display: none !important; }
	.cg-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: block !important; position: static !important; width: auto; background: transparent !important; padding: 0 !important;
	}
	.cg-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-close,
	.cg-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-dialog,
	.cg-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-content {
		display: block !important; padding: 0 !important; margin: 0 !important; position: static !important;
	}
	.cg-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
		display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: flex-start !important; gap: 0 !important;
	}
	.cg-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item { width: auto !important; }
	.cg-nav .wp-block-navigation__responsive-container-close { display: none !important; }
}
@media (max-width: 900px) {
	.cg-header .cg-nav { right: 0; top: 21px; }
	.cg-nav .wp-block-navigation__responsive-container-open {
		display: flex !important; align-items: center; gap: 8px;
		background: #fff; color: #222527; padding: 0 6px; height: 25px;
		font: 400 16px/25px Roboto, sans-serif, Arial; text-transform: uppercase;
	}
	.cg-nav .wp-block-navigation__responsive-container-open::after {
		content: ""; width: 16px; height: 12px;
		background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat,
		            linear-gradient(currentColor 0 0) center / 100% 2px no-repeat,
		            linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat;
	}
	.cg-nav .wp-block-navigation__responsive-container.is-menu-open {
		left: auto !important; right: 0; width: 250px; background: #000 !important; color: #fff !important;
		padding: 160px 25px 25px !important; animation: cg-slide-in .2s ease-out;
	}
	.cg-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 0 !important; }
	.cg-nav .is-menu-open .wp-block-navigation__container { gap: 0 !important; align-items: stretch !important; width: 100%; }
	.cg-nav .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid rgba(255,255,255,.2); }
	.cg-nav .is-menu-open .wp-block-navigation-item:last-child { border-bottom: 0; }
	.cg-nav .is-menu-open .wp-block-navigation-item__content { color: #fff !important; border-top: 0; padding: 10px 0; margin: 0; font-weight: 400; }
	.cg-nav .is-menu-open .wp-block-navigation-item__content:hover { color: #ee2c49 !important; }
	.cg-nav .wp-block-navigation__responsive-container-close { top: 20px; right: 20px; color: #fff; opacity: .6; }
	.cg-nav .wp-block-navigation__responsive-container-close:hover { opacity: 1; }
}
@keyframes cg-slide-in { from { transform: translateX(100%); } to { transform: none; } }

/* ---------- pallini di navigazione tra le sezioni (come #fp-nav) ---------- */
#cg-dots { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 100; margin: 0; padding: 0; list-style: none; }
#cg-dots li { display: block; width: 14px; height: 13px; margin: 7px; position: relative; }
#cg-dots a { display: block; width: 100%; height: 100%; position: relative; cursor: pointer; }
#cg-dots span {
	position: absolute; top: 2px; left: 2px; width: 6px; height: 6px; border-radius: 50%;
	background: #333; border: 2px solid rgba(88, 88, 88, .77);
	transition: all .1s ease-in-out;
}
#cg-dots a:hover span { width: 10px; height: 10px; top: 0; left: 0; }
#cg-dots a.active span { width: 10px; height: 10px; top: 1px; left: 1px; background: none; border-color: rgba(9, 134, 98, .8); }
#cg-dots a.active { transform: scale(1.0); }
.editor-styles-wrapper #cg-dots { display: none; }

/* ---------- animazioni di entrata (come WOW.js / animate.css) ---------- */
.cg-anim { animation-duration: 1s; animation-fill-mode: both; }
.cg-js .cg-anim:not(.cg-in) { opacity: 0; }
.cg-in.cg-anim-fadeInLeft { animation-name: cgFadeInLeft; }
.cg-in.cg-anim-fadeInRight { animation-name: cgFadeInRight; }
.cg-in.cg-anim-fadeIn { animation-name: cgFadeIn; }
.cg-in.cg-anim-flash { animation-name: cgFlash; }
.cg-in.cg-anim-pulse { animation-name: cgPulse; }
@keyframes cgFadeInLeft { from { opacity: 0; transform: translate3d(-100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes cgFadeInRight { from { opacity: 0; transform: translate3d(100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes cgFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cgFlash { 0%, 50%, 100% { opacity: 1; } 25%, 75% { opacity: 0; } }
@keyframes cgPulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
	.cg-anim { animation: none !important; opacity: 1 !important; }
	html { scroll-behavior: auto; }
}
.editor-styles-wrapper .cg-anim { opacity: 1 !important; animation: none !important; }
