/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

:root {
  --font-primary: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-accent: "Montserrat", sans-serif;

  /* Base Dark Theme */
  --bg-primary-dark: #080b0f;
  --bg-secondary-dark: #0e131a;
  --bg-content-panel-dark: rgba(14, 22, 34, 0.75); /* Slightly more opaque */
  --text-primary-dark: #e0e6f0;
  --text-secondary-dark: #a0aec0;
  --text-accent-dark: #00aeef;
  --text-accent-hover-dark: #0095cc;
  --border-color-dark: rgba(0, 174, 239, 0.25);
  --card-shadow-dark: 0 8px 32px rgba(0, 100, 150, 0.15);

  /* Light mode */
  --bg-primary-light: #f7f9fc;
  --bg-secondary-light: #ffffff;
  --bg-content-panel-light: rgba(255, 255, 255, 0.9); /* More opaque for light */
  --text-primary-light: #2d3748;
  --text-secondary-light: #4a5568;
  --text-accent-light: #007ace;
  --text-accent-hover-light: #005c9e;
  --border-color-light: #e2e8f0;
  --card-shadow-light: 0 6px 24px rgba(0, 0, 0, 0.08);

  /* Applied variables - Default to Dark */
  --bg-primary: var(--bg-primary-dark);
  --bg-secondary: var(--bg-secondary-dark);
  --bg-content-panel: var(--bg-content-panel-dark);
  --text-primary: var(--text-primary-dark);
  --text-secondary: var(--text-secondary-dark);
  --text-accent: var(--text-accent-dark);
  --text-accent-hover: var(--text-accent-hover-dark);
  --border-color: var(--border-color-dark);
  --card-shadow: var(--card-shadow-dark);
  --logo-color: var(--text-primary-dark);
}

body.light-mode {
  --bg-primary: var(--bg-primary-light);
  --bg-secondary: var(--bg-secondary-light);
  --bg-content-panel: var(--bg-content-panel-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --text-accent: var(--text-accent-light);
  --text-accent-hover: var(--text-accent-hover-light);
  --border-color: var(--border-color-light);
  --card-shadow: var(--card-shadow-light);
  --logo-color: var(--text-primary-light);
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary); /* This will be covered by canvas */
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 300;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  position: relative;
}

#digital-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Behind all content */
  pointer-events: none;
  background-color: var(--bg-primary); /* Canvas itself has a background */
  transition: background-color 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1; /* Content above canvas */
}

/* Header */
#main-header {
  padding: 20px 0;
  position: relative; /* Changed from sticky for simplicity with full page canvas */
  z-index: 1001;
  background-color: transparent; /* Header floats over canvas */
  border-bottom: 1px solid var(--border-color);
}

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

.logo-container a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.infinity-logo {
  color: var(--logo-color);
  transition: color 0.3s ease;
}

.logo-container h1 {
  font-family: var(--font-accent); /* Montserrat */
  font-size: 1.4rem; /* Slightly smaller */
  font-weight: 400; /* Regular weight for logo text */
  letter-spacing: 0.03em; /* Reduced letter spacing */
  margin-left: 12px;
  color: var(--logo-color);
  transition: color 0.3s ease;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.contact-info-header {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.8rem;
  font-weight: 300;
}
.contact-item-header a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}
.contact-item-header a:hover {
  color: var(--text-accent);
}
.contact-icon-header {
  margin-right: 6px;
  color: var(--text-accent);
  font-size: 0.9rem;
}
.language-switcher a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 400; /* Slightly bolder for lang switch */
  padding: 5px;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0.8;
}
.language-switcher a.active,
.language-switcher a:hover {
  color: var(--text-accent);
  opacity: 1;
}
.language-switcher span.lang-separator {
  color: var(--text-secondary);
  opacity: 0.5;
  margin: 0 2px;
}

