/*
 Theme Name: Berellini Child
 Theme URI: http://tuodominio.it
 Description: Child Theme per Berellini
 Author: Claudia
 Template: hello-elementor
 Version: 1.0
*/

/* ---------------- Base ---------------- */
body {
  font-family: 'Neue Haas Grotesk Display Pro', sans-serif !important;
  padding: 0 20px;
}

@media (min-width: 768px) {
  body {
    padding: 0 40px;
  }
}

/* ---------------- Navbar ---------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100% !important;
  margin: 0;
  z-index: 1000;
  background: transparent;
}

.navbar-custom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 20px 0;
  width: 100% !important;
}

.navbar-custom .logo {
  grid-column: 1;
}

.navbar-custom .menu {
  grid-column: 2;
  display: flex;
  justify-content: flex-end;
}

.navbar-custom .menu ul {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-custom .menu a {
  font-weight: 450;
  font-size: 20px;
  line-height: 100%;
  text-decoration: none;
  color: #000;
  padding-bottom: 10px;
  padding-right: 10px;
}

.navbar-custom .menu ul li.current-menu-item a {
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
  padding-right: 10px;
}

/* ---------------- Mobile Navbar ---------------- */
@media (max-width: 768px) {
  .navbar-custom {
    grid-template-columns: 1fr 1fr;
    padding: 10px 0;
  }

  .navbar-custom .menu {
    justify-content: flex-end;
  }

  .navbar-custom .menu ul {
    gap: 20px;
  }

  .navbar-custom .menu a {
    font-size: 18px;
  }
}

/* ---------------- Hero Slider (Swiper) ---------------- */
.hero-slider {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
} 


.hero-slider.swiper {
  position: absolute !important;
  top: 0;
}

/* .more-projects .swiper {
  position: relative !important;
  top: auto;
} */

.hero-slider .swiper-wrapper,
.hero-slider .swiper-slide {
  height: 100%;
}

.hero-slider .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------------- Custom Arrows ---------------- */
.swiper-button-prev::after,
.swiper-button-next::after {
  content: none !important;
}

.swiper-button-prev,
.swiper-button-next {
  width: 50px !important;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: transparent;
  border: none;
  cursor: pointer;
}

.swiper-button-prev { left: 40px !important; }
.swiper-button-next { right: 40px !important; }

.swiper-button-prev {
  background-image: url('./assets/prev.svg') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
.swiper-button-next {
  background-image: url('./assets/next.svg') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  filter: invert(1);
}

/* ---------------- Font Face ---------------- */
@font-face {
  font-family: 'Neue Haas Grotesk Display Pro';
  src: url('./assets/NeueHaasDisplayMediu.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk Display Pro';
  src: url('./assets/NeueHaasDisplayRoman.ttf') format('truetype');
  font-weight: 450;
  font-style: normal;
  font-display: swap;
}

/* ---------------- Portfolio ---------------- */
.work-portfolio {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.portfolio-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: opacity 0.3s ease;
  opacity: 1;
}

.portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
}

.portfolio-item.empty {
  background: transparent;
}

.item-label {
  font-size: 14px;
  color: black;
  margin-top: 10px;
  text-align: left;
}

/* ---------------- Anchor button ---------------- */
.back-to-top {
  text-align: right;
  margin: 20px 0;
  cursor: pointer;
}

.back-to-top a {
  display: inline-block;
  color: black;
  text-decoration: none;
  font-weight: bold;
}

/* ---------------- Project Summary ---------------- */
.project-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: start;
 /*  margin-top: 50px; */
}

.summary-title {
  font-size: 28px;
  font-weight: bold;
}

.summary-image {
  width: 100%;
  height: auto;
}

.summary-text {
  font-size: 24px;
  padding-right: 30px
}

.project-gallery {
  margin-top: 4rem;
}

.project-gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: none;
  margin-bottom: 2rem;
}

.project-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
 
}

/* ---------------- Swiper Modal ---------------- */
.swiper-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.swiper-modal .swiper-container {
  width: 90%;
  max-width: 1200px;
  height: 80%;
}

.swiper-modal .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.swiper-button-prev,
.swiper-button-next {
  color: white;
  width: 50px;
  height: 50px;
}

@media (max-width: 1023px) {
.swiper-button-prev,
.swiper-button-next {
    display: none !important;
  }
}

.swiper-pagination-bullet {
  background: white;
  opacity: 0.8;
}

