/* Base Styles */
:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --text-color: #333;
  --text-light: #fff;
  --spacing-unit: 1rem;
  --max-width: 1200px;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  margin-bottom: var(--spacing-unit);
  color: var(--dark-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
  margin-bottom: var(--spacing-unit);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-unit);
}

/* Header & Navigation */
.navbar {
  background-color: var(--secondary-color);
  padding: var(--spacing-unit) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  padding: 0 var(--spacing-unit);
}

.nav-list img {
  height: 50px;
  margin-right: auto;
}

.nav-list li {
  margin: 0 var(--spacing-unit);
}

.nav-list a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-list a:hover {
  color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--light-color);
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  z-index: 1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  color: var(--text-color);
  padding: var(--spacing-unit);
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

/* Hero Section */
.firstSection {
  padding: calc(var(--spacing-unit) * 4) 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
}

.box-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Content Sections */
.container {
  display: flex;
  
  justify-content: space-between;
  margin: calc(var(--spacing-unit) * 2) auto;
}

.container .text {
  flex: 1 1 50%;
  padding: var(--spacing-unit);
  min-width: 300px;
}

.container img {
  flex: 1 1 40%;
  max-width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: calc(var(--spacing-unit) * 2) 0;
}

.dropdown {
  margin-bottom: var(--spacing-unit);
}

.dropdown h2 {
  color: var(--text-light);
  cursor: pointer;
}

.dropdown p {
  color: var(--light-color);
}

/* Original Navbar Styles */
#checkanswer {
  background-color: var(--dark-color);
  color: var(--text-light);
  padding: 0.5rem;
}

.navbar {
  background-color: var(--secondary-color);
  padding: var(--spacing-unit) 0;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0 var(--spacing-unit);
}

.nav-list img {
  height: 40px;
  margin-right: 1rem;
}

.nav-list li {
  margin: 0 1rem;
}

.nav-list a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
}

.rightnav {
  margin-left: auto;
}

/* Image Size Adjustments */
img {
  max-width: 100%;
  height: auto;
}

.hero-image img,
.feature-image img {
  max-height: 300px;
  width: auto;
}

/* Mobile Image Sizes */
@media (max-width: 768px) {
  .hero-image img,
  .feature-image img {
    max-height: 200px;
  }
}

/* Hero Section */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 4rem var(--spacing-unit);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
}

.hero-content {
  flex: 1 1 50%;
  min-width: 300px;
}

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

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 1rem;
}

/* Original Feature Section Styles */
.container {
  margin: 2rem 0;
  padding: 0 var(--spacing-unit);
}

.text {
  margin-bottom: 1rem;
}

#old_way,
#modern_way,
#cx {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  
  .text {
    order: 1;
  }
  
  img {
    order: 2;
    margin-bottom: 1rem;
  }
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: var(--light-color);
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  z-index: 1;
  list-style: none;
  padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  color: var(--text-color);
  padding: 0.5rem 1rem;
  display: block;
}

.dropdown-menu a:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  
  .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
  }
  
  .hero,
  .feature-card {
    flex-direction: column;
  }
  
  .feature-card.reverse {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .hero {
    padding: 2rem var(--spacing-unit);
  }
  
  .features {
    padding: 1.5rem var(--spacing-unit);
  }
}

/* Accessibility Improvements */
a:focus, button:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate {
  animation: fadeIn 0.5s ease-in;
}