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

:root {
  --primary-blue: #0047ab;
  --white: #ffffff;
  --light-gray: #f5f7fa;
  --accent-gold: #ffb300;
  --text-dark: #1a1a1a;
  --text-gray: #666666;
  --border-color: #e0e0e0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
}

/* Typography */
h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}
h2 {
  font-size: 2rem;
  font-weight: 600;
}
h3 {
  font-size: 1.5rem;
  font-weight: 600;
}
h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--accent-gold);
}
a:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

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

/* Header */
.header {
  background-color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.logo a {
  color: var(--primary-blue);
}

.logo-highlight {
  color: var(--accent-gold);
  font-size: 1.8rem;
}

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

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

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-blue);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #0066cc 100%);
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.animated-title {
  animation: fadeInUp 1s ease-out, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.95;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-gold);
  color: var(--text-dark);
  padding: 1rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 179, 0, 0.4);
  color: var(--text-dark);
}

.cta-button.secondary {
  background-color: var(--white);
  color: var(--primary-blue);
}

.cta-button.secondary:hover {
  box-shadow: 0 6px 20px rgba(0, 71, 171, 0.2);
}

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

.page-hero h1 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--text-gray);
  font-size: 1.125rem;
}

/* Content Section */
.content-section {
  padding: 4rem 0;
}

/* Trends Widget */
.trends-widget {
  background-color: var(--light-gray);
  padding: 4rem 0;
}

.trends-widget h2 {
  text-align: center;
  color: var(--primary-blue);
  margin-bottom: 2rem;
}

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

.trend-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.trend-card:hover {
  transform: translateY(-5px);
}

.trend-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.trend-value {
  font-size: 2rem;
  color: var(--primary-blue);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.trend-label {
  color: var(--text-gray);
  font-size: 1rem;
}

/* Articles Section */
.featured-articles {
  padding: 4rem 0;
}

.featured-articles h2 {
  text-align: center;
  color: var(--primary-blue);
  margin-bottom: 2rem;
}

.search-container {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-container input[type="search"] {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-container input[type="search"]:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.articles-grid,
.research-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.article-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.article-category {
  display: inline-block;
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.article-card h3 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.article-card p {
  color: var(--text-gray);
  margin-bottom: 1rem;
}

.article-date {
  color: var(--text-gray);
  font-size: 0.875rem;
}

/* Education Grid */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.education-card {
  background-color: var(--white);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.education-card:hover {
  border-color: var(--primary-blue);
  transform: translateY(-3px);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.education-card h2 {
  color: var(--primary-blue);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.topic-list {
  list-style: none;
  padding-left: 0;
}

.topic-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-gray);
}

.topic-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-weight: bold;
}

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

.tool-card {
  background-color: var(--light-gray);
  border-radius: 12px;
  padding: 2rem;
}

.tool-card h2 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.calculator-form {
  margin-top: 1.5rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.form-group textarea {
  resize: vertical;
}

.result-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: var(--white);
  border-left: 4px solid var(--accent-gold);
  border-radius: 6px;
  display: none;
}

.result-box.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

.result-box strong {
  color: var(--primary-blue);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.news-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: box-shadow 0.3s ease;
}

.news-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-image {
  margin: -2rem -2rem 1.5rem -2rem;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.news-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-date {
  color: var(--text-gray);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.news-card h2 {
  color: var(--primary-blue);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--primary-blue);
  font-weight: 600;
  display: inline-block;
  margin-top: 0.5rem;
}

.read-more:hover {
  color: var(--accent-gold);
}

/* About Content */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

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

.feature-item {
  background-color: var(--light-gray);
  padding: 1.5rem;
  border-radius: 8px;
}

.feature-item h3 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.simple-list {
  list-style: none;
  padding-left: 0;
}

.simple-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.simple-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-weight: bold;
}

.disclaimer-box {
  background-color: #fff9e6;
  border: 2px solid var(--accent-gold);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
}

.disclaimer-box h2 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

/* Contact Page */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info h2 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.contact-details {
  margin-top: 2rem;
}

.contact-item {
  margin-bottom: 2rem;
}

.contact-item h3 {
  color: var(--primary-blue);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.contact-form {
  background-color: var(--light-gray);
  padding: 2rem;
  border-radius: 12px;
}

.required {
  color: #d32f2f;
}

.error-message {
  display: block;
  color: #d32f2f;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.25rem;
}

.success-message {
  display: none;
  background-color: #4caf50;
  color: var(--white);
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1rem;
}

.success-message.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* CTA Section */
.cta-section {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section p {
  opacity: 0.8;
  line-height: 1.6;
}

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

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

.footer-section a {
  color: var(--white);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-section a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  text-align: center;
  opacity: 0.8;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: -200px;
  left: 0;
  right: 0;
  background-color: var(--text-dark);
  color: var(--white);
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  transition: bottom 0.5s ease, opacity 0.5s ease;
}

.cookie-banner.show {
  bottom: 0;
  opacity: 1;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-content h3 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.cookie-content p {
  opacity: 0.9;
  margin-bottom: 0;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cookie-btn:hover {
  transform: translateY(-2px);
}

.cookie-btn.accept {
  background-color: var(--accent-gold);
  color: var(--text-dark);
}

.cookie-btn.decline {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in:nth-child(1) {
  animation-delay: 0.1s;
}
.fade-in:nth-child(2) {
  animation-delay: 0.2s;
}
.fade-in:nth-child(3) {
  animation-delay: 0.3s;
}
.fade-in:nth-child(4) {
  animation-delay: 0.4s;
}
.fade-in:nth-child(5) {
  animation-delay: 0.5s;
}
.fade-in:nth-child(6) {
  animation-delay: 0.6s;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero-title {
    font-size: 2rem;
  }

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

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }

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

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .trends-grid,
  .articles-grid,
  .education-grid,
  .tools-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .cta-buttons {
    flex-direction: column;
  }
}

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

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .trend-card,
  .article-card,
  .education-card {
    border: 2px solid currentColor;
  }
}

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