/**
 * Microinteractions CSS
 * Voglsam Arzt Website
 *
 * Zum Deaktivieren: Zeile in base.html.twig entfernen/auskommentieren:
 * {% do assets.addCss('theme://css/microinteractions.css', {'media': 'all'}) %}
 */

/* ==========================================================================
   1. BUTTONS - Allgemeine Hover-Effekte
   ========================================================================== */

.btn {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Button Icons - sanfte Skalierung */
.btn svg {
  transition: transform 0.2s ease;
}

.btn:hover svg {
  transform: scale(1.1);
}

/* ==========================================================================
   2. SCROLL-TO-TOP BUTTON
   ========================================================================== */

.to-top {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.3s ease;
}

.to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.to-top:hover svg {
  animation: bounce-up 0.4s ease infinite;
}

@keyframes bounce-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ==========================================================================
   3. SLIDER CONTROLS - Hover-Effekte
   ========================================================================== */

.slider-control {
  transition:
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

.slider-control:hover {
  opacity: 0.8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Slider Dots */
.slider-dots-item {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.slider-dots-item:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   4. LINKS - Animierte Unterstreichung
   ========================================================================== */

/* Footer und Inline Links */
.footer a:not(.btn):not(.footer-logo),
.section-info a:not(.btn) {
  position: relative;
  text-decoration: none;
}

.footer a:not(.btn):not(.footer-logo)::after,
.section-info a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.footer a:not(.btn):not(.footer-logo):hover::after,
.section-info a:not(.btn):hover::after {
  width: 100%;
}

/* ==========================================================================
   5. TEAM KARTEN
   ========================================================================== */

.team {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team:hover {
  transform: translateY(-5px);
}

.team .ratio img {
  transition: transform 0.4s ease;
}

.team:hover .ratio img {
  transform: scale(1.03);
}

/* ==========================================================================
   6. PRAXIS BILDER
   ========================================================================== */

.section-practic img {
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}

.section-practic img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   7. ANGEBOT ITEMS (falls vorhanden)
   ========================================================================== */

.section [data-bs-toggle="modal"] {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.section [data-bs-toggle="modal"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   8. HEADER - Logo Hover
   ========================================================================== */

.navbar-brand {
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.85;
}

.navbar-brand svg {
  transition: transform 0.3s ease;
}

.navbar-brand:hover svg {
  transform: scale(1.05);
}

/* ==========================================================================
   9. FOOTER LOGO
   ========================================================================== */

.footer-logo {
  transition: opacity 0.2s ease;
}

.footer-logo:hover {
  opacity: 0.9;
}

.footer-logo svg {
  transition: transform 0.3s ease;
}

.footer-logo:hover svg {
  transform: scale(1.05);
}

/* ==========================================================================
   10. ARTIKEL CARDS (Slider)
   ========================================================================== */

.slick-articles-thumbs .ratio {
  overflow: hidden;
}

.slick-articles-thumbs img {
  transition: transform 0.5s ease;
}

.section-articles:hover .slick-articles-thumbs img {
  transform: scale(1.02);
}

/* ==========================================================================
   11. NEWS BOX - Feste Höhe mit scrollbarem Inhalt
   ========================================================================== */

/* News Box mit fester Höhe */
.news-fixed-height {
  display: flex;
  flex-direction: column;
  height: 420px;
  max-height: 420px;
}

/* Slider nimmt verfügbaren Platz, Inhalt scrollbar */
.news-fixed-height .news-slider {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Jeder Slide scrollbar wenn Inhalt zu lang */
.news-fixed-height .news-slider .slick-slide > div {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Scrollbar-Styling */
.news-fixed-height .news-slider .slick-slide > div::-webkit-scrollbar {
  width: 5px;
}

.news-fixed-height .news-slider .slick-slide > div::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.news-fixed-height .news-slider .slick-slide > div::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.news-fixed-height .news-slider .slick-slide > div::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Controls immer am Ende */
.news-fixed-height .news-control {
  flex-shrink: 0;
  padding-top: 1rem;
}

/* Mobile: etwas kleiner */
@media (max-width: 991px) {
  .news-fixed-height {
    height: 380px;
    max-height: 380px;
  }

  .news-fixed-height .news-slider .slick-slide > div {
    max-height: 240px;
  }
}

/* ==========================================================================
   REDUCED MOTION - Barrierefreiheit
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
