/* ==================== CLS ПРЕДОТВРАТЯВАНЕ ==================== */
html body .container {
    max-width: 1280px;
    margin: 25px auto;
    padding: 0 20px;
}

ins.adsbygoogle,
.google-auto-placed {
    min-height: 280px;
    max-height: 280px;
    height: 280px;
    display: block;
    background: #f8f9fa;
    contain-intrinsic-size: 280px;
    content-visibility: auto;
    overflow: hidden;
}

/* ==================== БАЗОВИ СТИЛОВЕ ==================== */
.hero-banner { 
    background: linear-gradient(135deg, #1d3557 0%, #457b9d 100%); 
    color: #fff; 
    padding: 35px 20px; 
    border-radius: 18px; 
    margin-bottom: 25px; 
    box-shadow: 0 10px 25px rgba(29,53,87,0.15); 
    text-align: center; 
    min-height: 200px;
}

.hero-title { 
    font-size: 2rem; 
    font-weight: 800; 
    margin-bottom: 15px; 
}

.search-box { 
    max-width: 650px; 
    margin: 0 auto 15px; 
    display: flex; 
    gap: 8px; 
    background: #fff; 
    padding: 6px; 
    border-radius: 30px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.12); 
}

.search-box input { 
    flex: 1; 
    border: none; 
    outline: none; 
    padding: 10px 18px; 
    font-size: 0.95rem; 
    border-radius: 25px; 
    min-width: 0; 
}

.search-box button { 
    background: #c1121f; 
    color: #fff; 
    border: none; 
    padding: 10px 22px; 
    border-radius: 25px; 
    font-weight: 700; 
    cursor: pointer; 
    white-space: nowrap; 
}

.quick-filters { 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    flex-wrap: wrap; 
}

.filter-btn { 
    background: rgba(255,255,255,0.15); 
    color: #fff; 
    text-decoration: none; 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    backdrop-filter: blur(5px); 
    border: 1px solid rgba(255,255,255,0.2); 
}

.filter-btn:hover { 
    background: #fff; 
    color: #1d3557; 
}

/* ==================== FRIDGE SECTION ==================== */
.fridge-section { 
    background: #fff; 
    border: 2px dashed #a8ded6; 
    border-radius: 16px; 
    padding: 20px; 
    margin-bottom: 30px; 
    text-align: center; 
}

.fridge-title { 
    font-size: 1.2rem; 
    color: #1d3557; 
    font-weight: 700; 
}

.fridge-inputs { 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    max-width: 650px; 
    margin: 12px auto 0; 
    flex-wrap: wrap; 
}

.fridge-inputs input { 
    flex: 1; 
    min-width: 220px; 
    padding: 10px 14px; 
    border: 1px solid #cbd5e1; 
    border-radius: 10px; 
}

/* ==================== SECTION HEADERS ==================== */
.section-header { 
    font-size: 1.25rem; 
    font-weight: 800; 
    color: #1d3557; 
    margin-bottom: 15px; 
    border-bottom: 2px solid #e2e8f0; 
    padding-bottom: 8px; 
}

/* ==================== RECIPE GRID ==================== */
.recipe-grid-4 { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.recipe-card { 
    background: #fff; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    transition: transform 0.2s; 
    display: flex; 
    flex-direction: column; 
    min-height: 350px;
    contain: layout style;
}

.recipe-card:hover { 
    transform: translateY(-3px); 
}

.card-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.card-details { 
    padding: 14px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

.card-title-link { 
    font-size: 1rem; 
    font-weight: 700; 
    color: #1d3557; 
    text-decoration: none; 
    line-height: 1.3; 
    margin-bottom: 8px; 
    display: block; 
}

.card-title-link:hover { 
    color: #e63946; 
}

.card-author { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.8rem; 
    color: #64748b; 
    margin-bottom: 10px; 
}

.avatar { 
    width: 22px; 
    height: 22px; 
    border-radius: 50%; 
    object-fit: cover; 
    aspect-ratio: 1/1;
}

.card-meta-details { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    font-size: 0.8rem; 
    color: #475569; 
    background: #f8fafc; 
    padding: 8px 10px; 
    border-radius: 8px; 
    margin-top: 8px; 
}

.card-meta-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.btn-view-recipe { 
    display: block; 
    text-align: center; 
    background: #b71c1c; 
    color: #fff !important; 
    text-decoration: none; 
    padding: 9px; 
    border-radius: 8px; 
    font-weight: 700; 
    font-size: 0.88rem; 
    margin-top: 12px; 
    transition: background 0.2s; 
}

.btn-view-recipe:hover { 
    background: #8e0000; 
}

.btn-fridge-find { 
    display: block; 
    text-align: center; 
    background: #1b7a6e; 
    color: #fff; 
    text-decoration: none; 
    padding: 10px 20px; 
    border-radius: 8px; 
    font-weight: 700; 
    border: none; 
    cursor: pointer; 
    width: auto; 
    font-size: 0.9rem; 
}

/* ==================== ALERTS ==================== */
.alert { 
    padding: 10px; 
    border-radius: 8px; 
    font-size: 0.85rem; 
    margin-bottom: 12px; 
}

.alert-success { 
    background: #d1fae5; 
    color: #065f46; 
}

.alert-error { 
    background: #fee2e2; 
    color: #991b1b; 
}

/* ==================== БУТОНИ ==================== */
.search-box button, .btn-fridge-find {
    color: #fff;
    background-color: #c1121f;
}

/* ==================== FOOTER ==================== */
.site-footer {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.site-footer a {
    color: #93c5fd !important;
    text-decoration: underline !important;
}

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

.social-link {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #475569;
}

/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.cookie-btn-primary {
    background-color: #b91c1c !important;
    color: #ffffff !important;
    font-weight: bold !important;
}

#cookieConsentBanner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    min-height: 80px;
    z-index: 99999;
}

ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

.social-login svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-social {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==================== MOBILE ==================== */
@media (max-width: 600px) {
    html body .container {
        min-height: 400px;
    }
    
    .recipe-card {
        min-height: 300px;
    }
    
    .ad-slot {
        min-height: 100px;
    }
    
    .hero-banner {
        min-height: 180px;
    }
    
    ins.adsbygoogle,
    .google-auto-placed {
        min-height: 100px;
        max-height: 100px;
        height: 100px;
    }
}

@media (min-width: 601px) {
    html body .container,
    html body .container[style] {
        min-height: 500px !important;
        height: auto !important;
    }
}


.search-section, 
.categories-scroll,
.hero-section {
    min-height: 180px; 
    contain: layout;  
}

.btn-add-recipe {
    color: #111111 !important; 
}