/**
 * LSC New Theme - Base Styles
 */

/* Base Typography - Kunco Style */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-black);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary-dark);
  margin-top: 0;
  margin-bottom: 1.5rem;
}

h1, .h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
}
h2, .h2 {
  font-size: 2.5rem;
  font-weight: 700;
}
h3, .h3 {
  font-size: 2rem;
  font-weight: 700;
}
h4, .h4 {
  font-size: 1.5rem;
  font-weight: 600;
}
h5, .h5 {
  font-size: 1.25rem;
  font-weight: 600;
}
h6, .h6 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin-top: 0;
  margin-bottom: 1.2rem;
  line-height: 1.8;
  font-size: 1rem;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary-dark);
  text-decoration: underline;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Sections - no padding, spacing controlled by containers */
section {
  padding: 0;
}

/* Containers within sections provide the spacing */
section .container {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (max-width: 768px) {
  section .container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* Containers */
.section-title {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title h2 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-md);
}

.section-title .subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Utilities */
.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-white { color: var(--color-white) !important; }

/* Visually Hidden - SEO friendly (for screen readers) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.bg-primary { background-color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-light { background-color: var(--bg-light) !important; }
.bg-white { background-color: var(--bg-white) !important; }

/* Overlay Utilities */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-overlay);
}

.overlay-blue {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.9) 0%, rgba(41, 128, 185, 0.9) 100%);
}

.overlay-purple {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.9) 0%, rgba(142, 68, 173, 0.9) 100%);
}

.overlay-pink {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.9) 0%, rgba(192, 57, 43, 0.9) 100%);
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp var(--transition-slow) ease-out;
}

/* Responsive Typography - Kunco Style */
@media (max-width: 991px) {
  h1, .h1 { font-size: 2.5rem; }
  h2, .h2 { font-size: 2rem; }
  h3, .h3 { font-size: 1.75rem; }
  
  body {
    font-size: 15px;
  }
}

@media (max-width: 767px) {
  h1, .h1 { font-size: 2rem; }
  h2, .h2 { font-size: 1.75rem; }
  h3, .h3 { font-size: 1.5rem; }
  h4, .h4 { font-size: 1.25rem; }
  
  body {
    font-size: 14px;
  }
}

/* Main Content Layout - Add more spacing between content and sidebar */
.main-content .row {
  --bs-gutter-x: 4rem;
}

/* Extra padding for content when sidebar is present */
.main-content .row > div:not([class*="sidebar"]) {
  padding-right: 3rem !important;
}

/* Sticky Sidebar - follows as you scroll */
.sidebar-second {
  position: sticky;
  top: 100px; /* Adjust based on header height */
  align-self: flex-start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Hide scrollbar but keep functionality */
.sidebar-second::-webkit-scrollbar {
  width: 4px;
}

.sidebar-second::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-second::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.sidebar-second::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Spacing between sidebar blocks */
.region-sidebar-second > .block,
.region-sidebar-second > div[id^="block-"] {
  padding-bottom: 15px !important;
}

.region-sidebar-second > .block:last-child,
.region-sidebar-second > div[id^="block-"]:last-child {
  padding-bottom: 0 !important;
}

@media (max-width: 991px) {
  .main-content .row {
    --bs-gutter-x: 2rem;
  }
  
  .main-content .row > div:not([class*="sidebar"]) {
    padding-right: calc(var(--bs-gutter-x) * 0.5) !important;
  }
  
  /* Disable sticky on tablets and mobile */
  .sidebar-second {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}
/* Image Text Headline */
.image-text-headline {
  color: var(--color-primary);
  font-weight: 600;
}

/* Mobile: nur 3 Items anzeigen */
@media (max-width: 767px) {
  .pages-grid > .col-12:nth-child(n+4) {
    display: none;
  }
  .weglide-flights__grid .weglide-card:nth-child(n+4) {
    display: none;
  }
}

/* Image Text - Figure, Caption, Zoom */
.image-text-figure {
  margin: 0;
}
.image-text-figure img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  display: block;
}
.image-text-zoom {
  display: block;
  cursor: zoom-in;
  position: relative;
}
.image-text-zoom:hover img {
  opacity: 0.95;
}
.image-text-caption {
  font-size: 0.8rem;
  color: var(--color-text-muted, #6c757d);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Float Layout */
.image-text--float .image-text-figure--left {
  float: left;
  width: 45%;
  margin: 0 var(--space-xl, 2rem) var(--space-lg, 1.5rem) 0;
}
.image-text--float .image-text-figure--right {
  float: right;
  width: 45%;
  margin: 0 0 var(--space-lg, 1.5rem) var(--space-xl, 2rem);
}
.image-text--float::after {
  content: '';
  display: table;
  clear: both;
}
@media (max-width: 768px) {
  .image-text--float .image-text-figure--left,
  .image-text--float .image-text-figure--right {
    float: none;
    width: 100%;
    margin: 0 0 1rem 0;
  }
}

/* Image Text Lightbox */
.image-text-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.image-text-lightbox.is-open { display: flex; }
.image-text-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}
