/* 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: #00246b;
  background-color: #ffffff;
}

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

/* Header and Navigation */
.header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 36, 107, 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 {
  color: #00246b;
  font-size: 1.8rem;
  font-weight: 700;
}

.logo h1 a {
  text-decoration: none;
  color: inherit;
}

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

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

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

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

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: #00246b;
  margin: 3px 0;
  transition: 0.3s;
}

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

/* Calculator Section */
.calculator-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #cadcfc 0%, #ffffff 100%);
}

.calculator-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #00246b;
}

.calculator-card {
  background: #ffffff;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 36, 107, 0.1);
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

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

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #00246b;
}

.date-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #cadcfc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  transition: border-color 0.3s ease;
}

.date-input:focus {
  outline: none;
  border-color: #00246b;
}

.calculate-btn {
  background-color: #00246b;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.calculate-btn:hover {
  background-color: #001a4d;
}

.result {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #cadcfc;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #00246b;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Article Section */
.article-section {
  padding: 4rem 0;
}

.main-article {
  max-width: 800px;
  margin: 0 auto;
  background: #ffffff;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 36, 107, 0.1);
}

.main-article h1,
.main-article h2,
.main-article h3 {
  color: #00246b;
  margin-bottom: 1rem;
}

.main-article h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.main-article h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
}

.main-article h3 {
  font-size: 1.4rem;
  margin-top: 1.5rem;
}

.article-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  color: #666;
  font-size: 0.9rem;
}

.highlight-box {
  background-color: #cadcfc;
  padding: 1.5rem;
  border-radius: 10px;
  margin: 1.5rem 0;
  border-left: 4px solid #00246b;
}

.highlight-box h4 {
  color: #00246b;
  margin-bottom: 0.5rem;
}

blockquote {
  background-color: #f8f9fa;
  border-left: 4px solid #00246b;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #00246b;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 36, 107, 0.1);
}

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

.info-table th {
  background-color: #00246b;
  color: white;
  font-weight: 600;
}

.info-table tr:hover {
  background-color: #f8f9fa;
}

.sources {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #cadcfc;
}

.sources h4 {
  color: #00246b;
  margin-bottom: 1rem;
}

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

.sources li {
  margin-bottom: 0.5rem;
}

.related-articles {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 10px;
}

.related-articles h4 {
  color: #00246b;
  margin-bottom: 1rem;
}

.related-articles ul {
  list-style: none;
  padding: 0;
}

.related-articles li {
  margin-bottom: 0.5rem;
}

.related-articles a {
  color: #00246b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.related-articles a:hover {
  color: #001a4d;
  text-decoration: underline;
}

/* Page Sections */
.page-section {
  padding: 4rem 0;
}

.content-card {
  background: #ffffff;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 36, 107, 0.1);
  margin-bottom: 2rem;
}

.content-card h2,
.content-card h3 {
  color: #00246b;
  margin-bottom: 1rem;
}

.content-card ul {
  padding-left: 1.5rem;
}

.content-card li {
  margin-bottom: 0.5rem;
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.contact-card {
  background: #ffffff;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 36, 107, 0.1);
  text-align: center;
}

.contact-card h3 {
  color: #00246b;
  margin-bottom: 1rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #cadcfc;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h4 {
  color: #00246b;
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  background-color: #00246b;
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: #cadcfc;
}

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

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

.footer-section a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* GDPR Notice */
.gdpr-notice {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: #00246b;
  color: white;
  padding: 1rem;
  border-radius: 8px;
  max-width: 300px;
  box-shadow: 0 5px 20px rgba(0, 36, 107, 0.3);
  z-index: 1000;
  font-size: 0.9rem;
}

.gdpr-notice a {
  color: #cadcfc;
  text-decoration: underline;
}

.gdpr-notice button {
  background-color: #cadcfc;
  color: #00246b;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  margin-top: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
}

.gdpr-notice.hidden {
  display: none;
}

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

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

.back-to-top:hover {
  background-color: #001a4d;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 36, 107, 0.1);
    padding: 2rem 0;
  }

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

  .hamburger {
    display: flex;
  }

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

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .calculator-section h2 {
    font-size: 2rem;
  }

  .main-article {
    padding: 1.5rem;
  }

  .main-article h1 {
    font-size: 1.8rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

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

  .calculator-card {
    padding: 1.5rem;
  }

  .main-article {
    padding: 1rem;
  }

  .content-card {
    padding: 1.5rem;
  }

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

/* Performance Optimizations */
.calculator-section,
.article-section,
.page-section {
  will-change: transform;
}

img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

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

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus {
  outline: 2px solid #00246b;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .highlight-box {
    border: 2px solid #00246b;
  }

  .calculator-card {
    border: 1px solid #00246b;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}
