/*
Theme Name: IL COMUNITARISTA
Theme URI:
Author: Matteo Di Bello
Author URI: www.mdbmilano.it
Description:
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags:
Text Domain: mdb

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/
.grecaptcha-badge {
    visibility: hidden !important;
}
body, html {
  overflow-x: hidden;
}

.post-categories {list-style-type: none; background-color:#c8071e; padding:2%; width:100%; margin-bottom:5px;}
.post-categories a {font-size:0.9rem; color:white;}
.admin-bar .navbar--fixed{top:32px;}
img {
  max-width: 100%;
  height:auto;
}
body{
  display: flex;
  min-height: 100vh;
  background-color: black !important;
  background-image: url("https://www.transparenttextures.com/patterns/concrete-wall-3.png");
  flex-direction: column;
  font-family: 'Montserrat', sans-serif;
}
.sidebar a {text-decoration: none; color:white !important;}
a {text-decoration: none; color:black;}
.main-content{
  flex:1;
}

.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

/* MENU
-------------------------------------------------------- */

.hamburger {
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 1001;
  transition: opacity 0.3s ease;
}

/* Menu base (desktop) */
.side-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: #111 url('https://www.transparenttextures.com/patterns/fabric-of-squares.png') repeat;
  color: white;
  overflow-y: auto;
  transition: right 0.4s ease-in-out, top 0.4s ease-in-out;
  z-index: 1000;
  padding: 2rem 1rem;
  box-shadow:0 0 16px black;
}

/* Mobile override */
@media (max-width: 767px) {
  .side-menu {
    top: -100%;
    right: 0;
    width: 100%;
    height: auto;
    padding-top: 3rem;
  }

  .side-menu.open {
    top: 0;
    right: 0;
  }
}

/* Desktop open state */
.side-menu.open {
  right: 0;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  z-index: 1001;
}

