/*
Theme Name: Global Cuisine Wiki Styles
Description: Dish and Ingredient layout styling for GeneratePress
Template: generatepress
*/

/* ===== GLOBAL LAYOUT ===== */
.inside-article,
.wiki-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* ===== PAGE HEADER ===== */
.wiki-header h1 {
    font-size: 2.3rem;
    margin: 0 0 15px 0;
    line-height: 1.2;
    font-weight: 600;
}

/* ===== TOP LAYOUT ===== */
.wiki-top {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

/* ===== LEFT COLUMN (INFOBOX) ===== */
.wiki-infobox {
    width: 300px;
    flex-shrink: 0;
    background: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    font-size: 0.9rem;
}

.infobox-image {
    display: block;
    margin-bottom: 12px;
}

.infobox-image img {
    width: 100%;
    border-radius: 4px;
}

/* ===== FACT TABLE ===== */
.facts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
    table-layout: fixed;
}

.facts-table th {
    text-align: left;
    font-weight: 600;
    padding: 6px 4px;
    width: 40%;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.facts-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #eee;
    word-wrap: break-word;
}

/* ===== CARDS ===== */
.ingredient-knowledge-boxes,
.dish-knowledge-boxes {
    display: grid;
    gap: 16px;
    margin: 20px 0;
}

.dish-knowledge-boxes {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.ingredient-card,
.dish-card {
    background: #f8f6f2;
    border: 1px solid #e2dfd7;
    border-radius: 8px;
    padding: 18px;
}

.ingredient-card h2,
.dish-card h2 {
    font-size: 1.2rem;
    margin-top: 0;
}

.ingredient-card ul,
.dish-card ul {
    margin: 0;
    padding-left: 18px;
}

.ingredient-card li,
.dish-card li {
    margin: 6px 0;
}

/* ===== TAGS ===== */
.cuisine-tags,
.pairing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.cuisine-tags a,
.pairing-tags a {
    display: inline-block;
    background: #f8f6f2;
    color: #2f7d32;
    padding: 6px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
    border: 1px solid #e2dfd7;
    transition: all 0.2s ease;
}

.cuisine-tags a:hover,
.pairing-tags a:hover {
    background: #e2dfd7;
    color: #1b5e20;
}

/* ===== RIGHT COLUMN ===== */
.wiki-right {
    flex: 1;
    min-width: 0;
}

.wiki-right section {
    margin-bottom: 25px;
}

.wiki-right h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    background: #f7f7f7;
    padding: 5px 0;
    border-radius: 4px;
}

.wiki-right .wiki-header {
    margin-bottom: 10px;
}

/* ===== DISH GRID ===== */
.wiki-dishes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

/* ===== FAQ ===== */
.faq-section {
    margin: 2rem 0;
}

.faq-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.faq-question {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.35rem;
    color: #222;
}

.faq-answer {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #444;
}

.faq-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e2dfd7;
}

/* ===== SITE HEADER FIXES ===== */
.site-branding-container {
    min-width: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    /* Stack layout for top content */
    .wiki-top {
        flex-direction: column;
        gap: 20px;
    }

    .wiki-right {
        order: 1;
    }

    .wiki-infobox {
        order: 2;
        width: 100%;
    }

    /* Page header */
    .wiki-header h1 {
        font-size: 1.8rem;
        line-height: 1.25;
    }

    /* Hide desktop images */
    .infobox-image,
    .dish-infobox .infobox-image {
        display: none !important;
    }

    /* Show mobile images */
    .mobile-ingredient-image,
    .mobile-dish-image {
        display: block !important;
        margin-bottom: 15px;
    }

    .mobile-ingredient-image img,
    .mobile-dish-image img {
        width: 100%;
        height: auto;
        border-radius: 6px;
    }

    /* ===== HEADER FIX ===== */
    .site-header,
    .inside-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .site-branding-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        order: 1;
    }

    .site-logo {
        margin-bottom: 5px !important;
        order: 1;
    }

    .site-logo img {
        max-width: 80px !important;
        height: auto !important;
    }

    .main-title {
        white-space: normal !important;
        line-height: 1.2 !important;
        font-size: 1.4rem !important;
        margin: 0 !important;
        order: 2;
    }

    .main-title a {
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }

    .mobile-menu-control-wrapper {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin-top: 5px !important;
        order: 3;
    }
}

/* ===== HIDE MOBILE IMAGES ON DESKTOP ===== */
.mobile-ingredient-image,
.mobile-dish-image {
    display: none !important;
}