/* ============================================
   Ratsstuben Germering - Common Styles
   ============================================ */

/* CSS Custom Properties (Variables) */
:root {
  /* Colors */
  --color-dark: #333;
  --color-darker: #1d1d1d;
  --color-light: #e9e7e7;
  --color-light-gray: #d4d3d3;
  --color-medium-gray: #b5b5b5;
  --color-text-muted: #5a5a5a;
  --color-white: #fff;

  /* Background */
  --bg-dark: rgb(51, 51, 51);

  /* Spacing */
  --container-max-width: 42em;
  --header-margin-bottom: 2rem;
  --nav-link-padding: 0.25rem 0;
  --nav-link-spacing: 1rem;
  --nav-border-width: 0.25rem;

  /* Transitions */
  --transition-base: all 0.2s ease-in-out;

  /* Shadows */
  --shadow-subtle: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  --shadow-card: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
  --shadow-text: 0 0.05rem 0.1rem rgba(0, 0, 0, 0.5);
  --shadow-inset: inset 0 0 5rem rgba(0, 0, 0, 0.5);

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-full: 50%;
}

/* ============================================
   Base & Layout
   ============================================ */

html {
  /* height: 100%;  Removed to allow flexbox min-vh-100 to work correctly without conflict */
  overflow-y: scroll !important;
}

body {
  min-height: 100vh;
  background-color: #1d1d1d;
}

/* Fixed background for desktop */
@media (min-width: 768px) {
  body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../imgs/T_hero.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
  }
}

/* Mobile: use fixed position element to avoid zoom */
@media (max-width: 767px) {
  body {
    position: relative;
  }

  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../imgs/T_hero.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
    pointer-events: none;
  }
}

/* Container max-width for page layout */
.site-container {
  max-width: var(--container-max-width);
}

.site-container-wide {
  max-width: 60em;
}

/* Helper to force full viewport height on index page */
.min-vh-100 {
  min-height: 100vh !important;
}

/* Helper for flex growth (missing in Bootstrap 4.0) */
.flex-grow-1 {
  flex-grow: 1 !important;
}

/* ============================================
   Header & Navigation
   ============================================ */

