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

:root {
  /* Color Palette */
  --lavender: #e6e6fa;
  --warm-beige: #f5f5dc;
  --ivory: #fffff0;
  --plum: #8b4b8c;
  --navy: #2c3e50;
  --emerald: #50c878;
  --soft-gray: #f8f9fa;
  --text-dark: #2c3e50;
  --text-light: #6c757d;

  /* Typography */
  --font-serif: "Merriweather", serif;
  --font-sans: "Lato", sans-serif;

  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 4rem 0;
  --card-padding: 2rem;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--ivory);
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1rem;
}

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

p {
  margin-bottom: 1rem;
}

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

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

/* Header and Navigation */
.header {
  background-color: rgba(255, 255, 240, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--plum);
}

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

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

.nav-link:hover {
  color: var(--plum);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(
    135deg,
    var(--lavender) 0%,
    var(--warm-beige) 100%
  );
  display: flex;
  align-items: center;
  min-height: 80vh;
}

.hero-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--plum);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.hero-cta {
  display: inline-block;
  background-color: var(--plum);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 75, 140, 0.3);
}

.hero-cta:hover {
  background-color: var(--navy);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 75, 140, 0.4);
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Blog Section */
.blog-section {
  padding: var(--section-padding);
  background-color: var(--ivory);
}

.section-title {
  text-align: center;
  color: var(--navy);
  margin-bottom: 3rem;
}

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

.blog-card {
  background-color: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

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

.blog-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.blog-content {
  padding: 1.5rem;
}

.blog-title {
  margin-bottom: 1rem;
}

.blog-title a {
  color: var(--navy);
  text-decoration: none;
}

.blog-title a:hover {
  color: var(--plum);
}

.blog-excerpt {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.read-more {
  color: var(--plum);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Adding styles for new homepage sections */
/* Tips Section */
.tips-section {
  padding: var(--section-padding);
  background-color: var(--soft-gray);
}

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

.tip-card {
  background-color: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

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

.tip-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.tip-card h3 {
  color: var(--navy);
  margin-bottom: 1rem;
}

.tip-card p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* Quiz Section */
.quiz-section {
  padding: var(--section-padding);
  background-color: var(--lavender);
}

.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.quiz-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.quiz-intro p {
  font-size: 1.1rem;
  color: var(--text-light);
}

.question {
  display: none;
}

.question.active {
  display: block;
}

.question h3 {
  color: var(--navy);
  margin-bottom: 2rem;
  text-align: center;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-option {
  background-color: var(--soft-gray);
  border: 2px solid transparent;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-align: left;
}

.quiz-option:hover {
  background-color: var(--lavender);
  border-color: var(--plum);
}

.quiz-option:focus {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

.quiz-option.selected {
  background-color: var(--plum);
  color: white;
  border-color: var(--plum);
}

.quiz-result {
  text-align: center;
}

.result-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0;
  padding: 2rem;
  background-color: var(--soft-gray);
  border-radius: 15px;
}

.result-icon {
  font-size: 3rem;
  min-width: 60px;
}

.result-text {
  text-align: left;
}

.result-title {
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.result-description {
  color: var(--text-light);
  margin-bottom: 0;
}

.quiz-restart {
  background-color: var(--plum);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.quiz-restart:hover {
  background-color: var(--navy);
  transform: translateY(-2px);
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 70px;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(to right, var(--plum), var(--emerald));
  z-index: 999;
  transition: width 0.3s ease;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Inspiration Section */
.inspiration-section {
  padding: var(--section-padding);
  background-color: var(--warm-beige);
}

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

.inspiration-quote {
  background-color: white;
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border-left: 5px solid var(--plum);
  transition: all 0.3s ease;
}

.inspiration-quote:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.inspiration-quote p {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.inspiration-quote cite {
  color: var(--plum);
  font-weight: 500;
  font-style: normal;
}

/* About and Resources Page Styles */
.main {
  padding-top: 70px;
}

.page-title {
  font-size: 2.5rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.about-hero,
.resources-hero {
  padding: 140px 0 60px;
  background: linear-gradient(
    135deg,
    var(--lavender) 0%,
    var(--warm-beige) 100%
  );
}

.about-content,
.resources-content {
  padding: 3rem 0;
}

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

.about-section h2,
.resource-category h2 {
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.about-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

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

.values-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.value-item,
.resource-item {
  background-color: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.value-item:hover,
.resource-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.value-item h3,
.resource-item h3 {
  color: var(--navy);
  margin-bottom: 1rem;
}

.value-item p,
.resource-item p {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.resource-item strong {
  color: var(--plum);
}

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

.resource-item.urgent {
  border-left: 5px solid var(--emerald);
  background-color: #f8fff8;
}

.resource-item.urgent h3 {
  color: var(--emerald);
}

/* Footer */
.footer {
  background-color: var(--navy);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

.footer p {
  margin-bottom: 0.5rem;
}

.footer-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

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

.footer-links a:hover {
  color: var(--lavender);
}

/* Article Styles */
.article-header {
  padding: 120px 0 60px;
  background: linear-gradient(
    135deg,
    var(--lavender) 0%,
    var(--warm-beige) 100%
  );
  text-align: center;
}

.article-title {
  font-size: 2.5rem;
  color: var(--navy);
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article-meta {
  color: var(--text-light);
  font-size: 1rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1rem 1rem 1rem;
  position: relative;
  z-index: 1;
}

.article-image {
  margin: 2rem 0;
  text-align: center;
}

.article-image img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.pullquote {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--plum);
  text-align: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: var(--soft-gray);
  border-radius: 10px;
  border-left: 4px solid var(--plum);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--ivory);
    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-toggle {
    display: flex;
  }

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

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

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

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

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

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

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.25rem;
  }

  /* Mobile responsive styles for new sections */
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .quiz-container {
    padding: 2rem;
  }

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

  .result-text {
    text-align: center;
  }

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

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

  .values-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .crisis-resources {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-card {
    margin: 0 0.5rem;
  }

  .quiz-container {
    padding: 1.5rem;
  }

  .tip-card,
  .value-item,
  .resource-item {
    padding: 1.5rem;
  }
}

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

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

/* Screen reader only text */
.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;
}
