/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --primary-color: #007BFF;
  --secondary-color: #6c757d;
  --background-color: #ffffff;
  --text-color: #343a40;
  --light-gray: #f8f9fa;
  --border-color: #dee2e6;
  --header-height: 70px;
  --radius: 8px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 1.25rem;
  margin: 0 auto;
}

/* --- Header & Nav --- */
.main-header {
  background: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 999;
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--text-color);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* --- Hero Section --- */
.hero {
  padding: 4rem 1rem;
  text-align: center;
  background-color: var(--light-gray);
}

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

.hero p {
  font-size: 1.125rem;
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

/* --- Calculator Box --- */
.calculator-wrapper {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
}

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

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

.input-group input[type="date"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}

#result-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #e7f3ff;
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius);
}

#result-date {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-color);
}

/* --- Content / Article --- */
.content-section {
  padding: 4rem 1rem;
}

.content-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

.article-content p,
.article-content li {
  margin-bottom: 1rem;
}

.article-content a {
  color: var(--primary-color);
  text-decoration: none;
}

.article-content a:hover {
  text-decoration: underline;
}

blockquote {
  border-left: 4px solid var(--primary-color);
  background-color: var(--light-gray);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

table th,
table td {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
}

table th {
  background-color: var(--light-gray);
  font-weight: 600;
}

.highlight {
  background-color: #fff3cd;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
}

/* --- Sources --- */
.sources {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--secondary-color);
}

.sources h3 {
  font-size: 1.2rem;
  color: var(--text-color);
}

/* --- Footer --- */
.main-footer {
  background-color: var(--text-color);
  color: #f8f9fa;
  padding: 3rem 1rem;
  margin-top: 4rem;
}

.main-footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.footer-section a {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--light-gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--secondary-color);
  font-size: 0.875rem;
}

/* --- Floating Elements --- */
#gdpr-notice {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 1rem;
  border-radius: var(--radius);
  display: flex;
  gap: 1rem;
  z-index: 1001;
  max-width: 320px;
}

#gdpr-accept {
  background: var(--primary-color);
  border: none;
  padding: 0.5rem 1rem;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--primary-color);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .main-header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-section {
    text-align: center;
  }
}