.masthead {
  /* margin-bottom: var(--header-margin-bottom); removed for full width layout */
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.masthead-brand {
  margin-bottom: 0;
  text-align: center;
}

.masthead-brand p {
  margin: 0;
}

/* Masthead brand link styling */
.masthead-brand a {
  text-decoration: none;
  transition: opacity 0.2s ease;
  display: inline-block;
  white-space: nowrap;
}

/* Brand subtitle (formerly nested small tags) */
.masthead-brand .brand-subtitle {
  font-size: 0.7em;
  display: inline;
  white-space: nowrap;
}

.masthead-brand a:hover {
  opacity: 0.8;
}

/* Dark header theme (for index.html) */
.masthead.dark-header {
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.masthead.dark-header .masthead-brand,
.masthead.dark-header .masthead-brand a {
  color: var(--color-light);
}

.masthead.dark-header .nav-masthead .nav-link {
  padding: var(--nav-link-padding);
  font-weight: 700;
  color: var(--color-light);
  background-color: transparent;
  border-bottom: var(--nav-border-width) solid transparent;
  transition: border-color 0.15s ease-in-out;
}

.masthead.dark-header .nav-masthead .nav-link:hover,
.masthead.dark-header .nav-masthead .nav-link:focus {
  border-bottom-color: rgba(51, 51, 51, 0.25);
}

.masthead.dark-header .nav-masthead .nav-link + .nav-link {
  margin-left: var(--nav-link-spacing);
}

.masthead.dark-header .nav-masthead .active {
  color: var(--color-light);
  border-bottom-color: var(--color-light);
}

/* Light header theme (for all other pages) */
.masthead.light-header {
  background-color: #e9ecef;
  border-bottom: 1px solid #dee2e6;
}

.masthead.light-header .masthead-brand,
.masthead.light-header .masthead-brand a {
  color: rgba(51, 51, 51, 0.5);
}

.masthead.light-header .nav-masthead .nav-link {
  padding: var(--nav-link-padding);
  font-weight: 700;
  color: rgba(51, 51, 51, 0.5);
  background-color: transparent;
  border-bottom: var(--nav-border-width) solid transparent;
  transition: border-color 0.15s ease-in-out;
}

.masthead.light-header .nav-masthead .nav-link:hover,
.masthead.light-header .nav-masthead .nav-link:focus {
  border-bottom-color: rgba(51, 51, 51, 0.25);
}

.masthead.light-header .nav-masthead .nav-link + .nav-link {
  margin-left: var(--nav-link-spacing);
}

.masthead.light-header .nav-masthead .active {
  color: var(--color-dark);
  border-bottom-color: var(--color-dark);
}

/* Responsive header layout */
@media (min-width: 48em) {
  .masthead .masthead-brand {
    float: left;
    text-align: left;
  }
  .masthead .nav-masthead {
    float: right;
  }
}

/* Mobile nav centering */
@media (max-width: 47.99em) {
  .masthead .nav-masthead {
    justify-content: center;
  }
}

/* ============================================
   Footer
   ============================================ */

footer {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

footer p {
  margin-bottom: 0.25rem;
}

.mastfoot {
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Utility Classes
   ============================================ */

/* Outlined text effect for better contrast on light backgrounds */
.outlined-text {
  color: var(--color-light);
  text-shadow:
    -1px -1px 0 var(--color-dark),
    1px -1px 0 var(--color-dark),
    -1px 1px 0 var(--color-dark),
    1px 1px 0 var(--color-dark);
}

/* Box shadow utility */
.box-shadow {
  box-shadow: var(--shadow-subtle);
}

/* Secondary button styling */
.btn-secondary {
  margin-bottom: 3%;
  color: var(--color-light-gray);
  text-shadow: none;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.btn-secondary:hover,
.btn-secondary:focus {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.2);
  border-color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Custom "whitesmoke" button */
.sec_btn_whitesmoke {
  color: var(--color-light-gray);
  border-color: rgba(255, 255, 255, 0.4);
}

.prim_btn_whitesmoke {
  background-color: var(--color-white) !important;
  color: var(--color-dark) !important;
  border-color: var(--color-white) !important;
}

.prim_btn_whitesmoke:hover {
  background-color: var(--color-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Honeypot anti-spam field (hidden from users) */
.honeyfield {
  position: absolute;
  left: -9999px;
  display: none;
}

/* ============================================
   Footer
   ============================================ */

/* Footer base styles */
.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

/* Footer grid layout */
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .site-footer .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: left;
  }

  .site-footer .footer-section:nth-child(2) {
    text-align: center;
  }

  .site-footer .footer-section:nth-child(3) {
    text-align: right;
  }
}

/* Footer sections */
.site-footer .footer-section {
  margin-bottom: 1.5rem;
}

.site-footer .footer-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

/* Footer for dark background pages (index.html) */
.site-footer.dark-footer {
  background-color: rgba(0, 0, 0, 0.2);
  border-top-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.site-footer.dark-footer .footer-section-title {
  color: var(--color-light);
}

.site-footer.dark-footer .footer-text,
.site-footer.dark-footer address {
  color: var(--color-light);
}

.site-footer.dark-footer .footer-link {
  color: var(--color-light);
  transition: opacity 0.2s ease;
}

.site-footer.dark-footer .footer-link:hover {
  color: var(--color-white);
  opacity: 0.8;
  text-decoration: underline;
}

.site-footer.dark-footer .footer-phone {
  color: var(--color-light);
}

/* Footer for light background pages */
.site-footer.light-footer {
  background-color: #e9ecef;
  border-top-color: #dee2e6;
  color: var(--color-text-muted);
}

.site-footer.light-footer .footer-section-title {
  color: var(--color-dark);
}

.site-footer.light-footer .footer-text,
.site-footer.light-footer address {
  color: var(--color-text-muted);
}

.site-footer.light-footer .footer-link {
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.site-footer.light-footer .footer-link:hover {
  color: var(--color-dark);
  text-decoration: underline;
}

.site-footer.light-footer .footer-phone {
  color: var(--color-text-muted);
}

/* Footer address/contact styling */
.site-footer address {
  font-style: normal;
  margin-bottom: 0;
}

.site-footer .footer-phone {
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.site-footer .footer-phone:hover {
  text-decoration: underline;
}

/* Footer work hours */
.site-footer .footer-work-hours {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Footer legal/nav section */
.site-footer .footer-legal {
  padding-top: 2rem;
  border-top: 1px solid;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer.dark-footer .footer-legal {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.site-footer.light-footer .footer-legal {
  border-top-color: #dee2e6;
}

.site-footer .footer-legal nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.site-footer .footer-legal .footer-link {
  display: inline-block;
}

/* Footer copyright */
.site-footer .footer-copyright {
  margin-bottom: 0.5rem;
}

/* Responsive footer text alignment */
@media (max-width: 767px) {
  .site-footer {
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    margin-top: 1.5rem;
  }

  .site-footer .footer-grid {
    text-align: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
  }

  .site-footer .footer-section {
    margin-bottom: 0.5rem;
  }

  .site-footer .footer-section-title {
    margin-bottom: 0.5rem;
  }

  .site-footer .footer-legal nav {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================
   Jumbotron Styles
   ============================================ */

:root {
  --jumbotron-padding-y: 0.5em;
}

.jumbotron {
  padding-top: var(--jumbotron-padding-y);
  padding-bottom: var(--jumbotron-padding-y);
  margin-bottom: 0;
  background-color: var(--color-white);
}

@media (min-width: 768px) {
  .jumbotron {
    padding-top: calc(var(--jumbotron-padding-y) * 2);
    padding-bottom: calc(var(--jumbotron-padding-y) * 2);
  }
}

.jumbotron p:last-child {
  margin-bottom: 0;
}

.jumbotron-heading {
  font-weight: 300;
}

.jumbotron .container {
  max-width: 40rem;
}

/* ============================================
   Cover Section
   ============================================ */

.cover {
  padding: 0 1.5rem;
}

.cover .btn-lg {
  padding: 0.75rem 1.25rem;
  font-weight: 700;
}

/* ============================================
   Dark Theme Cards
   ============================================ */

/* Dark card backgrounds for content pages */
.bg-dark {
  /* Background is now on body element */
}

.bg-dark .card,
.bg-dark .reservation-card,
.bg-dark .legal-card,
.bg-dark .pdf-viewer-wrapper {
  background-color: #2d2d2d !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Light text on dark backgrounds */
.bg-dark .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Form elements on dark background */
.bg-dark .form-control,
.bg-dark .custom-input {
  background-color: #3d3d3d;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--color-light);
}

.bg-dark .form-control:focus,
.bg-dark .custom-input:focus {
  background-color: #4d4d4d;
  border-color: var(--color-light);
  color: var(--color-white);
}

.bg-dark .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Selection pills on dark background */
.bg-dark .selection-pill {
  background-color: #3d3d3d;
  border-color: rgba(255, 255, 255, 0.15);
}

.bg-dark .selection-pill:hover {
  background-color: #4d4d4d;
  border-color: var(--color-light);
}

.bg-dark .selection-pill .custom-control-label {
  color: rgba(255, 255, 255, 0.7);
}

.bg-dark .selection-pill .custom-control-input:checked ~ .custom-control-label {
  color: var(--color-white);
}

/* Links on dark background */
.bg-dark a:not(.btn):not(.nav-link):not(.footer-link):not(.footer-phone) {
  color: rgba(255, 255, 255, 0.85);
}

/* Text colors on dark background */
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.bg-dark .display-4, .bg-dark .font-weight-bold, .bg-dark .font-weight-light {
  color: var(--color-white) !important;
}

.bg-dark p, .bg-dark li, .bg-dark span, .bg-dark div {
  color: rgba(255, 255, 255, 0.85);
}

/* Border colors on dark background */
.bg-dark .border-bottom,
.bg-dark .border-top {
  border-color: rgba(255, 255, 255, 0.15) !important;
}