/* 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;
}

.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);
}

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;
}

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

.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;
}

.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;
}

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

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

.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: flex;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  header p {
    font-size: 1rem;
  }
  
  .hamburger {
    display: flex;
  }
  
  .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;
  }
}

@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;
}
