/*
Theme Name: Gotuj z Maciejem
Theme URI: https://gotujzmaciejem.pl
Author: Maciej
Author URI: https://gotujzmaciejem.pl
Description: Elegancki motyw dla bloga kulinarnego - prosty i klasyczny design idealny do prezentowania przepisów kulinarnych.
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: gotuj-z-maciejem
Tags: food-and-drink, blog, custom-menu, featured-images, translation-ready, custom-logo, custom-header

Gotuj z Maciejem - Twój kulinarny blog
*/

/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    background-color: #fff;
    accent-color: #333;
}

/* Override default blue accent color on all form elements */
input, select, textarea, button {
    accent-color: #333;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: #222;
}

h1 { font-size: 2.5rem; letter-spacing: 3px; }
h2 { font-size: 2rem; letter-spacing: 2px; }
h3 { font-size: 1.5rem; letter-spacing: 1px; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #888;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-area {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 40px 0;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.full-width .main-content {
    width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    text-align: center;
    padding: 40px 20px;
    border-bottom: 1px solid #eee;
}

.site-branding {
    margin-bottom: 20px;
}

.site-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 8px;
    text-transform: uppercase;
    margin: 0;
}

.site-title a {
    color: #222;
}

.site-title a:hover {
    color: #555;
}

.site-description {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

/* Custom Logo */
.custom-logo {
    max-width: 300px;
    height: auto;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.main-navigation .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 10px 5px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
    border-bottom: 2px solid transparent;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    border-bottom-color: #333;
}

/* Dropdown Menu */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    min-width: 200px;
    flex-direction: column;
    gap: 0;
    z-index: 1000;
}

.main-navigation li:hover > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 12px 20px;
    border-bottom: none;
}

.main-navigation ul ul a:hover {
    background: #f9f9f9;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    color: #333;
    accent-color: #333;
}

/* Search Icon */
.nav-search {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    padding: 5px;
    transition: color 0.3s ease;
}

.search-toggle:hover {
    color: #666;
}

/* ==========================================================================
   Hero/Featured Section
   ========================================================================== */

.hero-section {
    position: relative;
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: 40px;
}

