/* ================= Root Variables ================= */
:root {
  /* Colores RGB */
  --primary-color-rgb: 108, 40, 244; /* RGB de Púrpura intenso --primary-color */
  --secondary-color-rgb: 43, 157, 109; /* RGB de Verde tropical --secondary-color */
  --tertiary-color-rgb: 0, 0, 0; /* RGB de Negro --tertiary-color */
  --contact-color-rgb: 255, 255, 255; /* RGB de Blanco --contact-color */

  /* Colores claros hex originales (por compatibilidad) */
  --primary-color: #6c28f4;
  --secondary-color: #2b9d6d;
  --tertiary-color: #000000;
  --contact-color: #ffffff;
  --text-color: #000000;
  --text-secondary-color: #000000;
  --text-tertiary-color: #ffffff;

  /* Fondos */
  --background: rgba(255, 255, 255, 0.9);
  --background-color: rgba(255, 255, 255);
  --background-color-secondary: rgba(0, 0, 0, 0.2);
  --background-hero: rgba(255, 255, 255, 0.5);

  /* Enlaces */
  --nav-link-color: #000000;
  --nav-link-hover: #6c28f4;

  /* Fuentes y estilos */
  --border-radius: 10px;
  --transition-time: 0.3s;

  /* Otros estilos */
  --box-shadow-standard: 0px 4px 6px var(--background-color-secondary);
  --box-shadow-elevated: 0 10px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
  /* Colores oscuros */
  --primary-color: #6c28f4;
  --secondary-color: #2b9d6d;
  --tertiary-color: #ffffff;
  --contact-color: #000000;
  --text-color: #ffffff;
  --text-secondary-color: #000000;
  --text-tertiary-color: #ffffff;

  /* Fondos */
  --background: rgba(18, 18, 18, 0.8);
  --background-color: rgba(18, 18, 18);
  --background-color-secondary: rgba(255, 255, 255, 0.2);
  --background-hero: rgba(18, 18, 18, 0.5);

  /* Enlaces */
  --nav-link-color: #ffffff;
  --nav-link-hover: #6c28f4;

  /* Otros estilos */
  --box-shadow-standard: 0px 4px 6px var(--background-color-secondary);
  --box-shadow-elevated: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ================= Theme Toggle ================= */
#theme-toggle {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] #theme-toggle {
  color: var(--text-color);
}

#theme-toggle:hover {
  transform: rotate(360deg);
}

#theme-toggle:focus-visible {
  outline: 3px dashed var(--primary-color);
  outline-offset: 10px;
  border-radius: 50%;
}

/* ================= Fonts ================= */
@font-face {
  font-family: "Open Sans";
  src: url("/fonts/titles/OpenSans-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("/fonts/titles/OpenSans-Italic.woff2") format("woff2");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova Rg";
  src: url("/fonts/body/ProximaNova-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova Rg";
  src: url("/fonts/body/ProximaNova-BoldIt.woff2") format("woff2");
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova Rg";
  src: url("/fonts/body/ProximaNova-Bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* ============== RESET CSS ============== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  height: 100%;
  font-family: "Proxima Nova Rg", Arial, sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: "";
}

/* ================= General Styles ================= */
html {
  scroll-behavior: smooth;
}

body {
  height: auto;
  min-height: 100%;
  max-width: 100vw;
  font-family: "Proxima Nova Rg", Arial, sans-serif;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--background-color);
  transition: background-color var(--transition-time),
    color var(--transition-time);
  margin: 0;
  padding: 0;
}

/* ================= Utility Classes ================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ============ Header ======== */
.main-header {
  display: flex;
  align-items: center;
  background: var(--background);
  color: var(--text-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  margin: 0 auto;
  padding: 0 3.5%;
}

.container-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1900px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ================= Hamburger Menu ================= */
.menu-toggle {
  display: none;
  order: -1;
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 10px;
}

.hamburger {
  width: 30px;
  height: 3px;
  background-color: var(--nav-link-color);
  border-radius: var(--border-radius);
  position: relative;
  cursor: pointer;
  transition: var(--transition-time);
}

.hamburger::before,
.hamburger::after {
  width: 30px;
  height: 3px;
  background-color: var(--nav-link-color);
  border-radius: var(--border-radius);
  content: "";
  position: absolute;
  cursor: pointer;
  transition: var(--transition-time);
}

.hamburger::before {
  top: -10px;
  right: 0;
}

.hamburger::after {
  top: 10px;
  right: 0;
}

.menu-toggle.open .hamburger {
  background-color: transparent;
}

.menu-toggle.open .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-toggle.open .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* ================= Logo ================= */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  padding: 10px;
  z-index: 1000;
}

.logo {
  margin: 0;
}

.logo-image {
  width: 100px;
  height: auto;
  display: block;
  transition: transform var(--transition-time);
}

.logo-image:hover {
  transform: scale(1.1);
}

.menu-toggle {
  display: none;
}

/* ================= Navigation ================= */
.main-nav {
  margin-right: 0;
}

.main-nav ul {
  display: flex;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  position: relative;
  padding: 5px 10px;
  font-size: clamp(1rem, 0.8rem + 0.5vw, 1.2rem);
  color: var(--nav-link-color);
  text-decoration: none;
  transition: color var(--transition-time);
}

.main-nav a.active {
  font-weight: bold;
  color: var(--primary-color);
  /* text-decoration: underline; */
}

.main-nav a:hover {
  color: var(--primary-color);
}

.main-nav.open {
  display: flex;
  max-height: 500px;
  background-color: var(--background);
  border-bottom-right-radius: var(--border-radius);
}

/* ================= Hero Section ================= */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 1900px;
  margin: 0 auto;
  padding: 25px 3.5%;
  box-sizing: border-box;
  overflow: hidden;
}

/* ------------ Contenedor Principal ------------ */
.hero-content {
  position: relative;
  width: 100%;
  border-radius: var(--border-radius);
}

/* -------- Hero Text -------- */
.hero-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 1% 20px 1%;
}

