/*!
 * Shared Footer Component - Gastroenterologie am Claraplatz
 * Mobile-First responsive footer for all pages
 * Used by: home-figma-complete.css, angebot-figma-complete.css
 */

/* ========================================
   BASE STYLES (Mobile 320px+)
   ======================================== */

.footer {
  background-color: #6dc8bf; /* Figma: türkis */
  padding: 2.5rem 1.25rem; /* Mobile: 40px 20px (proportional to desktop) */
  width: 100%; /* Vollbreite */
  position: relative;
  /* NO fixed height - content determines height */
  box-sizing: border-box;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem; /* 32px */
  max-width: 1440px;
  margin: 0 auto;
  align-items: start;
}

/* ========================================
   FOOTER ELEMENTS - Mobile Base
   ======================================== */

.footer-logo {
  text-align: center;
  width: 100%;
  margin: 0 auto;
}

.footer-logo img {
  width: 60px;
  height: auto;
  max-height: 110px;
  object-fit: contain;
}

.footer-practice-info {
  text-align: center;
  width: 100%;
}

.footer-address {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: 0.16px;
  color: #003974;
  font-style: normal;
}

.footer-address strong {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
}

.footer-address a {
  color: #003974;
  text-decoration: underline;
  text-underline-position: from-font;
  transition: color 0.3s ease;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.footer-address a:hover {
  color: #00a88e;
}

.footer-hours {
  text-align: center;
  width: 100%;
}

.footer-hours h4 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 22px;
  color: #003974;
  margin: 0 0 8px 0;
}

.hours-table {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 0; /* No gap between rows */
}

.hours-row {
  display: flex;
  justify-content: center;
  gap: 0; /* No gap - use spacing in day column */
  margin-bottom: 0;
  line-height: 22px;
  white-space: pre; /* Preserve spacing */
}

.hours-row-indent {
  padding-left: 0; /* No padding on mobile */
  margin-left: 80px; /* Align with time column (80px day width) */
}

.hours-row .day {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 22px;
  color: #003974;
  width: 80px; /* Optimized width for mobile (was 90px) */
  flex-shrink: 0;
  text-align: left;
  margin-right: 10px; /* Add spacing between day and time */
}

.hours-row .time {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 22px;
  color: #003974;
  flex: 0 0 auto; /* Don't grow */
  text-align: left;
}

.footer-phone {
  text-align: center;
  width: 100%;
}

.footer-phone-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #003974;
  color: #ffffff;
  text-decoration: none;
  font-family: 'Dosis', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.72px;
  text-transform: uppercase;
  padding: 12px 48px;
  border-radius: 40px;
  height: 48px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.footer-phone-button:hover {
  background-color: #004a8f;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 57, 116, 0.3);
}

.footer-legal {
  display: flex;
  gap: 57px; /* Figma spacing between links */
  justify-content: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 57, 116, 0.2);
  width: 100%;
}

.footer-legal a {
  color: #00698c;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0.14px;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  text-decoration: underline;
  color: #003974;
}

/* ========================================
   EXTRA SMALL MOBILE (320px - 374px)
   ======================================== */

@media (max-width: 374px) {
  .footer {
    padding: 2.5rem 1rem;
  }

  .footer-grid {
    gap: 1.5rem;
  }

  .footer-phone-button {
    padding: 12px 32px;
    font-size: 16px;
  }

  .footer-legal {
    gap: 2rem;
    flex-direction: column;
    align-items: center;
  }
}

/* ========================================
   TABLET (768px - 1023px) - 2-column layout
   ======================================== */

@media (min-width: 768px) and (max-width: 1023px) {
  .footer {
    padding: 4rem 3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 3rem;
    text-align: left;
  }

  .footer-logo {
    grid-column: 1 / -1;
    justify-self: center;
    text-align: center;
  }

  .footer-practice-info,
  .footer-hours {
    text-align: left;
  }

  .footer-hours .hours-grid {
    justify-content: flex-start;
  }

  .footer-phone {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

/* ========================================
   DESKTOP (1024px+) - Horizontal 4-column layout
   Figma: Vollbreite mit Grid-Layout
   ======================================== */

@media (min-width: 1024px) {
  .footer {
    padding: 148px 202px 57px; /* Figma: Top 148px, Left/Right 202px, Bottom 57px */
  }

  .footer-grid {
    grid-template-columns: auto minmax(200px, 1fr) minmax(200px, 1fr) auto;
    grid-template-areas:
      "logo info hours phone"
      "legal legal legal legal";
    align-items: start; /* Start alignment for better text positioning */
    gap: 0; /* No gap - use manual spacing for precise Figma layout */
    column-gap: 48px; /* Horizontal spacing between columns */
  }

  .footer-logo {
    grid-area: logo;
    align-self: center;
    text-align: left;
  }

  .footer-logo img {
    width: 59px;
    height: 110px;
  }

  .footer-practice-info {
    grid-area: info;
    align-self: center;
    text-align: left;
  }

  .footer-hours {
    grid-area: hours;
    align-self: center;
    text-align: left;
  }

  .footer-hours h4 {
    text-align: left;
  }

  .hours-row {
    justify-content: flex-start;
    gap: 0; /* No gap - spacing in day column */
  }

  .hours-row-indent {
    padding-left: 0; /* Remove mobile indent */
    margin-left: 104px; /* Desktop indent: 80px (day width) + 24px spacing */
  }

  .hours-row .day {
    width: 80px; /* Fixed width for Mo.– Do. and Fr. */
    margin-right: 24px; /* Spacing between day and time */
  }

  .hours-row .time {
    flex: 0 0 auto; /* No flex grow */
  }

  .footer-phone {
    grid-area: phone;
    text-align: right;
    align-self: center;
  }

  .footer-phone-button {
    padding: 12px 48px; /* Figma: 20px vertical (12px after adjustment), 48px horizontal */
  }

  .footer-legal {
    grid-area: legal;
    padding-top: 2rem;
    margin-top: 2rem;
    justify-content: center;
  }
}

/* ========================================
   LARGE DESKTOP (1440px+)
   ======================================== */

@media (min-width: 1440px) {
  .footer-grid {
    gap: 2rem 4rem; /* 32px 64px */
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .footer-phone-button,
  .footer-address a,
  .footer-legal a {
    transition: none;
  }

  .footer-phone-button:hover {
    transform: none;
  }
}

/* Focus styles for keyboard navigation */
.footer a:focus-visible {
  outline: 2px solid #003974;
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-phone-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}
