/*==========================================================================
  site.css  -  francopastorino.com
  Unico foglio di stile del sito (sostituisce styles.css, other.css e gli
  <style> dentro le pagine). Le librerie (bootstrap, owl, magnific, ...)
  restano in css/libs/.

  1. Reset
  2. Tipografia
  3. Generale
  4. Header e menu
  5. Portfolio e gallerie (griglia isotope + lightbox)
  6. Pagine e articoli (base del tema)
  7. Footer
  8. Componenti del sito (cookie, about, caroselli, card, contatti, 404, blog)
==========================================================================*/

:root {
  --font-ui: 'Montserrat', sans-serif;
  --font-text: 'Lato', sans-serif;
  --c-ink: #000;
  --c-dark: #111;
  --c-muted: #999;
  --c-soft: #888;
  --c-line: #e0e0e0;
  --c-hover: #ababab;
}

/* =========== 1. Reset CSS  =========== */
img,
legend {
  border: 0;
}
legend,
td,
th {
  padding: 0;
}
html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
  display: block;
}
audio,
canvas,
progress,
video {
  display: inline-block;
  vertical-align: baseline;
}
audio:not([controls]) {
  display: none;
  height: 0;
}
[hidden],
template {
  display: none;
}
a {
  color: #000000;
  background-color: transparent;
}
a:hover,
a:active {
  outline: 0;
}
abbr[title] {
  border-bottom: 1px dotted;
}
b,
optgroup,
strong {
  font-weight: 700;
}
dfn {
  font-style: italic;
}
h1 {
  font-size: 2em;
  margin: .67em 0;
}
mark {
  background: #ffffff;
  color: #666666;
}
small {
  font-size: 80%;
}
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sup {
  top: -0.5em;
}
sub {
  bottom: -0.25em;
}
svg:not(:root) {
  overflow: hidden;
}
figure {
  margin: 1em 40px;
}
hr {
  box-sizing: content-box;
  height: 0;
}
pre,
textarea {
  overflow: auto;
}
code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
  color: inherit;
  font: inherit;
  margin: 0;
}
button {
  overflow: visible;
}
button,
select {
  text-transform: none;
}
button,
html input[type=button],
input[type=reset],
input[type=submit] {
  -webkit-appearance: button;
  cursor: pointer;
}
button[disabled],
html input[disabled] {
  cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}
