/* Core CSS for Schmetterling - die-schmetterlinge-deutschlands.de */
/* Primary: Indigo | Accent: Silver */

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 18px !important;
    line-height: 1.7 !important;
    color: #1f2937 !important;
    background-color: #f9fafb !important;
}

/* Navigation Styles */
.nav-menu li {
    margin-bottom: 0 !important;
    list-style: none !important;
}

.nav-menu li::before,
.nav-menu li::after {
    display: none !important;
    content: none !important;
}

.nav-menu ul,
.nav-menu ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

nav ul,
nav ol,
header ul,
header ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

nav li::before,
nav li::after,
header li::before,
header li::after {
    display: none !important;
    content: none !important;
}

footer ul,
footer ol {
    list-style: none !important;
}

footer li::before,
footer li::after {
    display: none !important;
    content: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700 !important;
    color: #1e1b4b !important;
    line-height: 1.3 !important;
}

h1 {
    font-size: 2.5rem !important;
    margin-bottom: 1rem !important;
}

h2 {
    font-size: 2rem !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1.25rem !important;
}

h3 {
    font-size: 1.5rem !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
}

p {
    font-size: 1.125rem !important;
    margin-bottom: 1rem !important;
    color: #374151 !important;
}

/* Content Lists - Silver Markers */
.content-section ul,
.content-section ol,
main ul:not(.nav-menu),
main ol:not(.nav-menu),
article ul,
article ol,
section ul:not(.nav-menu):not(.footer-links),
section ol:not(.nav-menu):not(.footer-links) {
    list-style: none !important;
    padding-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.content-section ul li,
.content-section ol li,
main ul:not(.nav-menu) li,
main ol:not(.nav-menu) li,
article ul li,
article ol li,
section ul:not(.nav-menu):not(.footer-links) li,
section ol:not(.nav-menu):not(.footer-links) li {
    position: relative !important;
    padding-left: 1.5rem !important;
    margin-bottom: 0.75rem !important;
    font-size: 1.125rem !important;
}

.content-section ul li::before,
main ul:not(.nav-menu) li::before,
article ul li::before,
section ul:not(.nav-menu):not(.footer-links) li::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.6rem !important;
    width: 8px !important;
    height: 8px !important;
    background-color: #9ca3af !important;
    border-radius: 50% !important;
}

.content-section ol,
main ol:not(.nav-menu),
article ol,
section ol:not(.nav-menu):not(.footer-links) {
    counter-reset: item !important;
}

.content-section ol li::before,
main ol:not(.nav-menu) li::before,
article ol li::before,
section ol:not(.nav-menu):not(.footer-links) li::before {
    content: counter(item) "." !important;
    counter-increment: item !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    color: #9ca3af !important;
    font-weight: 600 !important;
}

/* Tables */
.table-container {
    overflow-x: auto !important;
    margin: 1.5rem 0 !important;
    border-radius: 0.5rem !important;
}

table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #ffffff !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
}

thead {
    background: #4f46e5 !important;
}

thead th {
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 1rem !important;
    text-align: left !important;
    font-size: 1rem !important;
}

tbody td {
    padding: 1rem !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-size: 1rem !important;
}

tbody tr:hover {
    background-color: #f3f4f6 !important;
}

/* Hero Section */
.hero-section {
    position: relative !important;
    min-height: 70vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.hero-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.9) 0%, rgba(79, 70, 229, 0.85) 100%) !important;
}

.hero-content {
    position: relative !important;
    z-index: 10 !important;
    text-align: center !important;
    padding: 2rem !important;
    max-width: 900px !important;
}

