/* --- THEME & COLOR VARIABLES --- */
:root {
  --bg-primary: #f6f8ff;
  --bg-page-wrapper: #ffffff;
  --text-primary: #1d2b4f;
  --text-secondary: #6e7b98;
  --border-primary: #eaeffc;
  --shadow-color: rgba(29, 43, 79, 0.08);
  --primary-action: #4a69ff;
  --primary-action-hover: #3558ff;
  --font-family: "Inter", sans-serif;
}

:root.dark-theme {
  --bg-primary: #1a202c;
  --bg-page-wrapper: #2d3748;
  --text-primary: #f7fafc;
  --text-secondary: #a0aec0;
  --border-primary: #4a5568;
  --shadow-color: rgba(0, 0, 0, 0.2);
}

/* --- GENERAL RESET & SETUP --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease;
}

.page-wrapper {
  background-color: var(--bg-page-wrapper);
  border: 1px solid var(--border-primary);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px var(--shadow-color);
  overflow: hidden;
  margin: 1.5rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}
section {
  padding: 120px 0;
}

/* --- HEADER & NAVIGATION --- */
.main-header {
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-primary);
  background: color-mix(in srgb, var(--bg-page-wrapper) 85%, transparent);
  backdrop-filter: blur(12px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  height: 40px;
  width: auto;
}
.logo-text {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
}
.nav-links-desktop {
  display: none;
  align-items: center;
  gap: 16px;
  list-style-type: none;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s ease;
  padding: 10px 16px;
  border-radius: 8px;
}
.nav-link:hover {
  color: var(--primary-action);
}
.nav-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

/* --- NAVBAR DROPDOWN / OVERLAY --- */
.nav-item {
  position: relative;
}
.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}
.nav-item:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.dropdown-content {
  background: var(--bg-page-wrapper);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: 0 10px 30px -5px var(--shadow-color);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 320px;
}
.dropdown-panel.wide .dropdown-content {
  width: 500px;
}
.dropdown-content.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border-radius: 8px;
}
.dropdown-item .feature-icon.small {
  width: 36px;
  height: 36px;
  font-size: 18px;
  margin-bottom: 0;
  flex-shrink: 0;
}
.item-text h5 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 2px;
}
.item-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}
.dropdown-item-text {
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.dropdown-item-text:hover {
  color: var(--primary-action);
  background-color: color-mix(in srgb, var(--primary-action) 10%, transparent);
}

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--primary-action);
  color: var(--primary-action);
}
.moon-icon {
  display: none;
}
:root.dark-theme .moon-icon {
  display: block;
}
:root.dark-theme .sun-icon {
  display: none;
}

/* --- TYPOGRAPHY --- */
.headline-large {
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.headline-large .highlight {
  color: var(--primary-action);
}
.sub-headline {
  font-size: 1.2rem;
  color: #eaeffc;
  max-width: 600px;
  text-align: center;
  margin: 0 auto 2.5rem auto;
}
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4rem;
  color: var(--text-primary);
  line-height: 1.2;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
strong {
  color: var(--primary-action);
}

/* --- BUTTONS & CTAs --- */
.cta-primary {
  display: inline-block;
  background-color: var(--primary-action);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px 0 rgba(74, 105, 255, 0.39);
}
.cta-primary:hover {
  background-color: var(--primary-action-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(74, 105, 255, 0.45);
}
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Mobile Menu --- */
.nav-toggle {
  display: block;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}
.hamburger {
  display: block;
  position: relative;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.25s ease-in-out;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.25s ease-in-out;
}
.hamburger::before {
  top: -8px;
}
.hamburger::after {
  bottom: -8px;
}
.nav-toggle.active .hamburger {
  transform: rotate(135deg);
}
.nav-toggle.active .hamburger::before,
.nav-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(90deg);
}
.mobile-nav-menu {
  position: absolute;
  top: 73px;
  left: 0;
  right: 0;
  background-color: var(--bg-page-wrapper);
  border-bottom: 1px solid var(--border-primary);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  transform: translateY(-150%);
  transition: transform 0.3s ease-in-out, background-color 0.3s ease,
    border-color 0.3s ease;
  z-index: 99;
  box-shadow: 0 10px 20px var(--shadow-color);
}
.mobile-nav-menu.active {
  transform: translateY(0);
}
.mobile-nav-menu .nav-link {
  font-size: 1.2rem;
  color: var(--text-primary);
}

/* --- Language Switcher --- */
.language-switcher {
  position: relative;
}
.language-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.language-btn:hover {
  border-color: var(--primary-action);
  color: var(--primary-action);
}
.language-switcher .flag-icon {
  width: 20px;
  height: 15px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}
.current-lang {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.lang-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}
.language-btn.active .lang-arrow {
  transform: rotate(180deg);
}
.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-page-wrapper);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: all 0.2s ease;
  margin-top: 8px;
}
.language-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s ease;
  gap: 8px;
}
:root.light-theme .lang-option:hover {
  background-color: #f3f4f6;
}
:root.dark-theme .lang-option:hover {
  background-color: #4a5568;
}