/* Theme Toggler */
.theme-toggler {
  background: var(--bg-content-panel);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1002;
  backdrop-filter: blur(5px);
}
.theme-toggler:hover {
  background-color: var(--text-accent);
  color: var(--bg-primary);
  border-color: var(--text-accent);
}
.theme-toggler svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Navigation Menu */
.main-nav {
  position: sticky; /* Sticky nav is good for UX */
  top: 0;
  background-color: rgba(8, 11, 15, 0.65); /* Darker, more transparent sticky nav */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000; /* Below header but above content normally */
  padding: 10px 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
body.light-mode .main-nav {
  background-color: rgba(247, 249, 252, 0.7); /* Light mode sticky nav */
}

.main-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 25px;
}
.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 400; /* Regular weight for nav links */
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 4px;
  transition: color 0.3s ease, background-color 0.3s ease;
  position: relative;
  letter-spacing: 0.03em; /* Reduced letter spacing */
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--text-accent);
}
.main-nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--text-accent);
  transition: width 0.3s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after {
  width: 50%; /* Smaller underline */
}

/* Hero Section */
#hero-section {
  min-height: 70vh; /* Adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* background-color: transparent; /* Let canvas show */
}
.hero-content-wrapper {
  background-color: var(--bg-content-panel); /* Give hero text a panel */
  padding: 30px 40px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 800px;
}

.hero h2 {
  font-family: var(--font-accent); /* Montserrat */
  font-size: clamp(2.5rem, 5.5vw, 4rem); /* Slightly smaller */
  font-weight: 300; /* Lighter weight for hero heading */
  margin-bottom: 25px;
  letter-spacing: 0.02em; /* Reduced letter spacing */
  color: var(--text-primary);
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(0, 174, 239, 0.2); /* More subtle shadow */
}
.hero p {
  font-family: var(--font-primary);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 35px auto;
  font-weight: 300;
  line-height: 1.8;
}

/* Sections & Content Panels */
main > section {
  position: relative; /* For z-indexing if needed, but mostly for ID targeting */
  z-index: 1;
  /* background-color: transparent; /* Ensure sections don't hide canvas */
  /* We will style panels within sections to have backgrounds */
  padding: 60px 0; /* Give space for content */
}

section {
  margin-bottom: 70px;
  padding: 30px 0;
}

.section-title {
  font-family: var(--font-accent); /* Montserrat */
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 300; /* Lighter section titles */
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 12px;
  color: var(--text-primary);
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1.5px; /* Thinner underline */
  background-color: var(--text-accent);
  border-radius: 1px;
  box-shadow: 0 0 6px var(--text-accent);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Smaller minmax */
  gap: 20px;
}

.content-panel {
  background-color: var(--bg-content-panel); /* Panels have background */
  border: 1px solid var(--border-color);
  padding: 25px;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
}
.content-panel:hover {
  transform: translateY(-4px); /* Less hover effect */
  border-color: var(--text-accent);
  box-shadow: 0 10px 30px rgba(0, 150, 220, 0.1);
}
.content-panel.featured {
  border-left: 2px solid var(--text-accent);
  box-shadow: 0 0 20px rgba(0, 174, 239, 0.15);
}
.featured-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-accent);
  font-weight: 500; /* Bolder tag */
  background-color: rgba(0, 174, 239, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
}
.content-panel h3 {
  font-family: var(--font-accent); /* Montserrat */
  font-size: 1.2rem;
  font-weight: 400; /* Regular weight for panel titles */
  margin-bottom: 12px;
  color: var(--text-primary);
}
.content-panel p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 0.85rem; /* Smaller body text in panels */
  font-weight: 300;
  flex-grow: 1;
}
.content-panel ul {
  list-style: none;
  margin-bottom: 15px;
  color: var(--text-secondary);
  padding-left: 0;
}
.content-panel li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 300;
}
.content-panel li::before {
  content: "›"; /* Simpler bullet */
  color: var(--text-accent);
  margin-right: 8px;
  font-weight: 400;
  flex-shrink: 0;
}
.price-delivery-wrapper {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}
.price {
  font-size: 1.3rem; /* Smaller price */
  font-weight: 400;
  color: var(--text-accent);
  margin-bottom: 4px;
}
.delivery {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Why Choose Us specific styling */
.why-us-section .content-panel {
  text-align: left; /* Align text left for features */
}
.why-us-section .content-panel h3 {
  color: var(--text-accent);
}

/* Contact section */
.contact-section {
  background: transparent;
  padding: 50px 0;
  border-radius: 0;
  margin-top: 50px;
}
.contact-content-wrapper {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}
.contact-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 35px;
  font-weight: 300;
}
.contact-grid {
  text-align: left;
}
.contact-block {
  align-items: center;
}
.contact-block-icon {
  font-size: 1.4rem;
  color: var(--text-accent);
  margin-right: 12px;
  flex-shrink: 0;
}
.contact-block-title {
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.contact-block-text a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 300;
  transition: color 0.3s ease;
}
.contact-block-text a:hover {
  color: var(--text-accent);
  text-decoration: underline;
}

