/* Importació de la font Comfortaa */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&display=swap');

:root {
  --font-heading: 'Futura', 'Futura PT', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Comfortaa', cursive, sans-serif;

  /* --- FONS I COLORS BASE --- */
  --bg-page: #f7f4ee;
  --bg-card: #ffffff;
  --bg-card-subtle: #f0ece3;
  
  --purple-primary: #3c096c;
  --purple-deep: #10002b;
  --purple-light: #6a0da0;
  --purple-logo-sub: #5a189a;
  
  /* --- TONS TERRAPES / COBRE D'ÀNIMA --- */
  --color-terracotta: #B67957;
  --color-terracotta-hover: #9c6342;
  --color-terracotta-light: rgba(182, 121, 87, 0.16);
  --color-terracotta-border: rgba(182, 121, 87, 0.55);
  
  --color-text: #221f20;
  --color-text-muted: #6b6566;
  --color-white: #ffffff;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-capsule: 30px;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

section {
  padding: 6rem 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--purple-primary);
  line-height: 1.2;
}

.section-title {
  font-size: 2.3rem;
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--purple-primary);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
  font-weight: 400;
}

.text-left {
  text-align: left;
}

/* =============================================================
   HEADER ESTIL REFERÈNCIA (EXACTE)
============================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(247, 244, 238, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-terracotta-border);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 300 !important;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.logo-db {
  color: var(--color-terracotta) !important;
  font-weight: 600;
}

.logo-beneyto {
  color: var(--purple-primary) !important;
  font-weight: 300;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.nav-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--color-terracotta);
}

/* Botó WhatsApp (Escriptori) */
.nav-btn {
  background-color: transparent !important;
  color: var(--color-terracotta) !important;
  border: 1px solid var(--color-terracotta) !important;
  padding: 0.45rem 1.15rem !important;
  border-radius: var(--radius-capsule) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  transition: var(--transition) !important;
}

.nav-btn svg {
  width: 14px !important;
  height: 14px !important;
  fill: var(--color-terracotta) !important;
  transition: fill var(--transition) !important;
}

.nav-btn:hover {
  background-color: var(--color-terracotta) !important;
  border-color: var(--color-terracotta) !important;
  color: var(--color-white) !important;
}

.nav-btn:hover svg {
  fill: var(--color-white) !important;
}

/* Per defecte en escriptori amaguem el botó independent de mòbil */
.mobile-whatsapp-icon {
  display: none !important;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 0.5rem;
}

.mobile-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background-color: var(--color-terracotta);
  transition: var(--transition);
}

/* =============================================================
   HERO PRINCIPAL
============================================================= */
.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 130px;
  padding-bottom: 70px;
  background: radial-gradient(circle at top center, rgba(182, 121, 87, 0.12) 0%, rgba(247, 244, 238, 1) 70%);
  text-align: center;
}

.hero-content {
  max-width: 820px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-terracotta);
  background-color: var(--color-terracotta-light);
  border: 1px solid var(--color-terracotta-border);
  padding: 0.4rem 1.2rem;
  border-radius: 30px;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--purple-primary);
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto;
  font-weight: 400;
}

/* =============================================================
   TARGETES PORTAL (SHOWS)
============================================================= */
.experiences-section {
  background-color: var(--bg-page);
  padding: 6rem 0;
}

.cards-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.2rem;
  margin-top: 2rem;
}

.portal-card {
  background-color: var(--bg-card);
  border: 2px solid var(--color-terracotta-border);
  border-radius: var(--radius-md);
  padding: 2.8rem 2.2rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: 0 10px 25px rgba(182, 121, 87, 0.08);
}

.portal-card:hover {
  border-color: var(--color-terracotta);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(182, 121, 87, 0.2);
}

