/* Mobile First Responsive Design */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: rgba(255, 248, 244, 0.98);
    backdrop-filter: blur(10px);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(216, 167, 177, 0.2);
  }

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

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(216, 167, 177, 0.1);
  }

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

  .nav-toggle {
    display: flex;
  }

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

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

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

  /* Hero Section */
  .hero {
    padding: 4rem 0;
  }

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

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

  /* Typography */
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.7rem;
  }

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

  .page-title {
    font-size: 2.2rem;
  }

  .article-page .article-title {
    font-size: 2.2rem;
  }

  /* Container */
  .container {
    padding: 0 1rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  /* Articles Grid */
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Article Cards */
  .article-content {
    padding: 1.5rem;
  }

  /* Sections */
  .featured-articles,
  .philosophy {
    padding: 4rem 0;
  }

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

  /* Page Header */
  .page-header {
    padding: 3rem 0;
  }

  /* Article Page */
  .article-page {
    padding: 1rem 0 3rem;
  }

  .article-page .article-image img {
    height: 250px;
  }

  .article-intro {
    font-size: 1.1rem;
    padding: 1rem;
  }

  /* Resources */
  .resources-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .resource-category {
    padding: 2rem;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-links ul {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Buttons */
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }

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

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

  .article-page .article-title {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

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

  .article-intro {
    font-size: 1rem;
  }

  .resource-category {
    padding: 1.5rem;
  }

  .resource-item {
    padding: 1rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 769px) and (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large devices (desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-title {
    font-size: 4rem;
  }

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

  .article-page .article-title {
    font-size: 3.2rem;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .article-image img,
  .hero::before {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

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

  .fade-in,
  .fade-in-delay,
  .fade-in-delay-2 {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  /* This can be implemented if dark mode is desired */
}

/* Print styles */
@media print {
  .header,
  .footer,
  .nav-toggle,
  .btn {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .article-page .article-content {
    max-width: none;
  }
}