input {
  border-radius: 0;
  line-height: normal;
}
input[type=checkbox],
input[type=radio] {
  box-sizing: border-box;
  padding: 0;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  height: auto;
}
input[type=search] {
  -webkit-appearance: textfield;
  box-sizing: content-box;
}
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration {
  -webkit-appearance: none;
}
fieldset {
  border: 1px solid #666666;
  margin: 0 2px;
  padding: .35em .625em .75em;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
a,
input,
textarea,
button,
select {
  outline: none;
}
a:hover,
a:focus,
input:focus,
textarea:focus,
button:focus,
select:focus {
  outline: none !important;
  text-decoration: none;
}
* {
  box-sizing: border-box;
}
:after,
:before {
  box-sizing: border-box;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: #666666;
}
input:-moz-placeholder,
textarea:-moz-placeholder {
  color: #666666;
}
/* =========== 2. Typography  =========== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Lato', sans-serif;
  color: #000000;
  font-weight: 400;
  line-height: 1.2em;
  margin-bottom: 20px;
  margin-top: 0;
}
h1 > a,
h2 > a,
h3 > a,
h4 > a,
h5 > a,
h6 > a {
  color: inherit;
}
h1 {
  font-size: 36px;
}
h2 {
  font-size: 30px;
}
h3 {
  font-size: 26px;
}
h4 {
  font-size: 22px;
}
h5 {
  font-size: 18px;
}
h6 {
  font-size: 14px;
}
a {
  color: #000000;
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover {
  color: #ababab !important;
}
p {
  margin-top: 0;
  margin-bottom: 10px;
}
code,
kbd,
pre,
samp {
  font-family: 'Lato', sans-serif;
  border-radius: 0;
}
code {
  background-color: #eee;
  letter-spacing: 0.015em;
}
abbr {
  background-color: #A1D71A;
  color: #111;
  border-width: 2px;
}
mark {
  color: #ffffff;
  background-color: #a4b4c4;
}
dfn {
  border-bottom: 1px dashed;
}
cite {
  font-style: normal;
}
blockquote {
  font-size: 13px;
  border: 0;
  padding: 10px 0 10px 20px;
  margin: 20px 0;
  font-style: italic;
  letter-spacing: 1px;
  overflow: hidden;
  background-color: #f6f6f6;
}
blockquote p {
  margin-bottom: 10px;
}
blockquote footer,
blockquote cite {
  font-size: 12px;
  color: #666666;
  font-weight: 700;
}
blockquote footer:before,
blockquote cite:before {
  content: '- ';
  color: #666666;
}
blockquote footer:after,
blockquote cite:after {
  content: ' ';
  color: #666666;
}
pre {
  line-height: 1.8em;
  padding: 15px;
  border: 1px solid #E4E4E4;
  font-style: italic;
  overflow: auto;
  white-space: pre-wrap;
  background-color: #f7f7f7;
  word-wrap: break-word;
  max-width: 100%;
}
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border: 0;
}
input[type="search"],
input[type="text"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="file"],
select,
textarea {
  height: 40px;
  width: 100%;
  border: 1px solid #666666;
  padding: 0 10px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
}
::-moz-selection {
  color: #f7f7f7;
  background-color: #222222;
}
::selection {
  color: #f7f7f7;
  background-color: #222222;
}
iframe {
  border: 0;
  max-width: 100%;
}
/* ===========  3. General  =========== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  background: #ffffff;
  color: #666666;
  overflow-x: hidden;
  line-height: 1.8em;
  letter-spacing: 1.2px;
  word-spacing: 1px;
}
/* ===========  4. Header  =========== */
#header {
  width: 100%;
  height: 70px;
  background-color: #ffffff;
  position: fixed;
  z-index: 1001;
  border-bottom: 1px solid #eeeeee;
  transform: translateZ(0);
}
#header .header-inner {
  position: relative;
  height: 70px;
}
#header .logo-wrap {
  display: inline-block;
}
#header .logo {
  height: 70px;
  display: table;
}
#header .logo a {
  display: table-cell;
  vertical-align: middle;
}
#header ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#header .wrap-menu {
  float: right;
  position: relative;
}
.header-hide {
  height: 70px;
}
.main-menu {
  float: right;
}
.menu-list {
  list-style-type: none;
  margin: 0;
  clear: both;
  white-space: nowrap;
  padding-left: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
}
.menu-list li {
  float: left;
  height: 100%;
  position: relative;
  white-space: nowrap;
}
.menu-list .menu-item-has-children {
  position: relative;
}
.menu-list .menu-item-has-children:hover > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.menu-list a {
  color: #000000;
  float: left;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 15px;
  padding: 25px 0;
  text-decoration: none;
}
.menu-list .sub-menu {
  background-color: #ffffff;
  position: absolute;
  z-index: 99;
  top: 69px;
  left: 0;
  width: 220px;
  border: 1px solid #eeeeee;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: visibility 0.3s ease-in-out, opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.menu-list .sub-menu li {
  width: 100%;
}
.menu-list .sub-menu a {
  font-size: 10px;
  letter-spacing: 1.5px;
  margin: 0;
  line-height: 18px;
  padding: 14px 15px 14px 15px;
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  white-space: normal;
}
.menu-list .sub-menu .sub-menu {
  top: -1px;
  left: 100%;
}
.menu-mobile {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 70px;
  float: right;
}
.menu-mobile.active .item-2 {
  left: 5px;
}
.menu-mobile .item {
  position: absolute;
  left: 0;
  background-color: #000000;
  width: 18px;
  height: 2px;
}
.menu-mobile .item-1 {
  top: 27px;
}
.menu-mobile .item-2 {
  top: 34px;
  width: 14px;
  transition: left 0.3s ease-in-out;
}
.menu-mobile .item-3 {
  bottom: 27px;
}
#slider-section .item {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  position: relative;
}
#slider-section .owl-nav {
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
}
#slider-section .owl-nav > * {
  display: inline-block;
  position: absolute;
  width: 100px;
  height: 50px;
  background-size: 40px;
  background-repeat: no-repeat;
  background-position: center center;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}
