:root {
    /* Color Palette */
    --primary-bg: #ffffff;
    --secondary-bg: #f8fafc;
    --text-main: #0f172a;
    --text-sub: #64748b;
    --accent-tech: #0ea5e9;
    --accent-food: #f59e0b;
    --accent-nature: #10b981;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --border-color: #e2e8f0;
    
    /* Spacing */
    --section-padding: 100px 5%;
    --container-width: 1200px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    width: 100%;
}




@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 5%;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent-tech);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-sub);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

/* Search Box */
.search-container {
    position: relative;
    width: 300px;
    margin: 0 2rem;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1.2rem 0.6rem 2.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: #f1f5f9;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-tech);
    background: white;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-sub);
    font-size: 0.8rem;
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    display: none;
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

.search-result-item:hover {
    background: #f8fafc;
    transform: translateX(5px);
}

.result-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.result-info h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.result-info p {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-sub);
    font-style: italic;
}

@media (max-width: 768px) {
    .search-container { display: none; } /* Hide on mobile for simplicity */
}


/* Latest Content Section */
.latest-section {
    padding: 140px 5% 80px;
}


/* Ad Slots */
.ad-slot {
    display: none !important; /* Hidden until ads are ready */
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 1.5rem 0;
    overflow: hidden;
    width: 100%;
}


.ad-slot::before {
    content: 'ADVERTISEMENT';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-sub);
    letter-spacing: 1.5px;
}

.ad-leaderboard {
    width: 100%;
    height: 90px;
    max-width: 728px;
    margin: 0 auto 2rem; /* Removed top margin */
}


.ad-card {
    grid-column: span 1;
    height: 250px;
}

.ad-content {
    color: var(--text-sub);
    font-size: 0.8rem;
    text-align: center;
    font-family: monospace;
}

/* Recipe Card Styles */
.recipe-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.recipe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.recipe-img {
    width: 100%;
    height: 160px; /* Reduced Size */
    object-fit: cover;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-bottom: 0.5rem;
}

.recipe-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.recipe-desc {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.5;
}

/* Placeholder Grids */
.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.placeholder-card {
    height: 250px;
    background-color: var(--secondary-bg);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.placeholder-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-tech);
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--accent-tech);
    display: inline-block;
    padding-bottom: 5px;
}

.ad-skyscraper {
    width: 300px;
    height: 850px; /* Increased Height for better coverage */
}

.ad-rectangle {
    width: 300px;
    height: 250px;
}




/* Recipe Detail Page */
.recipe-detail {
    padding: 120px 5% 80px;
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 3rem;
}

.recipe-header-text {
    flex: 1;
}


.recipe-hero-container {
    display: flex;
    gap: 3rem;
    align-items: stretch;
    margin-bottom: 3rem;
}

.recipe-hero-img {
    flex: 1;
    max-width: 800px;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
}

.recipe-hero-note {
    width: 350px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.note-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-text {
    font-size: 0.95rem;
    color: #b45309;
    line-height: 1.5;
}

@media (max-width: 991px) {
    .recipe-hero-container { flex-direction: column; }
    .recipe-hero-note { width: 100%; }
}


.recipe-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
}

.recipe-sidebar {
    display: flex;
    flex-direction: column;
}

.sticky-sidebar-container {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 10;
}

.recipe-info-card {
    background: var(--secondary-bg);
    padding: 2rem;
    border-radius: 24px;
}


.recipe-info-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.ingredients-list {
    list-style: none;
    margin-top: 1.5rem;
}

.ingredients-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions-list {
    margin-top: 1.5rem;
    counter-reset: steps;
    list-style: none;
}

.instructions-list li {
    margin-bottom: 2rem;
    position: relative;
    padding-left: 3rem;
}

.instructions-list li::before {
    counter-increment: steps;
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--accent-food);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

footer {
    background-color: var(--secondary-bg);
    padding: 4rem 5%;
    border-top: 1px solid var(--border-color);
}

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

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-sub);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 991px) {
    .recipe-grid { grid-template-columns: 1fr; }
    .recipe-info-card { position: static; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.8rem; }
    .footer-content { flex-direction: column; gap: 2rem; text-align: center; }
}

/* Persistent Sticky Ad */
.sticky-ad {
    position: sticky;
    top: 100px;
    z-index: 100;
}
