/*
 * Professional Modern Theme Styles - GlutenFreePro v2
 * Focus: Mobile Readability, Clean Aesthetic, and Engagement
 */

:root {
    --primary-color: #27ae60;
    --primary-hover: #219150;
    --accent-color: #e67e22;
    --text-main: #2c3e50;
    --text-light: #7f8c8d;
    --bg-body: #fdfdfd;
    --bg-card: #ffffff;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.1);
    --border-radius: 16px;
    --container-width: 1140px;
}

/* 1. Base & Typography */
* { box-sizing: border-box; }

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.8;
    color: var(--text-main);
    background-color: var(--bg-body);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

a { color: var(--primary-color); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--primary-hover); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* 2. Header & Navigation */
.site-header {
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-title { font-size: 1.8rem; margin: 0; letter-spacing: -1px; }
.site-title a { color: var(--text-main); }

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after { width: 100%; }

/* 3. Hero Section - More Engaging */
.hero-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f1f8f4 0%, #ffffff 100%);
    text-align: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 80px;
}

.hero-content h1 { font-size: 4rem; color: var(--text-main); margin-bottom: 20px; }
.hero-description { font-size: 1.2rem; color: var(--text-light); max-width: 700px; margin: 0 auto 40px; }

.button {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.button:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(39, 174, 96, 0.3); color: #fff; }

/* 4. Recipe Grid - Spacious & Modern */
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 60px; position: relative; }
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.recipe-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

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

.recipe-card .post-thumbnail {
    height: 240px;
    overflow: hidden;
}

.recipe-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recipe-card:hover .post-thumbnail img { transform: scale(1.05); }

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

.recipe-card .entry-title { font-size: 1.4rem; margin-bottom: 15px; }
.recipe-card .entry-title a { color: var(--text-main); }

.recipe-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.entry-excerpt { font-size: 0.95rem; color: var(--text-light); margin-bottom: 25px; line-height: 1.6; }

.recipe-button {
    margin-top: auto;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 25px;
    text-align: center;
    border-radius: 50px;
}

.recipe-button:hover { background: var(--primary-color); color: #fff; }

/* 5. Single Post Layout - Professional & Clean */
.single-recipe-post {
    max-width: 850px;
    margin: 60px auto;
    background: #fff;
    padding: 0; /* Remove padding to handle image full width if needed */
}

.single-recipe-post .entry-header { margin-bottom: 50px; }
.single-recipe-post .entry-title { font-size: 3.5rem; }

.single-recipe-post .post-thumbnail img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.entry-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #444;
}

/* 6. Improved Recipe Box - Mobile First, Not Tight */
.recipe-box {
    background: #f9fbf9;
    border-radius: var(--border-radius);
    padding: 50px;
    margin: 60px 0;
    border: 1px solid #e1e8e4;
}

.recipe-box-header h2 { font-size: 2.2rem; margin-bottom: 20px; }

.recipe-quick-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.info-item { text-align: center; border-right: 1px solid #eee; }
.info-item:last-child { border-right: none; }
.info-item strong { display: block; font-size: 0.8rem; text-transform: uppercase; color: var(--text-light); }

.recipe-box-content {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column for mobile */
    gap: 50px;
}

@media (min-width: 992px) {
    .recipe-box-content { grid-template-columns: 1fr 1.8fr; }
}

.recipe-ingredients, .recipe-instructions {
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.recipe-ingredients h3, .recipe-instructions h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.recipe-ingredients ul { list-style: none; padding: 0; }
.recipe-ingredients li {
    padding: 12px 0;
    border-bottom: 1px solid #f9f9f9;
    display: flex;
    align-items: flex-start;
}
.recipe-ingredients li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 15px;
}

.recipe-instructions ol { padding-left: 25px; }
.recipe-instructions li { padding: 10px 0; margin-bottom: 15px; }

/* 7. Footer - Modern & Professional */
.site-footer {
    background: #1a252f;
    color: #ecf0f1;
    padding: 80px 0 40px;
    margin-top: 100px;
}

.footer-widget-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    color: #fff;
}

.site-info {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    font-size: 0.9rem;
    color: #95a5a6;
}

/* 8. Mobile Responsiveness Fixes */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    
    .recipe-grid { grid-template-columns: 1fr; gap: 30px; }
    
    .single-recipe-post .entry-title { font-size: 2.2rem; }
    
    .recipe-box { padding: 25px; }
    .recipe-quick-info { grid-template-columns: 1fr 1fr; }
    .info-item { border-right: none; padding: 10px; border-bottom: 1px solid #eee; }
    .info-item:nth-last-child(-n+2) { border-bottom: none; }
    
    .recipe-ingredients, .recipe-instructions { padding: 20px; }

    /* Fix tight navigation */
    .menu-toggle {
        display: block;
        background: none;
        border: 2px solid var(--primary-color);
        color: var(--primary-color);
        padding: 8px 15px;
        border-radius: 8px;
        font-weight: 700;
    }

    .main-navigation .menu-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 20px;
    }

    .main-navigation.toggled .menu-container { display: block; }
    .main-navigation ul { flex-direction: column; gap: 15px; }
}

/* Print Styles */
@media print {
    .recipe-box { border: 2px solid #333; padding: 30px; }
    .site-header, .site-footer, .hero-section, .print-recipe-button { display: none !important; }
}