#slider-section .owl-nav > *:hover {
  opacity: 0.5;
}
#slider-section .owl-nav .owl-prev {
  left: 0;
  background-image: url(../images/arrow-left.png);
}
#slider-section .owl-nav .owl-next {
  right: 0;
  background-image: url(../images/arrow-right.png);
}
#slider-section .owl-dots {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  text-align: center;
  transform: translateY(-100%);
  padding-bottom: 10px;
}
#slider-section .owl-dots .owl-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  border: 1px solid #000000;
}
#slider-section .owl-dots .owl-dot.active {
  background: #000000;
}
#slider-section .owl-dots .owl-dot:last-child {
  margin-right: 0;
}
@media screen and (min-width: 992px) {
  .menu-list {
    display: block !important;
  }
}
@media screen and (max-width: 991px) {
  #header .menu-mobile {
    display: block;
  }
  #header .header-inner {
    position: relative;
  }
  #header .wrap-menu {
    position: static;
  }
  #header .main-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
  }
  #header .menu-list {
    display: none;
    background-color: #f6f6f6;
    margin-left: -15px;
    margin-right: -15px;
  }
  #header .menu-list > li:last-child a {
    border-bottom: none;
  }
  #header .menu-list li {
    display: block;
    float: none;
  }
  #header .menu-list li:after {
    content: '';
    clear: both;
    display: block;
  }
  #header .menu-list li a {
    float: none;
    position: relative;
    text-align: left;
    margin: 0;
    font-size: 13px;
    padding: 10px 24px;
    border-bottom: 1px solid #eeeeee;
    text-transform: uppercase !important;
    color: #000000;
    display: block;
  }
  #header .menu-list li a:hover {
    color: #000000 !important;
  }
  #header .menu-list li ul {
    visibility: visible;
    opacity: 1;
    width: auto;
    position: static;
    display: none;
    padding: 0;
    margin: 0;
    border: none;
    background-color: #f6f6f6;
    transition: none;
    transform: translateY(0);
  }
  #header .menu-list li ul:before {
    content: normal;
  }
  #header .menu-list li ul li {
    margin: 0;
  }
  #header .menu-list li ul li a {
    padding-left: 44px;
    padding-right: 44px;
  }
  #slider-section .item {
    max-height: 400px;
  }
  #slider-section .owl-nav {
    display: none;
  }
}
/* ===========  5. Portfolio & Gallery  =========== */
.image {
  background-color: #eeeeee;
  padding-bottom: 80%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}