.portal-card-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: var(--purple-primary);
  border: 1px solid rgba(182, 121, 87, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.portal-card:hover .portal-card-logo {
  transform: scale(1.05);
}

.portal-card-logo img {
  max-width: 55%;
  max-height: 55%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.portal-card-badge {
  font-size: 0.75rem;
  color: var(--color-terracotta);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.portal-card-title {
  font-size: 1.65rem;
  margin-bottom: 1rem;
  color: var(--purple-primary);
}

.portal-card-text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.portal-features {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
  border-top: 1px solid var(--color-terracotta-border);
  padding-top: 1.25rem;
}

.portal-features li {
  font-size: 0.88rem;
  color: var(--color-text);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
}

.portal-features li::before {
  content: "—";
  color: var(--color-terracotta);
  font-weight: 700;
}

.btn-portal {
  text-align: center;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
  color: var(--color-white);
  background-color: var(--color-terracotta);
  border: 1px solid var(--color-terracotta);
  letter-spacing: 0.5px;
}

.portal-card:hover .btn-portal {
  background-color: var(--purple-primary);
  border-color: var(--purple-primary);
}

/* =============================================================
   SECCIÓ SOBRE MI
============================================================= */
.about-section {
  padding: 6rem 0;
  background-color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid var(--color-terracotta-border);
  border-bottom: 1px solid var(--color-terracotta-border);
}

.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 4rem;
  align-items: center;
}

.about-brand-box {
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--purple-primary);
  border: 2px solid var(--color-terracotta-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(182, 121, 87, 0.15);
}

.about-logo-img {
  max-width: 65%;
  max-height: 65%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.about-intro {
  color: var(--color-terracotta);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.card-text {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  margin-bottom: 1rem;
}

/* =============================================================
   FOOTER
============================================================= */
.footer {
  border-top: 1px solid var(--color-terracotta-border);
  padding: 3.5rem 0;
  text-align: center;
  background-color: var(--bg-card-subtle);
}

.footer-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.footer-logo-img {
  height: 30px;
  width: auto;
}

.footer-logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: 2px;
  color: var(--purple-logo-sub);
  font-weight: 700;
}

.footer-links {
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.footer-links span {
  margin: 0 0.8rem;
  color: var(--color-terracotta);
  opacity: 0.6;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--color-terracotta);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* =============================================================
   RESPONSIVE MÒBIL (CONFIGURACIÓ DELS BOTONS AL HEADER)
============================================================= */
@media (max-width: 900px) {
  .mobile-toggle {
    display: block;
    z-index: 1003;
  }

  /* Amaguen el botó llarg de WhatsApp que està dins del menú desplegable mòbil */
  .nav-menu .desktop-whatsapp-btn {
    display: none !important;
  }

  /* Transformem el botó de WhatsApp en una circumferència perfecta amb centratge absolut per CSS background */
  .header-container .mobile-whatsapp-icon {
    display: flex !important;
    position: absolute !important;
    right: 56px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    background-color: transparent !important;
    border: 1px solid var(--color-terracotta) !important;
    
    /* Injecció de l'SVG directament com a fons per controlar el centratge mil·limètric */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23B67957'%3E%3Cpath d='M.057 24l1.687-6.163c-1.041-1.804-1.588-3.849-1.587-5.946.003-6.556 5.338-11.891 11.893-11.891 3.181.001 6.167 1.24 8.413 3.488 2.245 2.248 3.481 5.236 3.48 8.414-.003 6.557-5.338 11.892-11.893 11.892-1.99-.001-3.951-.5-5.688-1.448l-6.305 1.654zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 18px 18px;
    z-index: 1002;
  }

  /* Amaguem qualsevol SVG intern que pogués quedar de l'etiqueta HTML */
  .header-container .mobile-whatsapp-icon svg {
    display: none !important;
  }

  /* Menú desplegable mòbil */
  .nav-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: var(--bg-page);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    margin-left: 0;
    transition: var(--transition);
    border-top: 1px solid var(--color-terracotta-border);
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .text-left {
    text-align: center;
  }

  .about-brand-box {
    max-width: 200px;
    margin: 0 auto;
  }
}