/* -------- Hero Image -------- */
.hero-image {
  position: relative;
  z-index: -2;
  width: 100%;
  max-width: 1000px;
  border-radius: var(--border-radius);
  margin-top: 1%;
  margin-bottom: 1%;
  margin: 0 auto;
}

.hero-image img {
  width: 100%;
  height: auto;
  opacity: 1;
  object-fit: cover;
  border-radius: var(--border-radius);
}

/* -------- Styled Heading -------- */
.styled-heading {
  max-width: 75%;
  text-align: left;
  font-size: clamp(2.5rem, 2.5rem + 1vw, 4rem);
  font-weight: 400;
  line-height: 1.2;
  font-family: "Open Sans", sans-serif;
  margin-bottom: 15px;
}

.styled-heading .green,
.styled-heading .purple,
.styled-heading .black {
  font-size: clamp(2.5rem, 2.5rem + 1vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
}

.styled-heading .green {
  color: var(--secondary-color);
}

.styled-heading .purple {
  color: var(--primary-color);
}

.styled-heading .black {
  color: var(--text-color);
  text-shadow: var(--box-shadow-standard);
}

.fade-in-subtitle {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.2s ease-out 0.5s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-family: "Open Sans", sans-serif;
  font-size: clamp(1.5rem, 1.5rem + 0.5vw, 2.2rem);
  font-weight: 100;
  color: var(--text-color);
  margin-top: 20px;
  margin-bottom: 20px;
}

.hero-subtitle::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  margin: 10px auto 0;
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--primary-color)
  );
  border-radius: var(--border-radius);
}

/* -------- Hero List -------- */
.hero-list {
  list-style: none;
  padding: 10px 0;
  margin: 0;
  text-align: left;
}

.hero-list li {
  position: relative;
  margin-bottom: 10px;
  font-size: clamp(1rem, 1rem + 0.2vw, 1.5rem);
  color: var(--text-color);
}

/* -------- Call to Action Button -------- */
.cta-button {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 200px;
  padding: 10px 30px;
  margin: 20px auto;
  font-size: clamp(0.6rem, 0.6rem + 0.6vw, 1.6rem);
  font-weight: bold;
  text-decoration: none;
  color: var(--background-color);
  background: var(--primary-color);
  border: none;
  border-radius: 100px;
  outline: none;
  box-shadow: 0 0 0 transparent;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
  background: var(--background-color);
  color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
}

/* ================= Services Section ================= */
#services {
  scroll-margin-top: 75px;
}

.services {
  max-width: 1900px;
  margin: 0 auto;
  padding: 25px 3.5% 25px;
  box-sizing: border-box;
}

