/*
Theme Name: ReTer
Theme URI: https://www.reter.info/
Description: Tema del sito ReTer - Reti e Territorio. Ricostruisce la grafica del sito Joomla originale (Gantry 5 Hydrogen).
Version: 1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: reter
License: GPL-2.0-or-later
*/

@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/roboto-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/roboto-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: italic; font-weight: 700; font-display: swap; src: url("assets/fonts/roboto-latin-700-italic.woff2") format("woff2"); }

:root {
	--r-top: #4c1517;
	--r-nav: #a61f21;
	--r-nav-dark: #8c1a1c;
	--r-showcase: #722829;
	--r-accent: #bf383a;
	--r-accent-hover: #c94749;
	--r-text: #666;
	--r-heading: #444;
	--r-light: #f5f5f5;
	--r-border: #ddd;
	--r-footer: #ccc;
	--r-tag: #3a5a6e;
	--r-max: 75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: "Roboto", "Helvetica Neue", Arial, sans-serif; font-weight: 400; color: var(--r-text); background: #fff; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--r-accent); text-decoration: none; }
a:hover { color: var(--r-heading); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { font-weight: 500; color: var(--r-heading); line-height: 1.25; margin: 1.5rem 0 .75rem; }
h1 { font-size: 2.25rem; } h2 { font-size: 1.9rem; } h3 { font-size: 1.5rem; } h4 { font-size: 1.15rem; } h5 { font-size: 1rem; }
p { margin: 0 0 1rem; }
iframe { max-width: 100%; }
.r-container { max-width: var(--r-max); margin: 0 auto; padding: 0 .938rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* ---------- buttons ---------- */
.button, .r-button, input[type="submit"], button[type="submit"] {
	display: inline-block; padding: .5rem 1rem; border-radius: .1875rem; border: 0; cursor: pointer;
	background: var(--r-accent); color: #fff; font: 500 .9rem/1.5 "Roboto", sans-serif; box-shadow: 1px 1px 1px rgba(0,0,0,.1);
}
.button:hover, .r-button:hover, input[type="submit"]:hover { background: var(--r-accent-hover); color: #fff; }
.r-readmore { display: inline-block; margin-top: .5rem; padding: .3rem .8rem; font-size: .8rem; color: #333; background: #f7f7f7; border: 1px solid #ccc; border-radius: .2rem; }
.r-readmore::before { content: "\203A"; font-weight: 700; margin-right: .4rem; }
.r-readmore:hover { background: #e9e9e9; color: #333; }

/* ---------- header ---------- */
.r-top { background: var(--r-top); padding: .9rem 0 .7rem; }
.r-top .r-container { display: flex; align-items: center; justify-content: space-between; }
.r-logo img { display: block; height: 22px; width: auto; }
.r-menu-toggle { display: none; background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: .2rem; padding: .3rem .6rem; font-size: 1.1rem; cursor: pointer; }

.r-nav { background: var(--r-nav); text-align: center; position: relative; z-index: 20; }
.r-nav ul { list-style: none; margin: 0; padding: 0; }
.r-nav > .r-container > ul { display: flex; flex-wrap: wrap; justify-content: center; }
.r-nav li { position: relative; }
.r-nav > .r-container > ul > li > a { display: block; padding: 1.2rem .938rem; color: #fff; text-transform: uppercase; font-weight: 500; font-size: .875rem; letter-spacing: .02em; }
.r-nav > .r-container > ul > li:hover > a { background: var(--r-nav-dark); }
.r-nav > .r-container > ul > li.current-menu-item > a,
.r-nav > .r-container > ul > li.current-menu-ancestor > a,
.r-nav > .r-container > ul > li.current-page-ancestor > a,
.r-nav > .r-container > ul > li.current_page_parent > a { background: #fff; color: #555; }
.r-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .55em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); opacity: .7; }
.r-nav .menu-item-home > a::before { content: ""; display: inline-block; width: .85em; height: .8em; margin-right: .35em; vertical-align: -1px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'><path d='M8 0 0 7h2v8h4v-5h4v5h4V7h2z'/></svg>") no-repeat center/contain;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'><path d='M8 0 0 7h2v8h4v-5h4v5h4V7h2z'/></svg>") no-repeat center/contain; }
.r-nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 13rem; background: var(--r-nav-dark); text-align: left; padding: .3rem 0; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.r-nav .sub-menu .sub-menu { left: 100%; top: 0; }
.r-nav li:hover > .sub-menu, .r-nav li:focus-within > .sub-menu { display: block; }
.r-nav .sub-menu a { display: block; padding: .55rem 1rem; color: #fff; font-size: .875rem; }
.r-nav .sub-menu a:hover { background: rgba(0,0,0,.18); color: #fff; }
.r-nav .sub-menu .menu-item-has-children > a::after { transform: rotate(-45deg); float: right; margin-top: .45em; }

/* ---------- showcase (home) ---------- */
.r-showcase { background: var(--r-showcase) linear-gradient(180deg, #6d2526 0%, #7a2b2c 100%); color: #fff; text-align: center; padding: 2.2rem 0 3.2rem; }
.r-showcase .r-big-logo { display: block; width: min(560px, 90%); margin: 0 auto .6rem; }
.r-showcase p { max-width: 36rem; margin: 0 auto 1.2rem; font-size: .95rem; }
.r-showcase .button { background: var(--r-nav); font-size: .8rem; }
.r-showcase .button:hover { background: var(--r-nav-dark); }
.r-social { text-align: center; padding: 1.6rem 0 1rem; }
.r-social a { display: inline-block; margin: 0 .1rem; padding: .1rem .4rem; border: 1px solid #ccc; border-radius: .15rem; font-size: .72rem; color: var(--r-accent); background: #fff; }
.r-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; padding: 2.5rem 0 3.5rem; }
.r-feature svg { width: 3rem; height: 3rem; fill: #d89a9b; }
.r-feature h4 { text-transform: uppercase; font-size: .85rem; margin: .8rem 0 .7rem; color: #555; }
.r-feature p { font-size: .8rem; max-width: 15rem; margin: 0 auto 1rem; }
.r-feature .button { font-size: .75rem; }

/* ---------- breadcrumbs ---------- */
.r-breadcrumbs { background: var(--r-light); border-radius: .2rem; padding: .5rem 1rem; margin: 2rem 0 0; font-size: .8rem; color: #888; }
.r-breadcrumbs a { color: var(--r-accent); }
.r-breadcrumbs .sep { display: inline-block; margin: 0 .55rem; width: 0; height: 0; border-left: 4px solid var(--r-accent); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }

/* ---------- layout ---------- */
.r-main { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2.5rem; padding: 2rem 0 4rem; }
.r-main.r-full { grid-template-columns: minmax(0, 1fr); }
.r-content { font-size: .82rem; line-height: 1.6; }
.r-content h1.r-title { font-size: 1.6rem; margin-top: 1.5rem; }
.r-content ul { padding-left: 1.4rem; }
.r-content table { border-collapse: collapse; }
.r-content th, .r-content td { border: 1px solid var(--r-border); padding: .4rem .6rem; }
.r-content th { background: #f7f7f7; }
.r-content blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 4px solid #eee; color: #999; }
.r-meta { font-size: .78rem; color: #999; margin: .4rem 0 .8rem 1rem; }
.r-meta .r-cal { display: inline-block; width: .8rem; height: .8rem; margin-right: .3rem; vertical-align: -1px; background: #aaa;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 3h12v12H2zM3 6v8h10V6zM4 1h2v3H4zm6 0h2v3h-2zM4 7h2v2H4zm3 0h2v2H7zm3 0h2v2h-2zM4 10h2v2H4zm3 0h2v2H7z'/></svg>") no-repeat center/contain;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 3h12v12H2zM3 6v8h10V6zM4 1h2v3H4zm6 0h2v3h-2zM4 7h2v2H4zm3 0h2v2H7zm3 0h2v2h-2zM4 10h2v2H4zm3 0h2v2H7z'/></svg>") no-repeat center/contain; }
.r-tags { margin: .2rem 0 1rem; }
.r-tags a { display: inline-block; background: var(--r-tag); color: #fff; font-size: .62rem; font-weight: 700; padding: .1rem .35rem; border-radius: .15rem; margin: 0 .3rem .3rem 0; }
.r-tags a:hover { background: #2b4556; color: #fff; }
.r-form-note, .reter-form-note { display: block; background: #f7f0f0; border-left: 4px solid var(--r-accent); padding: .7rem 1rem; margin: 1rem 0; }

/* ---------- blog grids ---------- */
.r-grid { display: grid; gap: 2.2rem 1.6rem; }
.r-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r-card h2 { font-size: 1.35rem; margin: 0 0 .3rem; }
.r-card h2 a { color: var(--r-accent); }
.r-card h2 a:hover { color: var(--r-heading); }
.r-card .r-intro { font-size: .78rem; }
.r-card .r-intro img { display: block; margin-bottom: .6rem; }
.r-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 2.5rem; font-size: .75rem; }
.r-pagination .page-numbers { display: inline-block; padding: .2rem .55rem; border: 1px solid var(--r-border); margin-right: -1px; color: var(--r-accent); }
.r-pagination .page-numbers.current { color: #999; background: #f7f7f7; }
.r-pagination .r-pageof { color: #999; }

/* ---------- sidebar ---------- */
.r-aside { font-size: .8rem; }
.r-aside .widget { margin-bottom: 1.8rem; }
.r-aside .widget-title { font-size: 1.05rem; font-weight: 500; color: #555; margin: 0 0 .8rem; }
.r-aside ul { padding-left: 1rem; margin: 0; }
.r-aside li { margin-bottom: .25rem; }
.r-search input[type="search"] { width: 9rem; border: 1px solid var(--r-border); border-radius: 1rem; padding: .25rem .6rem; font: .75rem "Roboto", sans-serif; color: #666; }
.r-search .search-submit { display: none; }
.r-aside .tagcloud a, .r-aside .wp-block-tag-cloud a { color: var(--r-accent); margin-right: .25rem; line-height: 1.3; }

/* ---------- footer ---------- */
.r-footer { background: var(--r-footer); color: #333; border-top: 1px solid rgba(0,0,0,.05); padding: 2.5rem 0 1.5rem; font-size: .72rem; }
.r-footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.r-footer ul { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.r-footer a { color: var(--r-accent); font-weight: 700; }
.r-footer .r-col-title > a { text-transform: uppercase; }
.r-footer li li { line-height: 1.65; }
.r-copyright { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; font-size: .7rem; }
.r-copyright a { font-weight: 400; }

/* ---------- gallery ---------- */
.r-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 4px; margin: 1rem 0 1.5rem; }
.r-gallery a { display: block; aspect-ratio: 1; overflow: hidden; }
.r-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- newsletter list ---------- */
.reter-newsletter-list { list-style: none; padding: 0 !important; }
.reter-newsletter-list li { padding: .25rem 0; }
.reter-date { color: #999; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
	.r-main { grid-template-columns: minmax(0, 1fr); }
	.r-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
	.r-menu-toggle { display: inline-block; }
	.r-nav { display: none; text-align: left; }
	.r-nav.is-open { display: block; }
	.r-nav > .r-container > ul { display: block; }
	.r-nav > .r-container > ul > li > a { padding: .8rem 1rem; }
	.r-nav .sub-menu, .r-nav .sub-menu .sub-menu { display: block; position: static; box-shadow: none; padding-left: 1rem; }
	.r-features, .r-grid.cols-2, .r-grid.cols-3, .r-footer-cols { grid-template-columns: minmax(0, 1fr); }
	.r-copyright { flex-direction: column; }
}
