/* Fonts & reset */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

html,
body {
  height: 100%;
}

/* Smooth scroll for the entire page */
html {
  scroll-behavior: smooth;
}

/* Theme vars */
body {
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image: linear-gradient(
      to bottom,
      rgba(var(--bg-from-rgb), 0.7),
      transparent 30vh
    ),
    radial-gradient(at 0% 0%, var(--bg-from) 0%, transparent 50%),
    radial-gradient(at 100% 100%, var(--bg-to) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-via), var(--bg-via));
  background-size: cover;
  background-attachment: fixed;
  color: var(--text-color);
}

/* Light theme */
body.theme-light {
  --bg-from: #ffffff;
  --bg-from-rgb: 255, 255, 255;
  --bg-via: #e6f3f5;
  --bg-to: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.95);
  --text-color: #111827;
  --accent: #047857;
  --accent-ui: #ff007f;
  --muted: #6b7280;
  --header-text: #000000;
  --dropdown-hover-bg: #e0e0e0;
  --dropdown-hover-text: #000000;
  --border-color: rgba(0, 0, 0, 0.06);
  --hero-title-color: #000;
  --hero-title-shadow: none;
}

/* Dark theme */
body.theme-dark {
  --bg-from: #0f172a;
  --bg-from-rgb: 15, 23, 42;
  --bg-via: #020617;
  --bg-to: #020617;
  --card-bg: rgba(17, 24, 39, 0.92);
  --text-color: #e6eef8;
  --accent: #34d399;
  --accent-ui: #ff4da6;
  --muted: #94a3b8;
  --header-text: #ffffff;
  --dropdown-hover-bg: #374151;
  --dropdown-hover-text: #ffffff;
  --border-color: rgba(255, 255, 255, 0.06);
  --hero-title-color: #fff;
  --hero-title-shadow: none;
}

/* Section backgrounds */
#features {
  background: var(--bg-via);
}

#testimonials {
  background: var(--bg-from);
}

#cta {
  background-image: radial-gradient(
      at 0% 0%,
      var(--bg-from) 0%,
      transparent 50%
    ),
    radial-gradient(at 100% 100%, var(--bg-to) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-via), var(--bg-via));
}

footer {
  background: var(--bg-from);
}

/* Header Section */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-bottom-color: transparent;
}