.image > img {
  display: none !important;
}
#portfolio {
  padding: 80px 0 50px 0;
}
#portfolio.gallery .grid-item {
  cursor: pointer;
  opacity: 1;
}
#portfolio.gallery .grid-item:hover {
  opacity: 0.8;
}
#portfolio .square-grids {
  text-align: center;
  padding-bottom: 50px;
}
#portfolio .square-grids .square-grids-inner {
  margin: -2px;
  width: 27px;
  display: inline-block;
  cursor: pointer;
}
#portfolio .square-grids .square {
  width: 5px;
  height: 5px;
  display: inline-block;
  margin: 2px;
  background: #000000;
  float: left;
}
#portfolio .square-grids .square:last-child {
  background: transparent;
}
#portfolio .controls {
  font-size: 12px;
  letter-spacing: 3px;
  padding-bottom: 30px;
  font-family: 'Montserrat', sans-serif;
  position: sticky;
  top: 70px;
  z-index: 999;
  background-color: #ffffff;
  padding-top: 4px;
  width: calc(100% + 30px);
  margin-left: -15px;
  margin-right: -15px;
  padding-left: 15px;
  padding-right: 15px;
  float: none;
  clear: both;
  display: block;
}
#portfolio .controls ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}
#portfolio .controls ul li {
  display: inline-block;
  margin-right: 20px;
  margin-bottom: 30px;
}
#portfolio .controls ul li:last-child {
  margin-right: 0;
}
#portfolio .controls ul li a {
  padding: 8px 20px;
  border-radius: 14px;
}
#portfolio .controls ul li a.active {
  background-color: #f2f2f2;
}
#portfolio .grids {
  margin-left: -15px;
  margin-right: -15px;
  overflow: hidden;
}
#portfolio .grids:after {
  content: '';
  clear: both;
  display: block;
}
#portfolio .grid-sizer {
  width: 33.333333%;
}
#portfolio .grid-item {
  position: relative;
  padding-left: 15px;
  padding-right: 15px;
  width: 33.333333%;
  display: inline-block;
  margin-bottom: 30px;
}
#portfolio .equal .image {
  padding-bottom: 100%;
}
@media screen and (max-width: 991px) {
  #portfolio .grid-sizer {
    width: 50% !important;
  }
  #portfolio .grid-item {
    width: 50% !important;
  }
}
@media screen and (max-width: 768px) {
  #portfolio .grid-sizer {
    width: 50% !important;
  }
  #portfolio .grid-item {
    width: 50% !important;
  }
  #portfolio .controls {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-bottom: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  #portfolio .controls::-webkit-scrollbar {
    display: none;
  }
  #portfolio .controls ul {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 4px 2px;
  }
  #portfolio .controls ul li {
    display: inline-block;
    margin-right: 0;
    margin-bottom: 0 !important;
    flex-shrink: 0;
  }
  #portfolio .controls {
    padding-bottom: 10px;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  .page_sub_title_404 {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.2em !important;
  }
  #portfolio .controls ul li:last-child {
    margin-right: 0;
  }
  #portfolio .controls ul li a {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #cccccc;
    border-radius: 20px;
    font-size: 11px;
    white-space: nowrap;
  }
  #portfolio .controls ul li a.active {
    background-color: #555555;
    color: #ffffff;
    border-color: #555555;
  }
}
/* ===========  6. Posts  =========== */
#posts {
  padding-top: 80px;
  padding-bottom: 80px;
}
#main-content .pagination-wrap {
  padding-top: 40px;
  font-family: 'Lato', sans-serif;
}
#main-content .pagination-wrap ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
#main-content .pagination-wrap ul:after {
  content: '';
  display: block;
  clear: both;
}
#main-content .pagination-wrap ul span {
  display: block;
}
#main-content .pagination-wrap ul li {
  color: #000000;
  width: 35px;
  height: 44px;
  line-height: 44px;
  display: inline-block;
  text-align: center;
  overflow: hidden;
  font-size: 18px;
}
#main-content .pagination-wrap ul li .current {
  color: #000000;
  font-size: 40px;
}
.single-post {
  /* Response */;
}
.single-post article footer {
  margin-bottom: 20px;
}
.single-post article footer:last-child {
  margin-bottom: 0;
}
.page_sub_title_404 {
  font-size: 20px;
  text-transform: uppercase;
  line-height: 1.8em;
}
.contact-via {
  padding-top: 10px;
}
.contact-via .item-field {
  margin-bottom: 10px;
  font-style: italic;
}
.contact-via .item-field i {
  font-size: 18px;
  margin-right: 15px;
}
@media screen and (max-width: 768px) {
  #posts {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}
@media screen and (max-width: 768px) {
  #posts .blog-grid {
    margin-left: 0;
    margin-right: 0;
  }
  #posts article:last-child {
    margin-bottom: 0;
  }
}
/* ===========  7. Footer =========== */
#footer {
  border-top: 1px solid #eeeeee;
  display: table;
  width: 100%;
  padding-top: 50px;
  padding-bottom: 40px;
  text-align: center;
}
#footer .footer-inner {
  display: table-cell;
  vertical-align: middle;
}
#footer .socials {
  padding-top: 15px;
}
#footer .socials a {
  color: #666666 !important;
  margin-right: 10px;
}
#footer .socials a:hover {
  opacity: 0.7 !important;
}
/* ----- Lightbox: blocca lo scroll della pagina ----- */
.mfp-no-scroll {
  overflow: hidden !important;
  height: 100% !important;
  position: fixed !important;
  width: 100% !important;
}
/* ----- Lightbox: transizioni ----- */
.mfp-figure {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 1s ease, transform 1s ease;
}
.mfp-ready .mfp-figure {
  opacity: 1;
  transform: scale(1);
}
.mfp-removing .mfp-figure {
  opacity: 0;
  transform: scale(0.98);
}
.mfp-removing .mfp-container {
  opacity: 0;
  transition: opacity 1s ease;
}
.mfp-container {
  opacity: 1;
  transition: opacity 1s ease;
}
#portfolio .grid-item .media.image {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  /* ratio 1:1 */
    overflow: hidden;
  background-size: cover;
  background-position: center;
}
#portfolio .grid-item .media.image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ----- Pulsanti "30 foto casuali" e "Una galleria a caso" ----- */
.random-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 30px 20px 20px;
}
.random-buttons a {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 10px 30px;
  border: 1px solid #000;
  color: #000;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .random-buttons {
    flex-direction: column;
    align-items: center;
  }
}
/* ----- Zoom delle foto al passaggio del mouse (desktop) ----- */
@media (min-width: 768px) {
  #portfolio .grid-item {
    overflow: hidden;
  }
  #portfolio .grid-item .media.image {
    transition: transform 0.4s ease, opacity 0.4s ease;
  }
  #portfolio .grid-item:hover .media.image {
    transform: scale(1.04);
    opacity: 0.88;
  }
}