.section-services-title {
  text-align: center;
  font-size: clamp(1.5rem, 1rem + 1vw, 2rem);
  max-width: 700px;
  margin: 0 auto 15px;
  padding: 10px 20px;
  color: var(--secondary-color);
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  justify-items: center;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: 50px;
  background: rgba(var(--secondary-color-rgb), 0.2);
  border-radius: var(--border-radius);
  transition: transform var(--transition-time);
}

.card:hover {
  transform: translateY(-5px);
}

.card-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  margin-bottom: 25px;
  text-align: center;
  font-size: clamp(1.5rem, 1rem + 1vw, 1rem);
  color: var(--secondary-color);
}

.card-description {
  color: var(--text-color);
  line-height: 1.5;
}

/* CONTENIDO LINKS CARDS SERVICIOS BARCELONA */
/* Contenedor principal optimitzat */
.seo-container {
  padding: 25px 3.5%; /* Igual que .hero */
  max-width: 1000px; /* Igual que .hero-text */
  margin: 0 auto;
  line-height: 1.5;
  font-size: 1.05rem;
  color: var(--text-color);
}

.seo-container section + section {
  border-top: 2px solid rgba(var(--secondary-color-rgb), 0.3);
  margin-top: 1.5rem;
}

/* Elimina el separador a l'última secció */
.seo-container section:last-of-type {
  border-top: none;
  padding-top: 0;
}

.seo-container h1 {
  font-size: clamp(2rem, 1.5rem + 1vw, 2.8rem);
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
  line-height: 1.2;
  text-align: left;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

/* Media Queries */
@media (max-width: 768px) {
  .seo-container h1 {
    font-size: clamp(1.8rem, 1.2rem + 0.85rem, 2rem);
  }
}

.rotating-words {
  position: relative;
  display: inline-block;
  height: 1.2em;
  vertical-align: baseline;
}

.city {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  white-space: nowrap;
}

.city.active {
  opacity: 1;
  position: relative;
}

/* Subtítols */
.seo-container h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.8rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

/* Paràgrafs */
.seo-container p {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/* Llistes de serveis */
.seo-container ul {
  padding-left: 0;
  margin-top: 1rem;
  margin-bottom: 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.seo-container li {
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--box-shadow-standard);
  list-style: none;
}

/* Il·lustració */
.seo-container img {
  display: block;
  margin: 2rem auto;
  width: 100%;
  max-width: 600px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-soft);
}

.footer-note {
  font-size: 0.9rem;
  color: var(--text-color);
  text-align: center;
  margin-top: 2rem;
}
/* ================= Logos Section ================= */
.logos-section {
  max-width: 1900px;
  margin: 0 auto;
  padding: 30px 3.5%;
  text-align: center;
  box-sizing: border-box;
}

.container-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0 1%;
  max-width: 1900px;
}

.logos {
  width: 100px;
  height: auto;
  filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.logos:hover {
  transform: scale(1.1);
}

/* ================= Section transition 1 ================= */
.elegant-transition {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1900px;
  margin: 0 auto;
  padding: 25px 3.5%;
  overflow: hidden;
  text-align: center;
  box-sizing: border-box;
}

.transition-content {
  width: 1900px;
  margin: 0;
  padding: 0;
  border-radius: var(--border-radius);
  background: linear-gradient(
    to right,
    rgba(var(--secondary-color-rgb), 0.1) 0%,
    rgba(var(--primary-color-rgb), 0.1) 50%,
    rgba(var(--secondary-color-rgb), 0.1) 100%
  );
}

.transition-heading {
  margin-bottom: 0;
  padding: 40px 20px 0;
  font-size: clamp(1.5rem, 1rem + 1vw, 2rem);
  color: var(--primary-color);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  animation: slide-in-right 1s ease-out forwards;
  opacity: 0;
}

.transition-subheading {
  padding: 20px 350px 40px;
  text-align: center;
  line-height: 1.5;
  color: var(--text-color);
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  animation: slide-in-left 1s ease-out forwards;
  opacity: 0;
  animation-delay: 0.5s;
}

.solutions-icon {
  display: block;
  width: 100px;
  height: 100px;
  margin: 20px auto 0;
}

@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out-right {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes slide-in-left {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

/* ================= Projects Section ================= */
#projects {
  scroll-margin-top: 50px;
}

.projects-section {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1900px;
  margin: 0 auto;
  padding: 25px 3.5%;
  text-align: center;
  box-sizing: border-box;
}

.projects-container {
  width: 1900px;
  margin: 0 auto;
  border-radius: var(--border-radius);
}

.projects-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 20px;
  font-size: clamp(1.5rem, 1rem + 1vw, 2rem);
  color: var(--primary-color);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  text-align: center;
  box-sizing: border-box;
}

.projects-icon {
  width: 40px;
  height: 40px;
}

.projects-subtitle {
  padding: 0 20px 20px;
  line-height: 1.5;
  color: var(--text-color);
  text-align: center;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

.projects-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  margin-top: 25px;
  padding-bottom: 25px;
  justify-items: center;
  align-items: center;
}

.project-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 250px;
  height: auto;
  margin: 0 auto;
}

