/* ==========================================
   RECIPE PAGE STYLES - ОПТИМИЗИРАНА ВЕРСИЯ
   ========================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8f9fa;
    color: #111827;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
}

/* ==========================================
   СТАБИЛИЗАЦИЯ СРЕЩУ CLS
   ========================================== */
.recipe-card { 
    background: #fff; 
    border-radius: 12px; 
    padding: 25px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    position: relative; 
    min-height: 380px;
    contain: layout style;
}

ins.adsbygoogle, 
.google-auto-placed {
    display: block !important;
    min-height: 280px !important;
    background: #f8f9fa;
    contain-intrinsic-size: auto 280px;
    content-visibility: auto;
    margin: 15px 0;
}

/* ==========================================
   ЗАГЛАВИЯ И НАВИГАЦИЯ
   ========================================== */
.recipe-title { 
    font-size: 2rem; 
    color: #111827; 
    margin-bottom: 15px; 
    font-weight: 700;
}

.breadcrumbs { 
    margin-bottom: 20px; 
    font-size: 0.9rem; 
    color: #374151; 
    min-height: 24px;
    line-height: 24px;
}

.breadcrumbs a { 
    color: #1e40af; /* Висок контраст */
    text-decoration: underline; 
    font-weight: 700;
    text-underline-offset: 2px;
}

.breadcrumbs a:hover { 
    color: #1e3a8a;
}

.breadcrumbs span {
    color: #111827;
    font-weight: 700;
}

/* ==========================================
   АВТОРСКИ БЛОК
   ========================================== */
.author-box { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    background: #f3f4f6; 
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
}

.author-avatar { 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    object-fit: cover; 
}

.author-info strong { 
    font-size: 1.1rem; 
    color: #111827;
}

.author-info p {
    color: #374151 !important;
    font-size: 0.85rem;
}

/* ==========================================
   МЕТА БАР
   ========================================== */
.meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 68px;
    align-items: center;
    box-sizing: border-box;
}

.meta-item {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    color: #374151;
    font-weight: 500;
}

.rating { 
    font-size: 1.2rem; 
    color: #d97706; 
}

.recipe-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: #f4f4f4;
    border-radius: 8px;
    margin: 20px 0;
}

/* ==========================================
   СЪДЪРЖАНИЕ И СЕКЦИИ
   ========================================== */
.content-box { 
    margin-bottom: 30px; 
    font-size: 1.05rem; 
    color: #111827; 
}

.section-title { 
    font-size: 1.4rem; 
    color: #b91c1c; /* По-тъмно червено за контраст */
    border-bottom: 2px solid #fecaca; 
    padding-bottom: 5px; 
    margin-bottom: 15px; 
    margin-top: 30px; 
    font-weight: 700;
}

/* ==========================================
   БУТОНИ ЗА СПОДЕЛЯНЕ - ВИСОК КОНТРАСТ
   ========================================== */
.share-box { 
    background: #f9fafb; 
    border: 1px solid #e5e7eb; 
    padding: 15px 18px; 
    border-radius: 8px; 
    margin-bottom: 25px; 
}

.share-title { 
    font-size: 1rem; 
    color: #111827; 
    font-weight: 700; 
    margin-bottom: 12px; 
}

.share-buttons { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}

.share-btn, 
.btn-like, 
.btn-print, 
.btn-report {
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 10px 16px; 
    border-radius: 6px; 
    color: #ffffff !important; 
    text-decoration: none; 
    font-size: 0.9rem; 
    font-weight: 700; 
    border: none; 
    cursor: pointer; 
    min-height: 44px;
}

/* Facebook - тъмно синьо */
.btn-facebook {
    background-color: #1157a8 !important;
    color: #ffffff !important;
}

/* Pinterest - тъмно червено */
.btn-pinterest { 
    background-color: #9b0717 !important; 
    color: #ffffff !important;
}

/* Instagram - тъмно розово */
.btn-instagram { 
    background: #9c1d4e !important; 
    color: #ffffff !important;
}

/* Email - тъмно сиво */
.btn-email { 
    background-color: #374151 !important; 
    color: #ffffff !important;
}

/* Copy - тъмно синьо */
.btn-copy { 
    background-color: #1e3a8a !important; 
    color: #ffffff !important;
}

/* Like - тъмно зелено */
.btn-like { 
    background-color: #14532d !important; 
    color: #ffffff !important;
}

.btn-like.liked { 
    background-color: #991b1b !important; 
}

/* Report - тъмно оранжево */
.btn-report { 
    background-color: #92400e !important; 
    color: #ffffff !important; 
}

/* Print - тъмно зелено */
.btn-print {
    background-color: #166534 !important;
    color: #ffffff !important;
}

/* ==========================================
   КАЛКУЛАТОР ЗА ПОРЦИИ
   ========================================== */
.servings-calculator { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    background: #fef3c7; 
    padding: 10px 15px; 
    border-radius: 8px; 
    margin-bottom: 15px; 
    font-weight: 700; 
    width: fit-content; 
    color: #111827;
}

.btn-serv { 
    background: #b91c1c; 
    color: #ffffff; 
    border: none; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    cursor: pointer; 
    font-size: 1.1rem; 
    font-weight: 700;
}

.btn-serv:hover {
    background: #991b1b;
}

/* ==========================================
   СЪСТАВКИ И СТЪПКИ
   ========================================== */
.ingredients-list { 
    list-style: none; 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 10px; 
}