/* =========== 8. Componenti del sito =========== */

/* ----- Banner cookie ----- */
.cookieBannerHome {
  position: fixed !important;
  z-index: 10010;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: #ccc;
  border-radius: 10px;
}
.innerCookieBanner {
  margin: 20px;
  background-color: #ccc;
  border-radius: 5px;
}
.centerCookieBanner {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.buttonCookieBanner {
  flex: 1;
  max-width: 150px;
  height: 40px;
  border-radius: 8px;
}

/* ----- Footer: link "autore" senza stile ----- */
a.hidden-link,
a.hidden-link:hover,
a.hidden-link:visited,
a.hidden-link:active,
a.hidden-link:focus {
  color: inherit !important;
  text-decoration: none !important;
  font: inherit !important;
  cursor: pointer;
}

/* ----- Testo corrente delle pagine (about, blog, eyes, film, bologna) ----- */
.page_eyes {
  font-family: var(--font-ui) !important;
  font-size: 16px !important;
  letter-spacing: 1px !important;
  line-height: 1.8 !important;
}
.page_eyes p,
.page_eyes a {
  font-family: var(--font-ui);
  font-size: 16px;
  letter-spacing: 1px;
  line-height: 1.8;
}

/* ----- Chi sono / Blog: foto affiancate al testo ----- */
.about-intro {
  margin-bottom: 30px;
  overflow: hidden; /* clearfix */
}
.about-intro__img {
  float: left;
  width: 38%;
  margin: 0 36px 16px 0;
}
.about-intro__img--right {
  float: right;
  width: 36%;
  margin: 0 0 16px 30px;
}
.about-ld {
  float: right;
  margin: 0 0 16px 30px;
  max-width: 28%;
}
.about-img-left {
  float: left;
  clear: left; /* parte sotto la prima foto, senza affiancarsi a essa */
  width: 28%;
  margin: 0 30px 16px 0;
}
.about-intro__img img,
.about-intro__img--right img,
.about-ld img,
.about-img-left img {
  width: 100%;
  height: auto;
  display: block;
}
.about-ld__caption {
  text-align: right;
  font-style: italic;
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--c-muted);
  margin-top: 6px;
  padding-right: 2px;
}
@media (max-width: 767px) {
  .about-intro__img,
  .about-intro__img--right {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
  }
  .about-ld {
    float: none;
    max-width: 60%;
    margin: 0 auto 20px;
  }
  .about-img-left {
    float: none;
    clear: none;
    width: 60%;
    margin: 0 auto 20px;
  }
}

