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

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf9;
  --accent: #00B894;
  --accent-dark: #00997a;
  --accent-light: rgba(0, 184, 148, 0.08);
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --border-accent: rgba(0, 184, 148, 0.3);
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Negretes dins de textos secundaris */
p strong {
  color: var(--text);
  font-weight: 600;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s ease, border-color 0.35s ease;
}

nav.scrolled {
  background: var(--accent);
  border-bottom-color: transparent;
  box-shadow: 0 4px 24px rgba(0, 184, 148, 0.25);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  transition: color 0.35s ease;
}

.nav-logo span {
  color: var(--accent);
  transition: color 0.35s ease;
}

nav.scrolled .nav-logo {
  color: #fff;
}

nav.scrolled .nav-logo span {
  color: rgba(255, 255, 255, 0.75);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* SECTIONS */
section {
  padding: 5rem 0;
}

.section-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -1px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-top: 0.75rem;
}

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-danger:hover {
  border-color: rgba(239, 68, 68, 0.5) !important;
  background: rgba(239, 68, 68, 0.03) !important;
}

/* DIVIDER */
hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* FORM */
input[type="text"],
input[type="email"] {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

input::placeholder {
  color: #9ca3af;
}

/* CHECK LIST */
.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--text);
}

.check-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
  background: var(--accent-light);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.cross-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cross-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cross-list li::before {
  content: '✕';
  color: #ef4444;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
  background: rgba(239, 68, 68, 0.08);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

/* STEP */
.step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

/* MODULE NUMBER */
.mod-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

/* STAT NUMBERS */
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* FOOTER */
footer {
  background: #f7f8fa;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.footer-icon-link:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-light);
}

/* HERO BG */
.hero-bg {
  background: linear-gradient(135deg, #f0fdf9 0%, #ffffff 60%);
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr !important;
  }

  .four-col {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .three-col {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* mòdul 7 centrat en desktop perd el grid-column en mobile */
  .three-col > [style*="grid-column"] {
    grid-column: auto !important;
  }

  .six-col {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 600px) {
  section {
    padding: 3rem 0;
  }

  .four-col {
    grid-template-columns: 1fr !important;
  }

  .three-col {
    grid-template-columns: 1fr !important;
  }
}