.ingredients-list li { 
    background: #f9fafb; 
    padding: 12px; 
    border-left: 3px solid #b91c1c; 
    border-radius: 4px; 
    color: #111827;
}

.steps-list { 
    list-style: none;
}

.steps-list li { 
    margin-bottom: 20px; 
}

.step-label { 
    display: flex; 
    gap: 15px; 
    width: 100%; 
    cursor: pointer; 
    align-items: flex-start; 
}

.step-checkbox { 
    width: 20px; 
    height: 20px; 
    margin-top: 6px; 
    accent-color: #b91c1c; 
    cursor: pointer; 
    flex-shrink: 0; 
}

.step-number { 
    background: #b91c1c; 
    color: #ffffff; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 700; 
    flex-shrink: 0; 
}

.step-text { 
    background: #f9fafb; 
    padding: 12px 18px; 
    border-radius: 8px; 
    width: 100%; 
    color: #111827;
}

/* ==========================================
   ТАЙМЕР БУТОНИ - ВИСОК КОНТРАСТ
   ========================================== */
.timer-btn { 
    background: #b45309; /* Тъмно оранжево */
    color: #ffffff; 
    border: none; 
    padding: 6px 12px; 
    border-radius: 4px; 
    font-size: 0.85rem; 
    cursor: pointer; 
    margin-left: 8px; 
    font-weight: 700; 
    min-height: 36px;
}

.timer-btn:hover { 
    background: #92400e; 
}

/* ==========================================
   ХРАНИТЕЛНА СТОЙНОСТ
   ========================================== */
.nutrition-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; 
    background: #f0fdf4; 
    padding: 15px; 
    border-radius: 8px; 
    text-align: center; 
    margin-top: 15px; 
}

.nutrition-card { 
    background: #ffffff; 
    padding: 12px; 
    border-radius: 6px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    color: #111827;
}

.nutrition-card strong { 
    display: block; 
    font-size: 1.1rem; 
    color: #14532d; 
}

/* ==========================================
   ТЕГОВЕ И СВЪРЗАНИ РЕЦЕПТИ
   ========================================== */
.tags { 
    margin-top: 20px; 
}

.tag-chip { 
    display: inline-block; 
    background: #e5e7eb; 
    color: #111827; 
    padding: 6px 12px; 
    border-radius: 15px; 
    margin-right: 5px; 
    font-size: 0.85rem; 
    font-weight: 600; 
}

.related-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 15px; 
    margin-top: 15px; 
}

.related-card { 
    display: flex; 
    flex-direction: column; 
    background: #ffffff; 
    border-radius: 8px; 
    overflow: hidden; 
    border: 1px solid #e5e7eb; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    text-decoration: none; 
    color: #111827; 
    transition: transform 0.2s; 
}

.related-card img { 
    width: 100%; 
    height: 140px; 
    object-fit: cover; 
    display: block; 
    background-color: #e5e7eb; 
    aspect-ratio: 3/2;
}

.related-card .related-title { 
    padding: 12px; 
    font-size: 0.95rem; 
    font-weight: 700; 
    color: #111827; 
    line-height: 1.3; 
}

/* ==========================================
   FOOTER - МАКСИМАЛЕН КОНТРАСТ
   ========================================== */
.site-footer {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.site-footer h3,
.site-footer h4 {
    color: #ffffff !important;
}

.site-footer a {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
    text-underline-offset: 3px;
}

.site-footer a:hover {
    color: #ffd700 !important;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
}

.social-link {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* ==========================================
   COOKIE БАНЕР - ВИСОК КОНТРАСТ
   ========================================== */
.cookie-banner {
    background: #0f172a !important;
    color: #ffffff !important;
}

.cookie-banner a {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
}

.cookie-btn-primary {
    background: #b91c1c !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: 2px solid #ffffff !important;
}

/* ==========================================
   ФОКУС СТИЛОВЕ ЗА ДОСТЪПНОСТ
   ========================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #b91c1c;
    outline-offset: 2px;
}

/* ==========================================
   АНИМАЦИИ И ДОСТЪПНОСТ
   ========================================== */
@keyframes blink { 
    0%, 100% { opacity: 1; } 
    50% { opacity: 0.3; } 
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   ПЕЧАТ
   ========================================== */
@media print {
    body * { 
        visibility: hidden; 
    }
    .recipe-card, .recipe-card * { 
        visibility: visible; 
    }
    .recipe-card { 
        position: absolute; 
        left: 0; 
        top: 0; 
        width: 100%; 
        box-shadow: none; 
        padding: 0; 
        margin: 0; 
    }
    .no-print { 
        display: none !important; 
    }
}

/* ==========================================
   RESPONSIVE ДИЗАЙН
   ========================================== */
@media (max-width: 768px) {
    .recipe-title { 
        font-size: 1.6rem; 
    }
    
    .share-buttons { 
        display: grid; 
        grid-template-columns: 1fr 1fr; 
    }
    
    .nutrition-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 600px) {
    .recipe-card {
        padding: 20px;
    }
    
    .recipe-title { 
        font-size: 1.5rem; 
    }
    
    .share-buttons { 
        grid-template-columns: 1fr; 
    }
    
    .share-btn,
    .btn-like,
    .btn-print,
    .btn-report {
        width: 100%;
        justify-content: center;
    }
    
    .nutrition-grid { 
        grid-template-columns: 1fr; 
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Подобрена четимост */
p, a, label, input, textarea, button {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;         
}