.project-logo img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  border-radius: var(--border-radius);
  filter: grayscale(100%);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.project-logo img:hover {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.project-logo.patapat img,
.project-logo.bheinn img {
  max-height: 70%;
  max-width: 70%;
  object-fit: contain;
}

/* ================= Team Section ================= */
#team {
  scroll-margin-top: 50px;
}

.team-section {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1900px;
  margin: 0 auto;
  padding: 25px 3.5%;
  text-align: center;
  box-sizing: border-box;
}

.team-container {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  box-sizing: border-box;
}

.team-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 40px;
  font-size: clamp(1.5rem, 1rem + 1vw, 2rem);
  color: var(--primary-color);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  background: linear-gradient(
    to right,
    rgba(var(--primary-color-rgb), 0.2) 0%,
    rgba(var(--primary-color-rgb), 0.1) 50%,
    rgba(var(--primary-color-rgb), 0.05) 100%
  );
}

.team-icon {
  width: 25px;
  height: 25px;
}

.team-subtitle {
  padding: 0 40px 40px;
  line-height: 1.5;
  color: var(--text-color);
  text-align: center;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  background: linear-gradient(
    to right,
    rgba(var(--primary-color-rgb), 0.2) 0%,
    rgba(var(--primary-color-rgb), 0.1) 50%,
    rgba(var(--primary-color-rgb), 0.05) 100%
  );
}

.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 20px;
  margin: 0 auto;
  padding: 25px 0 0;
  justify-items: center;
}

.card2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  transition: transform var(--transition-time);
}

.card2:hover {
  transform: translateY(-5px);
}

.card2-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card2-title {
  margin-bottom: 25px;
  text-align: center;
  font-size: clamp(1.5rem, 1rem + 1vw, 1rem);
  color: var(--primary-color);
}

.card2-description {
  color: var(--text-color);
  line-height: 1.5;
}

/* ==========================================================
       ❓ SECCIÓ FAQ (Preguntes Freqüents)
   ========================================================== */
.faq-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 25px 3.5% 25px;
  box-sizing: border-box;
}

.faq-container-outer {
  background-color: rgba(var(--secondary-color-rgb), 0.1);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
}

.faq-title {
  text-align: center;
  font-size: clamp(1.5rem, 1rem + 1vw, 2rem);
  max-width: 700px;
  margin: 0 auto 15px;
  padding: 10px 20px;
  color: var(--secondary-color);
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.faq-item {
  background-color: transparent;
  color: var(--text-color);
  border-bottom: 2px solid rgba(var(--secondary-color-rgb), 0.3);
  padding: 1rem 0;
}

.faq-item summary {
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  padding-left: 2rem;
  position: relative;
  list-style: none;
  margin-bottom: 0.5rem;
}

.faq-item summary::marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--secondary-color);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  content: "–";
  transform: translateY(-50%) rotate(180deg);
}

.faq-item:last-of-type {
  border-bottom: none;
}

.faq-answer {
  font-size: 1rem;
  color: var(--text-color);
  padding-left: 2rem;
  line-height: 1.6;
}

/* ================= Contact Section ================= */
#contact {
  scroll-margin-top: 75px;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 1900px;
  margin: 0 auto;
  padding: 25px 3.5% 0;
  box-sizing: border-box;
}

