/* ==========================================================================
   Schaf Seite (schafe.php)
   ========================================================================== */

/* Allgemeine Sektionen */
.sheep-hero-section,
.sheep-description-section,
.sheep-offers-section {
    padding: 40px 0;
    text-align: center;
}

.sheep-description-section {
    background-color: #f8f8f8; /* Leichter Hintergrund für den Text */
    padding: 60px 0;
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sheep-description-section h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 2.5em;
}

.sheep-description-section p {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    color: #555;
    font-size: 1.1em;
    padding: 0 15px; /* Padding für kleine Bildschirme */
}

.sheep-offers-section .section-intro {
    max-width: 800px;
    margin: 20px auto 40px auto;
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
}

/* --- Diashow (Slideshow) --- */
.slideshow-container {
    max-width: 900px; /* Breite der Diashow anpassen */
    position: relative;
    margin: auto;
    border-radius: 10px;
    overflow: hidden; /* WICHTIG: Wieder hinzugefügt für abgerundete Ecken und um Pfeile am Rand zu halten */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mySlides {
    display: none; /* Standardmässig alle Slides ausblenden */
    width: 100%;
    height: 500px; /* Feste Höhe für alle Diashow-Bilder */
    position: relative; /* Für Text-Positionierung */
    overflow: hidden; /* Für object-fit */
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Bild füllt den Container ohne Verzerrung */
    vertical-align: middle;
}

/* Bildunterschrift Text */
.text {
    color: #f2f2f2;
    font-size: 1.2em;
    padding: 8px 12px;
    position: absolute;
    bottom: 0px;
    width: 100%;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5); /* Halbtransparenter Hintergrund für bessere Lesbarkeit */
}

/* Pfeile (vorherige/nächste) */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    /* HIER KORRIGIERT: Präzise vertikale Zentrierung */
    margin-top: -28.5px; /* (25px font-size + 2*16px padding) / 2 = 57 / 2 = 28.5px */
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 25px;
    transition: 0.6s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.4); /* Etwas transparenter als 0.5, für bessere Sichtbarkeit des Bildes dahinter */
    z-index: 10; /* Stellen Sie sicher, dass sie über dem Bild sind */
}

/* HIER KORRIGIERT: Pfeile wieder an den äussersten Rand des Bildes positionieren */
.next {
    right: 0; /* An den rechten Rand des slideshow-container */
    border-radius: 3px 0 0 3px;
}

/* HIER KORRIGIERT: Pfeile wieder an den äussersten Rand des Bildes positionieren */
.prev {
    left: 0; /* An den linken Rand des slideshow-container */
    border-radius: 0 3px 3px 0;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Die Punkte/Indikatoren */
.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: #717171;
}

/* Fading Animation */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* --- Schaf-Angebote Grid --- */
.sheep-offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.sheep-offer-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sheep-offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.sheep-offer-image-wrapper {
    width: 100%;
    height: 200px; /* Feste Höhe für Bilder */
    overflow: hidden;
    background-color: #f0f0f0; /* Fallback Farbe */
    display: flex;
    justify-content: center;
    align-items: center;
}

.sheep-offer-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Bild füllt den Container ohne Verzerrung */
    display: block;
}

.sheep-offer-content {
    padding: 20px;
    text-align: left; /* Text linksbündig innerhalb der Karte */
    flex-grow: 1; /* Inhalt füllt verfügbaren Platz */
    display: flex;
    flex-direction: column;
}

.sheep-offer-title {
    font-size: 1.6em;
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
}

.sheep-offer-description {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.sheep-offer-price {
    font-size: 1.1em;
    color: #444;
    font-weight: bold;
    margin-top: auto; /* Preis am unteren Rand der Karte ausrichten */
}

/* Stil für den Fall, dass keine Angebote vorhanden sind */
.no-offers {
    text-align: center;
    font-size: 1.2em;
    color: #888;
    margin-top: 50px;
    padding: 20px;
    border: 1px dashed #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .mySlides {
        height: 300px; /* Kleinere feste Höhe für mobile */
    }
    .sheep-offers-grid {
        grid-template-columns: 1fr; /* Eine Spalte auf kleineren Bildschirmen */
    }
    .sheep-offer-card {
        margin: 0 auto; /* Zentrieren der Karte */
        max-width: 400px; /* Max Breite für einzelne Karten */
    }
    .sheep-description-section h2 {
        font-size: 2em;
    }
    .text {
        font-size: 1em;
    }
}