/**
 * DasSchmecktuns.de - Stylesheet
 * Design System: Warm Coral
 */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    /* Colors - Warm Coral Palette */
    --color-primary: #E8A87C;
    --color-primary-dark: #D4896A;
    --color-primary-light: #F5D0B9;
    --color-secondary: #C38D9E;
    --color-secondary-dark: #A67485;
    --color-accent: #41B3A3;
    --color-accent-dark: #359588;
    
    /* Backgrounds */
    --color-bg: #FFF9F5;
    --color-bg-card: #FFFFFF;
    --color-bg-highlight: #F8E1D6;
    --color-bg-dark: #2D2A3E;
    
    /* Text */
    --color-text: #4A4A4A;
    --color-text-light: #7A7A7A;
    --color-text-muted: #9A9A9A;
    --color-text-inverse: #FFFFFF;
    
    /* Status */
    --color-success: #41B3A3;
    --color-warning: #F9D976;
    --color-danger: #E57373;
    --color-info: #64B5F6;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 4px 16px rgba(232, 168, 124, 0.4);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Typography */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 15px;
    --font-size-lg: 18px;
    --font-size-xl: 22px;
    --font-size-2xl: 28px;
    --font-size-3xl: 36px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* Container */
    --container-max: 1200px;
    --container-padding: 20px;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-inverse);
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.header__logo-icon {
    font-size: 28px;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-left: auto;
    margin-right: var(--space-lg);
}

.header__nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.header__nav-link:hover {
    color: var(--color-text-inverse);
}

/* Navigation Dropdown */
.header__nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

/* Neue Ratgeber-Dropdown Styles */
.header__nav-dd-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    padding: 0;
    margin: 0;
    line-height: inherit;
    transition: color var(--transition-fast);
}

.header__nav-dd-toggle:hover {
    color: var(--color-text-inverse);
}

.header__nav-caret {
    transition: transform var(--transition-fast);
}

.header__nav-dropdown:hover .header__nav-caret,
.header__nav-dropdown.is-open .header__nav-caret {
    transform: rotate(180deg);
}

.header__nav-dd-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
    margin-top: 12px;
}

.header__nav-dropdown:hover .header__nav-dd-menu,
.header__nav-dropdown:focus-within .header__nav-dd-menu,
.header__nav-dropdown.is-open .header__nav-dd-menu {
    opacity: 1;
    visibility: visible;
}

.header__nav-dd-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.header__nav-dd-item:hover {
    background: var(--color-bg-highlight);
}

.header__nav-dd-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.header__nav-dd-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header__nav-dd-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.header__nav-dd-desc {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* Alte Dropdown-Styles für Kompatibilität */
.header__nav-link--dropdown {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.header__nav-link--dropdown .dropdown-arrow {
    font-size: 10px;
    transition: transform var(--transition-fast);
}

.header__nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.header__nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
    margin-top: 8px;
}

.header__nav-dropdown:hover .header__nav-dropdown-menu,
.header__nav-dropdown.is-open .header__nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.header__nav-dropdown-menu .header__dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    color: var(--color-text);
    transition: background var(--transition-fast);
}

.header__nav-dropdown-menu .header__dropdown-item:hover {
    background: var(--color-bg-highlight);
}

.header__nav-dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--color-bg-highlight);
    margin: var(--space-xs) 0;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header__user-menu {
    position: relative;
}

.header__user-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-full);
    padding: 4px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.header__user-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header__user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.header__user-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-text-inverse);
    color: var(--color-primary);
    font-weight: 700;
}

.header__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

/* Nav Dropdowns (Gesundheit, Küchenhelfer) */
.header__nav .header__dropdown {
    position: relative;
    display: inline-block;
}

.header__nav .header__dropdown .header__dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
    padding: var(--space-xs) 0;
}

.header__nav .header__dropdown:hover .header__dropdown-menu,
.header__nav .header__dropdown:focus-within .header__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__nav .header__dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    padding: 0;
}

.header__nav .header__dropdown-caret {
    font-size: 0.75em;
    margin-left: 2px;
}