.contact-container {
  width: 100%;
  max-width: 1900px;
  padding: 50px;
  margin: 0;
  position: relative;
  text-align: center;
  border-radius: var(--border-radius);
  background: linear-gradient(
    to right,
    rgba(var(--secondary-color-rgb), 0.2) 0%,
    var(--contact-color) 40%,
    var(--contact-color) 60%,
    rgba(var(--primary-color-rgb), 0.2) 100%
  );
}

.contact-title {
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 1rem + 1vw, 2rem);
}

.contact-subtitle {
  color: var(--text-color);
  line-height: 1.5;
  margin-bottom: 20px;
}

.contact-icon {
  display: block;
  width: 50px;
  height: 50px;
  margin: 20px auto 0;
}

.contact-stars {
  position: absolute;
  top: 50%;
  right: 40px;
  z-index: 1;
  width: 35%;
  max-width: 300px;
  height: auto;
  opacity: 0.8;
  transform: translateY(-50%);
}

/* ================= Form Adjustments ================= */
.form-section {
  max-width: 1900px;
  margin: 0 auto;
  padding: 25px 3.5%;
  box-sizing: border-box;
}

.form-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 0 auto;
  width: 100%;
  max-width: 1900px;
}

.contact-form,
.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  width: 100%;
  border: 1px solid rgba(var(--secondary-color-rgb), 1);
  border-radius: var(--border-radius);
  box-sizing: border-box;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  width: 100%;
}

.form-group label {
  color: var(--text-color);
  margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(var(--secondary-color-rgb), 0.3);
  border-radius: var(--border-radius);
  background-color: var(--bg-secondary);
  color: var(--text-color);
  transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 5px rgba(var(--secondary-color-rgb), 0.5);
}

.contact-info {
  gap: 70px;
  text-align: center;
  line-height: 1.5;
}

.contact-info a {
  color: var(--text-color);
  text-decoration: none;
}

/* ================== AGENDA DE GOOGLE ================= */

.agenda-reunions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0; /* elimina l'espai vertical excessiu */
  padding: 20px;
  width: 100%;
  min-height: 640px; /* opcional, per igualar altura amb el formulari */
  border: 1px solid rgba(var(--secondary-color-rgb), 1);
  border-radius: var(--border-radius);
  box-sizing: border-box;
  text-align: center;
  line-height: 1.5;
}

.agenda-reunions p {
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
  color: black;
}

[data-theme="dark"] .agenda-reunions {
  background-color: #d5f2dd; /* o prova #d5f2dd si vols més to */
  color: black;
  border: 1px solid rgba(var(--secondary-color-rgb), 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}




/* ================= Thank You Section ================= */
.thank-you-main {
  padding: 50px;
}

.thank-you-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
  padding: 50px;
  max-width: 700px;
  background: var(--background-hero);
  border: 1px solid rgba(var(--primary-color-rgb), 0.3);
  border-radius: var(--border-radius);
}

.thank-you-title {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.thank-you-message {
  margin-bottom: 30px;
  line-height: 1.5;
  color: var(--text-color);
}

.thank-you-buttons {
  display: flex;
  gap: 15px;
}

.cta-button.secondary {
  background: var(--secondary-color);
  color: var(--background-color);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.cta-button.secondary:hover {
  background: var(--background-color);
  color: var(--secondary-color);
  box-shadow: 0 0 10px var(--secondary-color);
}

/* ================= Footer Section ================= */
.main-footer {
  margin: 0 auto;
  padding: 25px 3.5% 25px;
  box-sizing: border-box;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--text-tertiary-color);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 25px;
  max-width: 1900px;
}

.footer-column {
  flex: 1 1 1;
  min-width: 250px;
}

.footer-title {
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 3;
  color: var(--text-tertiary-color);
  position: relative;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 10%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background-color: var(--text-tertiary-color);
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 1rem;
  line-height: 2;
}

.footer-contact img {
  width: 20px;
  height: 20px;
}

.footer-column p {
  line-height: 3;
}

.footer-column a {
  color: var(--text-tertiary-color);
  text-decoration: none;
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.footer-column a:hover {
  color: var(--secondary-color);
  font-weight: bold;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-tertiary-color);
  text-decoration: none;
  font-weight: normal;
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.footer-links a:hover {
  color: var(--secondary-color);
  font-weight: bold;
}

.social-icons {
  display: flex;
  gap: 40px;
}

.social-icons img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-tertiary-color);
  border-top: 2px solid var(--secondary-color);
}

