/* ============================================================================
   The Savory Skillet — Single Recipe Template Stylesheet
   ============================================================================ */

/* ── 1. Above The Fold Layout ────────────────────────────────────────────── */
.breadcrumb-nav {
    margin-bottom: 20px;
}

.breadcrumbs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-family: var(--font-accent);
    font-size: 0.85rem;
    font-weight: 600;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
}
.breadcrumbs a:hover {
    color: var(--accent-primary);
}

.breadcrumbs li.active {
    color: var(--text-primary);
    font-weight: 700;
}

.recipe-main-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 15px;
}

.recipe-byline-bar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .recipe-byline-bar {
        flex-direction: row;
        align-items: center;
    }
}

.author-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-by {
    font-family: var(--font-accent);
    font-size: 0.95rem;
}

.last-updated {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.byline-ratings {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars-gold {
    color: var(--accent-gold);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.rating-text {
    font-family: var(--font-accent);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.recipe-teaser-intro {
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-style: italic;
    margin-bottom: 25px;
}

.recipe-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
}

.recipe-hero-image-block {
    margin-bottom: 40px;
}

.recipe-hero-main-img {
    width: 100%;
    border-radius: var(--border-radius-md);
    aspect-ratio: 16/10;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.image-caption {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
}

/* ── 2. Editorial Multi-Column Layout ────────────────────────────────────── */
.recipe-editorial-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

@media (min-width: 1024px) {
    .recipe-editorial-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.recipe-rich-body-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.recipe-rich-body-content ul, .recipe-rich-body-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.recipe-rich-body-content li {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

/* Step directions list */
.recipe-narrative-instructions {
    margin-top: 40px;
}

.step-directions-list {
    list-style: none;
    padding: 0 !important;
}

.step-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.step-heading {
    font-family: var(--font-accent);
    font-weight: 800;
    color: var(--accent-primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.step-text {
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

/* Sidebar Widgets */
.recipe-sidebar-widgets {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-family: var(--font-accent);
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.sidebar-author-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px auto;
    display: block;
    border: 3px solid var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.sidebar-author-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

.widget-link {
    display: block;
    text-align: center;
    font-family: var(--font-accent);
    font-weight: 700;
    margin-top: 15px;
}

.trust-checklists {
    list-style: none;
}

.trust-checklists li {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ── 3. High-End Recipe Card Component ───────────────────────────────────── */
.recipe-card-box {
    background-color: var(--card-bg);
    border: 2px solid var(--text-primary);
    border-radius: var(--border-radius-md);
    padding: 30px;
    margin: 50px 0;
    box-shadow: var(--shadow-md);
}

.card-header {
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 25px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

@media (min-width: 768px) {
    .card-header {
        flex-direction: row;
        align-items: center;
    }
}

.card-header-tag {
    font-family: var(--font-accent);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 5px;
}

.card-quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.stat-box {
    font-family: var(--font-accent);
    font-size: 0.85rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
}

/* Servings & System Controls Wrapper */
.card-controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    width: 100%;
}

@media (min-width: 768px) {
    .card-controls-wrapper {
        justify-content: flex-end;
        width: auto;
    }
}

/* Servings controls */
.card-serving-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Unit system controls */
.card-unit-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-unit-controls .control-label {
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.unit-toggle-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.unit-toggle-btn {
    padding: 8px 12px;
    font-family: var(--font-accent);
    font-size: 0.8rem;
    font-weight: 700;
    background-color: var(--bg-primary);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.unit-toggle-btn.active {
    background-color: var(--accent-primary);
    color: #FFFFFF;
}

.unit-toggle-btn:not(.active):hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.card-serving-controls label {
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.9rem;
}

.servings-input-wrapper {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.servings-input-wrapper button {
    width: 36px;
    height: 36px;
    background-color: var(--bg-primary);
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.servings-input-wrapper button:active {
    transform: scale(0.85);
}

.servings-input-wrapper input {
    width: 44px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-family: var(--font-accent);
    font-weight: 800;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text-primary);
}

.card-body-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .card-body-wrapper {
        grid-template-columns: 45% 55%;
    }
}

/* Checklist items list */
.ingredients-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ingredient-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.ingredients-checklist-ul {
    list-style: none;
}

.ingredient-row {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-primary);
}

.ingredient-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
}

.ingredient-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    top: 2px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ingredient-checkbox:checked ~ .checkbox-custom {
    background-color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.checkbox-custom::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ingredient-checkbox:checked ~ .checkbox-custom::after {
    display: block;
}

.ingredient-checkbox:checked ~ .ingredient-name,
.ingredient-checkbox:checked ~ .ingredient-quantity,
.ingredient-checkbox:checked ~ .ingredient-unit {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.55;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ingredient-name, .ingredient-quantity, .ingredient-unit {
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ingredient-quantity, .ingredient-unit {
    font-weight: 700;
    color: var(--accent-primary);
}

.card-instructions-steps {
    list-style: none;
    padding: 0;
}

.card-instructions-steps li {
    margin-bottom: 18px;
    position: relative;
}

/* Macro Nutrition grid */
.recipe-nutrition-table-block {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px dashed var(--border-color);
}

.nutrition-grid-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .nutrition-grid-pills {
        grid-template-columns: repeat(7, 1fr);
    }
}

.nutrition-pill {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    font-size: 0.8rem;
    font-family: var(--font-accent);
}

.nutrition-pill strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nutrition-pill span {
    font-weight: 800;
    color: var(--text-primary);
}

.nutrition-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 15px;
    font-style: italic;
}

/* ── 4. Dynamic Sticky Jump Bar ───────────────────────────────────────────── */
.sticky-recipe-nav {
    position: fixed;
    top: -80px; /* Hidden initially */
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--accent-primary);
    box-shadow: var(--shadow-md);
    z-index: 999;
    padding: 10px 20px;
    transition: top 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sticky-recipe-nav.visible {
    top: 75px; /* Sits exactly below the main header bar */
}

.sticky-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.sticky-bar-actions {
    display: flex;
    gap: 10px;
}

/* ── 5. Comments & Star Ratings Review Feed ─────────────────────────────── */
.recipe-reviews-section {
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    padding-top: 50px;
}

.reviews-summary-row {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .reviews-summary-row {
        flex-direction: row;
    }
}

.average-rating-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .average-rating-panel {
        align-items: flex-start;
        text-align: left;
    }
}

.average-number {
    font-size: 3rem;
    font-weight: 900;
    font-family: var(--font-accent);
    color: var(--text-primary);
    line-height: 1;
}

.stars-gold-big {
    color: var(--accent-gold);
    font-size: 1.6rem;
    margin: 5px 0;
}

.reviews-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.comment-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.commenter-name {
    font-family: var(--font-accent);
    font-size: 1.05rem;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-rating-stars {
    color: var(--accent-gold);
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-body p {
    font-size: 1rem;
    margin: 0;
}

.comment-submission-form-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 30px;
    margin-top: 40px;
    box-shadow: var(--shadow-sm);
}

.comment-submission-form-box h3 {
    margin-bottom: 10px;
}

.comment-submission-form-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.form-rating-selector-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.form-rating-selector-row label {
    font-family: var(--font-accent);
    font-weight: 700;
}

/* CSS Stars Selector implementation */
.stars-rating-selector {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.stars-rating-selector input {
    display: none;
}

.stars-rating-selector label {
    font-size: 1.8rem;
    color: var(--border-color);
    cursor: pointer;
    transition: color 0.1s ease;
}

.stars-rating-selector label:hover,
.stars-rating-selector label:hover ~ label,
.stars-rating-selector input:checked ~ label {
    color: var(--accent-gold);
}

.form-grid-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .form-grid-inputs {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.9rem;
}

.form-group input, .form-group textarea {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-primary);
}

.comment-alert {
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-accent);
    font-weight: 700;
    margin-bottom: 20px;
}
.comment-alert.success {
    background-color: rgba(74, 124, 89, 0.1);
    color: var(--accent-secondary);
    border: 1px solid var(--accent-secondary);
}
.comment-alert.error {
    background-color: rgba(200, 96, 42, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

/* ── 4. Helpful Content & E-E-A-T Blocks ───────────────────────────────────── */
.helpful-content-block {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 40px 0;
}

.culinary-science-card {
    background: linear-gradient(135deg, rgba(74, 124, 89, 0.04), rgba(74, 124, 89, 0.08));
    border-left: 4px solid var(--accent-secondary);
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.culinary-science-card:hover {
    transform: translateY(-2px);
}

.culinary-science-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-secondary);
    font-size: 1.2rem;
    margin-bottom: 12px;
    border: none !important;
    padding-bottom: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.test-kitchen-logs {
    background: linear-gradient(135deg, rgba(200, 96, 42, 0.04), rgba(200, 96, 42, 0.08));
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.test-kitchen-logs:hover {
    transform: translateY(-2px);
}

.test-kitchen-logs h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 12px;
    border: none !important;
    padding-bottom: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.test-kitchen-logs ul {
    list-style: none;
    padding-left: 0 !important;
}

.test-kitchen-logs li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 1rem !important;
}

.test-kitchen-logs li::before {
    content: "•";
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.equipment-checklist, .pitfalls-playbook {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.equipment-checklist h3, .pitfalls-playbook h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    margin-bottom: 15px;
    border: none !important;
    padding-bottom: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.equipment-checklist ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding-left: 0 !important;
    list-style: none;
}

@media (min-width: 600px) {
    .equipment-checklist ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

.equipment-checklist li {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.95rem !important;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-accent);
    font-weight: 700;
}

.equipment-checklist li::before {
    content: "✓";
    color: var(--accent-secondary);
    font-weight: bold;
}

.pitfalls-playbook p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.pitfalls-playbook p strong {
    color: var(--accent-primary);
}

/* ── 5. Responsive step-by-step images ────────────────────────────────────────── */
.step-img-wrapper {
    margin-top: 15px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 100%;
}

.step-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    max-height: 450px;
    transition: transform 0.3s ease;
}

.step-img-wrapper img:hover {
    transform: scale(1.02);
}