/* Footer */
#main-footer {
  padding: 25px 0;
  border-top: 1px solid var(--border-color);
  background-color: transparent;
  text-align: center;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.footer-logo .infinity-logo {
  color: var(--text-secondary);
  width: 22px;
  height: 15px;
}
.footer-logo span {
  font-family: var(--font-accent); /* Montserrat */
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-left: 8px;
  color: var(--text-secondary);
}
.copyright {
  color: var(--text-secondary);
  font-size: 0.7rem; /* Smaller copyright */
  font-weight: 300;
}

/* Scroll to Top Arrow */
.scroll-to-top-arrow {
  position: fixed;
  bottom: 15px; /* Closer to edge */
  right: 15px;
  width: 36px; /* Smaller */
  height: 36px;
  background-color: var(--bg-content-panel);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-accent);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s;
  z-index: 1000;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(5px);
}
.scroll-to-top-arrow.visible {
  opacity: 0.8; /* Slightly transparent */
  visibility: visible;
  transform: translateY(0);
}
.scroll-to-top-arrow:hover {
  background-color: var(--text-accent);
  color: var(--bg-primary);
  transform: scale(1.05); /* Less aggressive hover */
  opacity: 1;
}
.scroll-to-top-arrow svg {
  stroke: currentColor;
  width: 18px; /* Smaller icon */
  height: 18px;
}

/* On-Scroll Animations */
.scroll-animate {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out; /* Faster animation */
}
.scroll-animate[data-animation="fadeInUp"] {
  transform: translateY(30px); /* Less travel */
}
.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media queries */
@media (max-width: 992px) {
  .main-nav ul {
    gap: 15px;
  }
  .main-nav a {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  .header-container {
    flex-direction: column;
    gap: 10px;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .logo-container {
    margin-bottom: 10px;
  }
  .header-right {
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
  }
  .main-nav ul {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .main-nav a {
    padding: 6px;
    font-size: 0.75rem;
  }
  .footer-logo {
    margin-bottom: 10px;
  }
  #hero-section {
    min-height: auto;
    padding: 50px 0;
  }
  .section-title {
    margin-bottom: 30px;
  }
  .panel-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Print styles */
@media print {
  body {
    background-color: white !important;
    color: black !important;
    font-family: "Times New Roman", Times, serif;
    font-size: 11pt; /* Smaller print font */
    font-weight: normal !important;
  }
  :root,
  body.dark-mode {
    --text-primary: #000000;
    --text-secondary: #222222;
    --text-accent: #000000;
    --border-color: #bbbbbb;
    --bg-content-panel: #ffffff;
  }
  #digital-canvas /* Ensure canvas is hidden */,
  #main-header,
  .main-nav,
  .theme-toggler,
  .scroll-to-top-arrow {
    display: none !important;
  }
  .container {
    width: 100%;
    max-width: none;
    padding: 0 0.5cm; /* Reduced print padding */
  }
  section {
    margin-bottom: 0.8cm;
    padding: 0 !important; /* Remove section padding for print */
    page-break-inside: avoid;
  }
  .content-panel,
  .contact-block {
    border: 1px solid #bbb;
    box-shadow: none !important;
    transform: none !important;
    page-break-inside: avoid;
    background-color: white !important;
    backdrop-filter: none !important;
    padding: 0.5cm !important; /* Consistent panel padding */
  }
  a {
    color: #000000 !important;
    text-decoration: underline !important;
  }
  .price,
  .content-panel h3,
  .contact-block-title {
    color: #000000 !important;
    font-weight: bold; /* Bolder titles for print */
  }
  .section-title::after {
    background-color: #000000 !important;
  }
  @page {
    margin: 1cm; /* Standard print margin */
  }
}