.footer-legal-links {
  margin-top: 10px;
  font-size: 0.85rem;
}

.footer-legal-links a {
  color: var(--text-tertiary-color);
  text-decoration: none;
  margin: 0 6px;
  transition: color 0.3s ease;
}

.footer-legal-links a:hover {
  color: var(--secondary-color);
}

/* ================= Whattsapp Section ================= */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  border-radius: 50px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  transition: background-color 0.3s ease;
}

.whatsapp-float:hover {
  background: #1ebe57;
}

.whatsapp-float img {
  width: 28px;
  height: 28px;
}


/* ================= Responsive Adjustments ================= */

/* General Adjustments */
@media (max-width: 768px) {
  .container {
    justify-content: flex-start;
  }

  #theme-toggle {
    margin-left: auto;
  }

.main-nav {
  background-color: rgba(255, 255, 255, 0.4);
  color: #000;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100vw;
  padding: 20px 10px;
  box-sizing: border-box;
  display: none;
  flex-direction: column;
  text-align: center;
  z-index: 1000;
}



.main-nav ul {
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.main-nav li {
  margin: 10px 0;
}

.main-nav a {
  font-size: 1.3rem; /* 👈 Aumentamos el tamaño de letra */
  color: var(--nav-link-color);
  text-decoration: none;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: var(--accent-color); /* o cualquier color de hover que uses */
}


.main-nav.open {
  display: flex;
  align-items: center; /* 👈 centra horizontalmente */
  justify-content: center; /* 👈 centra verticalmente si lo necesitas */
}



  .main-nav.open {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .menu-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
  }

  .logo {
    margin-left: 20px;
    margin-right: 5px;
    margin-top: 0;
    margin-bottom: 0;
    cursor: pointer;
  }

  .logo-image {
    width: 100px;
    height: auto;
    padding: 5px;
    display: block;
    transition: transform var(--transition-time);
  }
}

/* Hero Section */
@media (max-width: 1510px) {
  .styled-heading {
    max-width: 100%;
  }
}

@media (max-width: 1024px) {
  .hero {
    padding-top: 0;
  }

  .hero-bg {
    display: none !important; /* Oculta la nube si se reduce el tamaño de la pantalla */
  }
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .styled-heading {
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  }

  .styled-heading .green,
  .styled-heading .purple,
  .styled-heading .black {
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: clamp(1rem, 1rem + 1.5vw, 2rem);
  }

  .hero-list li {
    font-size: clamp(0.9rem, 0.7rem + 0.8vw, 1.1rem);
  }
}

@media (max-width: 425px) {
  .hero-text {
    padding-top: 0;
  }

  .hero-list {
    padding: 0 0 5px;
    list-style: none;
  }

  .hero-list li {
    line-height: 1.3;
  }
}

/* Services Section */
@media (max-width: 1024px) {
  .service-cards,
  .team-cards {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
  }

  .card,
  .card2 {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .service-cards,
  .team-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .card,
  .card2 {
    padding: 15px;
    min-height: 150px;
  }
}

/* Logos Section */
@media (max-width: 1024px) {
  .logos {
    width: 80px;
  }
}

@media (max-width: 768px) {
  .logos {
    width: 60px;
  }
}

@media (max-width: 480px) {
  .logos {
    width: 50px;
  }
}

@media (max-width: 375px) {
  .logos {
    width: 40px;
  }
}

/* Transition Section */
@media (max-width: 1440px) {
  .transition-subheading {
    padding: 20px 200px 40px;
  }
}

@media (max-width: 1024px) {
  .transition-subheading {
    padding: 20px 100px 40px;
  }
}

@media (max-width: 768px) {
  .transition-subheading {
    padding: 20px 30px 40px;
  }

  /* Projects Section */
  .project-logo.patapat img {
    margin-right: 0;
  }
}

/* Contact Section */
@media (max-width: 1024px) {
  .form-container {
    grid-template-columns: 1fr; /* Una columna: cajas en disposición vertical */
  }

  .contact-info {
    gap: 35px;
  }

  .contact-icons {
    gap: 60px;
  }

  .icon-box {
    width: 130px;
  }
}

@media (max-width: 768px) {
  .contact-info {
    gap: 25px;
  }

  .contact-icons {
    gap: 30px;
  }

  .icon-box {
    width: 25%;
  }
}
