/* Reset CSS (Bash site yban bhal bhal f ga3 les navigateurs) */
*, *::before, *::after {
    box_sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Palette de couleurs (Yummly Vibe) */
    --primary-color: #ff6b6b; /* Un rouge/orange appetissant */
    --secondary-color: #333;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --text-color: #4a4a4a;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Container basique bash l-contenu maylsaqch f jnab */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* AdSense Placeholder Styling (Bash tban lik fin kayna) */
.ad-slot {
    background: #eee;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border: 1px dashed #ccc;
    font-size: 12px;
    color: #999;
}
/* --- HEADER STYLES --- */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky; /* Header kay-bqa las9 mli kathbat */
    top: 0;
    z-index: 1000;
}

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

.text-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: -1px;
}

/* Menu */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
}

.main-navigation a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn-user {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-accent {
    background: var(--primary-color);
    color: white;
}

/* Responsive Mobile (Simple version) */
@media (max-width: 768px) {
    .main-navigation { display: none; } /* Mn ba3d nradouha Burger Menu */
    .header-grid { flex-wrap: wrap; }
}

/* AdSense Slot Style */
.ad-header {
    margin-top: 20px;
    margin-bottom: 20px;
}
/* --- RECIPE GRID (HOME) --- */
.home-container {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Grid System: 3 columns f PC, 1 f Mobile */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Card Style "Pro" */
.recipe-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

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

.card-image {
    height: 200px;
    overflow: hidden;
    background: #eee;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Bash taswira tji mameriyach */
    transition: transform 0.5s ease;
}

.recipe-card:hover .card-image img {
    transform: scale(1.05); /* Zoom effect zwine */
}

.card-content {
    padding: 20px;
}

.card-cat {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-title a {
    text-decoration: none;
    color: var(--secondary-color);
}

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

.card-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.card-btn {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 2px;
}
/* --- SINGLE POST STYLES (Page d'article) --- */
.single-container {
    max-width: 800px; /* Bash l-ktba ma-tjish 3rida bzaf, sahla f l-qraya */
    margin: 40px auto;
}

.entry-header.center-text {
    text-align: center;
    margin-bottom: 30px;
}

.entry-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin: 10px 0;
}

.entry-cat a {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.entry-image-wide img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

/* --- FIX: REGLAGES CARD ACCUEIL (Hada bash tqad l-image l-kbira f l-page lwla) --- */
.recipe-card .card-image {
    height: 200px !important; /* Zidna !important bash nferdouha */
    overflow: hidden;
    position: relative;
}

.recipe-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Darouriya: kat-coupé taswira bash tji m9ada */
    display: block;
}