body.theme-dark header {
  background: rgba(17, 24, 39, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

body.theme-dark header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-size: 1.875rem;
  font-weight: 800;
}

.tagline {
  font-size: 0.875rem;
  color: var(--muted);
  display: none;
}

.desktop-nav {
  display: none;
  gap: 1.5rem;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.nav-link {
  color: var(--header-text);
  transition: color 0.2s ease-in-out;
  text-decoration: none;
}

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

/* Mobile Navigation (Side Drawer) */
.mobile-nav-menu {
  position: fixed;
  top: 88px;
  right: 0;
  width: 60%;
  max-width: 350px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-left: 1px solid rgba(0, 0, 0, 0.04);
  z-index: 90;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;

  /* Animation for the slide-in effect */
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
}

body.theme-dark .mobile-nav-menu {
  background: rgba(6, 10, 20, 0.8);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.5);
}

.mobile-nav-menu.hidden {
  transform: translateX(100%);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
}

.mobile-nav-menu .nav-link {
  color: var(--text-color);
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
}

.mobile-nav-menu .nav-link:hover {
  color: var(--accent-ui);
}

.mobile-menu-btn {
  display: initial;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 88px;
  padding-bottom: 40px;
  text-align: center;
  position: relative;
  background-image: linear-gradient(
    135deg,
    var(--bg-via) 0%,
    var(--bg-from) 100%
  );
}

.hero-container {
  padding-top: 3rem;
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-text-content {
  width: 100%;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  background-image: linear-gradient(135deg, var(--accent-ui), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.4s ease;
}

.hero-title:hover {
  transform: scale(1.02);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.75rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

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

.dashboard-image-area {
  width: 100%;
  display: flex;
  justify-content: center;
}

.dashboard-image-wrapper {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: inline-block;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  padding: 1rem;
  width: auto;
  max-width: 550px;
}

body.theme-dark .dashboard-image-wrapper {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.dashboard-image-wrapper:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

body.theme-dark .dashboard-image-wrapper:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.dashboard-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Buttons & UI */
.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.icon-btn i {
  font-size: 18px;
  color: var(--accent-ui);
  transition: color 0.15s ease;
}

.icon-btn:hover {
  transform: scale(1.05);
}

.cta-btn,
.learn-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px !important;
  padding: 0 1.1rem !important;
  min-width: 140px;
  border-radius: 12px !important;
  font-weight: 600;
  text-decoration: none;
  box-shadow: -4px -4px 8px rgba(255, 255, 255, 0.5),
    4px 4px 8px rgba(0, 0, 0, 0.15), inset 2px 2px 4px rgba(0, 0, 0, 0.05),
    inset -2px -2px 4px rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  z-index: 10;
  position: relative;
}

body.theme-dark .cta-btn,
body.theme-dark .learn-more-btn {
  box-shadow: -4px -4px 8px rgba(255, 255, 255, 0.05),
    4px 4px 8px rgba(0, 0, 0, 0.6), inset 2px 2px 4px rgba(0, 0, 0, 0.3),
    inset -2px -2px 4px rgba(255, 255, 255, 0.03);
}

body.theme-light .cta-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: -2px -2px 4px rgba(255, 255, 255, 0.3),
    2px 2px 4px rgba(0, 0, 0, 0.1), inset 2px 2px 4px rgba(0, 0, 0, 0.05),
    inset -2px -2px 4px rgba(255, 255, 255, 0.2);
}

body.theme-light .learn-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: -2px -2px 4px rgba(255, 255, 255, 0.3),
    2px 2px 4px rgba(0, 0, 0, 0.1), inset 2px 2px 4px rgba(0, 0, 0, 0.05),
    inset -2px -2px 4px rgba(255, 255, 255, 0.2);
}

body.theme-dark .cta-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: -2px -2px 4px rgba(255, 255, 255, 0.03),
    2px 2px 4px rgba(0, 0, 0, 0.4), inset 2px 2px 4px rgba(0, 0, 0, 0.2),
    inset -2px -2px 4px rgba(255, 255, 255, 0.02);
}

body.theme-dark .learn-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: -2px -2px 4px rgba(255, 255, 255, 0.03),
    2px 2px 4px rgba(0, 0, 0, 0.4), inset 2px 2px 4px rgba(0, 0, 0, 0.2),
    inset -2px -2px 4px rgba(255, 255, 255, 0.02);
}

.cta-btn:focus,
.learn-more-btn:focus {
  outline: 3px solid rgba(0, 0, 0, 0.06);
  outline-offset: 3px;
}

/* Theme Dropdown */
#theme-dropdown {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  padding: 0.25rem;
  min-width: 10rem;
  z-index: 80;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
}

#theme-dropdown.hidden {
  display: none;
}

#theme-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 1rem;
  background: transparent;
  color: var(--text-color);
  border: none;
  cursor: pointer;
}

#theme-dropdown button:hover {
  background: var(--dropdown-hover-bg);
  color: var(--dropdown-hover-text);
}

/* Features Section */
.features-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  padding: 1.5rem;
}

body.theme-dark .feature-card {
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

body.theme-dark .feature-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.feature-card[data-selected="true"] {
  border: 2px solid var(--accent-ui);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

body.theme-dark .feature-card[data-selected="true"] {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.feature-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 0.8rem;
  user-select: none;
}

.feature-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card-text {
  color: var(--muted);
}

/* Testimonials Section */
.testimonials-section {
  padding-top: 3rem;
  padding-bottom: 7rem;
}

.section-heading {
  margin-top: 0;
  margin-bottom: 2rem;
  text-align: center;
}

.testimonial-slider-wrapper {
  position: relative;
  padding: 0;
}

.swiper-slide {
  height: auto;
}

.testimonial {
  height: 100%;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  min-width: 280px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(2, 6, 23, 0.06);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

body.theme-dark .testimonial {
  box-shadow: 0 8px 26px rgba(2, 6, 23, 0.6);
}

.testimonial:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

body.theme-dark .testimonial:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.user-image {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 3px solid #fff;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  user-select: none;
}

body.theme-dark .user-image {
  border-color: rgba(255, 255, 255, 0.06);
}

.feedback {
  font-style: italic;
  color: var(--muted);
}

/* Swiper navigation arrows */
.custom-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  font-size: 20px;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--text-color);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  z-index: 30;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.custom-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  background: var(--accent-ui);
  color: white;
}

.swiper-prev.custom-arrow {
  left: 0;
}

.swiper-next.custom-arrow {
  right: 0;
}

.swiper-prev.custom-arrow.swiper-button-disabled,
.swiper-next.custom-arrow.swiper-button-disabled {
  opacity: 0.4;
  cursor: default;
  transform: translateY(-50%) scale(1) !important;
  background: var(--card-bg) !important;
  color: var(--muted) !important;
}

/* Swiper pagination dots */
.swiper-pagination {
  bottom: -2rem !important;
  display: flex;
  justify-content: center;
  margin-top: 0 !important;
}

.swiper-pagination-bullet {
  background: var(--accent-ui);
  opacity: 0.95;
  margin: 0 0.4rem !important;
}

.swiper-pagination-bullet-active {
  background: var(--accent-ui);
  opacity: 1;
  transform: scale(1.4);
  transition: transform 0.3s ease;
}

/* Call to Action (CTA) Section */
.cta-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
  text-align: center;
}