.side-menu-nav {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.side-menu-nav li a {
  color: white !important;
  display: block;
  padding: 10px 0;
  text-decoration: none;
}

.social-icons {
  margin-top: 2rem;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.social-icons a {
  color: white;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #1da1f2;
}


/* header
-------------------------------------------------------- */
.titlesite {text-align:left;}
.titlesite a {text-decoration: none;}
.navbar {background-color: transparent !important;}
.navbar .menu-item {margin-left: 10px;}
.navbar .menu-item a {color:white; text-decoration: none; transition: all 0.5s cubic-bezier(.215, .61, .355, 1);}
.navbar .menu-item a:hover {color:black;}
.socialicons {text-align:right;}
.socialicons a {color:#c8071e; transition: all 0.5s cubic-bezier(.215, .61, .355, 1);}
.socialicons a:hover {color:black;}
.msocialicons a {color:white; transition: all 0.5s cubic-bezier(.215, .61, .355, 1);}
.msocialicons a:hover {color:black;}
.navbar-toggler-icon {background-color: white; border-color: white;}
.btn-white-custom {
  background-color: white;
  color: black;
  border: 2px solid black;
  padding: 0.4rem 1rem;
  font-weight: bold;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-white-custom:hover {
  background-color: black;
  color: white;
}

@media (min-width:1200px){
}

@media (max-width:1199px){
}

@media (max-width:991px){
  .titlesite {text-align:center;}
  .socialicons {text-align:center; margin-top:2%;}
}

@media (max-width:767px){
}

/* IN EVIDENZA CAROSELLO
-------------------------------------------------------- */

/* Carosello principale */
.carousel-wrapper {
  width: 100%;
}

.carousel-custom {
  width: 75%;
  border: 10px solid #c8071e;
  border-radius: 10rem;
  box-shadow:0 0 16px black;
  overflow: hidden;
  position: relative;
}

/* Immagini in bianco e nero con transizione */
.carousel-image-wrapper img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 2s ease;
}

.carousel-item.active .carousel-image-wrapper img {
  filter: grayscale(0%);
}

.carousel-first .carousel-image-wrapper img {
  filter: grayscale(100%) !important;
}
.carousel-first.reveal .carousel-image-wrapper img {
  filter: grayscale(0%) !important;
}

/* Overlay nero sfumato */
.carousel-overlay {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
  z-index: 2;
}

/* Titolo */
.carousel-title-wrapper {
  position: absolute;
  bottom: 4rem;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
}

.carousel-title {
  background: rgba(200, 7, 30, 0.8);
  padding: 1rem;
  border-radius: 0.5rem;
  border:2px solid black;
  font-size: 1.5rem;
  max-width: 90%;
  color: white;
  text-align: center;
}

/* Call to action */
.carousel-cta {
  position: absolute;
  bottom: 2.5rem;
  width: 100%;
  z-index: 3;
  display: flex;
  justify-content: center;
}

/* Indicatori Bootstrap corretti */
.carousel-indicators {
  bottom: 0.8rem;
  z-index: 10;
  gap: 10px;
  margin: 0;
  display: flex;
  justify-content: center;
}

.carousel-indicators [data-bs-target] {
  background-color: white;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 1;
  border: none;
  margin: 0 5px;
  transition: background-color 0.3s ease;
}

.carousel-indicators .active {
  background-color: #c8071e;
}


.carousel-wrapper.animate-zoom {
  animation: zoomFadeIn 1.5s ease forwards;
  opacity: 0;
  transform: scale(0.8);
}

@keyframes zoomFadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .carousel-custom {
    width: 90%;
    border-radius: 2rem;
  }

  .carousel-image-wrapper img {
    aspect-ratio: 1 / 1 !important;
  }

  .carousel-title-wrapper,
  .carousel-cta {
    position: static;
    background: none;
    margin-top: 1rem;
    z-index: auto;
  }

  .carousel-title {
    background: none;
    color: white;
    font-size: 1.25rem;
    text-align: center;
    padding: 0.5rem 1rem;
  }

  .carousel-cta {
    margin-bottom: 1rem;
    justify-content: center;
  }

  .carousel-overlay {
    display: none;
  }

  .carousel-indicators {
    position: static;
    margin-top: 1rem;
  }
}

/* Landscape */

@media only screen

and (min-device-width: 375px)

and (max-device-width: 1200px)

and (-webkit-min-device-pixel-ratio: 2)

and (orientation: landscape) {
 .europee {background-attachment: scroll !important; background-position: center center; background-size: cover;}
}

/* SEZIONE ARTICOLI */
.article-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

/* Immagine quadrata */
.square-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem 0.5rem 0 0;
}

/* Contenitore del titolo visibile completamente */
.article-title-wrapper {
  background-color: #c8071e;
  min-height: 80px; /* Altezza fissa per uniformare */
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 0 0 0.5rem 0.5rem;
  width: 100%;
}

/* Titolo pienamente visibile */
.article-title-wrapper a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.3;
  width: 100%;
  display: block;
  word-wrap: break-word;
}


/* LIBRI
-------------------------------------------------------- */
.book-image-animate,
.book-author-animate,
.book-text-animate {
  opacity: 0;
  will-change: transform, opacity;
}

/* Quando diventano visibili */
.bounce-in-left,
.bounce-in-right,
.zoom-in.visible {
  opacity: 1;
}

/* Bounce da sinistra */
.bounce-in-left {
  animation: bounceInLeft 1.5s ease-out forwards;
}

/* Bounce da destra */
.bounce-in-right {
  animation: bounceInRight 1.5s ease-out forwards;
}

/* Zoom-in */
.zoom-in {
  transform: scale(0.85);
  transition: transform 1.2s ease-out, opacity 1.2s ease-out;
}

.zoom-in.visible {
  transform: scale(1);
}

