@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap");

:root {
  --color-primary: #2C5F2D; /* Dark Green */
  --color-secondary: #97BC62; /* Light Green */
  --color-text-dark: #333;
  --color-text-light: #f9f9f9;
  --color-background-light: #ffffff;
  --color-background-dark: #f0f2f5;
  --color-border: #ddd;
  --color-shadow-light: rgba(0, 0, 0, 0.08);
  --color-shadow-medium: rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.7; /* Slightly increased for better readability */
  color: var(--color-text-dark);
  background-color: var(--color-background-light);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-secondary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem; /* Slightly more padding */
  border-radius: 8px; /* Softer corners */
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  border: none;
  text-align: center;
  font-size: 1rem;
}

.btn.primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  box-shadow: 0 4px 10px rgba(137, 171, 227, 0.3); /* Shadow for primary */
}

.btn.primary:hover {
  background-color: #1e4a1f; /* Slightly darker primary */
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(44, 95, 45, 0.4);
}

.btn.secondary {
  background-color: var(--color-secondary);
  color: var(--color-text-light);
  box-shadow: 0 4px 10px rgba(234, 115, 141, 0.3); /* Shadow for secondary */
}

.btn.secondary:hover {
  background-color: #7ea054; /* Slightly darker secondary */
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(151, 188, 98, 0.4);
}