/* ----- Card: Articoli (blog), Gallerie, Progetti, Viaggi ----- */
.blog-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.blog-grid {
  padding: 40px 0 20px;
}
.projects-wrap {
  padding: 50px 0 60px;
}
.blog-card a.blog-thumb,
.project-card a.project-thumb {
  display: block;
  overflow: hidden;
}
.blog-card a.blog-thumb img,
.project-card a.project-thumb img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.blog-card a.blog-thumb img {
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.project-card a.project-thumb img {
  aspect-ratio: 5 / 7;
}
.blog-card a.blog-thumb:hover img,
.project-card a.project-thumb:hover img {
  transform: scale(1.03);
  opacity: 0.85;
}
.blog-card .blog-caption,
.project-card .project-caption {
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  color: var(--c-ink);
}
.blog-card .blog-caption a,
.project-card .project-caption a {
  color: var(--c-ink);
}
.blog-card .blog-caption a:hover,
.project-card .project-caption a:hover {
  color: var(--c-hover) !important;
}
.blog-card .blog-subcaption,
.project-card .project-subcaption {
  margin-top: 6px;
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--c-soft);
  text-align: center;
}
@media (max-width: 767px) {
  .blog-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .blog-card .blog-caption,
  .project-card .project-caption {
    font-size: 9px;
    letter-spacing: 1.5px;
  }
}

/* ----- Contatti ----- */
#contact-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 50px;
}
#contact-info-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 20px;
}
#contact-info-wrap p {
  color: #666;
  margin-bottom: 30px;
}
.contact-via .item-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #444;
  font-size: 13px;
  letter-spacing: 0.8px;
}
.contact-via .item-field i {
  font-size: 18px;
  color: var(--c-ink);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  #contact-layout {
    flex-direction: column;
    gap: 30px;
  }
  #contact-info-wrap {
    padding-top: 0;
  }
}

/* ----- Pagina 404 ----- */
#layout-404 {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 50px;
  margin-bottom: 40px;
}
#img-404 {
  flex: 0 0 50%;
  max-width: 50%;
  position: relative;
  overflow: hidden;
  padding-bottom: 50%;
}
#img-404 img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 767px) {
  #layout-404 {
    flex-direction: column;
    gap: 30px;
  }
  #img-404 {
    flex: none;
    max-width: 100%;
    width: 100%;
    padding-bottom: 100%;
  }
}

/* ----- Articoli del blog: layout a due colonne ----- */
.article-body p,
.article-body a {
  font-family: var(--font-ui);
  font-size: 16px;
  letter-spacing: 1px;
  line-height: 1.8;
}
.article-body {
  min-width: 0;
  padding-bottom: 60px;
}
.blog-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
}
.img-horiz {
  margin: 36px 0;
}
.img-horiz img,
.img-vert-left img,
.img-vert-right img {
  width: 100%;
  height: auto;
  display: block;
}
.img-vert-left {
  float: left;
  width: 36%;
  margin: 4px 36px 20px 0;
}
.img-vert-right {
  float: right;
  width: 36%;
  margin: 4px 0 20px 36px;
}
.img-caption {
  font-style: italic;
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--c-muted);
  margin-top: 6px;
}
.img-vert-right .img-caption { text-align: right; }
.img-vert-left .img-caption { text-align: left; }
.img-horiz .img-caption { text-align: center; }
.cf::after {
  content: '';
  display: table;
  clear: both;
}