.hero-content h1 {
    color: #ffffff !important;
    font-size: 3rem !important;
    margin-bottom: 1.5rem !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.hero-content p {
    color: #e5e7eb !important;
    font-size: 1.25rem !important;
    margin-bottom: 2rem !important;
    max-width: 700px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Buttons */
.btn-primary {
    display: inline-block !important;
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    padding: 0.875rem 2rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
    border: none !important;
}

.btn-primary:hover {
    background-color: #4338ca !important;
    transform: translateY(-2px) !important;
}

.btn-outline {
    display: inline-block !important;
    background-color: transparent !important;
    color: #4f46e5 !important;
    padding: 0.75rem 1.5rem !important;
    border: 2px solid #4f46e5 !important;
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
    margin: 0.25rem !important;
}

.btn-outline:hover {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
}

/* Cards */
.card {
    background: #ffffff !important;
    border-radius: 1rem !important;
    padding: 2rem !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid #e5e7eb !important;
    transition: transform 0.3s ease !important;
}

.card:hover {
    transform: translateY(-4px) !important;
}

/* Sections */
.content-section {
    padding: 4rem 1.5rem !important;
}

.content-section:nth-child(even) {
    background-color: #ffffff !important;
}

.content-section:nth-child(odd) {
    background-color: #f9fafb !important;
}

.section-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* Images */
.content-section img,
section img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 0.75rem !important;
    margin: 1.5rem auto !important;
    display: block !important;
}

/* Header/Navigation */
.site-header {
    background: #1e1b4b !important;
    padding: 1rem 2rem !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

.site-header .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.logo-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    text-decoration: none !important;
}

.logo-wrapper img {
    width: 45px !important;
    height: 45px !important;
    border-radius: 0.5rem !important;
}

.logo-text {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
}

.main-nav {
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
}

.nav-menu {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-menu a {
    color: #e5e7eb !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
    font-size: 1rem !important;
}

.nav-menu a:hover {
    color: #ffffff !important;
}

.nav-cta {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background-color 0.3s ease !important;
}

.nav-cta:hover {
    background-color: #6366f1 !important;
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none !important;
    background: none !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
    }

    .main-nav {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: #1e1b4b !important;
        flex-direction: column !important;
        padding: 1rem !important;
        gap: 1rem !important;
    }

    .main-nav.active {
        display: flex !important;
    }

    .nav-menu {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.5rem !important;
    }

    .nav-menu li {
        width: 100% !important;
    }

    .nav-menu a {
        display: block !important;
        padding: 0.75rem 1rem !important;
    }

    .nav-cta {
        width: 100% !important;
        text-align: center !important;
    }

    .hero-content h1 {
        font-size: 2rem !important;
    }

    .hero-content p {
        font-size: 1rem !important;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }
}

/* Footer */
.site-footer {
    background: #1e1b4b !important;
    color: #e5e7eb !important;
    padding: 3rem 2rem 2rem !important;
}

.footer-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.footer-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 2rem !important;
    margin-bottom: 2rem !important;
}

.footer-col h4 {
    color: #ffffff !important;
    font-size: 1.125rem !important;
    margin-bottom: 1rem !important;
}

.footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-links li {
    margin-bottom: 0.5rem !important;
}

.footer-links li::before,
.footer-links li::after {
    display: none !important;
    content: none !important;
}

.footer-links a {
    color: #9ca3af !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    font-size: 1rem !important;
}

.footer-links a:hover {
    color: #ffffff !important;
}

.footer-bottom {
    border-top: 1px solid #374151 !important;
    padding-top: 1.5rem !important;
    text-align: center !important;
}

.footer-bottom p {
    color: #9ca3af !important;
    font-size: 0.95rem !important;
    margin: 0 !important;
}

/* Table of Contents */
.toc-section {
    padding: 2rem 1.5rem !important;
    background: #ffffff !important;
}

.toc-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
}

/* Icons - Bootstrap Icons Color */
.bi {
    color: #4f46e5 !important;
    font-size: 1.25rem !important;
}

.icon-silver {
    color: #9ca3af !important;
}

/* Star Animations */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
}

.star:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.star:nth-child(2) { top: 20%; left: 80%; animation-delay: 0.5s; }
.star:nth-child(3) { top: 60%; left: 15%; animation-delay: 1s; }
.star:nth-child(4) { top: 80%; left: 90%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 40%; left: 50%; animation-delay: 0.3s; }

/* Fade-in Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Adjustments */
@media (max-width: 640px) {
    .content-section {
        padding: 2.5rem 1rem !important;
    }

    .btn-outline {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
}
