/* style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f9f7f4, #e0d6ee);
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

/* New Main Header Styles */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  background: white;
  margin-bottom: 20px;
  position: relative;
  z-index: 1000;
  border-bottom: 2px solid #f0f0f0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border-radius: 10px;
  padding: 20px 30px;
}

.logo-image {
  height: 60px;
  width: auto;
  transition: transform 0.3s ease;
}

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

.main-menu {
  position: relative;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white;
  z-index: 1001;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.main-menu nav ul {
  display: flex;
  list-style: none;
  align-items: center;
}

.main-menu nav ul li {
  position: relative;
  margin-left: 30px;
}

.main-menu nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  padding: 12px 0;
  display: block;
  position: relative;
}

.main-menu nav ul li a:hover {
  color: #9b59b6;
}

.main-menu nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 5px;
  left: 0;
  background: linear-gradient(90deg, #9b59b6, #3498db);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.main-menu nav ul li a:hover::after {
  width: 100%;
}

/* Dropdown Styles */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border-radius: 10px;
  padding: 15px 0;
  min-width: 220px;
  z-index: 1000;
  margin-top: 10px;
  border: 1px solid #eee;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown.hover .dropdown-menu {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.dropdown-menu li {
  margin: 0;
  display: block;
}

.dropdown-menu li a {
  padding: 12px 25px;
  font-size: 1.05rem;
  color: #333;
  display: block;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
  background: #f8f9fa;
  color: #9b59b6;
  padding-left: 30px;
  border-left: 3px solid #9b59b6;
}

/* Add a small triangle/arrow to the dropdown */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid white;
  z-index: 1001;
}

/* Main Header Responsive Styles */
@media (max-width: 768px) {
  .main-header {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
  }
  
  .logo-image {
    height: 50px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-menu nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    padding: 15px 0;
    z-index: 1000;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
  }
  
  /* On mobile, position relative to container */
  .container .main-menu nav ul {
    position: absolute;
    left: 20px;
    right: 20px;
  }
  
  .main-menu nav ul.show {
    display: flex;
  }
  
  .main-menu nav ul li {
    margin: 0;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .main-menu nav ul li:last-child {
    border-bottom: none;
  }
  
  .main-menu nav ul li a {
    padding: 10px 0;
    font-size: 1.1rem;
  }
  
  .main-menu nav ul li a::after {
    display: none;
  }
  
  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding: 10px 0 10px 30px;
    background: #f8f9fa;
    border-radius: 0;
    margin-top: 0;
    display: none;
    border: none;
    transform: none;
    opacity: 1;
  }
  
  .dropdown.show .dropdown-menu {
    display: block;
  }
  
  .dropdown:hover .dropdown-menu {
    display: none; /* Disable hover on mobile */
  }
  
  .dropdown-menu li a {
    padding: 10px 20px;
    border-left: none;
  }
  
  .dropdown-menu li a:hover {
    padding-left: 25px;
    border-left: none;
    background: #e9ecef;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 12px;
  }
  
  .logo-image {
    height: 45px;
  }
  
  .menu-toggle {
    font-size: 1.6rem;
    padding: 6px 10px;
  }
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  position: relative;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

header h1 {
  color: #8e44ad;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

header p {
  color: #7f8c8d;
  font-size: 1.1rem;
}

/* Main Header - now responsive for all devices */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  position: relative;
}

.logo-image {
  height: 60px;
  display: block;
}

.main-menu {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 5px 10px;
  background: #9b59b6;
  color: white;
  border-radius: 5px;
  border: none;
}

.main-menu nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu nav ul li {
  margin: 0 15px;
  position: relative;
}

.main-menu nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding: 10px 0;
  display: block;
  transition: color 0.3s ease;
}

.main-menu nav ul li a:hover {
  color: #9b59b6;
}

.main-menu nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #9b59b6;
  transition: width 0.3s ease;
}

