/* ========================================
   AfinArt – Estils personalitzats
   Responsive, correccions visuals i millores
   ======================================== */

/* ---- SPA: Page visibility ---- */
.spa-page {
  animation: spa-fade-in 0.3s ease;
}

@keyframes spa-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- FIX: Spacer placeholders (quadradets) ---- */
.b-sp-placeholder {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.b-sp-c {
  border: none !important;
  outline: none !important;
}

/* ---- FIX: WebnodeIcons fallback (font not loaded) ---- */
.t .b-btn-5 .b-btn-l:after {
  content: '→' !important;
  font-family: inherit !important;
}

.t .b-text ul li:before {
  font-family: inherit !important;
}

/* ---- SERVEIS: Custom list bullets ---- */
.t .b-text ul {
  list-style: none !important;
  padding-left: 1.8em !important;
}

.t .b-text ul li {
  position: relative;
  padding-left: 0.2em;
  margin-bottom: 0.6em;
}

.t .b-text ul li:before {
  content: '' !important;
  font-family: inherit !important;
  position: absolute;
  left: -1.4em;
  top: 0.45em;
  width: 0.5em;
  height: 0.5em;
  background: #f9a825;
  border-radius: 50%;
}

/* ---- RESSENYES: Testimonial cards ---- */
#page-ressenyes .cw-c > .c > .c-c:has(.b-text + .b-text) {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #f9a825;
  padding: 1.5em 1.5em 1em;
  margin: 0.5em;
  border-radius: 6px;
  position: relative;
  min-height: 100px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#page-ressenyes .cw-c > .c > .c-c:has(.b-text + .b-text):hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#page-ressenyes .cw-c > .c > .c-c:has(.b-text + .b-text)::before {
  content: '\201C';
  font-size: 4em;
  color: #f9a825;
  opacity: 0.2;
  position: absolute;
  top: -0.05em;
  left: 0.15em;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
  pointer-events: none;
}

#page-ressenyes .cw-c > .c > .c-c:has(.b-text + .b-text) .b-text:last-child p strong {
  color: #f9a825;
  font-size: 0.95em;
}

#page-ressenyes .cw-c > .c > .c-c:has(.b-text + .b-text) .b-text:last-child::before {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: #f9a825;
  margin-bottom: 0.5em;
  opacity: 0.5;
}

/* Hide empty spacer column next to title */
#page-ressenyes .cw-c > .c > .c-c:has(> .b-sp:only-child) {
  display: none;
}

/* ---- RESSENYES: CTA buttons ---- */
.ressenyes-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8em;
  margin-top: 1.2em;
}

.ressenyes-cta .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.7em 1.3em;
  border-radius: 6px;
  text-decoration: none !important;
  font-weight: bold;
  font-size: 0.95em;
  color: #fff !important;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ressenyes-cta .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.ressenyes-cta .cta-whatsapp { background: #25d366; }
