* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: eb-garamond, serif;
    font-weight: 200;
    font-style: normal;
    background: #fff;
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 100px;
    font-size: 0.625rem;
    overflow-y: scroll;
}

.container {
    max-width: 1400px;
    margin: 0 auto 20px auto;
    background: white;
    overflow: hidden;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    color: #595857;
    padding: 0 40px;
}

.header-left {
    flex: 1;
    cursor: pointer;
}

.header-title {
    font-size: 1.76rem;
    line-height: 1.2;
}

.header-subtitle, p {
    font-size: 1.2rem;
    line-height: 1.4;
}

.header-right {
    flex-shrink: 0;
}

.logo {
    width: 176px;
    height: 176px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background-image: url('../img/logo.svg');
    background-position: 50%;
    background-size: contain;
    background-repeat: no-repeat;
}

.logo:hover {
    transform: scale(1.05);
}

.logo svg {
    width: 100%;
    height: 100%;
}

/* Navigation Menu */
.nav-container {
    padding: 0 20px;
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: rgba(89,88,87,1);
    transition: all 0.3s;
    border-radius: 3px;
}

.mobile-menu-toggle:hover span,
.mobile-menu-toggle:active span {
    background: rgba(120,106,105,1);
}

.nav-menu.active ~ .mobile-menu-toggle span {
    background: rgba(120,106,105,1);
}

.nav-menu {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    list-style: none;
    padding: 0 20px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 7px 12px;
    color: rgba(89,88,87,1);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s;
    border: 1px dashed rgba(89,88,87,0.76);
    white-space: nowrap;
}

.nav-menu a:hover {
    background-color: rgba(120,106,105,1);
	border: 1px dashed rgba(89,88,87,0.76);
    color: #fff;
}

.nav-menu a.active {
    background-color: rgba(120,106,105,1);
	border: 1px dashed rgba(89,88,87,0.76);
    color: #fff;
}

/* Content Bereich */
#content-area {
    min-height: 400px;
}

p {
    padding: 10px 0px;
    color: rgba(89,88,87,1);
}

/* Search Container - nur auf Start-Seite */
.search-container {
    padding: 20px 40px 0 40px;
}

.search-box {
    width: 100%;
    padding: 25px 25px 25px 50px;
    font-size: 15px;
    border: none;
    outline: none;
    transition: all 0.3s;
    box-shadow: inset 0 2px 8px rgba(89,88,87,0.27);
    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='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 20px 20px;
    font-family: eb-garamond;
    font-weight: 100;
    font-size: 1.2rem;
    line-height: 1.4;
    font-style: normal;
    color: rgba(89,88,87,0.5);
}

.search-box:focus {
    box-shadow: inset 0 2px 12px rgba(120,106,105, 0.41);
    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='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    color: rgba(120,106,105,1);
}

/* Gallery */
.gallery {
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.animal-card {
    background: white;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(89,88,87,0.1);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.animal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(120,106,105,0.2);
}

.pdf-preview {
    width: 100%;
    height: 250px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(89,88,87,1);
    position: relative;
    overflow: hidden;
    padding: 10px;
}

.pdf-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

.animal-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.animal-info h3 {
    color: #786A69;
    margin-bottom: 4px;
    font-size: 1.4rem !important;
    line-height: 1.3;
    font-weight: normal;
}

.info-row {
    margin-bottom: 4px;
    font-size: 11px;
    color: #555;
    line-height: 1.4;
}

.info-label {
    font-weight: bold;
    color: #333;
}

.latin-name {
    font-style: italic;
    color: rgba(89,88,87,1);
    font-size: 11px;
}

/* Classification Modal Styles */
.classification-trigger {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(89,88,87,1);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    width: 100%;
    text-align: center;
    font-weight: 100;
}

.classification-trigger:hover {
    background: #786A69;
}

.classification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.classification-modal.active {
    display: flex;
}

.classification-modal-content {
    background: white;
    padding: 30px;
    border: 2px solid rgba(89,88,87,1);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.classification-modal-content #modalAnimalName {
    margin-bottom: 20px;
}

/* Modal Species Names - Drei Sprachen */
.modal-species-names {
    margin-bottom: 25px;
    text-align: center;
}

.modal-species-row {
    font-size: 1.3rem;
    line-height: 1.4;
    color: rgba(89,88,87,1);
    margin-bottom: 3px;
}

.modal-species-row.latin {
    font-style: italic;
    color: rgba(89,88,87,1);
    margin-top: 5px;
    font-size: 1.4rem;
}

.classification-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(89,88,87,1);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.classification-close:hover {
    background: #786A69;
    transform: rotate(90deg);
}

/* Taxonomy Table im Modal */
.classification-modal .taxonomy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    background: white;
    border: 1px solid rgba(89,88,87,1);
}