.swiper-pagination-bullet-active {
  background: #fff;
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

/* ---------------- Responsive Layout ---------------- */

/* Mobile: una colonna */
@media (max-width: 767px) {
  .project-summary {
    grid-template-columns: 1fr;
    gap: 0px;
    margin-top: 0px;
  }

  .summary-text {
    font-size: 16px;
  }

  .summary-title,
  .summary-text,
  .summary-image {
    grid-column: 1;
  }

  .portfolio-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .more-projects {
    margin-top: 0px !important;
  }

  .project-gallery-item{
    margin-bottom: 0px !important;
  }

  .portfolio-item.empty {
    display: none;
  }


}

/* Tablet (iPad Mini): due colonne per summary */
@media (min-width: 768px) and (max-width: 1299px) {
  .project-summary {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    /* margin-top: 45px; */
  }

  .summary-title,
  .summary-text {
    grid-column: 1;
  }

  .summary-text {
    font-size: 18px;
  }

  .summary-image {
    grid-column: 2;
  }

  .portfolio-row {
    grid-template-columns: repeat(3, 1fr);
  }


  
}

/* Desktop */
@media (min-width: 1300px) {
  .project-summary {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ---------------- Back to Work / Bottom Nav ---------------- */
.back-to-work {
  margin: 20px 0;
  display: flex;
}

.back-to-work a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: bold;
  color: #000;
  font-size: 16px;
}

.back-to-work .arrow-work {
  display: inline-block;
  width: 50px;
  height: 50px;
  margin-right: 8px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.bottom-nav-div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.arrow-bottom-work {
  width: 13px;
  display: inline-flex;
  gap: 5px;
}

@media (max-width: 1023px) {
  .back-to-work .arrow-work {
    width: 35px !important;
  }

  .back-to-work {
    margin: 0 !important;
    }
}

/* ---------------- More Projects ---------------- */
.more-projects {
  margin-top: 100px;
  padding: 60px 0;
}

.more-projects-title {
  text-align: left;
  font-size: 30px;
  margin-bottom: 40px;
  letter-spacing: 1px;
  font-weight: 400;
}

.more-project-item {
  text-align: start;
}

.more-project-item img {
    width: 100%;
    display: block;
    height: 22vh;
    object-fit: cover;
}

.more-project-title {
  margin-top: 10px;
  font-size: 20px;
  color: #000 !important;
}

.more-projects .swiper {
  width: 100%;
  margin: 0 auto;
}

.more-projects .swiper-button-prev,
.more-projects .swiper-button-next {
  color: #000;
}

@media (max-width: 1023px) {
  .more-projects .swiper-button-prev,
  .more-projects .swiper-button-next {
    display: none;
 }
}

body.home {
  padding: 0 !important;
}

body.home .navbar-custom {
  padding: 20px 40px;
}

@media (max-width: 768px) {
  body.home .navbar-custom {
    padding: 10px 20px;
  }
}

/* ---------------- Footer ---------------- */
.site-footer {
  width: 100%;
  border-top: 2px solid #000;
  margin-top: 100px;
  padding: 80px 0 !important;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  max-width: 100% !important;
}

.footer-container {
  width: 100%;
  box-sizing: border-box;
}


.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
  text-align: left;
}

.footer-col p {
  margin: 0;
  font-size: 2vh;
}

.footer-col a {
  text-decoration: none;
  color: #000;
}

.footer-col a:hover {
  text-decoration: underline;
}

/* Mobile: una colonna */
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .site-footer {
    margin-top: 60px;
  }
}

/* Tablet (due colonne) */
@media (min-width: 768px) and (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}


/* --- Mobile spacing fix for portfolio --- */
/* === Portfolio mobile: una colonna con spazi uniformi === */
@media (max-width: 767px) {
  /* gestiamo lo spacing a livello di contenitore, non di riga */
  .work-portfolio {
    display: grid;              /* invece di flex */
    grid-template-columns: 1fr; /* una colonna */
    row-gap: 20px;              /* spazio identico tra tutti i progetti */
  }

  /* appiattisce le righe: gli item diventano fratelli diretti del container */
  .work-portfolio .portfolio-row {
    display: contents;
    gap: 0;                     /* azzera il gap delle righe, lo gestiamo sopra */
  }

  /* ogni item occupa tutta la riga, niente margini extra */
  .work-portfolio .portfolio-item {
    margin: 0 !important;
  }

  /* non mostrare slot vuoti creati dal markup desktop */
  .work-portfolio .portfolio-item.empty {
    display: none !important;
  }

}

/* === PROJECT PAGE — Mobile layout fix === */
@media (max-width: 767px) {

  /* Ogni immagine a tutta larghezza */
  .project-gallery .portfolio-row {
    display: contents; /* toglie la griglia 3 colonne */
  }

  .project-gallery-item {
    grid-column: auto !important; /* ignora il colspan */
    width: 100%;
    margin: 0 0 20px 0 !important; /* spazio verticale uniforme */
  }

  .project-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* Ultima immagine senza margine extra */
  .project-gallery-item:last-child {
    margin-bottom: 0;
  }
}