/* --- HERO & CAROUSEL --- */
.hero {
  padding: 140px 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 70vh;
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-background-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-background-carousel .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-background-carousel .slide.active {
  opacity: 1;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}
:root.dark-theme .hero-overlay {
  background: rgba(0, 0, 0, 0.6);
}

/* --- NEW: CSS Placeholders for Carousel --- */
.slide::after {
  content: none;
}
.slide:nth-child(1) {
  background-color: #1d2b4f;
}
.slide:nth-child(2) {
  background-color: #4a69ff;
}
.slide:nth-child(3) {
  background-color: #1a202c;
}
.slide:nth-child(4) {
  background-color: #3d4852;
}
.slide:nth-child(5) {
  background-color: #2c5282;
}
/* --- END NEW --- */

.hero-content .headline-large,
.hero-content .sub-headline {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* --- SOLUTIONS SECTION (FEATURES) --- */
.features {
  background-color: color-mix(
    in srgb,
    var(--bg-page-wrapper) 50%,
    var(--bg-primary)
  );
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.feature-card {
  background-color: var(--bg-page-wrapper);
  padding: 30px;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px var(--shadow-color);
  border: none;
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px var(--shadow-color);
}
.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background-color: var(--primary-action);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
}
.feature-card .problem-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  border-left: 3px solid var(--border-primary);
  padding-left: 1rem;
}

/* --- MODULES SECTION --- */
.modules-section {
  background-color: var(--bg-page-wrapper);
}
.module-tabs-container {
  display: flex;
  gap: 40px;
}
.module-tabs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--border-primary);
  padding-right: 20px;
  flex-shrink: 0;
}
.module-tab {
  padding: 10px 20px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.module-tab:hover {
  background-color: color-mix(in srgb, var(--primary-action) 10%, transparent);
  color: var(--primary-action);
}
.module-tab.active {
  background-color: var(--primary-action);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(74, 105, 255, 0.39);
}
.module-content-container {
  flex-grow: 1;
  min-width: 0;
}
.module-content {
  display: none;
}
.module-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.content-wrapper {
  display: flex;
  gap: 30px;
}
.content-text {
  flex: 2;
}
.content-text h3 {
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}
.content-text h5 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--text-primary);
}
.content-text ol {
  padding-left: 20px;
  color: var(--text-secondary);
}
.content-text ol li {
  margin-bottom: 0.5rem;
}
.module-content .problem-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-style: italic;
}
.content-visual {
  flex: 1;
}
.visual-placeholder {
  width: 100%;
  height: 300px;
  background: color-mix(in srgb, var(--bg-page-wrapper) 50%, var(--bg-primary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

/* --- HOW-IT-WORKS SECTION --- */
.how-it-works {
  background-color: color-mix(
    in srgb,
    var(--bg-page-wrapper) 50%,
    var(--bg-primary)
  );
}
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
.step {
  text-align: center;
  padding: 20px;
}
.step-icon {
  width: 50px;
  height: 50px;
  background-color: transparent;
  color: var(--primary-action);
  border: 2px solid var(--primary-action);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.step-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.step-connector {
  display: none;
}

/* --- OTHER SECTIONS --- */
.uniqueness {
  border-top: 1px solid var(--border-primary);
}
.uniqueness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: center;
}
.uniqueness-item {
  padding: 1rem;
}
.faq-section {
  background-color: var(--bg-page-wrapper);
}
.faq-container {
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  background-color: transparent;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.faq-item[open] {
  border-color: var(--primary-action);
}
.faq-item[open] summary {
  color: var(--primary-action);
  font-weight: 700;
}
.faq-question {
  font-size: 1.1rem;
  font-weight: 500;
  padding: 20px;
  cursor: pointer;
  list-style: none;
  position: relative;
  color: var(--text-primary);
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease, color 0.3s ease;
}
.faq-item[open] .faq-question::after {
  color: var(--primary-action);
  transform: translateY(-50%) rotate(45deg);
}
.faq-answer {
  padding: 0 20px 20px 20px;
  color: var(--text-secondary);
}

.vision {
  background-color: #1d2b4f;
  color: #ffffff;
  text-align: center;
  border-radius: 20px;
  margin: 0 2rem;
  padding: 100px 40px;
}
:root.dark-theme .vision {
  background-color: #1a202c;
}
.vision .section-title,
.vision .vision-text {
  color: #ffffff;
}
.vision .vision-text {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 2rem auto;
}
.vision .cta-primary.vision-cta {
  background-color: #fff;
  color: #1d2b4f;
}
.vision .cta-primary.vision-cta:hover {
  background-color: #f0f0f0;
}

/* --- FOOTER --- */
.main-footer-section {
  background-color: transparent;
  padding: 60px 0;
  border-top: 1px solid var(--border-primary);
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: flex-start;
}
.footer-brand .logo-text,
.footer-links h4,
.footer-contact h4 {
  color: var(--text-primary);
  font-weight: 700;
}
.footer-links a,
.footer-contact a,
.copyright {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.powered-by {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.footer-links a:hover,
.footer-contact a:hover {
  color: var(--primary-action);
}
.copyright {
  font-size: 0.875rem;
  margin-top: 1rem;
}
.footer-links,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* --- FADE-IN ANIMATION --- */
.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-element.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE DESIGN --- */
@media (min-width: 769px) {
  .steps-grid {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 30px;
  }
  .step-connector {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--border-primary);
    margin-top: 25px;
  }
}
@media (max-width: 1024px) {
  body {
    padding: 0;
  }
  .page-wrapper {
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
  }
  .nav-links-desktop,
  .nav-actions {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
}
@media (min-width: 1025px) {
  .nav-toggle {
    display: none;
  }
  .nav-links-desktop {
    display: flex;
  }
  .nav-actions {
    display: flex;
  }
}
@media (max-width: 768px) {
  .headline-large {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .features-grid,
  .uniqueness-grid {
    grid-template-columns: 1fr;
  }
  .vision {
    margin: 0;
    border-radius: 0;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-brand,
  .footer-links,
  .footer-contact {
    align-items: center;
    display: flex;
    flex-direction: column;
  }
  .module-tabs-container {
    flex-direction: column;
    gap: 20px;
  }
  .module-tabs {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-primary);
    padding-right: 0;
    padding-bottom: 10px;
  }
  .content-wrapper {
    flex-direction: column-reverse;
  }
}
