:root {
  --header-bg-start: #3f51b5; /* Deeper blue for gradient start */
  --header-bg-end: #673ab7;   /* Purple for gradient end */
  --header-text-color: #ffffff;
  --footer-bg-color: #2c3e50; /* Dark blue-grey from image */
  --footer-text-color: #cccccc;
  --footer-link-color: #eeeeee;
  --primary-color: #007acc; /* Existing primary color */
  --secondary-color: #005fa3; /* Existing secondary color */
  --text-color: #333;
  --light-text-color: #444;
  --border-color: #ccc;
  --background-start: #eef7fa;
  --background-end: #d0f0ff;
  --container-bg: white;
  --shadow-color: rgba(0,0,0,0.1);
  --section-bg: #f5f5f5;
  --section-shadow: rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, var(--background-start), var(--background-end));
  display: flex;
  flex-direction: column; /* Allow header, content, footer to stack */
  min-height: 100vh;
}

/* Header Styles */
.main-header {
  background: linear-gradient(to right, var(--header-bg-start), var(--header-bg-end));
  padding: 15px 30px;
  color: var(--header-text-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px; /* Max width for content */
  margin: 0 auto;
}

.logo-section {
  display: flex;
  align-items: center;
}

.header-logo {
  width: 70px; /* Adjust size as needed */
  height: 70px;
  margin-right: 10px;
}

.site-title {
  font-size: 24px;
  font-weight: bold;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 25px; /* Space between nav items */
}

.main-nav ul li a {
  color: var(--header-text-color);
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.main-nav ul li a:hover {
  opacity: 0.8;
}

.hamburger-menu {
  display: none; /* Hidden by default on large screens */
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger-menu .bar {
  width: 25px;
  height: 3px;
  background-color: var(--header-text-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-nav {
  display: none; /* Hidden by default */
  background: var(--header-bg-end);
  width: 100%;
  position: absolute;
  top: 70px; /* Height of header + padding */
  left: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 999;
}

.mobile-nav.active {
  display: block;
  transform: translateY(0);
}

.mobile-nav ul {
  list-style: none;
  padding: 10px 0;
  text-align: center;
}

.mobile-nav ul li {
  padding: 12px 20px;
}

.mobile-nav ul li a {
  color: var(--header-text-color);
  text-decoration: none;
  font-size: 18px;
  display: block;
}

.mobile-nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

/* Hamburger animation */
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Main Content Styles */
.container {
  background: var(--container-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px var(--shadow-color);
  max-width: 420px;
  width: 100%;
  margin: 40px auto; /* Margin top/bottom for spacing */
  flex-grow: 1; /* Allows content to take available space */
}

h1 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-small {
  width: 50px;
  height: 50px;
  vertical-align: middle;
  margin-right: 16px;
}

p {
  font-size: 14px;
  color: var(--light-text-color);
  margin-bottom: 20px;
  text-align: center;
}

label {
  display: block;
  margin-top: 15px;
  color: var(--text-color);
}

input, select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
}

button {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--secondary-color);
}

#result {
  margin-top: 20px;
  font-size: 17px;
  font-weight: bold;
  color: var(--footer-bg-color);
  text-align: center;
}

/* Section Styles for Introduction, Features, How to Use */
section {
  background-color: var(--section-bg);
  padding: 25px;
  margin: 30px auto;
  max-width: 850px;
  border-radius: 12px;
  box-shadow: 0 0 10px var(--section-shadow);
}

h2 {
  color: var(--footer-bg-color);
  font-size: 26px;
  margin-bottom: 15px;
}

section p, section li {
  color: var(--text-color);
  font-size: 17px;
  line-height: 1.8;
  text-align: justify;
}

ol {
  padding-left: 20px;
}


/* Footer Styles */
.main-footer {
  background-color: var(--footer-bg-color);
  color: var(--footer-text-color);
  padding: 40px 20px 20px;
  margin-top: auto; /* Pushes footer to the bottom */
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
  padding: 10px;
}

.footer-logo-section {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.footer-logo {
  width: 50px; /* Adjust size */
  height: 50px;
  margin-right: 10px;
}

.footer-site-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--footer-link-color);
}

.footer-section h3 {
  color: var(--footer-link-color);
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-section p {
  font-size: 15px;
  line-height: 1.6;
  text-align: left; /* Adjust text alignment for footer description */
  margin-bottom: 0; /* Remove default paragraph margin */
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: var(--footer-text-color);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--footer-link-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 14px;
  color: var(--footer-text-color);
}


/* Sticky chat icon contact styles */
@keyframes wave {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.4;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

div[style*="position: fixed"] {
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  cursor: pointer;
}

div[style*="width: 50px"] { /* Specificity for the inner circle */
  width: 50px;
  height: 50px;
  background-color: #8800f8;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

svg[style*="width: 25px"] { /* Specificity for the SVG icon */
  width: 25px;
  height: 25px;
}

div[style*="width: 80px"] { /* Specificity for the wave effect */
  width: 80px;
  height: 80px;
  background: #8800f8;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0.4;
  animation: wave 2s infinite linear;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  .main-header {
    padding: 10px 20px;
  }

  .main-nav {
    display: none; /* Hide desktop nav */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger */
  }

  .site-title {
    font-size: 20px;
  }

  .header-logo {
    width: 35px;
    height: 35px;
  }

  .container {
    padding: 20px;
    margin: 20px auto; /* Adjust margin for smaller screens */
  }

  h1 {
    font-size: 22px;
  }

  .icon-small {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }

  /* Footer responsiveness */
  .footer-content {
    grid-template-columns: 1fr; /* Stack columns */
    text-align: center; /* Center align text */
  }

  .footer-section {
    padding: 15px 0;
  }

  .footer-logo-section {
    justify-content: center; /* Center logo in footer */
  }

  .footer-section p {
    text-align: center; /* Center text in footer sections */
  }

  /* Sticky chat icon responsive adjustments */
  div[style*="position: fixed"] {
    bottom: 20px !important;
    right: 20px !important;
  }

  div[style*="width: 50px"] {
    width: 45px !important;
    height: 45px !important;
  }

  svg[style*="width: 25px"] {
    width: 22px !important;
    height: 22px !important;
  }

  div[style*="width: 80px"] {
    width: 65px !important;
    height: 65px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  h1 {
    font-size: 20px;
  }

  .icon-small {
    width: 35px;
    height: 35px;
  }

  input, select, button {
    font-size: 15px;
    padding: 10px;
  }

  section h2 {
    font-size: 22px;
  }

  section p, section li {
    font-size: 15px;
  }
}