.header__user-menu:hover .header__dropdown,
.header__user-menu.active .header__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__dropdown-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-bg-highlight);
}

.header__dropdown-header strong {
    display: block;
    color: var(--color-text);
}

.header__dropdown-header span {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.header__dropdown-item {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    transition: background var(--transition-fast);
}

.header__dropdown-item:hover {
    background: var(--color-bg-highlight);
}

.header__dropdown-item--danger {
    color: var(--color-danger);
}

.header__dropdown hr {
    border: none;
    border-top: 1px solid var(--color-bg-highlight);
    margin: var(--space-xs) 0;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn--primary:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-primary);
}

.btn--secondary {
    background: var(--color-secondary);
    color: var(--color-text-inverse);
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-inverse);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn--sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-sm);
}

.btn--lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-lg);
}

/* ========================================
   FLASH MESSAGES
   ======================================== */
.flash-container {
    padding: var(--space-md) 0;
}

.flash {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    font-weight: 500;
}

.flash--success {
    background: rgba(65, 179, 163, 0.15);
    color: var(--color-accent-dark);
    border-left: 4px solid var(--color-success);
}

.flash--error {
    background: rgba(229, 115, 115, 0.15);
    color: #c62828;
    border-left: 4px solid var(--color-danger);
}

.flash--info {
    background: rgba(100, 181, 246, 0.15);
    color: #1565c0;
    border-left: 4px solid var(--color-info);
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--color-bg-highlight);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--color-bg-card);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(232, 168, 124, 0.2);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: var(--font-size-sm);
    color: var(--color-danger);
    margin-top: var(--space-xs);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-primary);
    margin-top: 2px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card__image {
    aspect-ratio: 16/10;
    object-fit: cover;
    width: 100%;
}

.card__body {
    padding: var(--space-lg);
}

.card__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.card__meta {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

/* ========================================
   RECIPE CARD
   ======================================== */
.recipe-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.recipe-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* Favorisierte Rezepte – Umrandung im Warm Coral Design */
.recipe-card.is-favorited {
    border: 2.5px solid var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary-light), var(--shadow-sm);
}

.recipe-card.is-favorited:hover {
    box-shadow: 0 0 0 1px var(--color-primary-light), var(--shadow-lg);
}

.recipe-card.is-favorited .recipe-card__body::before {
    content: '❤️ Favorit';
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary-dark);
    background: var(--color-primary-light);
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.recipe-card__image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.recipe-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.recipe-card:hover .recipe-card__image {
    transform: scale(1.05);
}

.recipe-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-bg-highlight) 0%, var(--color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.5;
}

.recipe-card__favorite {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    color: #d33;
    transition: all var(--transition-fast);
    z-index: 2;
}

.recipe-card__favorite:hover {
    background: var(--color-secondary);
    color: var(--color-text-inverse);
    transform: scale(1.08);
}

/* Aktiver Favorit – sofort gefülltes, rotes Herz */
.recipe-card__favorite.is-favorite,
.recipe-card__favorite.active {
    background: #fff;
    color: #e53935;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.25);
}

.recipe-card__favorite.is-favorite:hover,
.recipe-card__favorite.active:hover {
    background: #fff;
    color: #c62828;
    transform: scale(1.08);
}

/* Kleines Pop-Feedback nach dem Toggeln */
.recipe-card__favorite.just-toggled {
    animation: favPop 0.32s ease-out;
}

@keyframes favPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.recipe-card__body {
    padding: var(--space-md);
}

