/* 
========================================================================
   GROVE ATLANTIC CLONE - RESPONSIVE STYLESHEET
   Layout Adaptations, Media Queries, and Mobile Views
========================================================================
*/

/* ---------------------------------------------------------------------
   1. TABLET VIEWS (Max-width: 1024px)
   --------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
  :root {
    --section-padding: 60px;
  }
  
  /* Typography Scale Down */
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2.1rem; }
  
  /* Grid Adjustments */
  .grid-4-col {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  
  .footer-brand {
    grid-column: span 2;
    margin-bottom: 20px;
  }
}

/* ---------------------------------------------------------------------
   2. MOBILE LANDSCAPE & PORTRAIT (Max-width: 768px)
   --------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  :root {
    --section-padding: 50px;
    --header-height: 70px;
  }
  
  /* Typography */
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.4rem; }
  
  /* Hide Desktop Nav Menu & Actions */
  .nav-menu {
    display: none;
  }
  
  .header-actions .header-newsletter-btn {
    display: none; /* Hide newsletter button in header on mobile to save space */
  }
  
  .hamburger {
    display: flex;
  }
  
  /* Hero Section Stacking Layout */
  .hero-container {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 32px;
  }
  
  .hero-content {
    align-items: center;
    order: 2; /* Text goes below on mobile */
  }
  
  .hero-book-wrap {
    order: 1; /* Cover on top */
    max-width: 260px;
    margin: 0 auto;
  }
  
  /* Horizontally scrolling book lists on mobile */
  .mobile-scroll-row {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 16px;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
    scrollbar-width: none; /* Firefox */
  }
  
  .mobile-scroll-row::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
  }
  
  .mobile-scroll-row > * {
    flex: 0 0 240px;
    scroll-snap-align: start;
  }
  
  /* Event lists */
  .event-card {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
  }
  
  .event-date-box {
    margin: 0 auto;
    width: 80px;
    min-height: 80px;
    padding: 8px;
  }
  
  .event-meta {
    justify-content: center;
  }
  
  .event-action {
    text-align: center;
    margin-top: 8px;
  }
  
  /* Timeline collapsing */
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 55px;
    padding-right: 0;
  }
  
  .timeline-item::after {
    left: 25px;
    right: auto;
  }
  
  .timeline-left {
    text-align: left;
  }
  
  .timeline-right {
    left: 0;
  }
  
  /* News and Articles */
  .news-list-item {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .news-list-item-img {
    aspect-ratio: 16/9;
  }
  
  /* Book Details layout stacked */
  .book-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 40px;
  }
  
  .book-detail-cover {
    max-width: 320px;
    margin: 0 auto;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .footer-brand {
    grid-column: 1;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* Contact page layouts */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 40px;
  }
  
  .contact-departments {
    grid-template-columns: 1fr !important;
  }
  
  /* About page layouts */
  .imprints-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---------------------------------------------------------------------
   3. SMALL MOBILE PORTRAIT (Max-width: 480px)
   --------------------------------------------------------------------- */
@media screen and (max-width: 480px) {
  :root {
    --section-padding: 40px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .section-header-right {
    width: 100%;
  }
  
  .section-header-right .btn {
    width: 100%;
    text-align: center;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }
  
  .newsletter-form {
    flex-direction: column;
    border-bottom: none;
    gap: 12px;
  }
  
  .newsletter-email {
    border-bottom: 1px solid var(--primary-color);
    padding: 12px 4px;
  }
  
  .newsletter-submit {
    border: 1px solid var(--primary-color);
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--bg-color);
  }
  
  .newsletter-submit:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
  }
}