.ressenyes-cta .cta-instagram { background: #e1306c; }
.ressenyes-cta .cta-google { background: #4285f4; }
.ressenyes-cta .cta-email { background: #444; }
.ressenyes-cta .cta-phone { background: #1a6b3c; }

/* ---- CONTACTE: Layout & spacing fixes ---- */
/* Align both columns to top */
#page-home .mt-contact,
#page-contacte .mt-contact {
  margin-top: 0.5em;
}

/* Reduce gap between name and phone/email */
#page-home .mt-contact .mt-container,
#page-contacte .mt-contact .mt-container {
  margin-top: 0;
}

/* Right column aligned to top */
.contact-extra {
  padding: 0;
}

.contact-cta {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  margin-top: 1em;
}

.contact-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.9em 1.4em;
  border-radius: 6px;
  text-decoration: none !important;
  font-weight: bold;
  font-size: 1em;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.cta-phone {
  background: #1a6b3c;
  color: #fff !important;
}

.cta-email {
  background: #444;
  color: #fff !important;
}

.cta-whatsapp {
  background: #25d366;
  color: #fff !important;
}

.contact-info-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 1.5em;
  margin-top: 1.5em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-info-card h3 {
  color: #222;
  margin-top: 0;
  margin-bottom: 0.7em;
  font-size: 1.1em;
}

.contact-info-card p {
  margin: 0.3em 0;
  line-height: 1.6;
}

.contact-social {
  display: flex;
  gap: 1em;
  margin-top: 1em;
}

.contact-social a {
  color: #555 !important;
  text-decoration: none !important;
  font-size: 1em;
  font-weight: bold;
  padding: 0.5em 1em;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.contact-social a:hover {
  color: #f9a825 !important;
  border-color: #f9a825;
  background: rgba(249, 168, 37, 0.05);
}

/* ---- IMAGE PROPORTIONS: Limit height in column layouts ---- */
.cw .c .b-img-c {
  max-height: 55vh;
}

/* ======== MOBILE RESPONSIVE ======== */
@media (max-width: 899px) {
  /* -- Stack columns vertically -- */
  .cw-c {
    display: block !important;
  }

  .cw-c > .c {
    width: 100% !important;
    float: none !important;
    clear: both !important;
  }

  /* Hide spacer-only columns on mobile */
  .cw-c > .c > .c-c > .b-sp:only-child {
    display: none !important;
  }

  /* -- Mobile Menu -- */
  /* Hide desktop menu items */
  .menu-wrapper > ul.level-1 {
    display: none !important;
  }

  .menu-close, .more-text {
    display: none !important;
  }

  /* Show hamburger button */
  #menu-mobile {
    display: block !important;
  }

  #menu-submit {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    text-decoration: none !important;
    color: inherit;
    position: relative;
    z-index: 10001;
    font-size: 0;
    line-height: 0;
  }

  #menu-submit span {
    display: block !important;
    width: 24px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: background 0.3s;
  }

  #menu-submit span::before,
  #menu-submit span::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    position: absolute;
    transition: transform 0.3s;
  }

  #menu-submit span::before {
    top: -7px;
  }

  #menu-submit span::after {
    top: 7px;
  }

  /* Ensure hamburger is not clipped */
  .l-h, .l-h .sw, .l-h .sw-c,
  .s-hn, .s-hn .s-w, .s-hn .s-o,
  .h-w, .n-l, .n-l-w, .n-l-w-i {
    overflow: visible !important;
  }

  /* -- Images -- */
  .b-img-c {
    max-height: 50vh !important;
  }

  .cw .c .b-img-c {
    max-height: 45vh !important;
  }

  /* -- Buttons touch-friendly -- */
  .b-btn-l {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
  }

  /* -- Gallery: 2 columns -- */
  .b-gal-grid.grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* -- Ressenyes cards -- */
  #page-ressenyes .cw-c > .c > .c-c {
    margin: 0.5em 0;
  }

  /* -- FAQ touch targets -- */
  .mt-faq-title {
    min-height: 44px;
    cursor: pointer;
    padding: 0.3em 0;
  }

  /* -- Section padding -- */
  .s-c.s-fs {
    padding-left: 0.8em !important;
    padding-right: 0.8em !important;
  }

  /* -- Footer -- */
  footer.l-f {
    font-size: 0.85em !important;
    padding: 1.5em 1em !important;
  }

  /* -- Contact CTA -- */
  .contact-cta a {
    justify-content: center;
    text-align: center;
  }

  .contact-social {
    flex-wrap: wrap;
    justify-content: center;
  }

}

@media (max-width: 480px) {
  /* Gallery: 1 column on very small screens */
  .b-gal-grid.grid-3 {
    grid-template-columns: 1fr !important;
  }

  h1 {
    font-size: 1.5em !important;
  }
  h2 {
    font-size: 1.25em !important;
  }
  h3 {
    font-size: 1.05em !important;
  }
}
