/* ==========================================================================
   Mamma Pret a Porter - Modern Home Page Style
   - Preserves original brand fonts: "Grand Hotel", "Amatic SC", "Source Sans Pro"
   - Clean cards matching the category style: teal (#6db8b1) border, 14px rounded corners & subtle shadows
   - Complete photo visibility without opaque overlays obscuring the image
   - Clean white text container below each photo with readable typography
   - Fully responsive for desktop, tablet, and mobile screens
   ========================================================================== */

/* 1. Section Titles on Homepage */
.categoria-home h3.module-title,
.k2-blocco-foto h3.module-title {
  color: #4c4748 !important;
  font-size: 38px !important;
  font-weight: normal !important;
  margin-top: 36px !important;
  margin-bottom: 22px !important;
  text-align: center !important;
  padding: 10px 0 12px 0 !important;
  background-repeat: repeat-x !important;
  background-position: left bottom !important;
  font-family: 'Grand Hotel', cursive !important;
  background-image: url("../images/themes/mammapretaporter/punti.png") !important;
}

.t3-content-mass-top > .t3-module:first-child h3.module-title {
  margin-top: 10px !important;
}

/* 2. Categoria-Home: Cards Layout ("Da sapere", "Novità", "La gravidanza", etc.) */
.categoria-home .k2ItemsBlock > .row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
}

@media (min-width: 768px) {
  .categoria-home .prima-colonna {
    width: 66.666667% !important;
    display: flex !important;
    flex-direction: column !important;
    padding-right: 12px !important;
  }

  .categoria-home .seconda-colonna {
    width: 33.333333% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding-left: 12px !important;
  }
}

/* Card Wrapper */
.categoria-home .wrapper {
  background-color: #ffffff !important;
  border: 2px solid #6db8b1 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(109, 184, 177, 0.12) !important;
  overflow: hidden !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.categoria-home .prima-colonna .wrapper {
  height: 100% !important;
  flex: 1 1 auto !important;
}

.categoria-home .seconda-colonna .wrapper {
  flex: 0 0 calc(50% - 8px) !important;
  display: flex !important;
  flex-direction: column !important;
}

.categoria-home .seconda-colonna .wrapper + .wrapper {
  margin-top: 16px !important;
}

.categoria-home .wrapper:hover {
  transform: translateY(-3px) !important;
  border-color: #4fa99f !important;
  box-shadow: 0 8px 24px rgba(109, 184, 177, 0.25) !important;
}

/* Card Image: 100% visible, no cutting */
.categoria-home .wrapper a.moduleItemImage {
  display: block !important;
  width: 100% !important;
  overflow: hidden !important;
  position: relative !important;
  background-color: #f7fcfa !important;
}

.categoria-home .prima-colonna .wrapper a.moduleItemImage {
  height: 290px !important;
  max-height: none !important;
}

.categoria-home .seconda-colonna .wrapper a.moduleItemImage {
  height: 135px !important;
  max-height: none !important;
}

.categoria-home .wrapper a.moduleItemImage img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border: none !important;
  transition: transform 0.4s ease !important;
}

.categoria-home .wrapper:hover a.moduleItemImage img {
  transform: scale(1.03) !important;
}