.hero-title {
    font-size: 3rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* ==========================================================================
   Posts & Articles
   ========================================================================== */

.posts-section {
    padding: 50px 0;
}

.section-title {
    text-align: left;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

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

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

.post-card-content {
    padding: 1.25rem;
}

.post-category {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 10px;
}

.post-category a {
    color: #888;
}

.post-category a:hover {
    color: #333;
}

.post-card .post-title {
    font-size: 1.25rem;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-title a {
    color: #222;
}

.post-title a:hover {
    color: #666;
}

.post-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.post-meta {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 1px;
}

.post-date {
    text-transform: uppercase;
}

.read-more {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
}

.read-more:hover {
    color: #888;
    border-bottom-color: #888;
}

/* ==========================================================================
   Single Post / Recipe Template
   ========================================================================== */

.single-post-header {
    text-align: center;
    padding: 50px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.single-post-category {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 20px;
}

.single-post-title {
    font-size: 2.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.single-post-meta {
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 1px;
}

.featured-image {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 8px;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 20px;
}

.post-content p {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1.8rem;
}

/* Ukryj puste paragrafy */
.post-content p:empty {
    display: none;
}

/* Ukryj nagłówek "Wskazówki" jeśli następny paragraf jest pusty */
.post-content h2:has(+ p:empty) {
    display: none;
}

.post-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    object-fit: contain;
    border-radius: 8px;
}

/* ==========================================================================
   Recipe Card
   ========================================================================== */

.recipe-card {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 40px;
    margin: 40px 0;
    border-radius: 4px;
}

.recipe-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.recipe-title {
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.recipe-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.recipe-meta-item {
    text-align: center;
}

.recipe-meta-label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.recipe-meta-value {
    font-size: 1rem;
    color: #333;
}

.recipe-section {
    margin-bottom: 30px;
}

.recipe-section-title {
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* ==========================================================================
   Ingredient Checklist
   ========================================================================== */

.ingredients-list {
    list-style: none;
}

.ingredient-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ingredient-item:hover {
    background: #f5f5f5;
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
}

.ingredient-item:last-child {
    border-bottom: none;
}

.ingredient-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.ingredient-item.checked .ingredient-checkbox {
    background: #333;
    border-color: #333;
}

.ingredient-item.checked .ingredient-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
}

.ingredient-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
}

.ingredient-item.checked .ingredient-text {
    text-decoration: line-through;
    color: #999;
}

/* Instructions */
.instructions-list {
    list-style: none;
    counter-reset: step;
}

.instruction-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.instruction-item:last-child {
    border-bottom: none;
}

.instruction-step {
    counter-increment: step;
    width: 40px;
    height: 40px;
    background: #333;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.instruction-step::before {
    content: counter(step);
}

.instruction-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.8;
}

/* Print Recipe Button */
.print-recipe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #333;
    color: #fff;
    padding: 12px 25px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.print-recipe-btn:hover {
    background: #555;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.widget ul {
    list-style: none;
}

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

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

.widget a {
    color: #666;
    font-size: 0.95rem;
}

.widget a:hover {
    color: #333;
}

/* Search Widget */
.search-form {
    display: flex;
    align-items: stretch;
    background: #f8f8f8;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.search-form:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.search-form:focus-within {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.search-form label {
    flex: 1;
    display: flex;
}

.search-field {
    flex: 1;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
}

.search-field::placeholder {
    color: #999;
    font-style: italic;
}

.search-field:focus {
    outline: none;
}

.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: #fff;
    border: none;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: #555;
}

.search-submit svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.search-submit:hover svg {
    transform: translateX(2px);
}

/* Sidebar Search - slightly smaller */
.widget .search-form {
    border-radius: 30px;
}

.widget .search-field {
    padding: 12px 18px;
    font-size: 0.95rem;
}

.widget .search-submit {
    padding: 12px 16px;
}

.widget .search-submit svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 40px 20px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.footer-credits {
    font-size: 0.8rem;
    color: #aaa;
}

.footer-credits a {
    color: #888;
}

/* Footer Navigation */
.footer-navigation {
    margin-bottom: 20px;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 30px;
}

.footer-menu li {
    margin: 0;
}

.footer-menu a {
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #333;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #666;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    font-size: 0.9rem;
    color: #666;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background: #333;
    border-color: #333;
    color: #fff;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
    padding-top: 0;
}

.comments-title .comments-count {
    font-size: 1.6rem;
    font-weight: 700;
    margin-right: 0.25rem;
}

/* Comment Form */
.comment-respond {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid #eee;
}

.comment-reply-title {
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
}

.comment {
    padding: 30px 0;
    border-bottom: 1px solid #f5f5f5;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 10px;
}

.comment-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
}

.comment-content p {
    margin-bottom: 0;
}

.comment-reply-link {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
}

/* Comment Form */
.comment-form {
    margin-top: 40px;
}

.comment-form label {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #666;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 20px;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #333;
}

.comment-form .submit {
    background: #333;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease;
}

.comment-form .submit:hover {
    background: #555;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .content-area {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }
    
    .main-navigation .container {
        flex-wrap: wrap;
        justify-content: space-between;
        position: relative;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        gap: 0;
        text-align: center;
        width: 100%;
        order: 3;
        padding-top: 15px;
        margin-top: 15px;
        border-top: 1px solid #eee;
    }
    
    .main-navigation.active ul {
        display: flex;
    }
    
    .main-navigation ul li {
        width: 100%;
    }
    
    .main-navigation ul a {
        padding: 12px 10px;
    }
    
    .menu-toggle {
        display: block;
        order: 1;
        margin: 0;
    }
    
    .nav-search {
        order: 2;
        margin-left: auto;
    }
    
    .hero-section {
        height: 350px;
    }
    
    .hero-title {
        font-size: 2rem;
        letter-spacing: 3px;
    }
    
    .single-post-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .recipe-card {
        padding: 25px;
    }
    
    .recipe-meta {
        gap: 20px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-section {
        height: 280px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Mobile Search Form */
    .search-form {
        border-radius: 25px;
    }
    
    .search-field {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .search-submit {
        padding: 12px 14px;
    }
    
    .search-submit svg {
        width: 18px;
        height: 18px;
    }
    
    .widget .search-field {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .widget .search-submit {
        padding: 10px 12px;
    }
    
    .widget .search-submit svg {
        width: 16px;
        height: 16px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .main-navigation,
    .sidebar,
    .site-footer,
    .comments-area,
    .print-recipe-btn,
    .social-links {
        display: none !important;
    }
    
    .recipe-card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .ingredient-item.checked .ingredient-text {
        text-decoration: none;
        color: inherit;
    }
    
    body {
        font-size: 12pt;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.hidden { display: none; }
.visible { display: block; }

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