/*
Theme Name: İtalyan Modern
Theme URI: https://italyanmutfagi.com
Author: Doktorbul Development
Description: Modern, responsive İtalyan yemek tarifleri teması. SEO uyumlu, Recipe schema destekli, hızlı.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: italyan-modern
*/

/* === RESET & VARIABLES === */
:root {
    --primary: #c0392b;
    --primary-dark: #a93226;
    --primary-light: #e74c3c;
    --secondary: #2c3e50;
    --accent: #27ae60;
    --accent-hover: #219a52;
    --gold: #f39c12;
    --cream: #fdf6e3;
    --bg: #fafafa;
    --bg-card: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #e8e8e8;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 50px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --transition: all 0.25s ease;
    --container: 1200px;
}

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

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

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

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* === HEADER === */
.site-header {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    padding: 0;
    gap: 0;
}

.site-logo {
    flex-shrink: 0;
    padding: 14px 30px 14px 0;
    border-right: 1px solid var(--border);
    margin-right: 20px;
}

.site-logo img {
    height: 36px;
    width: auto;
}

.site-logo .logo-text {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
}

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

/* Navigation */
.main-nav {
    flex: 1;
}

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

.main-nav ul li a {
    display: block;
    padding: 18px 14px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a,
.main-nav ul li.current_page_item a {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-radius: var(--radius-pill);
    padding: 3px;
    border: 1px solid var(--border);
    margin-left: auto;
    flex-shrink: 0;
}

.header-search input {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 0.85rem;
    outline: none;
    width: 150px;
}

.header-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.header-search button:hover {
    background: var(--primary-dark);
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* === HERO / FEATURED === */
.hero-section {
    background: linear-gradient(135deg, var(--secondary) 0%, #1a252f 100%);
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><circle cx="40" cy="40" r="1" fill="rgba(255,255,255,0.03)"/></svg>') repeat;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-featured {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: 200px 200px;
    gap: 16px;
}

.hero-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.hero-card:first-child {
    grid-row: 1 / 3;
}

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

.hero-card:hover img {
    transform: scale(1.05);
}

.hero-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
}

.hero-card .overlay .cat {
    display: inline-block;
    background: var(--primary);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.hero-card .overlay h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.hero-card:first-child .overlay h3 {
    font-size: 1.4rem;
}

/* === RECIPE CARDS === */
.recipes-section {
    padding: 50px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--secondary);
}

.section-header a {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.recipe-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.recipe-card .thumb {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
}

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

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

.recipe-card .thumb .cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.recipe-card .card-body {
    padding: 18px;
}

.recipe-card .card-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text);
}

.recipe-card .card-body h3 a {
    color: inherit;
}

.recipe-card .card-body h3 a:hover {
    color: var(--primary);
}

.recipe-card .card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.recipe-card .rating {
    color: var(--gold);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 6px;
}

.recipe-card .rating .star.empty {
    color: #ccc;
}

.recipe-card .rating .star.half {
    background: linear-gradient(90deg, var(--gold) 50%, #ccc 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.recipe-card .rating .rating-text {
    margin-left: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* === SIDEBAR === */
.content-area {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    padding: 50px 0;
}

.sidebar .widget {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.sidebar .widget h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    color: var(--secondary);
}

.sidebar .widget ul {
    list-style: none;
}

.sidebar .widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar .widget ul li:last-child {
    border-bottom: none;
}

.sidebar .widget ul li a {
    color: var(--text);
    font-size: 0.9rem;
}

.sidebar .widget ul li a:hover {
    color: var(--primary);
    padding-left: 3px;
}

/* === SINGLE RECIPE === */
.single-recipe {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 30px;
}

.single-recipe .recipe-hero {
    position: relative;
    padding-top: 50%;
    overflow: hidden;
}

.single-recipe .recipe-hero img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-recipe .recipe-content {
    padding: 40px;
}

.single-recipe h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 16px;
    line-height: 1.3;
}

.recipe-info-bar {
    display: flex;
    gap: 24px;
    padding: 20px;
    background: var(--cream);
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.recipe-info-bar .info-item {
    text-align: center;
    flex: 1;
}

.recipe-info-bar .info-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.recipe-info-bar .info-item .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

/* === RECIPE DETAIL — MODERN === */
.recipe-top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.recipe-cat-link {
    background: var(--primary);
    color: #fff !important;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.recipe-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.recipe-author-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 16px 0 24px;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.print-btn {
    margin-left: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.print-btn:hover {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
}

/* Info Cards */
.recipe-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.info-card {
    text-align: center;
    padding: 18px 12px;
    border-radius: var(--radius-md);
    background: var(--bg);
    border: 1px solid var(--border);
}

.info-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

/* Ingredients Checklist */
.recipe-ingredients-box {
    background: #fef9f0;
    border: 2px solid #f5e6cc;
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 30px;
}

.recipe-ingredients-box h2 {
    font-size: 1.3rem;
    margin-bottom: 18px;
    color: var(--secondary);
    font-family: var(--font-serif);
}

.ingredient-checklist {
    list-style: none;
    columns: 2;
    column-gap: 30px;
}

.ingredient-checklist li {
    padding: 6px 0;
    break-inside: avoid;
}

.ingredient-checklist label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ingredient-checklist input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.ingredient-checklist input:checked + span {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Instructions */
.recipe-instructions-box {
    margin-bottom: 30px;
}

.recipe-instructions-box h2 {
    font-size: 1.3rem;
    margin-bottom: 18px;
    color: var(--secondary);
    font-family: var(--font-serif);
}

.recipe-steps {
    font-size: 1.05rem;
    line-height: 1.9;
}

.recipe-steps p {
    margin-bottom: 16px;
}

.recipe-steps ol {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.recipe-steps ol li {
    counter-increment: step;
    padding: 16px 16px 16px 64px;
    position: relative;
    margin-bottom: 12px;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.recipe-steps ol li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 16px;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Notes */
.recipe-notes-box {
    background: var(--cream);
    border-left: 4px solid var(--gold);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 24px;
    margin-bottom: 30px;
}

.recipe-notes-box h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--secondary);
}

/* Tags */
.recipe-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.tag-link {
    background: var(--bg);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    border: 1px solid var(--border);
    color: var(--text-light) !important;
}

.tag-link:hover {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
}

/* === RELATED RECIPES === */
.related-recipes {
    margin-bottom: 30px;
}

.related-recipes .section-header {
    margin-bottom: 24px;
}

.related-recipes .section-header h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--secondary);
}

/* === ARCHIVE === */
.archive-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: -16px 0 30px;
    line-height: 1.7;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Print styles */
@media print {
    .site-header, .site-footer, .sidebar, .breadcrumbs, .print-btn, .recipe-tags, .recipe-author-bar { display: none !important; }
    .content-area { grid-template-columns: 1fr !important; }
    .recipe-hero { max-height: 300px; }
    .single-recipe { box-shadow: none; border: none; }
}

@media (max-width: 768px) {
    .ingredient-checklist { columns: 1; }
    .recipe-info-cards { grid-template-columns: repeat(2, 1fr); }
}

/* === FOOTER === */
.site-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand p {
    font-size: 0.9rem;
    margin: 12px 0 20px;
    line-height: 1.7;
}

.footer-col h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: #fff;
    padding-left: 3px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0;
}

.pagination a, .pagination span {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
}

.pagination a {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

/* === BREADCRUMBS === */
.breadcrumbs {
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
}

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

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .hero-featured { grid-template-columns: 1fr 1fr; }
    .hero-card:first-child { grid-row: auto; }
    .recipes-grid { grid-template-columns: repeat(2, 1fr); }
    .content-area { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav { display: none; }
    .main-nav.active { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); box-shadow: var(--shadow-md); padding: 16px; }
    .main-nav.active ul { flex-direction: column; }
    .header-search { display: none; }
    .hero-featured { grid-template-columns: 1fr; grid-template-rows: auto; }
    .recipes-grid { grid-template-columns: 1fr; }
    .single-recipe .recipe-content { padding: 24px; }
    .single-recipe h1 { font-size: 1.5rem; }
    .recipe-info-bar { flex-wrap: wrap; }
    .recipe-info-bar .info-item { min-width: 45%; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}