/* Card Content: Clean White Area Under Image (NO OPAQUE OVERLAY COVERING PHOTO) */
.categoria-home .wrapper .wrapper-content {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  padding: 16px 20px !important;
  background-color: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.categoria-home .prima-colonna .wrapper .wrapper-content {
  flex: 1 1 auto !important;
  min-height: 85px !important;
  margin-bottom: 0 !important;
}

.categoria-home .seconda-colonna .wrapper .wrapper-content {
  padding: 10px 14px !important;
  min-height: 70px !important;
  flex: 1 1 auto !important;
}

/* Card Title */
.categoria-home .wrapper .wrapper-content .moduleItemTitle,
.categoria-home .wrapper .wrapper-content h1.moduleItemTitle {
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Amatic SC", cursive !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-wrap: break-word !important;
}

.categoria-home .prima-colonna .wrapper .wrapper-content h1.moduleItemTitle {
  font-size: 32px !important;
}

.categoria-home .seconda-colonna .wrapper .wrapper-content h1.moduleItemTitle {
  font-size: 24px !important;
}

.categoria-home .wrapper .wrapper-content .moduleItemTitle a {
  color: #383838 !important;
  font-family: "Amatic SC", cursive !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.categoria-home .wrapper .wrapper-content .moduleItemTitle a:hover,
.categoria-home .wrapper .wrapper-content .moduleItemTitle a:focus {
  color: #4fa99f !important;
}

.categoria-home .wrapper .wrapper-content .moduleItemExtraFieldsValue {
  font-family: "Source Sans Pro", sans-serif !important;
  font-size: 13px !important;
  color: #79c1b9 !important;
  margin-top: 4px !important;
  display: block !important;
}

/* 3. K2-Blocco-Foto: 4 Cards per Row ("Leggere, una passione di famiglia", "Disegni", "Nomi", "Film") */
.k2-blocco-foto .k2ItemsBlock > .row {
  display: flex !important;
  flex-wrap: wrap !important;
}

.k2-blocco-foto .col-sm-3 {
  margin-bottom: 24px !important;
  display: flex !important;
  flex-direction: column !important;
}

.k2-blocco-foto .foto-card {
  background-color: #ffffff !important;
  border: 2px solid #6db8b1 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(109, 184, 177, 0.12) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.k2-blocco-foto .foto-card:hover {
  transform: translateY(-3px) !important;
  border-color: #4fa99f !important;
  box-shadow: 0 8px 24px rgba(109, 184, 177, 0.25) !important;
}

.k2-blocco-foto .foto-card .moduleItemIntrotext {
  margin: 0 !important;
  padding: 0 !important;
}

.k2-blocco-foto .foto-card a.moduleItemImage {
  display: block !important;
  width: 100% !important;
  height: 160px !important;
  overflow: hidden !important;
  background-color: #f7fcfa !important;
}

.k2-blocco-foto .foto-card a.moduleItemImage img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border: none !important;
  transition: transform 0.4s ease !important;
}

.k2-blocco-foto .foto-card:hover a.moduleItemImage img {
  transform: scale(1.04) !important;
}

.k2-blocco-foto .foto-card-content {
  padding: 12px 14px !important;
  background-color: #ffffff !important;
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.k2-blocco-foto a.moduleItemTitle {
  font-family: "Amatic SC", cursive !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  line-height: 1.15 !important;
  height: auto !important;
  min-height: auto !important;
  overflow: visible !important;
  margin: 0 !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
  white-space: normal !important;
  word-wrap: break-word !important;
}

.k2-blocco-foto.k2-rubriche a.moduleItemTitle {
  color: #be5387 !important;
}

.k2-blocco-foto a.moduleItemTitle:hover {
  color: #4fa99f !important;
}

/* 4. Sidebar "Più letti" */
.t3-sidebar.t3-sidebar-right > .t3-module.piu-letti ul {
  padding-left: 0 !important;
  list-style: none !important;
}

.t3-sidebar.t3-sidebar-right > .t3-module.piu-letti ul > li {
  padding: 0 !important;
  border: 2px solid #6db8b1 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background-color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(109, 184, 177, 0.12) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.t3-sidebar.t3-sidebar-right > .t3-module.piu-letti ul > li + li {
  margin-top: 18px !important;
}

.t3-sidebar.t3-sidebar-right > .t3-module.piu-letti ul > li:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(109, 184, 177, 0.22) !important;
  border-color: #4fa99f !important;
}

.t3-sidebar.t3-sidebar-right > .t3-module.piu-letti ul > li img {
  width: 100% !important;
  height: 135px !important;
  object-fit: cover !important;
  display: block !important;
  border: none !important;
}

.t3-sidebar.t3-sidebar-right > .t3-module.piu-letti ul > li > a {
  padding: 10px 14px !important;
  display: block !important;
  font-family: "Amatic SC", cursive !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #383838 !important;
  text-decoration: none !important;
  text-align: center !important;
  transition: color 0.2s ease !important;
}

.t3-sidebar.t3-sidebar-right > .t3-module.piu-letti ul > li > a:hover {
  color: #4fa99f !important;
}

/* 5. Mobile Responsiveness */
@media (max-width: 767px) {
  .categoria-home .k2ItemsBlock > .row {
    flex-direction: column !important;
  }

  .categoria-home .prima-colonna {
    width: 100% !important;
    margin-bottom: 16px !important;
    padding-right: 15px !important;
  }

  .categoria-home .seconda-colonna {
    width: 100% !important;
    padding-left: 15px !important;
  }

  .categoria-home .prima-colonna .wrapper a.moduleItemImage {
    height: 220px !important;
  }

  .categoria-home .seconda-colonna .wrapper a.moduleItemImage {
    height: 180px !important;
  }

  .k2-blocco-foto .col-sm-3 {
    width: 50% !important;
    float: left !important;
  }

  .k2-blocco-foto .foto-card a.moduleItemImage {
    height: 130px !important;
  }
}