.main-menu nav ul li a:hover::after {
  width: 100%;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  padding: 10px 0;
  min-width: 200px;
  border-radius: 8px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.dropdown-menu li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu li:last-child {
  border-bottom: none;
}

.dropdown-menu li a {
  padding: 12px 20px;
  display: block;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
  background: #f8f9fa;
  padding-left: 25px;
  border-left: 3px solid #9b59b6;
}

/* Header with title (visible on mobile) */
.header-container {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  overflow-y: auto;
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu-content {
  background: white;
  min-height: 100vh;
  padding: 20px;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.mobile-menu-close {
  font-size: 2rem;
  cursor: pointer;
  color: #9b59b6;
  padding: 10px;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav ul li {
  margin-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
}

.mobile-nav ul li a {
  text-decoration: none;
  color: #333;
  font-size: 1.2rem;
  font-weight: 600;
  display: block;
  padding: 15px 0;
}

.mobile-nav ul li a:hover {
  color: #9b59b6;
}

.mobile-dropdown-menu {
  display: none;
  padding-left: 20px;
  margin-top: 10px;
}

.mobile-dropdown-menu.active {
  display: block;
}

.mobile-dropdown-menu li {
  border-bottom: none;
  padding-bottom: 5px;
}

.mobile-dropdown-menu li a {
  font-size: 1rem;
  color: #555;
  padding: 10px 0;
}

.mobile-dropdown-menu li a:hover {
  color: #9b59b6;
  background: #f8f9fa;
  padding-left: 10px;
  border-radius: 5px;
}

.mobile-dropdown-toggle.active {
  color: #9b59b6;
}

.header-title {
  flex: 1;
}

.header-title h1 {
  color: #8e44ad;
  font-size: 1.8rem;
  margin: 0 0 5px 0;
}

.header-title p {
  color: #7f8c8d;
  font-size: 1rem;
  margin: 0;
}

/* Hamburger Menu Icon */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  background: #9b59b6;
  border-radius: 5px;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Tab Navigation */
.tab-container {
  display: flex;
  margin-bottom: 30px;
  border-bottom: 1px solid #ddd;
  justify-content: center;
  background: white;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  flex-wrap: nowrap;
  overflow-x: auto;
}

.tablinks {
  background-color: #f1f1f1;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 12px;
  transition: 0.3s;
  font-size: 14px;
  border-radius: 6px;
  margin: 4px;
  flex: 1 1 auto;
  min-width: 100px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.tablinks:hover {
  background-color: #ddd;
}

.tablinks.active {
  background-color: #9b59b6;
  color: white;
}

.form-section {
  margin-bottom: 30px;
  padding: 25px;
  background: #f0f8ff;
  border-radius: 10px;
  border-left: 5px solid #3498db;
}

.form-section h2 {
  color: #2980b9;
  margin-bottom: 15px;
}

.form-section p {
  margin-bottom: 20px;
  color: #555;
}

label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  color: #2c3e50;
}

small {
  display: block;
  margin-top: -10px;
  margin-bottom: 15px;
  color: #666;
  font-style: italic;
}

input, select {
  width: 100%;
  padding: 12px;
  margin: 8px 0 15px;
  border: 1px solid #bdc3c7;
  border-radius: 6px;
  font-size: 16px;
  background-color: white;
}

button {
  width: 100%;
  background: linear-gradient(to right, #9b59b6, #3498db);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

button:hover {
  background: linear-gradient(to right, #8e44ad, #2980b9);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.result-section {
  background: #e8f4f8;
  padding: 25px;
  border-radius: 10px;
  border-left: 5px solid #27ae60;
  margin-bottom: 30px;
  display: none;
}

.result-section h2 {
  color: #27ae60;
  margin-bottom: 20px;
}

.result-section p {
  margin: 10px 0;
}

.result-section ul {
  margin: 15px 0;
  padding-left: 20px;
}

.result-section li {
  margin-bottom: 10px;
}

.result-section strong {
  color: #2c3e50;
}

.explanation-section {
  background: #f8f4ff;
  padding: 25px;
  border-radius: 10px;
  border-left: 5px solid #9b59b6;
}

.explanation-section h2 {
  color: #8e44ad;
  margin-bottom: 15px;
}

.explanation-section h3 {
  color: #8e44ad;
  margin: 20px 0 10px;
}

.explanation-content ul {
  margin: 15px 0;
  padding-left: 20px;
}

.explanation-content li {
  margin-bottom: 10px;
}

.explanation-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.explanation-content th, 
.explanation-content td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.explanation-content th {
  background-color: #9b59b6;
  color: white;
}

.explanation-content p {
  margin: 15px 0;
}

.info-box {
  background: #fff8e1;
  border-left: 5px solid #ffc107;
  padding: 15px;
  margin: 20px 0;
}

footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  font-size: 14px;
  text-align: center;
  color: #7f8c8d;
}

footer a {
  color: #9b59b6;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}

footer button {
  background: #e74c3c;
  width: auto;
  display: inline-block;
  padding: 10px 20px;
  margin-top: 10px;
}

footer button:hover {
  background: #c0392b;
}

/* Index page specific styles */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.method-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  padding: 15px;
  position: relative;
  border: 1px solid #ddd;
  transition: transform 0.3s ease;
}

.method-card:hover {
  transform: translateY(-5px);
}

.method-card.most-accurate {
  border: 2px solid #9b59b6;
}

.accuracy-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  background: #e74c3c;
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 0.6rem;
}

.method-icon {
  font-size: 2.5rem;
  text-align: center;
  margin: 10px 0;
}

.method-card h2 {
  color: #8e44ad;
  text-align: center;
  margin: 15px 0;
  font-size: 1.2rem;
}

.method-card p {
  text-align: center;
  color: #7f8c8d;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.method-details {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
}

.detail-item {
  text-align: center;
}

.detail-value {
  font-weight: bold;
  color: #2c3e50;
}

.detail-label {
  font-size: 0.8rem;
  color: #7f8c8d;
}

.method-note {
  text-align: center;
  margin-top: 15px;
  font-size: 0.7rem;
  color: #e74c3c;
  font-weight: bold;
}

.comparison-section {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  margin: 20px 0;
}

.comparison-section h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 25px;
  font-size: 1.5rem;
}

.comparison-section table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.comparison-section th,
.comparison-section td {
  padding: 12px;
  text-align: left;
  font-size: 0.9rem;
}

.comparison-section th {
  background: #9b59b6;
  color: white;
}

.comparison-section tr {
  border-bottom: 1px solid #ddd;
}

.medical-section {
  background: #e8f5e8;
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  border-left: 4px solid #27ae60;
}

.medical-section h2 {
  color: #27ae60;
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.medical-section p {
  margin-bottom: 15px;
  color: #2c3e50;
}

.medical-section ul {
  margin: 15px 0;
  padding-left: 20px;
}

.medical-section li {
  margin-bottom: 8px;
  color: #34495e;
  line-height: 1.5;
}

.medical-section li strong {
  color: #27ae60;
}

.medical-section em {
  color: #7f8c8d;
  font-style: italic;
}

.nub-explainer {
  background: #f0f8ff;
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  border-left: 4px solid #3498db;
}

.nub-explainer h3 {
  color: #3498db;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.nub-explainer p {
  margin-bottom: 15px;
  color: #2c3e50;
  line-height: 1.6;
}

.nub-explainer ul {
  margin: 15px 0;
  padding-left: 20px;
}

.nub-explainer li {
  margin-bottom: 8px;
  color: #34495e;
  line-height: 1.5;
}

.nub-explainer li strong {
  color: #2980b9;
}

.nub-explainer em {
  color: #7f8c8d;
  font-style: italic;
}

.credibility-section {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.credibility-section h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.credibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.credibility-item {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.credibility-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.credibility-item h3 {
  font-size: 1.1rem;
}

.credibility-item p {
  font-size: 0.9rem;
}

.myth-fact-box {
  background: #fff3cd;
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  border-left: 4px solid #ffc107;
}

.myth-fact-box h3 {
  color: #856404;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.myth-fact-box p {
  margin-bottom: 12px;
  color: #856404;
  line-height: 1.6;
}

.myth-fact-box strong {
  font-weight: bold;
}

.user-data {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  text-align: center;
  border: 2px solid #e9ecef;
}

.user-data h3 {
  color: #495057;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.user-data p {
  margin-bottom: 10px;
  color: #495057;
  line-height: 1.6;
}

.user-data strong {
  color: #28a745;
  font-size: 1.1em;
}

.timeline {
  background: #e6f3ff;
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  border-left: 4px solid #17a2b8;
}

.timeline h3 {
  color: #17a2b8;
  margin-bottom: 15px;
  font-size: 1.3rem;
  text-align: center;
}

.timeline ul {
  margin: 15px 0;
  padding-left: 20px;
}

.timeline li {
  margin-bottom: 10px;
  color: #2c3e50;
  line-height: 1.6;
}

.timeline li strong {
  color: #17a2b8;
  font-weight: bold;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.about-content h2 {
  color: #2c3e50;
  margin: 30px 0 15px 0;
  font-size: 1.5rem;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
}

.about-content h3 {
  color: #34495e;
  margin: 25px 0 10px 0;
  font-size: 1.2rem;
}

.about-content p {
  margin-bottom: 15px;
  color: #555;
}

.about-content ul {
  margin: 15px 0;
  padding-left: 25px;
}

.about-content li {
  margin-bottom: 8px;
  color: #555;
  line-height: 1.6;
}

.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.standard-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #e9ecef;
}

.standard-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.standard-item h3 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.standard-item p {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin: 0;
}

.disclaimer-box {
  background: #fff3cd;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  margin: 25px 0;
}

.disclaimer-box p {
  margin-bottom: 12px;
  color: #856404;
  line-height: 1.6;
}

.disclaimer-box strong {
  font-weight: bold;
}

.faq-section {
  margin: 30px 0;
}

.faq-section h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
}

/* Footer Styles */
footer {
  background: #2c3e50;
  color: white;
  margin-top: 50px;
  padding: 40px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-section {
  min-width: 180px;
}

.footer-section h4 {
  color: #3498db;
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #bdc3c7;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #3498db;
}

.footer-bottom {
  border-top: 1px solid #34495e;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.footer-bottom p {
  margin: 5px 0;
  color: #95a5a6;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: #3498db;
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Mobile Footer Styles */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 15px;
  }

  .footer-section h4 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .footer-section a {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  footer {
    padding: 30px 0 15px;
  }

  .footer-bottom {
    padding-top: 15px;
  }

  .footer-bottom p {
    font-size: 0.8rem;
  }
}

.faq-item {
  margin-bottom: 15px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.faq-item h3 {
  background: #f8f9fa;
  padding: 15px 20px;
  margin: 0;
  cursor: pointer;
  font-size: 1rem;
  color: #2c3e50;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item h3:hover {
  background: #e9ecef;
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: white;
}

.faq-answer p {
  padding: 15px 0;
  margin: 0;
  color: #495057;
}

/* Table container for horizontal scrolling on small screens */
.table-container {
  overflow-x: auto;
  margin: 20px 0;
}

.table-container table {
  min-width: 600px;
}

/* SEO links (hidden but crawlable) */
.seo-links {
  display: none;
}

/* Desktop Menu (Default) */
@media (min-width: 769px) {
  .tab-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    max-height: none;
    overflow-x: auto;
  }
  
  .tablinks {
    padding: 15px 12px;
    font-size: 14px;
    min-width: 110px;
    margin: 5px;
  }
  
  .hamburger {
    display: none;
  }
}

/* Tablet Menu */
@media (min-width: 769px) and (max-width: 1199px) {
  .tablinks {
    padding: 14px 10px;
    font-size: 13px;
    min-width: 90px;
    margin: 4px;
  }
  
  .container {
    max-width: 1000px;
    padding: 30px;
  }
  
  header h1 {
    font-size: 2.3rem;
  }
}

/* Large Desktop Menu */
@media (min-width: 1200px) {
  .tablinks {
    padding: 16px 15px;
    font-size: 15px;
    min-width: 110px;
    margin: 5px;
  }
  
  .container {
    max-width: 1400px;
    padding: 40px;
  }
  
  header h1 {
    font-size: 2.8rem;
  }
  
  .method-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }
}

/* Mobile Menu */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .container {
    padding: 20px;
    margin: 10px auto;
    max-width: 100%;
  }
  
  header {
    display: none;
  }
  
  .header-container {
    display: none;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  header p {
    font-size: 1rem;
  }
  
  /* Show the menu toggle on mobile */
  .menu-toggle {
    display: block;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px 10px;
    background: #9b59b6;
    color: white;
    border-radius: 5px;
    border: none;
  }
  
  /* Hide the main menu on mobile by default */
  .main-menu nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 0;
    z-index: 1000;
    border-radius: 0 0 8px 8px;
    border: 1px solid #eee;
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .main-menu nav ul.show {
    display: flex;
  }
  
  /* Show the main menu when .show class is added */
  .main-menu nav ul.show {
    display: flex;
  }
  
  /* Mobile menu item styling */
  .main-menu nav ul li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .main-menu nav ul li:last-child {
    border-bottom: none;
  }
  
  .main-menu nav ul li a {
    padding: 15px 20px;
    font-size: 1.1rem;
    color: #333;
    text-decoration: none;
    display: block;
    font-weight: 600;
  }
  
  .main-menu nav ul li a:hover {
    background: #f8f9fa;
    color: #9b59b6;
  }
  
  .main-menu nav ul li a::after {
    display: none;
  }
  
  /* Mobile dropdown menu */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding: 10px 0 10px 30px;
    background: #f8f9fa;
    border-radius: 0;
    margin-top: 0;
    display: none;
    border: none;
    transform: none;
    opacity: 1;
  }
  
  .dropdown.show .dropdown-menu {
    display: block;
  }
  
  .dropdown:hover .dropdown-menu {
    display: none; /* Disable hover on mobile */
  }
  
  .dropdown-menu li a {
    padding: 12px 20px;
    border-left: none;
    color: #555;
    font-size: 1rem;
  }
  
  .dropdown-menu li a:hover {
    background: #e9ecef;
    color: #9b59b6;
  }
  
  .tab-container {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 0 0 10px 10px;
    border: 2px solid #9b59b6;
  }
  
  .tab-container.mobile-menu-open {
    display: flex;
  }
  
  body.menu-open {
    background: linear-gradient(135deg, #f0e6f4, #d0c0e0);
  }
  
  .tablinks {
    padding: 15px;
    font-size: 15px;
    border-radius: 8px;
    margin: 5px 0;
    width: 100%;
    min-width: auto;
    text-align: left;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #333;
  }
  
  .tablinks:hover {
    background: #e9ecef;
    border-color: #9b59b6;
    color: #000;
  }
  
  .tablinks.active {
    background: #8e44ad;
    color: white;
    border-color: #8e44ad;
    font-weight: bold;
  }
  
  .form-section, .result-section, .explanation-section {
    padding: 20px;
  }
  
  .explanation-content th, 
  .explanation-content td {
    padding: 8px;
    font-size: 14px;
  }
  
  button {
    font-size: 16px;
  }
  
  footer {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
  }
  
  .container {
    padding: 15px;
  }
  
  .header-title h1 {
    font-size: 1.5rem;
  }
  
  .header-title p {
    font-size: 0.9rem;
  }
  
  .hamburger {
    display: flex;
  }
  
  .tab-container {
    top: 65px;
  }
  
  .tablinks {
    padding: 14px;
    font-size: 14px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #333;
  }
  
  label {
    font-size: 14px;
  }
  
  input, select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    background-color: white;
  }
  
  .form-section, .result-section, .explanation-section {
    padding: 15px;
  }
  
  .explanation-content th, 
  .explanation-content td {
    padding: 6px;
    font-size: 12px;
  }
  
  /* Adjust mobile menu for smaller screens */
  .main-menu nav ul {
    left: 10px;
    right: 10px;
    top: 110px;
  }
}

@media (max-width: 320px) {
  .tablinks {
    padding: 12px;
    font-size: 13px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #333;
  }
  
  header h1 {
    font-size: 1.3rem;
  }
  
  .form-section, .result-section, .explanation-section {
    padding: 12px;
  }
  
  small {
    font-size: 12px;
  }
  
  input, select {
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    background-color: white;
  }
}

/* Add styles for anchor tags used as buttons */
.method-button {
  display: block;
  width: 100%;
  background: linear-gradient(to right, #9b59b6, #3498db);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.method-button:hover {
  background: linear-gradient(to right, #8e44ad, #2980b9);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Add styles for anchor tags in tab navigation */
.tab-container a {
  background-color: #f1f1f1;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 12px;
  transition: 0.3s;
  font-size: 14px;
  border-radius: 6px;
  margin: 4px;
  flex: 1 1 auto;
  min-width: 100px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.tab-container a:hover {
  background-color: #ddd;
}

.tab-container a.active {
  background-color: #9b59b6;
  color: white;
}

/* Mobile styles for anchor tags in tab navigation */
@media (max-width: 768px) {
  .tab-container a {
    padding: 15px;
    font-size: 15px;
    border-radius: 8px;
    margin: 5px 0;
    width: 100%;
    min-width: auto;
    text-align: left;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #333;
  }
  
  .tab-container a:hover {
    background: #e9ecef;
    border-color: #9b59b6;
    color: #000;
  }
  
  .tab-container a.active {
    background: #8e44ad;
    color: white;
    border-color: #8e44ad;
    font-weight: bold;
  }
}

@media (max-width: 480px) {
  .tab-container a {
    padding: 14px;
    font-size: 14px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #333;
  }
}

@media (max-width: 320px) {
  .tab-container a {
    padding: 12px;
    font-size: 13px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #333;
  }
}

/* Add scrollbar styling for menu */
.tab-container::-webkit-scrollbar {
  height: 8px;
}

.tab-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.tab-container::-webkit-scrollbar-thumb {
  background: #9b59b6;
  border-radius: 4px;
}

.tab-container::-webkit-scrollbar-thumb:hover {
  background: #8e44ad;
}