.classification-modal .taxonomy-table th,
.classification-modal .taxonomy-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px dashed rgba(89,88,87,0.76);
}

.classification-modal .taxonomy-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-family: eb-garamond;
    color: rgba(89,88,87,1);
    width: 40%;
    font-size: 1rem;
    line-height: 140%;
}

.classification-modal .taxonomy-table td {
    color: #595857;
    line-height: 140%;
    vertical-align: top;
}

.classification-modal .taxonomy-table tr:last-child th,
.classification-modal .taxonomy-table tr:last-child td {
    border-bottom: none;
}

.classification-modal .taxonomy-table em {
    font-style: italic;
    color: rgba(89,88,87,1);
}

.animal-info .species-names {
    margin-bottom: 10px;
}

.animal-info .species-names .species-row {
    margin-bottom: 3px;
    font-size: 1.4rem;
    line-height: 1.4;
    color: rgba(89,88,87,1);
}

.species-names .species-row {
    font-size: 1.17rem !important;
}

.animal-info .species-names .species-row.latin {
    font-style: italic;
    color: rgba(89,88,87,1) !important;
    margin-top: 1px;
}

.download-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    background: rgba(89,88,87,1);
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s;
    cursor: pointer;
}

.download-btn:hover {
    background: #786A69;
    transform: translateY(-2px);
}

.download-btn.png {
    background: rgba(89,88,87,1);
}

.download-btn.png:hover {
    background: #786A69;
}

.download-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    position: relative;
    top: 0px;
}

.no-results {
    text-align: center;
    padding: 50px;
    color: rgba(89,88,87,0.76);
    font-size: 1.76rem;
    grid-column: 1 / -1;
}

/* Statische Content-Seiten (Impressum etc.) */
.static-page {
    padding: 40px;
    max-width: 1400px;
    margin: 0;
    margin-left: 0;
}

.static-page h1 {
    color: rgba(89,88,87,1);
    font-weight: 200;
    margin-bottom: 30px;
    font-size: 1.27rem;
}

.static-page h2 {
    color: rgba(89,88,87,1);
    font-weight: 200;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.15rem;
}

.static-page h3 {
    color: rgba(89,88,87,1);
    font-weight: 200;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.static-page p {
    margin-bottom: 15px;
    font-weight: 200;
    line-height: 1.6;
    color: rgba(89,88,87,1);
    font-size: 1rem;
}

.static-page a {
    color: rgba(120,106,105,1);
    text-decoration: none;
}

.static-page a:hover {
    text-decoration: underline;
    color: rgba(89,88,87,1);
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(120,106,105,1) 0%, rgba(89,88,87,1) 100%);
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-links {
    display: flex;
    gap: 20px;
    font-size: 1.05rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    cursor: pointer;
}

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-copyright {
    font-size: 0.99rem;
    opacity: 1;
    text-align: center;
    line-height: 112.5%;
}

.footer-schriftzug {
    background-image: url('../img/schriftzug.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: 50%;
    margin-top: 4px;
    display: inline-block;
    width: 136px !important;
    height: 35px !important;
}

.copy {
    margin-right: 7px !important;
    display: inline-block;
}

/* Social Media Icons im Footer */
.footer-social {
    padding-top: 10px;
	display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 1);
    z-index: 9999;
    animation: fadeIn 0.3s;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    padding: 20px;
    transition: opacity 0.2s ease;
}

.lightbox-info {
    padding: 20px 30px;
    margin-top: 20px;
    max-width: 600px;
    text-align: center;
}

.lightbox-info h2 {
    color: #786A69;
    margin-bottom: 8px;
    font-size: 28px;
}

.lightbox-info .species-row {
    font-size: 18px;
    margin-bottom: 5px;
    color: rgba(89,88,87,1);
}

.lightbox-info .species-row.latin {
    font-style: italic;
    color: rgba(89,88,87,1);
    font-size: 20px;
    margin-top: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10000;
    background: #fff !important;
}

.lightbox-close:hover {
    color: rgba(120,106,105,1);
    background: #fff !important;
    transform: rotate(90deg);
}

.lightbox-close:active {
    opacity: 0.7;
    transform: scale(0.95);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 1);
    border: none;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10000;
}

