/* ===================================
   Hebamme Website - Custom CSS
   Animations, pseudo-elements, and styles
   Tailwind CDN cannot handle
   =================================== */

html { scroll-behavior: smooth; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Keyframe Animations
   =================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* ===================================
   Animation Utilities
   =================================== */
.animate-fade-in-up { animation: fadeInUp 0.8s ease forwards; }
.animate-fade-in-right { animation: fadeInRight 1s ease forwards; }
.animate-bounce-gentle { animation: bounce 2s ease infinite; }
.animate-spin-slow { animation: spin 1s linear infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-250 { animation-delay: 0.25s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ===================================
   Scroll Reveal System
   =================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Navbar Scroll State
   =================================== */
.navbar-scrolled {
    background: rgba(253, 248, 246, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px rgba(61, 58, 56, 0.06);
    border-bottom: 1px solid rgba(184, 154, 162, 0.1);
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* ===================================
   Mobile Menu
   =================================== */
#nav-menu.menu-open {
    transform: translateX(0) !important;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===================================
   FAQ, Carousel, Notifications
   =================================== */
details[open] > .faq-answer {
    animation: fadeIn 0.3s ease;
}

.notification-enter { animation: slideInRight 0.4s ease; }
.notification-exit { animation: slideOutRight 0.3s ease forwards; }

/* ===================================
   Form Validation
   =================================== */
.input-error { border-color: #f87171 !important; }
.input-valid { border-color: #4ade80 !important; }
.shake { animation: shake 0.5s ease; }

/* ===================================
   Pseudo-element Decorations
   =================================== */
.badge-underline {
    position: relative;
}
.badge-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(-1deg);
}

.angebot-border {
    position: relative;
}
.angebot-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: #B89AA2;
    transition: height 0.3s ease;
    border-radius: 0 2px 2px 0;
    z-index: 1;
}
.group:hover .angebot-border::before {
    height: 100%;
}

.quote-mark {
    position: relative;
}
.quote-mark::before {
    content: '\201E';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 4rem;
    color: #B89AA2;
    opacity: 0.15;
    line-height: 1;
}

.pattern-overlay {
    position: relative;
}
.pattern-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.custom-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B6662' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* ===================================
   Accessibility & Device Optimizations
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    [data-reveal] { opacity: 1; transform: none; }
}

@media (max-width: 1023px) {
    footer { padding-bottom: 5rem !important; }
}

@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover { transform: none; }
    .hover-lift:active { transform: scale(0.98); }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero-section { min-height: auto !important; padding-top: 5rem; padding-bottom: 3rem; }
}