.recipe-card__title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.recipe-card__author {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.recipe-card__stats {
    display: flex;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.recipe-card__stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.recipe-card__rating {
    color: var(--color-warning);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: 0;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer__logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text-inverse);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer__logo-icon {
    color: var(--color-primary);
    flex-shrink: 0;
}

.footer__tagline {
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
}

.footer__tagline span {
    color: #ff6b6b;
    margin-left: 2px;
}

.footer__social {
    margin-top: var(--space-md);
    display: flex;
    gap: 10px;
}

.footer__social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.footer__social a:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer__links {
    display: contents;
}

.footer__col h4 {
    color: var(--color-text-inverse);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
}

.footer__chevron {
    display: none;
}

.footer__col a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer__col a::before {
    content: "›";
    color: var(--color-primary);
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}

.footer__col a:hover {
    color: var(--color-primary);
    transform: translateX(2px);
}

/* Rechtliches + Hinweise im Footer */
.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--space-lg);
    text-align: center;
    font-size: var(--font-size-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer__copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 0;
    max-width: 1100px;
    line-height: 1.7;
    font-size: var(--font-size-sm);
}

.footer__legal a {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.footer__legal a::before {
    content: none;
}

.footer__legal a:hover {
    color: var(--color-primary);
}

.footer__legal-sep {
    margin: 0 10px;
    opacity: 0.35;
}

.footer__alcohol-notice {
    margin: 2px 0 0;
    max-width: 900px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 6px;
    color: var(--footer-text-muted, #9ca3af);
    font-size: 12px;
    line-height: 1.5;
}

.footer__alcohol-notice a {
    color: var(--footer-text-muted, #9ca3af);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer__alcohol-notice a:hover {
    color: var(--color-primary);
}

/* ========================================
   MAIN
   ======================================== */
.main {
    min-height: calc(100vh - 200px);
}

/* ========================================
   AUTH PAGES
   ======================================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: var(--space-xl) 0;
}

.auth-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 440px;
}

.auth-card__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-card__logo {
    font-size: 48px;
    margin-bottom: var(--space-md);
}

.auth-card__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text);
}

.auth-card__subtitle {
    color: var(--color-text-light);
    margin-top: var(--space-xs);
}

.auth-card__footer {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-bg-highlight);
    color: var(--color-text-light);
}

.auth-card__footer a {
    color: var(--color-primary);
    font-weight: 600;
}

.auth-card__footer a:hover {
    text-decoration: underline;
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 16px;
    }
    
    /* Navigation NICHT ausblenden – auf kleinen Breiten umbrechen/scrollen */
    .header__nav {
        display: none;
    }
    
    .header__actions .btn--sm {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .footer__inner {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .footer__links {
        display: block;
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .footer__social {
        justify-content: center;
    }
    
    /* Akkordeon auf Mobile */
    .footer__col {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .footer__col h4.footer__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        padding: 14px 0;
        margin-bottom: 0;
        -webkit-tap-highlight-color: transparent;
    }
    
    .footer__chevron {
        display: block;
        transition: transform 0.25s ease;
        opacity: 0.5;
    }
    
    .footer__col.is-open .footer__chevron {
        transform: rotate(180deg);
    }
    
    .footer__col-links {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding-bottom: 0;
    }
    
    .footer__col.is-open .footer__col-links {
        max-height: 250px;
        padding-bottom: 12px;
    }
    
    .footer__col a {
        padding: 10px 0;
        font-size: 15px;
    }
    
    /* Rechtliches compact auf Mobile */
    .footer__bottom {
        padding-top: var(--space-md);
        gap: 12px;
    }

    .footer__legal {
        justify-content: center;
        font-size: 13px;
        gap: 8px;
    }

    .footer__legal-sep {
        display: none;
    }

    .footer__legal a {
        padding: 4px 8px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.045);
    }

    .footer__alcohol-notice {
        font-size: 11.5px;
        padding: 0 var(--space-xs);
    }
    
    .footer__brand {
        text-align: center;
    }
}


/* =============================================
   BADGES & NOTIFICATIONS
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary);
    border-radius: 9px;
    margin-left: 6px;
}

/* ========================================
   MOBILE BOTTOM NAVIGATION
   ======================================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    body {
        padding-bottom: 70px;
    }
    
    .footer {
        margin-bottom: 60px;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    min-width: 60px;
}

.mobile-nav-item svg {
    width: 22px;
    height: 22px;
    margin-bottom: 2px;
}

.mobile-nav-item span:not(.mobile-nav-badge):not(.nav-icon-wrap) {
    font-size: 10px;
}

.mobile-nav-item.active {
    color: var(--color-primary);
}

.mobile-nav-item.create {
    position: relative;
    top: -12px;
}

.mobile-nav-item.create .nav-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 50%;
    color: white;
    box-shadow: var(--shadow-primary);
}

.mobile-nav-item.create svg {
    width: 26px;
    height: 26px;
    margin: 0;
}

.mobile-nav-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(16px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--color-danger, #e53e3e);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   MOBILE RESPONSIVE ENHANCEMENTS
   ======================================== */
@media (max-width: 768px) {
    /* Header Mobile */
    .header {
        padding: 12px 0;
    }
    
    .header__inner {
        padding: 0 12px;
    }
    
    .header__logo-text {
        font-size: 18px;
    }
    
    .header__actions {
        gap: 8px;
    }
    
    .header__actions .btn--sm {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Cards Mobile */
    .card {
        border-radius: var(--radius-md);
    }
    
    /* Recipe Cards Mobile */
    .recipe-card {
        border-radius: var(--radius-md);
    }
    
    .recipe-card__image {
        height: 160px;
    }
    
    .recipe-card__content {
        padding: 12px;
    }
    
    .recipe-card__title {
        font-size: 15px;
        line-height: 1.3;
    }
    
    /* Container Mobile */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Headings Mobile */
    h1, .h1 {
        font-size: 24px;
    }
    
    h2, .h2 {
        font-size: 20px;
    }
    
    /* Forms Mobile */
    .form-control {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 12px 14px;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn--lg {
        padding: 14px 24px;
        width: 100%;
    }
    
    /* Dashboard Sidebar Mobile */
    .container > div[style*="display: flex"][style*="gap: 32px"] {
        flex-direction: column !important;
    }
    
    .container > div[style*="display: flex"] > div[style*="width: 240px"] {
        width: 100% !important;
        position: static !important;
    }
    
    .container > div[style*="display: flex"] > div[style*="width: 240px"] .card {
        position: static !important;
    }
    
    /* Stats Grid Mobile */
    div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Recipe Detail Mobile */
    .recipe-detail__header {
        padding: 16px;
    }
    
    .recipe-detail__title {
        font-size: 22px;
    }
    
    .recipe-detail__meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    /* Ingredients/Steps Mobile */
    .ingredients-list,
    .steps-list {
        padding: 16px;
    }
    
    /* Comment Section Mobile */
    .comment {
        padding: 12px;
    }
    
    .comment__avatar {
        width: 36px;
        height: 36px;
    }
    
    /* Footer Mobile - handled via accordion styles above */
    
    /* Modal Mobile */
    .modal__content {
        margin: 16px;
        max-height: calc(100vh - 32px);
        width: calc(100% - 32px);
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
}

/* Small phones */
@media (max-width: 375px) {
    .mobile-nav-item {
        min-width: 50px;
        padding: 6px 8px;
    }
    
    .mobile-nav-item.create .nav-icon-wrap {
        width: 46px;
        height: 46px;
    }
    
    h1, .h1 {
        font-size: 20px;
    }
    
    .recipe-card__image {
        height: 140px;
    }
}

.header__dropdown-item .badge {
    background: var(--color-danger, #e53e3e);
}
/* Hide on mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    /* Recipe Detail: Zutaten/Zubereitung untereinander statt nebeneinander */
    .recipe-layout {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .recipe-layout__sidebar {
        position: static !important;
    }
    
    /* Meine Rezepte: Cards mobile-optimiert */
    .my-recipe-card {
        padding: 14px !important;
    }
    
    .my-recipe-card__inner {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .my-recipe-card__img {
        width: 100% !important;
        height: 160px !important;
    }
    
    .my-recipe-card__header {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .my-recipe-card__actions {
        width: 100%;
    }
    
    .my-recipe-card__actions .btn {
        flex: 1;
        text-align: center;
    }
}

/* ========================================
   MOBILE QUICK-LINKS BAR
   ======================================== */
.mobile-quicklinks {
    display: none;
}

@media (max-width: 768px) {
    .mobile-quicklinks {
        display: block;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
        overflow: hidden;
        position: relative;
    }
    
    /* Scroll-Hinweis: Gradient am rechten Rand */
    .mobile-quicklinks::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(90deg, transparent 0%, var(--color-bg) 80%);
        pointer-events: none;
        z-index: 2;
        transition: opacity 0.3s ease;
    }
    
    /* Kleiner Pfeil-Hinweis */
    .mobile-quicklinks::before {
        content: '›';
        position: absolute;
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
        font-size: 18px;
        font-weight: 600;
        color: var(--color-text-muted);
        z-index: 3;
        pointer-events: none;
        animation: scroll-hint 1.5s ease-in-out infinite;
        opacity: 0.7;
    }
    
    @keyframes scroll-hint {
        0%, 100% { transform: translateY(-50%) translateX(0); opacity: 0.7; }
        50% { transform: translateY(-50%) translateX(4px); opacity: 1; }
    }
    
    /* Hinweis ausblenden wenn gescrollt */
    .mobile-quicklinks.scrolled::after,
    .mobile-quicklinks.scrolled::before {
        opacity: 0;
    }
    
    .mobile-quicklinks__scroll {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding: 8px 12px;
        padding-right: 48px; /* Platz für Scroll-Hinweis */
    }
    
    .mobile-quicklinks__scroll::-webkit-scrollbar {
        display: none;
    }
    
    .mobile-quicklinks__item {
        flex-shrink: 0;
        padding: 6px 14px;
        font-size: 13px;
        font-weight: 500;
        color: var(--color-text-light);
        background: var(--color-bg-alt, #f5f5f5);
        border-radius: 20px;
        white-space: nowrap;
        transition: all 0.2s ease;
        text-decoration: none;
    }
    
    .mobile-quicklinks__item:hover,
    .mobile-quicklinks__item.active {
        background: var(--color-primary);
        color: #fff;
    }
    
    .mobile-quicklinks__icon {
        margin-right: 3px;
    }
}

/* ========================================
   MOBILE HOMEPAGE OPTIMIERUNGEN
   ======================================== */
@media (max-width: 768px) {
    /* Hero Section kompakter */
    .hero {
        padding: 32px 0 !important;
    }
    
    .hero h1 {
        font-size: 26px !important;
        margin-bottom: 10px !important;
    }
    
    .hero p {
        font-size: 15px !important;
        margin-bottom: 16px !important;
    }
    
    .hero .btn--lg {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    /* Stats Section kompakter */
    section[style*="justify-content: center"][style*="gap: 60px"] {
        gap: 24px !important;
    }
    
    section[style*="justify-content: center"] > div[style*="font-size: 28px"] {
        font-size: 22px !important;
    }
    
    /* Rezept des Tages - Mobile Grid */
    section[style*="linear-gradient(135deg, #fff9e6"] {
        padding: 28px 0 !important;
    }
    
    section[style*="linear-gradient(135deg, #fff9e6"] .card > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    section[style*="linear-gradient(135deg, #fff9e6"] .card img {
        height: 200px !important;
    }
    
    section[style*="linear-gradient(135deg, #fff9e6"] .card > div > div[style*="padding: 32px"] {
        padding: 16px !important;
    }
    
    section[style*="linear-gradient(135deg, #fff9e6"] h3 {
        font-size: 20px !important;
    }
    
    /* Tipp des Tages - Mobile Layout */
    section[style*="padding: 48px 0"] > .container > a.card[style*="linear-gradient(135deg, #e8f5e9"] {
        padding: 16px !important;
    }
    
    section[style*="padding: 48px 0"] > .container > a.card[style*="linear-gradient(135deg, #e8f5e9"] > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    section[style*="padding: 48px 0"] > .container > a.card[style*="linear-gradient(135deg, #e8f5e9"] img {
        width: 100% !important;
        height: 140px !important;
    }
    
    section[style*="padding: 48px 0"] > .container > a.card[style*="linear-gradient(135deg, #e8f5e9"] h3 {
        font-size: 18px !important;
    }
    
    /* Allgemeine Section-Abstände reduzieren */
    section[style*="padding: 48px 0"] {
        padding: 28px 0 !important;
    }
    
    section[style*="padding: 60px 0"] {
        padding: 36px 0 !important;
    }
    
    /* Section-Titel kleiner */
    section h2[style*="font-size: 24px"] {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }
    
    /* Recipe Cards auf Mobile: weniger Whitespace */
    .recipe-card {
        box-shadow: var(--shadow-sm);
    }
    
    .recipe-card__body {
        padding: 10px 12px !important;
    }
    
    .recipe-card__title {
        font-size: 14px !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }
    
    .recipe-card__author {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }
    
    .recipe-card__stats {
        font-size: 12px !important;
    }
    
    /* Grid auf Mobile: 2 Spalten */
    .grid--4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    /* CTA Section kompakter */
    section[style*="linear-gradient(135deg, var(--color-accent)"] {
        padding: 36px 0 !important;
    }
    
    section[style*="linear-gradient(135deg, var(--color-accent)"] h2 {
        font-size: 24px !important;
    }
    
    section[style*="linear-gradient(135deg, var(--color-accent)"] p {
        font-size: 15px !important;
        margin-bottom: 16px !important;
    }
    
    /* Kategorien-Buttons kompakter */
    section[style*="Stöbere nach Kategorien"] a {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    
    /* ========================================
       MOBILE: Neue Klassen-basierte Regeln
       ======================================== */
    
    /* Hero Section */
    .hero__title {
        font-size: 26px !important;
    }
    
    .hero__text {
        font-size: 15px !important;
    }
    
    .hero__buttons {
        flex-direction: column;
        gap: 10px !important;
    }
    
    .hero__buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Rezept des Tages */
    .recipe-of-day__grid {
        grid-template-columns: 1fr !important;
    }
    
    .recipe-of-day__image {
        height: 200px !important;
    }
    
    .recipe-of-day__content {
        padding: 16px !important;
    }
    
    .recipe-of-day__title {
        font-size: 20px !important;
    }
    
    .recipe-of-day__meta {
        gap: 10px !important;
        font-size: 13px !important;
    }
    
    /* Tipp des Tages */
    .tip-card {
        padding: 16px !important;
    }
    
    .tip-card__inner {
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .tip-card__image-wrap {
        width: 100% !important;
    }
    
    .tip-card__image {
        width: 100% !important;
        height: 180px !important;
    }
    
    .tip-card__icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 28px !important;
    }
    
    .tip-card__title {
        font-size: 18px !important;
    }
    
    .tip-card__text {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }
    
    .tip-card__recipes {
        gap: 6px !important;
    }
}


/* =========================================================
   FIX: Küchengeräte Bilder vollständig anzeigen
   ========================================================= */

.kuechengeraete .card-image,
.kuechengeraete .card-img-wrapper {
    height: auto !important;
    overflow: visible !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kuechengeraete .card-image img,
.kuechengeraete .card-img-wrapper img,
.kuechengeraete .card img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}



/* =========================================================
   FIX 2: Küchengeräte – Bilder NICHT croppen (Inline-Styles überschreiben)
   Zeigt das komplette Bild ("rauszoomen") innerhalb der Karten.
   ========================================================= */

/* Geräte-Karten: Link zeigt auf /kuechengeraete/... */
a.card[href^="/kuechengeraete/"] > img,
a.card[href^="/kuechengeraete/"] img {
    object-fit: contain !important;      /* überschreibt inline cover */
    object-position: center center !important;
    background: #fff;                   /* Letterboxing sauber */
}

/* Optional: einheitliche, etwas kompaktere Bildhöhe (überschreibt inline height) */
a.card[href^="/kuechengeraete/"] > img {
    height: 240px !important;           /* statt 280px – wirkt "rausgezoomt" */
    width: 100% !important;
    display: block;
}
