/*
 * AnnaCuisine v7.0 - Premium Recipe Design
 * Enhanced recipe page styling with modern design
 */

/* === ROOT VARIABLES === */
:root {
    --primary: #E07C4F;
    --primary-dark: #C25B3F;
    --primary-light: #F5A87A;
    --accent: #2D6A4F;
    --accent-light: #40916C;
    --bg-primary: #FDF8F3;
    --bg-secondary: #FFF9F5;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #2D2A26;
    --text-secondary: #5C5450;
    --text-muted: #8A837D;
    --border-light: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --gap-sm: 0.5rem;
    --gap-md: 1rem;
    --gap-lg: 1.5rem;
    --gap-xl: 2rem;
    --font-primary: 'Outfit', sans-serif;
    --font-display: 'Playfair Display', serif;
}

[data-theme="dark"] {
    --primary: #FF8C5A;
    --accent: #40916C;
    --bg-primary: #1A1614;
    --bg-secondary: #231F1C;
    --bg-card: rgba(45, 41, 38, 0.95);
    --text-primary: #F5E6D8;
    --text-secondary: #C4B8AC;
    --border-light: rgba(255, 255, 255, 0.08);
}

/* === HEADER SECTION (Breadcrumb + Title above image) === */
.recipe-header {
    margin-bottom: var(--gap-lg);
    padding: var(--gap-lg) var(--gap-md);
    padding-left: 0;
    margin-left: calc(-1 * var(--gap-xl));
    /* Counteract wrapper padding to align with screen edge */
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--gap-md);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.breadcrumb span {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

.recipe-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

/* === HERO IMAGE === */
.recipe-hero {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 0;
}

.recipe-hero img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.recipe-hero-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

/* === FULL-WIDTH INFO BAR === */
.info-bar-wrapper {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    margin: 0 calc(-50vw + 50%) var(--gap-xl) calc(-50vw + 50%);
    padding: 0 calc(50vw - 50%);
    position: relative;
    z-index: 10;
}

.info-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gap-md);
    padding: var(--gap-lg) 0;
    max-width: 1400px;
    margin: 0 auto;
}

.info-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    color: #fff;
    min-width: 140px;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.info-bar-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.info-bar-item .icon {
    font-size: 1.3rem;
}

.info-bar-item .info-content {
    text-align: left;
}

.info-bar-item .label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-bar-item .value {
    font-size: 1rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .info-bar-wrapper {
        margin: 0 -20px var(--gap-lg) -20px;
        padding: 0 20px;
    }

    .info-bar-item {
        min-width: 120px;
        padding: 10px 16px;
    }
}

/* === UNIFIED CARD DESIGN === */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--gap-xl);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: var(--gap-md) var(--gap-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}

.card-header .icon {
    font-size: 1.4rem;
}

.card-body {
    padding: var(--gap-lg);
}

/* === INGREDIENTS === */
.ing-list {
    list-style: none;
}

