/**
 * Unfallpaten Website - Custom Styles (Tailwind CSS Companion)
 * 
 * WICHTIG: Diese CSS-Datei überschreibt Tailwind Typography
 * Basierend auf Guidelines.md - KEINE text-*, font-*, leading-* Klassen verwenden!
 */

/* ========================================
   TYPOGRAPHY OVERRIDE (from Guidelines)
   Überschreibt Tailwind Standard-Typography
   ======================================== */

/* Headings */
h1 {
    font-size: 2.25rem !important;
    /* 36px - Mobile */
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
}

h2 {
    font-size: 1.875rem !important;
    /* 30px - Mobile */
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
}

h3 {
    font-size: 1.5rem !important;
    /* 24px - Mobile */
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

h4 {
    font-size: 1.25rem !important;
    /* 20px */
    font-weight: 600 !important;
    line-height: 1.5 !important;
}



/* Responsive Typography */
@media (min-width: 768px) {
    h1 {
        font-size: 3rem !important;
        /* 48px - Tablet */
    }

    h2 {
        font-size: 2.25rem !important;
        /* 36px - Tablet */
    }

    h3 {
        font-size: 1.75rem !important;
        /* 28px - Tablet */
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3rem !important;
        /* 60px - Desktop */
    }

    h2 {
        font-size: 2.5rem !important;
        /* 40px - Desktop */
    }

    h3 {
        font-size: 1.5rem !important;
        /* 32px - Desktop */
    }
}

/* ========================================
   CUSTOM ANIMATIONS
   ======================================== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out forwards;
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.animate-pulse-soft {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   SMOOTH SCROLL
   ======================================== */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   HERO BACKGROUND RESPONSIVE
   Mobile-Bild bis 820px, Desktop-Bild ab 820px
   ======================================== */

.hero-bg-responsive {
    background-image: var(--hero-img-mobile);
    background-position: center center;
    background-size: cover;
}

@media (min-width: 820px) {
    .hero-bg-responsive {
        background-image: var(--hero-img-desktop);
        background-position: center right;
    }
}

/* ========================================
   FAQ STYLING IMPROVEMENTS
   ======================================== */

.faq-item {
    background-color: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #FDBA74;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.faq-question {
    cursor: pointer;
    font-weight: 500 !important;
}

.faq-question:hover .faq-icon {
    color: #F97316;
}

.faq-icon {
    transition: transform 0.3s ease, color 0.2s ease;
    color: #F97316;
}

.faq-answer {
    line-height: 1.7 !important;
}

/* ========================================
   LEGAL MODALS STYLING
   ======================================== */

/* Modal backdrop animation */
#impressumModal,
#datenschutzModal,
#agbModal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal content slide-in animation */
#impressumModal>div,
#datenschutzModal>div,
#agbModal>div {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Legal modal scrollbar styling */
#impressumModal .overflow-y-auto,
#datenschutzModal .overflow-y-auto,
#agbModal .overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: #F97316 #F3F4F6;
}

#impressumModal .overflow-y-auto::-webkit-scrollbar,
#datenschutzModal .overflow-y-auto::-webkit-scrollbar,
#agbModal .overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

#impressumModal .overflow-y-auto::-webkit-scrollbar-track,
#datenschutzModal .overflow-y-auto::-webkit-scrollbar-track,
#agbModal .overflow-y-auto::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 4px;
}

#impressumModal .overflow-y-auto::-webkit-scrollbar-thumb,
#datenschutzModal .overflow-y-auto::-webkit-scrollbar-thumb,
#agbModal .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #F97316;
    border-radius: 4px;
}

#impressumModal .overflow-y-auto::-webkit-scrollbar-thumb:hover,
#datenschutzModal .overflow-y-auto::-webkit-scrollbar-thumb:hover,
#agbModal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #EA580C;
}

/* ========================================
   CUSTOM UTILITIES
   ======================================== */

/* Text Shadow for Hero */
.text-shadow-strong {
    text-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.text-shadow-xl {
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

/* Drop Shadow for Icons */
.drop-shadow-strong {
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
}

.drop-shadow-xl-custom {
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.6));
}

/* Backdrop Blur (Safari Fix) */
.backdrop-blur-safari {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* ========================================
   TRANSITIONS
   ======================================== */

/* Smooth Transitions */
.transition-all-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-colors-smooth {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* ========================================
   FORM SPECIFIC
   ======================================== */

/* Input Focus Ring (Orange) */
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: #F97316 !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1) !important;
}

/* Honeypot Field (Spam Protection Level 1) */
.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ========================================
   MOBILE MENU
   ======================================== */

#mobileMenu {
    max-height: auto;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobileMenu.active {
    max-height: 500px;
}

/* ========================================
   FAQ ACCORDION
   ======================================== */

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-icon {
    transition: transform 0.3s ease;
}

/* ========================================
   NOTIFICATION TOAST
   ======================================== */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification {
    animation: slideInRight 0.3s ease-out;
}

/* ========================================
   DIALOG / MODAL
   ======================================== */

.dialog-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dialog-content {
    animation: scaleIn 0.2s ease-out;
}

/* ========================================
   BUTTON HOVER EFFECTS
   ======================================== */

/* Orange Button Hover */
.btn-orange:hover {
    background-color: #EA580C;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.4);
}

.btn-orange {
    transition: all 0.2s ease;
}

/* White Button Hover */
.btn-white:hover {
    background-color: #F9FAFB;
}

/* ========================================
   LOADING STATES
   ======================================== */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Loading Dots */
@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.loading-dot {
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

/* ========================================
   RESPONSIVE IMAGES
   ======================================== */

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {

    header,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus Visible (Keyboard Navigation) */
:focus-visible {
    outline: 2px solid #F97316 !important;
    outline-offset: 2px !important;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #F97316;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */


.visible {
    display: block !important;
}

/* Screen Reader Only */
.sr-only {
    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-width: 0 !important;
}

/* ========================================
   CUSTOM SCROLLBAR (Optional)
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* ========================================
   HERO BACKGROUND (Responsive)
   ======================================== */

.hero-bg-mobile {
    background-image: url('assets/img/herosection-mobil.png');
}

@media (min-width: 820px) {
    .hero-bg-desktop {
        background-image: url('assets/img/hersosection.png');
    }
}

/* ========================================
   END OF CUSTOM STYLES
   ======================================== */