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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and Navigation */
.header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar {
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.logo a {
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #2563eb;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 3px 0;
  transition: 0.3s;
}

/* Main Content */
main {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 3rem;
  opacity: 0.9;
}

/* Calculator */
.calculator-container {
  max-width: 600px;
  margin: 0 auto;
}

.calculator-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  color: #333;
}

.calculator-card h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2563eb;
}

.calc-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.calc-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #2563eb;
  background: transparent;
  color: #2563eb;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.calc-btn.active,
.calc-btn:hover {
  background: #2563eb;
  color: white;
}

.calc-mode {
  display: none;
}

.calc-mode.active {
  display: block;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #2563eb;
}

.result-display {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
}

.result-display h3 {
  margin-bottom: 1rem;
  color: #374151;
}

.result-date {
  font-size: 2rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.5rem;
}

.result-details {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Article Sections */
.article-section {
  padding: 4rem 0;
  background: #f9fafb;
}

.main-article {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e5e7eb;
}

.article-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-meta {
  color: #6b7280;
  font-size: 0.9rem;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content .lead {
  font-size: 1.3rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.article-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  margin: 2.5rem 0 1.5rem 0;
  line-height: 1.3;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin: 2rem 0 1rem 0;
}

.article-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #4b5563;
  margin: 1.5rem 0 0.75rem 0;
}

.article-content p {
  margin-bottom: 1.5rem;
  color: #374151;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.75rem;
  color: #374151;
}

.article-content strong {
  color: #1f2937;
  font-weight: 600;
}

.article-content em {
  color: #2563eb;
  font-style: italic;
}

.article-content a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.article-content a:hover {
  border-bottom-color: #2563eb;
}

/* Blockquotes */
blockquote {
  background: #f0f9ff;
  border-left: 4px solid #2563eb;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

blockquote p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #1e40af;
}

blockquote cite {
  display: block;
  text-align: right;
  font-size: 0.9rem;
  color: #3730a3;
  font-weight: 500;
}

/* Highlight Boxes */
.highlight-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.highlight-box h3 {
  color: #92400e;
  margin-bottom: 1rem;
}

.highlight-box p,
.highlight-box li {
  color: #78350f;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.data-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #374151;
}

.data-table tr:hover {
  background: #f9fafb;
}

/* Related Articles */
.related-articles {
  padding: 4rem 0;
  background: white;
}

.related-articles h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 3rem;
}

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

.article-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.article-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.article-card h3 a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-card h3 a:hover {
  color: #2563eb;
}

.article-card p {
  color: #6b7280;
  line-height: 1.6;
}

/* Article Pages */
.article-page {
  padding: 2rem 0 4rem 0;
  background: #f9fafb;
  min-height: calc(100vh - 80px);
}

.article-page .container {
  max-width: 900px;
}

