/* ===== CSS Variables / Design Tokens ===== */
:root {
  /* Colors */
  --primary: hsl(213, 70%, 25%);
  --primary-light: hsl(213, 70%, 35%);
  --primary-dark: hsl(213, 70%, 15%);
  --secondary: hsl(28, 100%, 50%);
  --secondary-light: hsl(28, 100%, 60%);
  --background: hsl(210, 20%, 98%);
  --foreground: hsl(213, 30%, 15%);
  --muted: hsl(210, 15%, 90%);
  --muted-foreground: hsl(210, 10%, 45%);
  --border: hsl(210, 15%, 85%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(213, 30%, 15%);
  
  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  
  /* Spacing */
  --container-max: 1200px;
  --header-height: 120px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  padding-top: var(--header-height);
}

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

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

ul {
  list-style: none;
}

/* ===== Utility Classes ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--muted);
}

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--secondary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-light);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--primary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--primary-light);
}

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

.btn-outline:hover {
  background-color: var(--secondary);
  color: white;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--card);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
  background-color: var(--primary);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.header-top a {
  color: white;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: opacity var(--transition-fast);
}

.header-top a:hover {
  opacity: 0.8;
}

.header-top-left,
.header-top-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-main {
  padding: 1rem 0;
}

.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--secondary);
}

.logo-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: var(--foreground);
  transition: color var(--transition-fast);
  border-radius: 4px;
}

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

.nav-link.active {
  color: var(--secondary);
}

/* Vi fixar dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
  background: transparent;
  border: none;
  font-size: 1rem;
  font-family: var(--font-body);
}

.nav-dropdown-trigger:hover {
  background-color: var(--muted);
}

.nav-dropdown-label {
  color: var(--secondary);
  font-weight: 700;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--card);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  padding: 0.5rem;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--foreground);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.nav-dropdown-item:hover {
  background-color: var(--muted);
  color: var(--secondary);
}

.nav-dropdown-item.featured {
  font-weight: 600;
  color: var(--primary);
}

.nav-dropdown-divider {
  height: 1px;
  background-color: var(--border);
  margin: 0.5rem 0;
}

/* Med mera sub-dropdown */
.nav-subdropdown {
  position: relative;
}

.nav-subdropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  color: var(--muted-foreground);
  font-style: italic;
  border-radius: 4px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-subdropdown-trigger:hover {
  background-color: var(--muted);
}

.nav-subdropdown-menu {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 200px;
  background-color: var(--card);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all var(--transition-fast);
  padding: 0.5rem;
}

.nav-subdropdown:hover .nav-subdropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary);
  margin: 5px 0;
  transition: all var(--transition-fast);
  border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Language switcher */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.lang-switch a {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.875rem;
}

.lang-switch a:hover {
  background-color: var(--muted);
}

.lang-switch a.active {
  background-color: var(--primary);
  color: white;
}

