/* ==========================================================================
   Kinder Physiotherapie Verena Irndorfer - Custom Stylesheet
   ========================================================================== */

/* 1. Skip-to-content Link for Keyboard & Screen Reader Users (WCAG 2.4.1) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background-color: #B9722B;
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    transition: top 0.2s ease;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
    outline: 3px solid #4A3E34;
    outline-offset: 2px;
}

/* 2. Global Visible Focus Indicators (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #B9722B;
    outline-offset: 3px;
    border-radius: 0.5rem;
}

/* 3. Glassmorphic Navbar & Header */
.glass {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* 4. Accessible Screen Reader Only Utility (WCAG 4.1.2) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 5. Animated Hamburger Button to X */
#mobile-menu-btn .line-top,
#mobile-menu-btn .line-bot {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-btn .line-mid {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#mobile-menu-btn[aria-expanded="true"] .line-top {
    transform: translateY(8px) rotate(45deg);
}

#mobile-menu-btn[aria-expanded="true"] .line-mid {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu-btn[aria-expanded="true"] .line-bot {
    transform: translateY(-8px) rotate(-45deg);
}

/* 6. Mobile Drawer Open State */
#mobile-menu-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* 7. Section Spacing */
.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 7.5rem;
        padding-bottom: 7.5rem;
    }
}

/* 8. Typography & Global Baseline (WCAG 1.4.3 Contrast) */
body {
    color: #5A4E44;
    background-color: #FDF9F3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #D48C45;
    color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: #4A3E34;
}

.content-card {
    background-color: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 768px) {
    .content-card {
        padding: 3rem;
    }
}

.content-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 9. Hide Scrollbars for clean carousel track */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 10. Adaptive Carousel Slide Card */
.carousel-card {
    flex: 0 0 85%;
    width: 85%;
    max-width: 85%;
    height: 240px;
}

@media (min-width: 640px) {
    .carousel-card {
        flex: 0 0 calc(50% - 12px);
        width: calc(50% - 12px);
        max-width: calc(50% - 12px);
        height: 270px;
    }
}

@media (min-width: 1024px) {
    .carousel-card {
        flex: 0 0 calc(33.333% - 16px);
        width: calc(33.333% - 16px);
        max-width: calc(33.333% - 16px);
        height: 290px;
    }
}

/* 11. Respect Reduced Motion Preferences (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