.ing-item {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: var(--gap-md);
    margin-bottom: var(--gap-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.ing-item:hover {
    background: rgba(224, 124, 79, 0.1);
}

.ing-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.ing-item label {
    cursor: pointer;
    flex: 1;
    font-size: 0.95rem;
}

.ing-item input:checked+label {
    text-decoration: line-through;
    opacity: 0.5;
}

.group-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    margin: var(--gap-lg) 0 var(--gap-md);
    padding-bottom: var(--gap-sm);
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === STEPS === */
.steps-list {
    list-style: none;
    counter-reset: step;
}

.step-item {
    display: flex;
    gap: var(--gap-lg);
    padding: var(--gap-lg);
    margin-bottom: var(--gap-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.step-item:hover {
    background: rgba(224, 124, 79, 0.08);
}

.step-num {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.step-content {
    flex: 1;
}

.step-content p {
    margin: 0;
    line-height: 1.7;
}

.step-timer-btn {
    margin-top: var(--gap-md);
    padding: 8px 16px;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.step-timer-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* === NUTRITION CARDS - PREMIUM DESIGN === */
.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--gap-md);
}

.nutrition-item {
    background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    padding: var(--gap-lg);
    border-radius: var(--radius-md);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.3s;
}

.nutrition-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.nutrition-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.nutrition-item .icon {
    font-size: 2rem;
    margin-bottom: var(--gap-sm);
    display: block;
}

.nutrition-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.nutrition-item .value {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === SIDEBAR PREMIUM === */
.recipe-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--gap-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.sidebar-widget-header {
    padding: var(--gap-md) var(--gap-lg);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    border-bottom: 2px solid var(--primary);
}

.sidebar-widget-body {
    padding: var(--gap-lg);
}

/* === SOCIAL MEDIA CARDS === */
.social-cards {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.social-card {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--gap-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.social-card:hover {
    transform: translateX(5px);
}

.social-card .social-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.social-card .social-info {
    flex: 1;
}

.social-card .social-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.social-card .social-handle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.social-card.facebook {
    background: rgba(24, 119, 242, 0.08);
}

.social-card.facebook:hover {
    border-color: #1877F2;
}

.social-card.facebook .social-icon {
    background: linear-gradient(135deg, #1877F2, #0d65d9);
}

.social-card.instagram {
    background: rgba(225, 48, 108, 0.08);
}

.social-card.instagram:hover {
    border-color: #E1306C;
}

.social-card.instagram .social-icon {
    background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
}

.social-card.pinterest {
    background: rgba(230, 0, 35, 0.08);
}

.social-card.pinterest:hover {
    border-color: #E60023;
}

.social-card.pinterest .social-icon {
    background: linear-gradient(135deg, #E60023, #bd081c);
}

/* === NAVIGATION WIDGET === */
.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: var(--gap-sm);
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: var(--gap-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-links a:hover {
    background: rgba(224, 124, 79, 0.1);
    border-left-color: var(--primary);
    transform: translateX(5px);
}

.nav-links a .nav-icon {
    font-size: 1.2rem;
}

/* === RATING WIDGET === */
.rating-widget .stars {
    display: flex;
    gap: 6px;
    margin-bottom: var(--gap-md);
    justify-content: center;
}

.rating-widget .star {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-widget .star.active,
.rating-widget .star:hover {
    color: #FFB800;
    transform: scale(1.1);
}

.rating-widget .rating-count {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    padding: var(--gap-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.rating-breakdown {
    margin-top: var(--gap-lg);
}

.rb-row {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.rb-label {
    width: 35px;
    font-weight: 600;
}

.rb-bar {
    flex: 1;
    height: 10px;
    background: var(--bg-secondary);
    border-radius: 5px;
    overflow: hidden;
}

.rb-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFB800, #FF9500);
    border-radius: 5px;
    transition: width 0.3s;
}

.rb-n {
    width: 25px;
    text-align: right;
    color: var(--text-muted);
}

/* === SUGGESTED RECIPES === */
.suggested-recipe {
    display: flex;
    gap: var(--gap-md);
    padding: var(--gap-md);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    text-decoration: none;
    margin-bottom: var(--gap-sm);
    border: 1px solid transparent;
}

.suggested-recipe:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    transform: translateX(5px);
}

.suggested-recipe img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.suggested-recipe-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.suggested-recipe-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.suggested-recipe-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === OTHER SECTIONS === */
.section {
    margin-bottom: var(--gap-xl);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-bottom: var(--gap-xl);
    box-shadow: var(--shadow-md);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.faq-item {
    background: var(--bg-secondary);
    padding: var(--gap-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--gap-md);
}

.faq-q {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--gap-sm);
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}

.faq-a {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === ACTION BUTTONS === */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-xl);
}

.btn {
    padding: 12px 20px;
    border: 2px solid var(--border-light);
    background: var(--bg-card);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-color: transparent;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(224, 124, 79, 0.4);
    color: #fff;
}

/* === TAGS === */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-xl);
}

.tag {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* === PRINT === */
@media print {
    .no-print {
        display: none !important;
    }

    .recipe-layout {
        grid-template-columns: 1fr !important;
    }

    .card:hover,
    .nutrition-item:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
}