/* ===== Hero Slider ===== */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(20, 45, 80, 0.85) 0%, rgba(20, 45, 80, 0.6) 100%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10;
  width: 90%;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: white;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-nav {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hero-dot.active {
  background-color: var(--secondary);
  transform: scale(1.2);
}

/* ===== Features Section ===== */
.features {
  padding: 5rem 0;
}

.feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.feature-card:nth-child(even) {
  direction: rtl;
}

.feature-card:nth-child(even) > * {
  direction: ltr;
}

.feature-card:last-child {
  margin-bottom: 0;
}

.feature-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.feature-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.feature-card:hover .feature-image img {
  transform: scale(1.05);
}

.feature-content h3 {
  margin-bottom: 1rem;
}

.feature-content p {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* ===== Testimonials ===== */
.testimonials {
  background-color: var(--primary);
  color: white;
  padding: 5rem 0;
}

.testimonials h2 {
  color: white;
  text-align: center;
  margin-bottom: 3rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background-color: rgba(255,255,255,0.1);
  padding: 2rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.testimonial-stars {
  color: var(--secondary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.testimonial-author {
  font-weight: 600;
}

.testimonial-role {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* ===== Contact Section ===== */
.contact {
  padding: 5rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  margin-bottom: 1.5rem;
}

.contact-info p {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--foreground);
}

.contact-item svg {
  color: var(--secondary);
  flex-shrink: 0;
}

.contact-form {
  background-color: var(--card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--secondary);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ===== Footer ===== */
.footer {
  background-color: var(--primary-dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo-text {
  color: white;
}

.footer-brand p {
  margin-top: 1rem;
  opacity: 0.7;
  max-width: 300px;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: white;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--secondary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  opacity: 0.7;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background-color: var(--secondary);
}

/* ===== Page Header ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.page-header h1 {
  color: white;
  margin-bottom: 1rem;
}

.page-header p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Content Page ===== */
.page-content {
  padding: 4rem 0;
}

.page-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--muted-foreground);
}

.page-content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
  color: var(--muted-foreground);
  list-style: disc;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  }

  .nav.active {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 1rem;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 1rem;
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-subdropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 1rem;
    display: none;
  }

  .nav-subdropdown:hover .nav-subdropdown-menu,
  .nav-subdropdown.open .nav-subdropdown-menu {
    display: block;
  }

  .mobile-toggle {
    display: block;
  }

  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }

  .feature-card {
    grid-template-columns: 1fr;
  }

  .feature-card:nth-child(even) {
    direction: ltr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 140px;
  }

  .header-top .container {
    justify-content: center;
    text-align: center;
  }

  .header-top-left,
  .header-top-right {
    justify-content: center;
    width: 100%;
  }

  .hero {
    height: 60vh;
    min-height: 400px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    margin: 1rem auto 0;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .nav-label {
    display: none;
  }
}

/* ===== New Navigation Style ===== */
.nav-label {
  font-weight: 700;
  color: var(--secondary);
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  font-size: 1rem;
}

/* ===== Page Hero ===== */
.page-hero {
  position: relative;
  height: 50vh;
  min-height: 350px;
  overflow: hidden;
}

.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10;
  width: 90%;
  max-width: 800px;
}

.page-hero-content h1 {
  color: white;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-hero-content p {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* ===== Info Grid ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.info-card {
  background: var(--card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  text-align: center;
}

.info-icon {
  color: var(--secondary);
  margin-bottom: 1rem;
}

.info-card h3 {
  margin-bottom: 0.75rem;
}

.info-card p {
  color: var(--muted-foreground);
}

/* ===== Feature Block ===== */
.feature-block {
  max-width: 900px;
  margin: 0 auto;
}

.feature-block-content .lead {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

/* ===== Comparison Grid ===== */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.comparison-bad, .comparison-good {
  padding: 1.5rem;
  border-radius: 8px;
}

.comparison-bad {
  background: hsl(0, 80%, 97%);
  border-left: 4px solid hsl(0, 70%, 50%);
}

.comparison-good {
  background: hsl(120, 60%, 97%);
  border-left: 4px solid hsl(120, 50%, 40%);
}

.comparison-bad h4, .comparison-good h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.comparison-bad ul, .comparison-good ul {
  padding-left: 1rem;
}

.comparison-bad li, .comparison-good li {
  margin-bottom: 0.5rem;
  list-style: disc;
}

.comparison-bad code, .comparison-good code {
  display: block;
  padding: 0.5rem;
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
  font-size: 0.75rem;
  word-break: break-all;
  margin-bottom: 0.5rem;
}

/* ===== Feature List ===== */
.feature-list {
  margin-top: 2rem;
}

.feature-list-item {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--secondary);
}

.feature-list-item strong {
  display: block;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.feature-list-item p {
  color: var(--muted-foreground);
  margin: 0;
}

/* ===== Progression Flow ===== */
.progression-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--muted);
  border-radius: 8px;
}

.progression-step {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
}

.progression-arrow {
  color: var(--secondary);
  font-size: 1.5rem;
  font-weight: bold;
}

/* ===== Quote ===== */
.quote {
  font-size: 1.5rem;
  font-style: italic;
  color: var(--primary);
  max-width: 700px;
  margin: 0 auto;
}

.quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 1rem;
  font-style: normal;
  color: var(--muted-foreground);
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: white;
  text-align: center;
  padding: 4rem 2rem;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

.cta-section .btn-primary {
  background: var(--primary);
}

.cta-section .btn-primary:hover {
  background: var(--primary-light);
}

@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .progression-flow {
    flex-direction: column;
  }
  
  .progression-arrow {
    transform: rotate(90deg);
  }
}
