/* Rezepte Grid */
.rezept_cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.rezept_card {
    background: var(--background-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rezept_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.rezept_card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.rezept_card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rezept_card:hover .rezept_card-image img {
    transform: scale(1.05);
}

.rezept_card .information {
    padding: 1.5rem;
}

.rezept_card .title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.rezept_card .info {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0;
}

/* Filter-Bereich */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    align-items: center;
}

/* Filter-Tags */
.content .rezeptetag {
    border: none !important;
    background: none !important;
    padding: 0 !important;
}

.content .rezeptetag a {
    box-shadow: none !important;
    color: white;
    text-decoration: none !important;
    padding: 0.25rem 0.75rem;
    transition: all 0.2s ease;
    display: block;
    font-size: 0.9rem;
}

.content .rezeptetag a:hover {
    box-shadow: none !important;
    background: var(--main) !important;
    color: var(--background-color) !important;
    transform: none;
}

/* Aktiver Filter */
.content .rezeptetag.active a {
    background: var(--main) !important;
}

/* Ernährungsform-Badges */
.recipe-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.recipe-diet-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
}

.recipe-diet-badge.vegetarian {
    background: #4CAF50;
    color: white;
    border: none;
}

.recipe-diet-badge.vegan {
    background: #8BC34A;
    color: white;
    border: none;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .rezept_cards {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .tag-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .rezeptetag {
        text-align: center;
    }
}

/* Rezept-Detailseite */
.recipe-detail {
    margin: 0rem auto;
    padding: 0 1rem;
}

.recipe-detail h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.recipe-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.recipe-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-info {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.recipe-time-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.recipe-time-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 0.9rem;
}

.recipe-servings-calculator {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
}

.recipe-servings-calculator input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 1rem;
}

.recipe-content {
    display: grid;
    grid-template-columns: 385px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.recipe-ingredients {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: right;
}

.recipe-ingredients ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recipe-ingredients li {
    padding: 0.1rem 0;
    grid-template-columns: auto auto 1fr auto;
    gap: 0.5rem;
    align-items: baseline;
}

.recipe-ingredients li:last-child {
    border-bottom: none;
}

.recipe-ingredients .amount {
    font-weight: 500;
    text-align: right;
}

.recipe-ingredients .unit {
    text-align: right;
}

.recipe-ingredients .notes {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.recipe-instructions {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 12px;
}

.recipe-tips,
.recipe-variations,
.recipe-storage {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.recipe-button {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s ease;
}

.recipe-button:hover {
    opacity: 0.9;
}

/* Print Styles */
@media print {
    /* Grundeinstellungen */
    @page {
        margin: 1cm;
        size: A4;
    }

    /* Scrollbalken und leere Bereiche entfernen */
    body.printing {
        overflow: hidden !important;
    }

    /* Verstecke spezifische Elemente */
    body.printing .navigation,
    body.printing nav,
    body.printing .header-index,
    body.printing .recipe-meta,
    body.printing .recipe-info,
    body.printing .recipe-difficulty,
    body.printing .recipe-actions-row button,
    body.printing .recipe-actions-row a:not(.printing .recipe-servings),
    body.printing .recipe-image,
    body.printung .parallax,
    body.printing .waves,
    body.printing .footer1,
    body.printing .footer2,
    body.printing .footer3 a:not(.footer_logo),
    body.printing .admin-panel,
    body.printing [class*="empty"],
    body.printing div:empty {
        display: none !important;
    }

    /* Kompakteres Layout */
    body.printing .recipe-detail {
        margin: 0;
        padding: 0;
    }

    /* Logo-Positionierung */
    body.printing .footer .logo {
        display: block !important;
        margin: 1rem auto 0;
        position: relative;
    }

    /* Layout für Zutaten und Zubereitung */
    body.printing .recipe-content {
        display: grid;
        grid-template-columns: 0.8fr 1.2fr;
        gap: 0.3rem;
        margin-bottom: 1rem; /* Reduzierter Abstand zum Logo */
    }

    /* Überschrift */
    body.printing .recipe-detail h1 {
        margin: 0 0 1rem 0;
        font-size: 18pt;
    }

    /* Rest der Styles */
    body.printing .recipe-ingredients {
        font-size: 11pt;
        line-height: 1.2;
    }

    body.printing .recipe-instructions {
        font-size: 10.5pt;
        line-height: 1.2;
    }

    body.printing .recipe-instructions p {
        margin: 0 !important;
    }

    /* Portionen-Container und Inhalt sichtbar machen und zentrieren */
    body.printing .recipe-actions-row {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 1rem 0 !important;
    }

    /* Buttons ausblenden, aber Portionen anzeigen */
    body.printing .recipe-actions-row button {
        display: none !important;
    }

    /* Portionen-Element und sein Input-Feld sichtbar machen */
    body.printing .recipe-servings {
        display: inline-flex !important;
        align-items: center !important;
    }

    /* Portionen-Input ohne Border */
    body.printing .recipe-servings input {
        display: inline-flex !important;
        align-items: center !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
}

/* Filter-Tag Anpassungen */
.content .rezeptetag a {
    border-radius: 0.5rem;
}

/* Karten im Dark Mode */
@media (prefers-color-scheme: dark) {
    .rezept_card {
        background-color: var(--rezept-color); /* dunklerer Hintergrund im Dark Mode */
    }

    .content .rezeptetag a:hover {
        color: white !important; /* weißer Text beim Hover im Dark Mode */
    }
}

/* Responsive Anpassungen für die Detailseite */
@media (max-width: 768px) {
    .recipe-content {
        grid-template-columns: 1fr;
    }

    .recipe-time-info {
        flex-direction: column;
    }

    .recipe-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Rezept-Detailseite Header */
.recipe-detail h1 {
    text-align: center;
    margin-bottom: 1rem;
}

.recipe-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

/* Portionen und Drucken Bereich */
.recipe-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
}

.recipe-servings-calculator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recipe-servings-calculator label {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Input-Feld im gleichen Style wie Buttons */
.recipe-detail .recipe-actions-row .recipe-servings-calculator #servings {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    text-align: center;
    font-size: 1.2rem;
}

.recipe-button {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s ease;
}

.recipe-meta {
    text-align: center;
    margin: 20px 0;
}

.recipe-category {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Neuer Info-Bereich für Schwierigkeit und Zeit */
.recipe-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px auto;
    text-align: center;
    max-width: 600px;
}

.recipe-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
}

.detail-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 1.1em;
    font-weight: 500;
}

.recipe-info-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0 4rem 0; /* Mehr Abstand nach unten */
}

.recipe-time-info {
    display: flex;
    justify-content: center;
    margin: 0;
}    

.recipe-time-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.recipe-time-badge i {
    color: var(--blog-accent-color);
}

.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.rezeptetag a {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #333;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.rezeptetag a:hover {
    background: #8257E6; /* Unser Lila */
}

.rezeptetag a.active {
    color: white !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #8257E6; /* Gleiches Lila wie beim Hover */
    color: white;
}

.rezeptetag a.active::after {
    content: "×";
    font-size: 1.2em;
    line-height: 1;
    margin-left: auto;
    color: white;
}

/* Für die Vegan/Vegetarisch Badges in den Karten */
.recipe-badges {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.recipe-diet-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.875rem;
}

.recipe-diet-badge.vegan {
    background: #8BC34A;
    color: white;
}

.recipe-diet-badge.vegetarian {
    background: #4CAF50;
    color: white;
}

.ingredient-group-page-header {
    margin: 30px 0 10px 0;
}