/* ----- Articoli del blog: barra laterale ----- */
.blog-sidebar {
  width: 180px;
  flex-shrink: 0;
  align-self: stretch;
}
.blog-sidebar-inner {
  position: sticky;
  top: 24px;
}
.sidebar-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-line);
}
.sidebar-item {
  display: block;
  margin-bottom: 14px;
  text-decoration: none;
  color: inherit;
}
.sidebar-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f0f0;
}
.sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.sidebar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sidebar-overlay .sidebar-date {
  font-family: var(--font-text);
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}
.sidebar-overlay .sidebar-title-item {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
  line-height: 1.3;
}
.sidebar-item:hover .sidebar-overlay {
  opacity: 1;
}
.sidebar-item:hover .sidebar-thumb img {
  opacity: 0.75;
  transform: scale(1.04);
}
.sidebar-mobile-meta {
  display: none; /* testo sotto la miniatura: solo mobile */
}

/* ----- Mobile: articoli e barra laterale ----- */
@media (max-width: 767px) {
  .blog-layout {
    flex-direction: column;
  }
  .img-vert-left,
  .img-vert-right {
    float: none;
    width: 100%;
    margin: 24px 0;
  }
  .blog-sidebar {
    width: 100%;
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid var(--c-line);
    padding-top: 5px;
    margin-top: 5px;
    justify-content: center;
    align-self: auto;
  }
  .blog-sidebar-inner {
    position: static;
  }
  .sidebar-label {
    width: 100%;
    border-bottom: none;
    margin-bottom: 12px;
    padding-bottom: 0;
    text-align: center;
  }
  .sidebar-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .sidebar-item {
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
  }
  .sidebar-overlay {
    display: none;
  }
  .sidebar-mobile-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 5px;
  }
  .sidebar-mobile-meta .sidebar-date {
    font-family: var(--font-text);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--c-muted);
    font-style: italic;
  }
  .sidebar-mobile-meta .sidebar-title-item {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #333;
    line-height: 1.3;
  }
}

/* ----- Caroselli a dissolvenza (le slide le crea il JS) ----- */
.about-carousels {
  display: flex;
  gap: 30px;
  margin: 50px 0 40px;
}
.about-carousel-wrap,
#contact-carousel-wrap,
#carousel-404-wrap,
#film-slide-wrap {
  position: relative;
  overflow: hidden;
  background: var(--c-dark);
}
.about-carousel-wrap,
#contact-carousel-wrap,
#carousel-404-wrap {
  padding-bottom: 50%;
}
.about-carousel-wrap,
#carousel-404-wrap {
  flex: 1;
}
#contact-carousel-wrap {
  flex: 0 0 50%;
  max-width: 50%;
}
#film-slide-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
}
.about-slide,
.contact-slide,
.slide-404,
.film-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.about-slide.active,
.contact-slide.active,
.slide-404.active,
.film-slide.active {
  opacity: 1;
}
.about-slide img,
.contact-slide img,
.slide-404 img,
.film-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.film-slide img {
  object-fit: contain;
}
@media (max-width: 767px) {
  .about-carousels {
    flex-direction: column;
  }
  .about-carousel-wrap:nth-child(2) {
    display: none; /* su mobile solo il primo carosello */
  }
  .about-carousel-wrap {
    padding-bottom: 100%;
  }
  #contact-carousel-wrap {
    flex: none;
    max-width: 100%;
    width: 100%;
    padding-bottom: 100%;
  }
  #carousel-404-wrap {
    width: 100%;
    padding-bottom: 100%;
  }
}

/* ----- Home: slider ----- */
@media (min-width: 768px) {
  #slider-section .item {
    height: 500px;
  }
  .slider-container {
    padding-top: 8px;
  }
}
