/* ==========================================
   DuskPetal 暮色花笺 - Responsive Styles
   ========================================== */

/* Tablet (768px - 1024px) */
@media screen and (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .section {
    padding: var(--spacing-xxl) 0;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
}

/* Mobile (< 768px) */
@media screen and (max-width: 768px) {
  :root {
    --header-height: 60px;
  }
  
  /* Navigation */
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-background);
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu li {
    width: 100%;
  }
  
  .nav-menu a {
    display: block;
    padding: var(--spacing-sm);
    font-size: 1.1rem;
  }
  
  /* Hero Section */
  .hero {
    min-height: 700px;
    height: auto;
    padding: var(--spacing-xl) 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-tagline {
    font-size: 1rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 260px;
  }

  .hero-scroll {
    display: none;
  }
  
  /* Grid Layouts */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .stat-number {
    font-size: 2.5rem;
  }

  /* Hero Responsive */
  .hero-features {
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
  }

  .hero-feature {
    font-size: 0.85rem;
  }

  .hero-feature i {
    font-size: 1rem;
  }

  .hero-description-wrapper {
    padding: 0 var(--spacing-sm);
  }

  .hero-subdescription {
    font-size: 0.9rem;
  }

  /* Featured Highlight */
  .featured-highlight {
    grid-template-columns: 1fr;
  }

  .featured-image-wrapper {
    min-height: 250px;
  }

  .featured-content {
    padding: var(--spacing-lg);
  }

  .featured-title {
    font-size: 1.5rem;
  }

  /* Newsletter */
  .newsletter-inner {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-content {
    max-width: 100%;
  }

  .newsletter-form {
    max-width: 100%;
  }

  .newsletter-input-group {
    flex-direction: column;
  }
  
  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .friendly-links-list {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  /* Cards */
  .card-image {
    height: 200px;
  }
  
  /* Spacing */
  .section {
    padding: var(--spacing-xl) 0;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  /* Filter Bar */
  .filter-bar {
    padding: var(--spacing-sm);
  }
  
  .filter-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
  
  /* Search Modal */
  .search-container {
    width: 95%;
    padding: var(--spacing-md);
  }
  
  /* Back to Top */
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
  
  /* Article Content */
  .article-content {
    font-size: 1rem;
    line-height: 1.8;
  }
  
  .poetry-content {
    font-size: 1.1rem;
    line-height: 2;
  }
  
  /* Quote Section */
  .quote-text {
    font-size: 1.2rem;
  }
  
  /* Tags Cloud */
  .tags-cloud .tag {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
  
  .tags-cloud .tag.size-lg {
    font-size: 1.1rem;
  }
  
  .tags-cloud .tag.size-md {
    font-size: 1rem;
  }
}

/* Small Mobile (< 480px) */
@media screen and (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-pretitle {
    font-size: 0.85rem;
  }

  .hero-description {
    font-size: 0.9rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .article-title {
    font-size: 1.75rem;
  }
  
  .card-image {
    height: 180px;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
  
  .pagination-item {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* Landscape Orientation on Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 400px;
    height: auto;
    padding: var(--spacing-xl) 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
}

/* Large Desktop (> 1440px) */
@media screen and (min-width: 1440px) {
  :root {
    --max-width: 1400px;
  }
  
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
  
  .section-title {
    font-size: 2.8rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .back-to-top,
  .search-modal,
  .hamburger,
  .nav-actions {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .hero {
    margin-top: 0;
    height: auto;
    min-height: auto;
    background: none;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  img {
    max-width: 100%;
  }
}
