/*
Theme Name: Otyawan Theme
Theme URI: https://github.com/otyawan/otyawan-theme
Author: Antigravity AI
Author URI: https://github.com/otyawan
Description: A premium, modern, automated WordPress theme for daily AI-generated recipes. Featuring elegant warm typography, glassmorphism, responsive grids, and micro-animations.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: otyawan-theme
*/

/* --- Design Tokens & CSS Variables --- */
:root {
    --bg-primary: #FDFBF7;
    --bg-secondary: #FFFFFF;
    --text-primary: #2D2621;
    --text-secondary: #6E6259;
    --accent-primary: #E76F51;
    --accent-hover: #D75A3C;
    --accent-bg: #F4EAE1;
    --border-color: #EFE9E2;
    --shadow-sm: 0 2px 4px rgba(45, 38, 33, 0.04);
    --shadow-md: 0 8px 20px rgba(45, 38, 33, 0.08);
    --shadow-lg: 0 16px 36px rgba(45, 38, 33, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base & Reset Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* --- Header Section --- */
.site-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.site-logo a span {
    color: var(--accent-primary);
}

.site-navigation ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.site-navigation a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
}

.site-navigation a:hover,
.site-navigation .current-menu-item a {
    color: var(--accent-primary);
}

/* --- Hero/Featured Recipe Section --- */
.featured-recipe {
    padding: 60px 0 40px;
}

.featured-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.featured-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    background-color: var(--accent-primary);
    color: #FFF;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-content {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recipe-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-title {
    font-family: var(--font-heading);
    font-size: 36px;
    line-height: 1.25;
    margin-bottom: 16px;
}

.featured-title a {
    color: var(--text-primary);
}

.featured-title a:hover {
    color: var(--accent-primary);
}

.recipe-excerpt {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 16px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-primary);
    color: #FFF;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(231, 111, 81, 0.2);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: #FFF;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(231, 111, 81, 0.3);
}

/* --- Recipe Grid (Past Recipes) --- */
.recipe-grid-section {
    padding: 40px 0 80px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 28px;
    margin-bottom: 32px;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-primary);
    border-radius: 2px;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.recipe-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.card-image-wrapper {
    position: relative;
    padding-top: 60%; /* 5:3 Aspect Ratio */
    background-color: #EEE;
    overflow: hidden;
}

.card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.recipe-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 20px;
    line-height: 1.35;
    margin-bottom: 12px;
}

.card-title a {
    color: var(--text-primary);
}

.card-title a:hover {
    color: var(--accent-primary);
}

/* --- Single Recipe Details View --- */
.single-recipe-wrapper {
    padding: 60px 0 80px;
}

.recipe-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.recipe-header .recipe-meta {
    justify-content: center;
    margin-bottom: 16px;
}

.recipe-header-title {
    font-family: var(--font-heading);
    font-size: 44px;
    line-height: 1.2;
    margin-bottom: 24px;
}

.recipe-featured-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 48px;
    max-height: 550px;
    width: 100%;
}

.recipe-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-grid-details {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    align-items: start;
}

.recipe-sidebar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 22px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-bg);
    padding-bottom: 10px;
}

/* Ingredients List styling */
.ingredients-list {
    list-style: none;
}

.ingredients-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 15px;
}

.ingredients-list li:last-child {
    border-bottom: none;
}

.ingredient-amount {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Recipe Content & Instructions */
.recipe-main-content {
    font-size: 17px;
    line-height: 1.8;
}

.recipe-intro {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-style: italic;
    border-left: 4px solid var(--accent-primary);
    padding-left: 16px;
}

.recipe-steps {
    margin-top: 32px;
}

.recipe-steps h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 20px;
}

.step-item {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.step-number {
    background-color: var(--accent-primary);
    color: #FFF;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 14px;
    margin-top: 4px;
}

.step-text {
    flex-grow: 1;
}

/* AI Arrangement Tip Alert */
.ai-twist-box {
    background: linear-gradient(135deg, #FDF9F4 0%, #FAEDE2 100%);
    border-left: 4px solid #E76F51;
    border-radius: var(--radius-md);
    padding: 24px 32px;
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
}

.ai-twist-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.ai-twist-content {
    font-size: 16px;
    color: var(--text-primary);
}

/* --- Footer --- */
.site-footer {
    background-color: #2D2621;
    color: #D5CECB;
    padding: 60px 0 30px;
    font-size: 14px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #4E423B;
    padding-top: 30px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 24px;
    color: #FFF;
    font-weight: 700;
}

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

.footer-copyright {
    color: #A39893;
}

/* --- Pagination --- */
.navigation.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.navigation.pagination .nav-links {
    display: flex;
    gap: 8px;
}

.navigation.pagination .page-numbers {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition);
}

.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers.current {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #FFF;
}

/* --- Empty & Error States --- */
.status-state-container {
    padding: 100px 24px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 32px;
    color: var(--accent-primary);
}

.status-icon-bowl {
    width: 100%;
    height: 100%;
    display: block;
}

.status-steam {
    position: absolute;
    top: 10px;
    width: 6px;
    height: 24px;
    background-color: var(--accent-primary);
    opacity: 0.3;
    border-radius: 3px;
    animation: riseAndFade 2s infinite ease-in-out;
}

.status-steam-1 { left: 45px; animation-delay: 0.2s; }
.status-steam-2 { left: 60px; animation-delay: 0.8s; }
.status-steam-3 { left: 75px; animation-delay: 0.5s; }

@keyframes riseAndFade {
    0% {
        transform: translateY(15px) scaleY(0.5);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-20px) scaleY(1.5);
        opacity: 0;
    }
}

.status-title {
    font-family: var(--font-heading);
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.status-description {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* --- Ad Zones & Placeholders --- */
.ad-container {
    width: 100%;
    margin: 24px 0;
    display: flex;
    justify-content: center;
}

.ad-placeholder {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    border: 1px dashed var(--accent-primary);
    background-color: var(--accent-bg);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.ad-placeholder:hover {
    background-color: rgba(231, 111, 81, 0.08);
}

.ad-placeholder span {
    font-size: 11px;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ad-sidebar-placeholder {
    width: 100%;
    min-height: 250px;
    border: 1px dashed var(--border-color);
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 24px;
}

/* --- Image Fallbacks --- */
.featured-card.no-image {
    grid-template-columns: 1fr;
    border: 2px solid var(--accent-primary);
}

.featured-fallback-header {
    background: linear-gradient(135deg, #FDF9F4 0%, #FAEDE2 100%);
    padding: 48px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.featured-fallback-header svg {
    width: 80px;
    height: 80px;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.card-fallback-image {
    background: linear-gradient(135deg, #FDFBF7 0%, #F5EDE4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.card-fallback-image svg {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    opacity: 0.7;
}

.recipe-featured-img.no-image {
    background: linear-gradient(135deg, #FDF9F4 0%, #FAEDE2 100%);
    height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

.recipe-featured-img.no-image svg {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
}

.recipe-featured-img.no-image span {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* --- Media Queries --- */
@media (max-width: 991px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        min-height: 280px;
    }
    
    .recipe-grid-details {
        grid-template-columns: 1fr;
    }
    
    .recipe-sidebar {
        position: static;
        margin-bottom: 32px;
    }
}

@media (max-width: 768px) {
    .featured-content {
        padding: 24px;
    }
    
    .featured-title {
        font-size: 28px;
    }
    
    .recipe-header-title {
        font-size: 32px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
