/* General Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    min-height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

h1, h2, h3, h4, h5, h6, p {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

section, nav, footer, header {
    max-width: 100vw;
}

/* overflow-x: hidden NICHT auf nav, sonst wird overflow-y zu auto und das
   absolut positionierte Mobile-Dropdown-Menü unterhalb der Navbar abgeschnitten */
section, footer, header {
    overflow-x: hidden;
}

/* .container behält die responsiven max-width-Werte von Tailwind (Desktop zentriert
   mit Seitenrand). Auf Mobil wird es weiter unten auf 100% gesetzt. */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* FAQ Accordion */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease;
    padding: 0 1.5rem;
}

.faq-item.open .faq-content {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

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

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* Mobile menu */
#mobile-menu {
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

#mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
    .aurora-background::before,
    .aurora-background::after {
        width: 300px;
        height: 300px;
        filter: blur(80px);
    }
    
    /* Prevent horizontal scroll on mobile */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    section {
        max-width: 100vw !important;
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100%;
    }
    
    img {
        max-width: 100% !important;
    }
    
    h1 {
        font-size: 1.7rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent any absolute positioned element from causing overflow */
.relative {
    max-width: 100%;
}

/* Better touch targets for FAQ buttons */
.faq-header {
    cursor: pointer;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
}

.faq-header span {
    flex: 1;
    min-width: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