/* Keyframes */
@keyframes bounceInLeft {
  0% {
    transform: translateX(-200px);
  }
  60% {
    transform: translateX(25px);
  }
  80% {
    transform: translateX(-10px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes bounceInRight {
  0% {
    transform: translateX(200px);
  }
  60% {
    transform: translateX(-25px);
  }
  80% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(0);
  }
}


/* Index
-------------------------------------------------------- */

.indexart {background-position: center center; background-size: cover; background-attachment: scroll; border:3px solid #c8071e;}
.categorie {background-color:#c8071e; color:white; padding-top:1%;}
.categorie a {color:white;}

@media (min-width:1200px){
}

@media (max-width:1199px){
}

@media (max-width:991px){
}

@media (max-width:767px){
}


/* Post
-------------------------------------------------------- */
.display-4 {font-size: 2.2rem; font-weight: bold; line-height: 1;}
.postcorpo {text-align:left;}
.postcorpo a, .postcorpo a:visited {color:#6e0101;transition:all 0.3s ease-in-out;}
.postcorpo a:hover {color:rgba(110,1,1,0.7); text-decoration: none;}
.postcorpo h3 {font-size:1.35rem;}
.imgpost {}
.imgpost img {border-top:3px solid black; border-bottom:3px solid black; width:100%; object-fit: cover !important; object-position: top center !important;}

/* ARTICOLO
-------------------------------------------------------- */
.book-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #222;
}
.book-card-paper {
  background-color: black;
  color:white;
  background-image: url('https://www.transparenttextures.com/patterns/clean-gray-paper.png');
  background-repeat: repeat;
  background-size: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  border:2px solid #c8071e;
}

/* Stile Amazon-style button */
.amazon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #FF9900;
  color: #111;
  font-weight: bold;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 0.3rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-size: 0.95rem;
}

.amazon-btn:hover {
  background-color: #e68a00;
  color: #111;
}

.amazon-btn i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}


/* CHI SONO
-------------------------------------------------------- */

/* Comments
-------------------------------------------------------- */
#comments{margin-bottom: 40px;}
.comments{padding-top: 40px;}
.comments textarea{width: 100%;}
.comments label{ min-width: 80px;}
.comments ul,
.comments ol{list-style-type: none;}
.comment-author img{border-radius: 999px; width:50px;}
.comment .reply{border-bottom:  1px solid #ccc; margin-bottom: 30px;padding-bottom: 10px;}


/* Input & textarea
-------------------------------------------------------- */
input,
textarea{padding: 5px 10px; border: 1px solid #ccc}
textarea {width:400px !important;}
.searchconsole input {width:80%;}


/* Widgets
-------------------------------------------------------- */
.widget_search .screen-reader-text{display: block;}
.widget_search #s{width:70%;float:left;}
.widget_search #searchsubmit{width:30%;float:left;background: #fff;}


/* pagination
-------------------------------------------------------- */
.pagination{margin-bottom:40px}
.page-numbers{display: inline-block;padding: 10px 15px;border: 1px solid #ddd;margin-right:4px;}

/* general wordpress style
-------------------------------------------------------- */




/* WordPress Core Styles
-------------------------------------------------------------- */
 .gallery-caption{padding:5px; font-size: 10px;}
 .bypostauthor{border-left: 3px solid #ddd;padding-left: 20px;}

.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float:right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%; /* Image does not overflow the content area */
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}

/* Text meant only for screen readers. */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
        white-space: nowrap;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	color: #21759b;
	display: block;
	font-size: 14px;
	font-size: 0.875rem;
	font-weight: bold;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000; /* Above WP toolbar. */
}

/* ! Box Sizing */
*,
*:before,
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}


/* Allineamento orizzontale tra bottone, hamburger e social */
.navbar .d-flex.align-items-center {
  gap: 1rem;
}

/* Rimuove i punti elenco dal menu */
.side-menu ul,
.side-menu li {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/* Spaziatura coerente per i link del menu */
.side-menu .nav-link {
  padding: 0.5rem 0;
  display: block;
  color: white;
  text-decoration: none;
}

.side-menu .nav-link:hover {
  color: #c8071e;
}