.article-page .article-header {
  background: white;
  padding: 3rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-page .article-content {
  background: white;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.article-sources {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 10px;
  margin-top: 3rem;
  border-left: 4px solid #2563eb;
}

.article-sources h3 {
  color: #1f2937;
  margin-bottom: 1rem;
}

.article-sources ol {
  padding-left: 1.5rem;
}

.article-sources li {
  margin-bottom: 0.75rem;
  color: #374151;
  font-size: 0.95rem;
}

.related-articles-section {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  margin-top: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.related-articles-section h3 {
  text-align: center;
  margin-bottom: 2rem;
  color: #1f2937;
}

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

.related-card {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.related-card:hover {
  background: #e0f2fe;
  border-color: #2563eb;
  transform: translateY(-2px);
}

.related-card h4 {
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.related-card p {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}

/* Page Content (About, Contact, Privacy) */
.page-content {
  padding: 2rem 0 4rem 0;
  background: #f9fafb;
  min-height: calc(100vh - 80px);
}

.page-content h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  margin-bottom: 3rem;
}

.about-content,
.contact-content,
.privacy-content {
  background: white;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin: 0 auto;
}

.about-section,
.privacy-section {
  margin-bottom: 3rem;
}

.about-section h2,
.privacy-section h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.about-section h3,
.privacy-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #374151;
  margin: 1.5rem 0 1rem 0;
}

.about-section p,
.privacy-section p {
  color: #374151;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.about-section ul,
.privacy-section ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.about-section li,
.privacy-section li {
  color: #374151;
  margin-bottom: 0.5rem;
}

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

.feature-card {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
}

.feature-card h3 {
  color: #1f2937;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.feature-card p {
  color: #6b7280;
  font-size: 0.95rem;
}

/* Contact Page */
.contact-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-intro p {
  font-size: 1.1rem;
  color: #6b7280;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.contact-form-section h2,
.contact-info-section h2 {
  color: #1f2937;
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  background: #2563eb;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background: #1d4ed8;
}

.contact-method {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.contact-method:last-child {
  border-bottom: none;
}

.contact-method h3 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.contact-method p {
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.faq-section {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 2px solid #e5e7eb;
}

.faq-section h2 {
  color: #1f2937;
  margin-bottom: 2rem;
  text-align: center;
}

.faq-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 10px;
}

.faq-item h3 {
  color: #1f2937;
  margin-bottom: 1rem;
}

.faq-item p {
  color: #6b7280;
  margin: 0;
}

.feedback-section {
  margin-top: 3rem;
  padding: 2rem;
  background: #f0f9ff;
  border-radius: 10px;
  border-left: 4px solid #2563eb;
}

.feedback-section h2 {
  color: #1f2937;
  margin-bottom: 1rem;
}

.feedback-section p {
  color: #374151;
  margin-bottom: 1rem;
}

.feedback-section ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.feedback-section li {
  color: #374151;
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  background: #1f2937;
  color: white;
  padding: 3rem 0 1rem 0;
}

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

.footer-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #60a5fa;
}

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

.footer-section p {
  color: #9ca3af;
  line-height: 1.6;
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #60a5fa;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #374151;
  color: #9ca3af;
}

/* GDPR Notice */
.gdpr-notice {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #1f2937;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 350px;
  z-index: 1001;
  font-size: 0.9rem;
  display: none;
}

.gdpr-notice.show {
  display: block;
}

.gdpr-notice p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

.gdpr-notice a {
  color: #60a5fa;
  text-decoration: none;
}

.gdpr-notice a:hover {
  text-decoration: underline;
}

.gdpr-notice button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.gdpr-notice button:hover {
  background: #1d4ed8;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #2563eb;
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 80px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

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

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

  .hero-subtitle {
    font-size: 1rem;
  }

  .calc-options {
    flex-direction: column;
  }

  .article-header h1 {
    font-size: 2rem;
  }

  .article-content h2 {
    font-size: 1.5rem;
  }

  .main-article {
    padding: 2rem;
  }

  .article-page .article-header,
  .article-page .article-content {
    padding: 2rem;
  }

  .about-content,
  .contact-content,
  .privacy-content {
    padding: 2rem;
  }

  .page-content h1 {
    font-size: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .gdpr-notice {
    left: 10px;
    right: 10px;
    max-width: none;
    bottom: 10px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-section {
    padding: 2rem 0;
  }

  .calculator-card {
    padding: 1.5rem;
  }

  .main-article {
    padding: 1.5rem;
  }

  .article-page .article-header,
  .article-page .article-content {
    padding: 1.5rem;
  }

  .about-content,
  .contact-content,
  .privacy-content {
    padding: 1.5rem;
  }

  .data-table {
    font-size: 0.9rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .gdpr-notice,
  .back-to-top,
  .related-articles-section {
    display: none;
  }

  main {
    margin-top: 0;
  }

  .article-content {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .article-content a {
    color: #000;
    text-decoration: underline;
  }

  .highlight-box {
    background: #f5f5f5;
    border: 1px solid #ccc;
  }

  blockquote {
    background: #f9f9f9;
    border-left: 4px solid #ccc;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .hero-section {
    background: #000;
    color: #fff;
  }

  .calculator-card {
    border: 2px solid #000;
  }

  .calc-btn {
    border-color: #000;
    color: #000;
  }

  .calc-btn.active,
  .calc-btn:hover {
    background: #000;
    color: #fff;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
