/* Responsive Design */

@media (max-width: 1024px) {
  .navbar-container {
    padding: 0 15px;
  }

  .navbar-menu {
    gap: 1rem;
  }

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

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

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

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

  .navbar-menu {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .navbar-menu li {
    width: 100%;
  }

  .navbar-menu a {
    display: block;
    padding: 0.5rem 0;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

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

  .cta-button {
    padding: 10px 20px;
    font-size: 1rem;
  }

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

  .card {
    padding: 1.5rem;
  }

  .section {
    padding: 2rem 0;
  }

  .section-title {
    margin-bottom: 2rem;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer {
    padding: 2rem 0 1rem;
  }

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

  .navbar-logo {
    font-size: 1.25rem;
  }

  .theme-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1rem; }
  h4 { font-size: 0.95rem; }

  .hero {
    padding: 1.5rem 0;
    min-height: auto;
  }

  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .cta-button {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .grid {
    gap: 1rem;
  }

  .card {
    padding: 1rem;
    border-top-width: 3px;
  }

  .card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .section-title h2 {
    font-size: 1.25rem;
  }

  .section-title p {
    font-size: 0.95rem;
  }

  .navbar {
    padding: 0.75rem 0;
  }

  .navbar-container {
    gap: 0.75rem;
  }

  .navbar-logo {
    font-size: 1rem;
  }

  .navbar-menu {
    gap: 0.25rem;
  }

  .navbar-menu li {
    font-size: 0.9rem;
  }

  .theme-toggle {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  .footer {
    padding: 1.5rem 0 0.75rem;
  }

  .footer-content {
    gap: 0.75rem;
  }

  .footer-section h4 {
    margin-bottom: 0.75rem;
  }

  .footer-section a {
    margin-bottom: 0.35rem;
  }

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

  .post-content {
    margin: 1rem 0;
  }

  input,
  textarea,
  select {
    width: 100%;
    padding: 0.5rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .navbar-menu {
    gap: 0.75rem;
  }

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

/* Tablets in portrait */
@media (min-width: 481px) and (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .theme-toggle {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .card {
    page-break-inside: avoid;
  }
}
