/* ==========================================================================
   ICC Berlin Church Website - Responsive Breakpoints
   ==========================================================================
   This file contains ONLY media queries. Base styles (mobile-first) are
   defined in style.css. This file progressively enhances the layout for
   larger viewports.

   Breakpoints:
   - Mobile-only:    max-width: 575px
   - Tablet:         min-width: 576px
   - Desktop small:  min-width: 768px
   - Desktop:        min-width: 992px
   - Desktop large:  min-width: 1200px
   - Print
   - Accessibility (prefers-reduced-motion, prefers-color-scheme)
   ========================================================================== */


/* ==========================================================================
   Mobile Only (max-width: 575px)
   ========================================================================== */

@media (max-width: 575px) {

  /* -- Navigation (fullscreen overlay) -- */
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: 999;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-link {
    color: var(--text-light);
    font-size: 1.5rem;
    padding: 1rem;
  }

  .nav-link::after {
    background-color: var(--accent-warm);
  }

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

  /* -- Hamburger -- */
  .hamburger {
    display: flex;
  }

  /* -- Hero -- */
  .hero {
    min-height: 80vh;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .hero__logo {
    width: 80px;
  }

  /* -- Page Header -- */
  .page-header {
    min-height: 300px;
    height: 40vh;
  }

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

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

  /* -- Chatbot -- */
  .chatbot__window {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 5rem;
  }

  .chatbot__toggle {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    right: 1.5rem;
  }

  /* -- Language Switcher -- */
  .lang-switcher {
    gap: 2px;
  }

  .lang-switcher__btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  /* -- Ministry Cards -- */
  .ministry-card {
    height: 300px;
  }

  /* -- Footer -- */
  .footer__grid {
    grid-template-columns: 1fr;
  }

  /* -- Buttons -- */
  .btn--lg {
    padding: 14px 28px;
    font-size: 1rem;
  }
}


/* ==========================================================================
   Tablet (min-width: 576px)
   ========================================================================== */

@media (min-width: 576px) {

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

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

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

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

  h2 {
    font-size: 2.25rem;
  }

  /* -- Hero -- */
  .hero__title {
    font-size: 3rem;
  }

  /* -- Event Cards (side by side layout) -- */
  .event-card {
    flex-direction: row;
  }

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

  /* -- Sections -- */
  .section {
    padding: 4rem 0;
  }
}


/* ==========================================================================
   Desktop Small (min-width: 768px)
   ========================================================================== */

@media (min-width: 768px) {

  /* -- Grid System -- */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

  /* -- Mother Church (two-column layout) -- */
  .mother-church {
    grid-template-columns: 1fr 1fr;
  }

  /* -- Timeline -- */
  .timeline {
    padding-left: 80px;
  }

  .timeline::before {
    left: 39px;
  }

  .timeline__item {
    padding-left: 80px;
  }

  .timeline__number {
    left: 20px;
  }

  /* -- Hero -- */
  .hero__title {
    font-size: 3.5rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  /* -- Chatbot -- */
  .chatbot__window {
    width: 380px;
  }

  /* -- Contact Form (two-column rows) -- */
  .contact-form__grid,
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}


/* ==========================================================================
   Desktop (min-width: 992px)
   ========================================================================== */

@media (min-width: 992px) {

  /* -- Navigation (always visible on desktop) -- */
  .hamburger {
    display: none;
  }

  .main-nav {
    display: flex !important;
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    transform: none;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }

  .nav-list {
    flex-direction: row;
    gap: 0.25rem;
  }

  .nav-link {
    color: var(--text);
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
  }

  /* Reset nav link colors that mobile override may have set */
  .site-header:not(.scrolled) .nav-link {
    color: var(--text-light);
  }

  /* -- Grid System -- */
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  /* -- Footer -- */
  .footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* -- Hero -- */
  .hero__content {
    text-align: center;
  }

  .hero__title {
    font-size: 4rem;
  }

  /* -- Page Header -- */
  .page-header__title {
    font-size: 3.5rem;
  }

  /* -- Sections -- */
  .section {
    padding: 6rem 0;
  }

  /* -- Counters -- */
  .counters__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* -- Info Grid (4 cards per row) -- */
  .info-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ==========================================================================
   Desktop Large (min-width: 1200px)
   ========================================================================== */

@media (min-width: 1200px) {

  /* -- Container -- */
  .container {
    max-width: 1200px;
  }

  /* -- Hero -- */
  .hero__title {
    font-size: 4.5rem;
  }

  /* -- Spacing refinements -- */
  .hero__content {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .section__title {
    margin-bottom: 3.5rem;
  }

  .footer__grid {
    gap: 3rem;
  }
}


/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {

  /* Hide non-essential UI elements */
  .site-header,
  .site-footer,
  .chatbot,
  .chatbot__toggle,
  .chatbot__window,
  .hamburger,
  .lang-switcher {
    display: none;
  }

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

  .hero__overlay {
    display: none;
  }

  /* Reset colors for print */
  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  /* Reduce section spacing */
  .section {
    padding: 1rem 0;
  }

  /* Flatten cards */
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .card:hover {
    transform: none;
    box-shadow: none;
  }

  /* Ensure content is not cut off */
  .hero__content,
  .page-header__content {
    color: #000;
  }

  .hero__title,
  .page-header__title {
    color: #000;
  }

  /* Avoid page breaks inside key elements */
  .card,
  .event-card,
  .feature-card,
  .timeline__item {
    break-inside: avoid;
  }
}


/* ==========================================================================
   Accessibility: Prefers Color Scheme
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  /* Optional: subtle dark mode adjustments could be added here
     if a dark mode toggle is implemented in the future. */
}


/* ==========================================================================
   Accessibility: Prefers Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  /* Core motion reduction is handled in animations.css.
     Any additional responsive-specific transitions that should
     be disabled under reduced motion can be placed here. */
}