.cta-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Footer Section */
footer {
  padding: 1.5rem 0;
  margin-top: 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

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

.footer-logo-text {
  font-weight: 600;
}

.footer-copyright {
  color: var(--muted);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  font-size: 1.5rem;
}

.social-icon {
  color: var(--muted);
  transition: color 0.2s ease;
}

.social-icon:hover {
  color: var(--accent-ui);
}

/* General Utilities */
.container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Accent color for specific text elements */
.accent-ui-color {
  color: var(--accent-ui);
}

/* Blur effect for the main content when the mobile menu is active */
.blur-background {
  filter: blur(5px);
  pointer-events: none;
  transition: filter 0.3s ease-in-out;
}

/* Testimonial card entrance animation */
.testimonial-card-animation {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.swiper-slide-active .testimonial-card-animation,
.swiper-slide-next .testimonial-card-animation,
.swiper-slide-prev .testimonial-card-animation,
.swiper-slide-visible .testimonial-card-animation {
  opacity: 1;
  transform: translateY(0);
}

/* Disable user select on all images */
img {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* --- Media Queries --- */

/* For screen sizes at least 640px wide */
@media (min-width: 640px) {
  .tagline {
    display: block;
  }
  .desktop-nav {
    display: flex;
  }
  .mobile-menu-btn {
    display: none;
  }
  .header-actions {
    gap: 1.5rem;
  }
  .hero-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding-top: 7rem;
    padding-bottom: 2rem;
    align-items: center;
    gap: 2rem;
  }
  .hero-text-content {
    width: 50%;
    text-align: left;
    margin-bottom: 0;
  }
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  .hero-subtitle {
    font-size: 1.25rem;
  }
  .hero-buttons {
    justify-content: flex-start;
  }
  .dashboard-image-area {
    width: 50%;
    justify-content: flex-end;
  }
  .dashboard-image-wrapper {
    max-width: none;
    width: 100%;
    padding: 1.5rem;
  }
  .dashboard-image {
    max-width: 100%;
  }
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .user-image {
    width: 110px;
    height: 110px;
  }
  .feature-image {
    height: 200px;
  }
  .testimonial-slider-wrapper {
    padding: 0 4rem;
  }

  /* Swiper arrows are now visible from this breakpoint and up */
  .custom-arrow {
    display: flex;
  }
  .footer-content {
    flex-direction: row;
  }
  .footer-info {
    text-align: left;
  }
}

/* For screen sizes at least 900px wide */
@media (min-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-image-wrapper {
    max-width: 600px;
    transform: translateY(-10px);
  }
  .dashboard-image-wrapper:hover {
    transform: translateY(-14px) scale(1.02);
  }
}

/* For screen sizes at least 640px wide */
@media (max-width: 640px) {
  .hero-section {
    min-height: auto;
  }
  .dashboard-image-area {
    margin-top: 0.25rem;
  }
  .hero-text-content {
    margin-bottom: 1.5rem;
  }
  .hero-container {
    padding-top: 1.5rem;
  }
  .dashboard-image-wrapper {
    max-width: 100%;
    transform: translateY(0);
    max-height: 400px;
    padding: 0.5rem;
  }
  .dashboard-image-wrapper:hover {
    transform: translateY(-2px) scale(1.01);
  }
  .dashboard-image {
    height: 250px;
    width: 100%;
    object-fit: contain;
  }
}