.lightbox-nav:hover {
    color: rgba(120,106,105,1);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    opacity: 0.7;
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 200;
    color: rgba(89,88,87,1);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1400px) {
    .gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column-reverse;
        text-align: center;
        padding: 0 20px;
    }

    .header-title {
        font-size: 24px;
    }

    .logo {
        width: 176px;
        height: 176px;
    }
    
    .search-container {
        padding: 20px;
    }
	
	.search-box {
        font-size: 0.89rem;
        line-height: 1.25;
	}
	
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
    }

    /* Mobile Menu deaktiviert - Desktop-Menü wird immer angezeigt */
    .mobile-menu-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 20px 20px 20px 0px;
		margin-bottom: 0;
    }

    .nav-menu a {
        font-size: 1rem;
        padding: 7px 12px;
    }

    .footer-content {
        font-size: 12px;
    }
    
    .footer-social {
        gap: 12px;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
    }
    
    .social-icon svg {
        width: 18px;
        height: 18px;
    }

    .static-page {
        padding: 20px 40px 40px 20px;
    }

 
    
    /* Classification Modal auf Mobile */
    .classification-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .classification-modal-content h3 {
        font-size: 1.2rem;
    }
    
    /* Lightbox Touch-optimiert */
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .lightbox-close {
        width: 45px;
        height: 45px;
        font-size: 26px;
        top: 15px;
        right: 15px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-image {
        max-height: 60vh;
        padding: 10px;
    }
    
    .lightbox-info {
        padding: 15px 20px;
        margin-top: 10px;
    }
    
    .lightbox-info h2 {
        font-size: 22px;
    }
    
    .lightbox-info .species-row {
        font-size: 16px;
    }
    
    .lightbox-info .species-row.latin {
        font-size: 18px;
    }
    
    .lightbox-counter {
        bottom: 10px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    
	.gallery {
        grid-template-columns: 1fr !important;
    } 
	
	
    body {
        padding: 10px;
        padding-bottom: 100px;
    }
    
    /* Extra kleine Geräte - Lightbox */
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
    
    .lightbox-image {
        max-height: 55vh;
        padding: 5px;
    }
    
    .lightbox-info h2 {
        font-size: 20px;
    }
    
    .lightbox-info .species-row {
        font-size: 14px;
    }
    
    .lightbox-info .species-row.latin {
        font-size: 16px;
    }
}

/* Scroll-to-Top Button - Am Ende der the-fauna.css hinzufügen */

.scroll-to-top {
    position: fixed;
    bottom: 76px; /* Über dem Footer positioniert */
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(120,106,105,0.76) 0%, rgba(89,88,87,0.76) 100%);
    color: white;
    border: 1px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(89,88,87,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 1002;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, rgba(89,88,87,0.76) 0%, rgba(120,106,105,0.76) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(89,88,87,0.4);
}

.scroll-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(89,88,87,0.3);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 76px; /* Über dem Footer positioniert */
        right: 20px;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        width: 42px;
        height: 42px;
        bottom: 76px; /* Über dem Footer positioniert */
        right: 15px;
    }
    
    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* Resize-Icon für Tier-Bilder - In die-fauna.css einfügen */

/* Resize-Icon in der rechten unteren Ecke des Bildes */
.pdf-preview::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    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='rgba(89,88,87,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cpolyline points='9 21 3 21 3 15'%3E%3C/polyline%3E%3Cline x1='21' y1='3' x2='14' y2='10'%3E%3C/line%3E%3Cline x1='3' y1='21' x2='10' y2='14'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

/* Icon wird beim Hover deutlicher */
.pdf-preview:hover::after {
    opacity: 0.8;
}

/* Auf Touch-Geräten etwas sichtbarer */
@media (hover: none) and (pointer: coarse) {
    .pdf-preview::after {
        opacity: 0.6;
    }
}