/* Custom Variables */
:root {
  --primary-color: #007BFF;
  --secondary-color: #28A745;
  --dark-color: #333;
  --light-color: #F8F9FA;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--primary-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 30px;
  transition: var(--transition);
}

.logo img:hover {
  transform: scale(1.05);
}

/* Added site name styling */
.site-name {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
}

.site-name-pro {
  color: #0e353d;
}

/* Currency Selector */
.currency-selector {
  margin-left: 1rem;
  order: 3;
}

.currency-selector select {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  font-size: 0.9rem;
}

.currency-selector select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.currency-selector select option {
  background-color: var(--primary-color);
  color: white;
}

nav {
  order: 2;
}

nav ul {
  list-style: none;
  display: flex;
  margin: 0;
}

nav ul li {
  position: relative;
  margin-left: 1.5rem;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem;
  transition: var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
  color: rgba(255,255,255,0.8);
}

/* Dropdown */
nav ul li ul.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  background: var(--primary-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: none;
  z-index: 10;
}

nav ul li:hover ul.dropdown {
  display: block;
}

nav ul li ul.dropdown li {
  margin: 0;
  width: 100%;
}

nav ul li ul.dropdown li a {
  padding: 0.7rem 1rem;
  display: block;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  color: #fff;
  font-size: 1.5rem;
}

/* Main Content */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero Section */
.hero {
  width: 100%;
  min-height: 55vh;
  background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05));
  position: relative;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero-image-container {
  flex: 1 1 40%;
  text-align: center;
}

.hero-image-container img {
  max-width: 80%;
  height: auto;
  max-height: 35vh;
  display: inline-block;
}

.hero-text-container {
  flex: 1 1 55%;
  text-align: left;
  color: var(--dark-color);
}

.hero-text-container h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.hero-text-container p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 100%;
}

.hero .btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn:hover {
  background: #0069d9;
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background: #218838;
}

/* Calculator Grid */
.calculators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.calculator-card {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: var(--transition);
}

.calculator-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.calculator-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.calculator-card .content {
  padding: 1.5rem;
}

.calculator-card h3 {
  margin-bottom: 1rem;
}

.calculator-card p {
  color: #666;
  margin-bottom: 1.5rem;
}

/* Features Section */
.features {
  background: var(--light-color);
  padding: 4rem 1rem;
  text-align: center;
}

.features h2 {
  margin-bottom: 3rem;
}

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

.feature-card {
  padding: 2rem;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.feature-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

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

/* Testimonials */
.testimonials {
  padding: 4rem 1rem;
  text-align: center;
}

.testimonials h2 {
  margin-bottom: 3rem;
}

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

.testimonial-card {
  padding: 2rem;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-card .user {
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-card .user img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 1rem;
}

.testimonial-card .user .info h4 {
  margin: 0;
}

.testimonial-card .user .info p {
  margin: 0;
  font-style: normal;
  color: #666;
}

/* CTA Section */
.cta {
  background: var(--primary-color);
  padding: 4rem 1rem;
  text-align: center;
  color: #fff;
}

.cta h2 {
  margin-bottom: 1.5rem;
}

.cta p {
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
footer {
  background: var(--dark-color);
  color: #fff;
  padding: 2rem;
  text-align: center;
}

footer p {
  margin-bottom: 1rem;
}

footer ul {
  list-style: none;
  display: flex;
  justify-content: center;
}

footer ul li {
  margin: 0 1rem;
}

footer ul li a {
  color: #fff;
  text-decoration: none;
}

/* Chart container styling */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  max-height: 400px;
  overflow: hidden;
}

.pie-chart-container {
  position: relative;
  height: 200px;
  width: 100%;
  max-height: 250px;
  overflow: hidden;
}

.chart-wrapper {
  position: relative;
  width: 100%;
}

/* Form styling */
.form-label {
  font-weight: 500;
}

.input-group-text {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

/* Results styling */
.results-table {
  margin-top: 1.5rem;
}

.results-table th {
  background-color: var(--light-color);
}

/* Responsive tables */
.table-responsive {
  overflow-x: auto;
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  .hamburger {
    display: block;
  }

  nav ul {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--primary-color);
    flex-direction: column;
    text-align: center;
    transform: translateY(-200%);
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  nav ul.active {
    transform: translateY(0);
  }

  nav ul li {
    margin: 0;
    padding: 1rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav ul li ul.dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    display: none;
    background: rgba(0,0,0,0.1);
  }

  nav ul li:hover ul.dropdown {
    display: block;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
    min-height: auto;
  }

  .hero-image-container {
    margin-bottom: 2rem;
    flex-basis: auto;
    text-align: center;
  }

  .hero-image-container img {
    max-width: 60%;
    max-height: 30vh;
  }

  .hero-text-container {
    flex-basis: auto;
    text-align: center;
    padding-left: 0;
  }

  .hero-text-container h1 {
    font-size: 2rem;
  }

  .hero-text-container p {
    font-size: 1rem;
  }

  .chart-container {
    height: 250px;
  }
}