/* --------------------------------------
   DESIGN SYSTEM FOR PREMIUM AESTHETIC
--------------------------------------- */
:root {
    /* Color Palette */
    --clr-background: #FDFBF7; /* Very light cream */
    --clr-surface: #FFFFFF;
    --clr-primary: #E07A5F; /* Deep Terracotta */
    --clr-primary-hover: #CC654A;
    --clr-secondary: #81B29A; /* Soft Sage Green */
    --clr-accent: #F2CC8F; /* Warm Yellow */
    --clr-text-main: #3D405B; /* Dark Navy for text */
    --clr-text-light: #7A7C93;
    --clr-border: #E8E5DF;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Lora', serif;

    /* Styling Data */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px rgba(61, 64, 91, 0.05);
    --shadow-md: 0 10px 20px rgba(61, 64, 91, 0.08);
    --shadow-hover: 0 20px 40px rgba(61, 64, 91, 0.12);
    
    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--clr-text-main);
    background-color: var(--clr-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--clr-text-main);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --------------------------------------
   NAVIGATION
--------------------------------------- */
.navbar {
    background-color: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--clr-text-main);
}

.logo i {
    color: var(--clr-primary);
    font-size: 1.8rem;
}

.logo-highlight {
    color: var(--clr-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.nav-links a:not(.btn-primary-small):hover {
    color: var(--clr-primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --------------------------------------
   BUTTONS
--------------------------------------- */
.btn-primary, .btn-primary-small, .btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-slow);
    border: none;
}

.btn-primary {
    background-color: var(--clr-primary);
    color: white;
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn-primary-small {
    background-color: var(--clr-primary);
    color: white;
    padding: 8px 16px;
}

.btn-primary:hover, .btn-primary-small:hover {
    background-color: var(--clr-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* --------------------------------------
   FORMS & ALERTS
--------------------------------------- */
.flash-alert {
    background-color: var(--clr-accent);
    color: var(--clr-text-main);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    font-family: var(--font-heading);
    text-align: center;
}

/* --------------------------------------
   FOOTER
--------------------------------------- */
.footer {
    background-color: var(--clr-text-main);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand .logo-text, .footer-brand .logo i {
    color: white;
}
.footer-brand .logo-highlight {
    color: var(--clr-primary);
}

.footer p {
    color: #A0A2B5;
    margin-top: 1rem;
}

.footer-links h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    color: #A0A2B5;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.footer-links a:hover {
    color: var(--clr-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #A0A2B5;
    font-size: 0.9rem;
}

/* --------------------------------------
   RESPONSIVE
--------------------------------------- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .footer-content { grid-template-columns: 1fr; }
}

/* --------------------------------------
   UTILITIES
--------------------------------------- */
.section-padding { padding: 4rem 0; }
.text-center { text-align: center; }
.text-primary { color: var(--clr-primary); }
.mt-4 { margin-top: 1.5rem; }
.small-caps {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-secondary);
}

.section-header {
    margin-bottom: 2.5rem;
}
.section-header h2 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--clr-text-light); font-size: 1.1rem; }

/* --------------------------------------
   HERO SECTION
--------------------------------------- */
.hero-section {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.featured-image {
    background-size: cover;
    background-position: center;
    min-height: 400px;
}

.featured-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-badge {
    display: inline-block;
    background: var(--clr-accent);
    color: var(--clr-text-main);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    align-self: flex-start;
}

.featured-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.featured-content p {
    color: var(--clr-text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.recipe-meta {
    display: flex;
    gap: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--clr-text-light);
    margin-bottom: 2rem;
}

.hero-fallback {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.hero-fallback h1 { font-size: 3.5rem; margin-bottom: 1rem; }

/* --------------------------------------
   RECIPE GRID & CARDS
--------------------------------------- */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background: var(--clr-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.recipe-card-img {
    height: 220px;
    background-size: cover;
    background-position: center;
}

.recipe-card-content {
    padding: 1.5rem;
}

.recipe-card-content h3 {
    font-size: 1.4rem;
    margin: 0.5rem 0 1rem;
}

.recipe-meta-small {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--clr-text-light);
}

/* --------------------------------------
   CATEGORIES GRID
--------------------------------------- */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.category-pill {
    background: var(--clr-surface);
    border: 2px solid var(--clr-border);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.category-pill:hover {
    border-color: var(--clr-primary);
    background: var(--clr-primary);
    color: white;
}

@media (max-width: 900px) {
    .featured-card { grid-template-columns: 1fr; }
    .featured-image { min-height: 300px; }
    .featured-content { padding: 2rem; }
}

/* --------------------------------------
   ARTICLE & NEW RECIPE CARD
--------------------------------------- */
.article-content {
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.8;
}


.article-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}

.article-main-image {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

.rich-text {
    margin-bottom: 4rem;
}
.rich-text h2, .rich-text h3 { margin-top: 2rem; margin-bottom: 1rem; }
.rich-text p { margin-bottom: 1.5rem; }

/* The Advanced Recipe Card */
.recipe-card-container {
    background-color: var(--clr-surface); /* Clean white background */
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-body);
    color: var(--clr-text-main);
    margin: 2rem 0; /* Reset margins */
}


.rc-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2F413B;
}
.rc-header p {
    font-size: 1.1rem;
    color: #556B64;
    margin-bottom: 2rem;
}

/* Meta Grid */
.rc-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.rc-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.rc-meta-item i { font-size: 1.5rem; color: var(--clr-primary); }
.rc-meta-item strong { font-family: var(--font-heading); font-size: 0.95rem; text-transform: uppercase; color: var(--clr-primary); }
.rc-meta-item span { font-size: 0.95rem; }

/* Details List */
.rc-details-list {
    margin-bottom: 3rem;
}
.rc-details-list ul {
    list-style: none;
    font-size: 1.05rem;
}
.rc-details-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.rc-details-list i { width: 20px; color: var(--clr-primary); text-align: center; }
.rc-details-list strong { font-family: var(--font-heading); color: var(--clr-text-main); }
.rc-details-list .text-primary { color: var(--clr-primary-hover); font-weight: bold; }

/* Ingredients */
.rc-section {
    margin-bottom: 3rem;
}
.rc-section h3 {
    font-size: 2rem;
    color: var(--clr-text-main);
    border-bottom: 2px solid var(--clr-border);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.rc-ingredients {
    list-style: none;
}
.rc-ingredients li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--clr-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 3D Square pill matching design */
.rc-pill {
    background-color: var(--clr-primary); /* Terracotta */
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1rem;
    box-shadow: -4px 4px 0px 0px rgba(224, 122, 95, 0.3); /* Terracotta shadow */
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.rc-item-text {
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

/* Completed (Strikethrough) State */
.rc-ingredients li.completed .rc-pill,
.rc-step.completed .rc-step-badge {
    box-shadow: 0px 0px 0px 0px rgba(224, 122, 95, 0); /* Flatten shadow */
    transform: translate(-4px, 4px); /* Move down to shadow position */
    background-color: #E2AD9F; /* Faded Terracotta */
}

.rc-ingredients li.completed .rc-item-text,
.rc-step.completed .rc-item-text {
    text-decoration: line-through;
    color: var(--clr-text-light); /* Dim text color */
}

/* Instructions */
.rc-step {
    margin-bottom: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.rc-step-badge {
    display: inline-block;
    background-color: var(--clr-primary);
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 1rem;
    box-shadow: -4px 4px 0px 0px rgba(224, 122, 95, 0.3);
    transition: all 0.2s ease;
}
.rc-step p {
    font-size: 1.1rem;
    line-height: 1.8;
    transition: all 0.2s ease;
}

/* Notes */
.rc-notes {
    list-style: none;
}
.rc-notes li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 1.5rem;
}
.rc-circle {
    background-color: var(--clr-secondary);
    color: white;
    font-family: var(--font-heading);
    font-weight: bold;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 0.9rem;
}

/* Tools */
.rc-tools {
    padding-left: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .recipe-card-container { padding: 1.5rem; }
    .rc-meta-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* --------------------------------------
   SIDEBAR & WIDGETS
--------------------------------------- */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 50px;
    align-items: start;
}

.layout-full-width {
    width: 100%;
}

.layout-full-width .main-column {
    width: 100%;
}

@media (max-width: 900px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }
}


.author-sidebar-card {
    background-color: #f9f8f6; 
    border: 1px dashed #000; 
    border-radius: 20px;
    margin-top: 80px; 
    padding: 20px 25px 40px;
    text-align: center;
    position: relative;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.03);
}

.author-card-img-wrapper {
    position: absolute;
    top: -75px; 
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1px dashed #000;
    padding: 6px;
    background: #fff;
}

.author-card-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.author-card-body {
    margin-top: 85px; 
}

.author-card-body h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 25px;
    color: #000;
}

.author-card-bio p {
    font-family: 'Georgia', serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: #111;
    margin-bottom: 30px;
    padding: 0 10px;
}

.author-card-bio h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: #000;
}

.author-socials {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.author-socials a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.15rem;
    transition: background 0.2s ease;
}

.author-socials a:hover {
    background-color: var(--clr-primary);
}

.widget-title {
    background-color: #f9f8f6; 
    border: 1px dashed #000;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 25px;
}

.might-like-item {
    display: flex;
    align-items: center;
    background-color: #f9f8f6;
    border-radius: 12px;
    margin-bottom: 18px;
    text-decoration: none;
    color: inherit;
    border: 1px dashed #000;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.might-like-item:hover {
    transform: translateY(-3px);
    box-shadow: 3px 6px 15px rgba(0,0,0,0.1);
}

.might-like-img {
    width: 110px;
    height: 110px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border-right: 1px dashed #888;
}

.might-like-info {
    padding: 15px 20px;
    flex-grow: 1;
}

.might-like-info h4 {
    margin: 0;
    font-size: 1.15rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: #000;
    line-height: 1.4;
}