/* Card Style */
.card {
  background-color: var(--color-background-light);
  padding: 2.5rem;
  border-radius: 12px; /* More rounded corners */
  box-shadow: 0 8px 25px var(--color-shadow-light); /* Softer, larger shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px var(--color-shadow-medium);
}

/* Header */
.header {
  background-color: var(--color-background-light);
  padding: 1rem 0;
  box-shadow: 0 2px 15px var(--color-shadow-light); /* Softer shadow */
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo a {
  font-size: 1.9rem; /* Slightly larger */
  font-weight: 700;
  color: var(--color-primary);
  transition: color 0.3s ease;
}

.logo a:hover {
  color: var(--color-secondary);
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 2rem; /* Increased gap */
}

.navbar .nav-links a {
  color: var(--color-text-dark);
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.navbar .nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px; /* Thicker underline */
  background-color: var(--color-secondary);
  bottom: -5px; /* Slightly lower */
  left: 0;
  transition: width 0.3s ease;
}

.navbar .nav-links a:hover::after {
  width: 100%;
}

/* Dropdown for More */
.dropdown {
  position: relative;
}

.dropdown .dropbtn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.dropdown .arrow-down {
  border: solid var(--color-text-dark);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--color-background-light);
  min-width: 180px; /* Slightly wider */
  box-shadow: 0px 8px 20px var(--color-shadow-medium); /* More pronounced shadow */
  z-index: 1;
  border-radius: 8px;
  overflow: hidden;
  top: calc(100% + 10px); /* Position further below the button */
  left: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-content a {
  color: var(--color-text-dark);
  padding: 12px 18px; /* More padding */
  text-decoration: none;
  display: block;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-content a:hover {
  background-color: var(--color-background-dark);
  color: var(--color-primary);
}

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

.dropdown:hover .arrow-down {
  transform: rotate(225deg); /* Arrow points up when open */
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger .bar {
  width: 100%;
  height: 3px;
  background-color: var(--color-text-dark);
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
}

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

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

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

/* Main Sections */
main {
  flex-grow: 1;
}

section {
  padding: 5rem 0; /* Increased padding */
  text-align: center;
}

section:nth-of-type(even) {
  background-color: var(--color-background-dark);
}

h1,
h2 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

h1 {
  font-size: 3.2rem; /* Larger for impact */
  line-height: 1.2;
}

h2 {
  font-size: 2.5rem; /* Larger */
  line-height: 1.3;
}

p {
  margin-bottom: 1.2rem; /* Slightly more spacing */
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #a7c4ed 100%);
  color: var(--color-text-light);
  padding: 4rem 0;
}

.hero-section h1 {
  color: var(--color-text-light);
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hero-section p {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Calculator Section */
.calculator-section {
  background-color: var(--color-background-light);
}

.calculator-card {
  background-color: var(--color-background-dark);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px var(--color-shadow-light);
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.date-picker {
  width: 100%;
  margin-bottom: 1rem;
  text-align: left;
}

.date-picker label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.date-input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.date-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(137, 171, 227, 0.2);
}

.calculator-results {
  width: 100%;
  text-align: center;
}

.calculator-results p {
  margin: 0.8rem 0;
  font-size: 1.1rem;
}

.calculator-results .result-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 1.2rem;
}

.calculator-card p {
  font-size: 1.2rem; /* Larger */
  font-weight: 600;
  margin: 0;
}

.calculator-card span {
  color: var(--color-secondary);
  font-weight: 700;
}

.calculator-card .result-text {
  font-size: 1.4rem; /* Larger */
  color: var(--color-primary);
}

/* Article Sections */
.articles-section .container,
.utility-page .container {
  text-align: left;
}

.main-article,
.article-content {
  max-width: 850px; /* Slightly wider */
  margin: 0 auto;
  font-size: 1.1rem; /* Slightly larger */
  line-height: 1.8;
}

.main-article h3,
.article-content h3 {
  font-size: 2rem; /* Larger */
  margin-top: 3rem; /* More spacing */
  margin-bottom: 1.2rem;
  color: var(--color-primary);
}

.main-article h4,
.article-content h4 {
  font-size: 1.6rem; /* Larger */
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

.main-article ol,
.main-article ul,
.article-content ol,
.article-content ul {
  margin-left: 2rem; /* More indentation */
  margin-bottom: 1.5rem;
}

.main-article li,
.article-content li {
  margin-bottom: 0.7rem; /* More spacing */
}

.quote {
  background-color: var(--color-background-dark);
  border-left: 6px solid var(--color-secondary); /* Thicker border */
  padding: 2rem; /* More padding */
  margin: 2.5rem 0; /* More margin */
  font-style: italic;
  color: var(--color-text-dark);
  font-size: 1.2rem; /* Larger */
  border-radius: 0 8px 8px 0; /* Softer corners */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.quote cite {
  display: block;
  margin-top: 1.5rem; /* More spacing */
  font-style: normal;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1rem;
}

.highlight {
  background-color: rgba(137, 171, 227, 0.15); /* More transparency */
  border: 1px solid var(--color-primary);
  padding: 2rem; /* More padding */
  margin: 2.5rem 0;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.highlight h4 {
  margin-top: 0;
  color: var(--color-primary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0; /* More margin */
  box-shadow: 0 5px 20px var(--color-shadow-light); /* Softer shadow */
  border-radius: 10px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  border: 1px solid var(--color-border);
  padding: 1.2rem; /* More padding */
  text-align: left;
}

.data-table th {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  font-weight: 600;
}

.data-table tr:nth-child(even) {
  background-color: var(--color-background-dark);
}

.data-table tr:hover {
  background-color: rgba(137, 171, 227, 0.08); /* More noticeable hover effect */
}

.sources-list,
.related-articles-list {
  list-style: none;
  padding: 0;
  margin-top: 2.5rem; /* More margin */
}

.sources-list li,
.related-articles-list li {
  margin-bottom: 0.8rem; /* More spacing */
}

.sources-list li a,
.related-articles-list li a {
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Footer */
.footer {
  background-color: var(--color-text-dark);
  color: var(--color-text-light);
  padding: 2.5rem 0; /* More padding */
  text-align: center;
  margin-top: auto;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem; /* Increased gap */
}

.footer-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem; /* Increased gap */
}

.footer-nav a {
  color: var(--color-text-light);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* GDPR Banner */
.gdpr-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #2c3e50;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 1rem;
}

.gdpr-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.gdpr-banner a {
  color: #3498db;
  text-decoration: underline;
  margin-left: 5px;
}

.gdpr-banner a:hover {
  color: #2980b9;
}

.gdpr-banner button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.gdpr-banner button:hover {
  background-color: #2980b9;
}

/* Back to Top Button */
.back-to-top-btn {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 2.5rem; /* Slightly higher */
  right: 2.5rem;
  background-color: var(--color-secondary);
  color: var(--color-text-light);
  border: none;
  border-radius: 50%;
  width: 55px; /* Slightly larger */
  height: 55px;
  font-size: 2rem; /* Larger icon */
  line-height: 55px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 5px 15px var(--color-shadow-medium); /* More pronounced shadow */
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  z-index: 999;
}

.back-to-top-btn:hover {
  background-color: #c75e74;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--color-shadow-medium);
}

/* Utility Pages Specific Styles */
.utility-page h1 {
  font-size: 2.8rem; /* Larger */
  color: var(--color-primary);
  margin-bottom: 2.5rem; /* More spacing */
}

.utility-page p {
  margin-bottom: 1.2rem;
}

.utility-page ul {
  list-style: disc;
  margin-left: 2.5rem; /* More indentation */
  margin-bottom: 1.5rem;
}

.utility-page address {
  font-style: normal;
  margin-top: 2rem;
  font-size: 1.1rem;
}



/* Responsive Design */
@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
  }

  .navbar {
    width: 100%;
    order: 3;
    margin-top: 1rem;
  }

  .navbar .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    display: none;
    width: 100%;
    background-color: var(--color-background-light);
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
  }

  .navbar.active .nav-links {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

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

  .hero-section p {
    font-size: 1.1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  section {
    padding: 3rem 0;
  }

  .calculator-card {
    padding: 2rem;
  }

  .main-article,
  .article-content {
    font-size: 1rem;
    padding: 1.5rem; /* Adjust card padding for mobile */
  }

  .main-article h3,
  .article-content h3 {
    font-size: 1.7rem;
  }

  .main-article h4,
  .article-content h4 {
    font-size: 1.3rem;
  }

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

  .footer-nav ul {
    flex-direction: column;
    gap: 0.8rem;
  }

  .gdpr-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    bottom: 0.8rem;
    left: 0.8rem;
    right: 0.8rem;
    max-width: unset;
    padding: 1rem;
  }

  .gdpr-banner .btn {
    width: 100%;
  }

  .back-to-top-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    font-size: 1.8rem;
    line-height: 48px;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    border-radius: 0;
    background-color: var(--color-background-dark);
    width: 100%;
    opacity: 1; /* Always visible when active */
    transform: translateY(0);
  }

  .dropdown:hover .dropdown-content {
    display: none; /* Managed by JS for mobile */
  }

  .dropdown.active .dropdown-content {
    display: block;
  }
}
