/*
Theme Name: MWZKctyri Theme
Theme URI:  https://mojewebka.cz/mwzk-theme (odkaz na stránku šablony)
Author:     Z. Klíma
Author URI: https://tvujweb.cz (tvůj web jako autora)
Description: Moderní, responzivní a čistá šablona s důrazem na typografii Georgia a modré barevné schéma. Obsahuje unikátní dlaždicový rozcestník a fixní navigaci.
Version:    1.0
Text Domain: mwzk-theme
License:    GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* =====================================================
   1. ZÁKLAD A BARVY
   ===================================================== */
html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.15rem;
    line-height: 1.65;
    background: #D7EAFD; 
    color: #404040;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

strong, b {
    font-weight: bold;
    color: inherit; /* Písmo převezme barvu od okolního textu */
}

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

/* =====================================================
   2. STICKY HORNÍ BLOK (KOMPAKTNÍ VERZE)
   ===================================================== */
.mwzk-sticky-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: #D7EAFD;
    border-bottom: 4px solid #A6C6EC;
}

body {
    padding-top: 100px; 
}

body.admin-bar .mwzk-sticky-wrapper { top: 32px; }

.mwzk-top-bar {
    height: 5px; 
    background: #D7EAFD;
}

.mwzk-menu-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: #D7EAFD; 
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 90px;
    justify-content: center;
}

.mwzk-hamburger {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background: #D7EAFD; 
    border: 4px solid #B00000 !important;
    border-radius: 8px; 
    cursor: pointer;
    width: auto;
    height: 60px; 
    padding: 0 15px;
    gap: 15px;
    transition: all 0.3s ease;
}

.hamburger-lines {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hamburger-lines span {
    display: block;
    width: 30px;
    height: 6px; 
    background: #B00000; 
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger-text {
    font-family: Georgia, serif;
    font-weight: bold;
    font-size: 1.5rem;
    color: #B00000;
    text-transform: uppercase;
    line-height: 1;
}

.mwzk-hamburger:hover {
    background: #ffffff;
    box-shadow: 0 0 10px rgba(176, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .mwzk-menu-wrapper { height: 70px; }
    .mwzk-hamburger {
        height: 50px;
        padding: 0 12px;
        gap: 10px;
    }
    .hamburger-lines span {
        width: 25px;
        height: 5px;
    }
    .hamburger-text { font-size: 1.2rem; }
    body { padding-top: 75px; }
}

/* --- OPRAVA ROLETKY MENU S RÁMEČKEM A LINKAMI --- */
.mwzk-nav-container {
    display: none; 
    width: 100%;
    background: #ffffff; 
    border: 4px solid #A6C6EC; /* Modrý rámeček roletky */
    border-top: none;
    position: absolute;
    top: 90px;
    left: 0;
    z-index: 9999;
}

/* Otevření menu */
.mwzk-menu-wrapper.is-open .mwzk-nav-container,
.mwzk-menu-wrapper.open .mwzk-nav-container { 
    display: block; 
}

.mwzk-menu li {
    border-bottom: 1px solid #A6C6EC; /* Linky mezi řádky v menu */
}

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

.mwzk-menu li a {
    display: block;
    padding: 15px 25px;
    color: #1A3C5E;
    font-weight: bold;
    text-decoration: none;
}

/* --- STYL NAVIGACE (Předchozí/Následující) --- */
.mwzk-post-navigation {
    display: flex;
    justify-content: space-between; /* Rozestup vlevo a vpravo */
    margin: 20px 0;
    font-size: 0.85rem; /* Menší písmo */
    font-style: italic; /* Kurzíva */
    font-family: Georgia, serif;
    color: #888; /* Šedá barva */
}

.mwzk-post-navigation a {
    color: #1A3C5E;
    text-decoration: none;
    font-weight: bold;
}

.mwzk-post-navigation .nav-next {
    text-align: right; /* Zarovnání nápisu vpravo doprava */
}
/* =====================================================
   3. HLAVIČKA A ÚVODNÍ OBRÁZEK
   ===================================================== */
.mwzk-header {
    width: 100%;
    background: #D7EAFD;
}

.mwzk-header-img {
    display: block;
    max-width: 1200px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: cover;
}

.mwzk-front-image {
    width: 100%; 
    margin: 0 0 40px 0;
}

.mwzk-front-image img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    display: block;
}

@media (min-width: 1000px) {
    .mwzk-header-img { height: 100px; } 
    .mwzk-front-image {
        margin-left: -40px;  
        margin-right: -20px; 
        width: calc(100% + 60px); 
        max-width: 900px;
    }
}

/* =====================================================
   4. UNIVERZÁLNÍ LAYOUT
   ===================================================== */
.mwzk-container {
    display: flex;
    flex-wrap: wrap; 
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    background: #D7EAFD;
}

.mwzk-content {
    width: 100%;
    padding: 20px; 
    box-sizing: border-box;
    background: #D7EAFD;
}

.sidebar {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: #D7EAFD;
    border-top: 1px solid #A6C6EC; 
}

@media (min-width: 1000px) {
    .mwzk-content {
        width: 75%;
        flex: 0 0 75%;
        padding: 40px 20px 40px 40px;
    }
    .sidebar {
        width: 25%;
        flex: 0 0 25%;
        padding: 40px 40px 40px 20px;
        border-top: none; 
        border: 1px solid #A6C6EC;
    }
}

/* =====================================================
   5. WIDGETY (SIDEBAR + FOOTER)
   ===================================================== */
.sidebar .widget-title, .site-footer .widget-title, .site-footer h2 {
    font-family: Georgia, serif;
    font-weight: bold;
    font-size: 1.15rem;
    color: #B00000;
    margin-bottom: 15px;
    display: block;
    border-bottom: 1px solid #A6C6EC;
    padding-bottom: 5px;
    text-transform: uppercase;
}

.sidebar .widget ul, .site-footer .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar .widget li, .site-footer .widget li {
    font-family: Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 8px 0;
    border-bottom: 1px dotted #A6C6EC;
    color: #404040;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sidebar .widget ul li a, .site-footer .widget ul li a {
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    color: #1A3C5E !important;
}

.sidebar .widget ul li a:hover, .site-footer .widget ul li a:hover {
    color: #B00000 !important;
}

.sidebar .widget .post-date, .site-footer .widget .post-date {
    display: block !important;
    font-size: 0.85rem !important;
    color: #707070 !important;
    font-style: italic;
}

/* =====================================================
   6. OBTÉKÁNÍ OBRÁZKŮ A ARCHIV
   ===================================================== */
.mwzk-archive-post {
    padding: 0 0 30px 0;
    margin-bottom: 30px;
    background: #D7EAFD;
    border-bottom: 1px solid #A6C6EC;
}

.alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 2rem auto; }

.alignleft, .alignright, .aligncenter {
    border: 1px solid #A6C6EC;
    padding: 5px;
    background: #fff;
}

.mwzk-content::after {
    content: "";
    display: table;
    clear: both;
}

/* =====================================================
   7. ZÁPATÍ
   ===================================================== */
.site-footer {
    background: #D7EAFD;
    border-top: 1px solid #A6C6EC;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}

.footer-col {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 20px 40px;
}

@media (min-width: 1000px) {
    .footer-col { flex: 0 0 25%; width: 25%; }
    .footer-col:nth-child(1) { padding: 40px 15px 40px 40px; }
    .footer-col:nth-child(2), .footer-col:nth-child(3) { padding: 40px 15px; }
    .footer-col:nth-child(4) { padding: 40px 40px 40px 15px; }
}

.footer-copyright {
    max-width: 1200px;
    margin: 0 auto;
    text-align: right;
    font-size: 0.85rem;
    color: #606060;
    padding: 20px 40px 30px;
}

/* =====================================================
   8. VÝPIS PŘÍSPĚVKŮ (ARCHIV) + DETAIL
   ===================================================== */
.mwzk-archive-item { margin-bottom: 30px; padding-bottom: 10px; }

.mwzk-archive-item h2.entry-title {
    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.mwzk-archive-item h2.entry-title a { text-decoration: none; color: #000; }

.entry-meta {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
}

.entry-meta a { color: #888; text-decoration: none; }
.entry-meta a:hover { color: #B00000; text-decoration: underline; }

.entry-excerpt {
    font-family: Georgia, serif;
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
    color: #404040;
}

.read-more {
    display: inline-block;
    color: #1A3C5E !important;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: underline;
}

/* Automatické kapitálky a červená POUZE pro hlavní názvy (stránka, příspěvek, widget) */
.entry-title, 
.entry-title a,
.mwzk-post-title,
.widget-title,
h1.entry-title {
    color: #B00000 !important;
    font-family: Georgia, serif !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    display: block !important;
}

/* Osvobození nadpisů uvnitř textu - zde budeš mít plnou kontrolu z editoru */
.mwzk-content h1, 
.mwzk-content h2, 
.mwzk-content h3, 
.mwzk-content h4, 
.mwzk-content h5, 
.mwzk-content h6 {
    text-transform: none; /* Vypne automatické kapitálky */
    /* Barvu a styl si určíš sám v editoru, CSS do toho nebude mluvit přes !important */
}

/* =====================================================
   9. STYLIZACE VYHLEDÁVACÍHO POLE (SIDEBAR)
   ===================================================== */
.widget_search .search-form {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin-top: 15px !important;
    width: 100% !important;
}

.widget_search input[type="search"], .widget_search .search-field {
    flex: 1 !important;
    background: #ffffff !important;
    border: 3px solid #A6C6EC !important;
    border-right: none !important;
    border-radius: 8px 0 0 8px !important;
    padding: 10px 15px !important;
    font-family: Georgia, serif !important;
    font-size: 1rem !important;
    outline: none !important;
    -webkit-appearance: none;
}

.widget_search input[type="submit"], .widget_search .search-submit {
    background: #B00000 !important;
    color: #ffffff !important;
    border: 3px solid #B00000 !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 10px 20px !important;
    cursor: pointer !important;
    font-family: Georgia, serif !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    -webkit-appearance: none;
}

/* =====================================================
   10. CHYBOVÁ STRÁNKA 404
   ===================================================== */
.mwzk-404-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    text-align: center;
    background: #D7EAFD;
    padding: 40px 20px;
}

.mwzk-404-content h1 { font-size: 5rem; color: #B00000; margin-bottom: 0; }
.mwzk-404-content h2 { font-size: 2rem; margin-top: 0; color: #444; }
.mwzk-404-content p { font-size: 1.5rem; font-weight: bold; margin-bottom: 40px; }

.mwzk-btn-back {
    text-decoration: none;
    display: inline-flex !important;
    margin: 0 auto;
}




/* Oprava pro responzivitu obrázků vložených z administrace */
@media screen and (max-width: 768px) {
    /* Zrušíme obtékání, aby obrázek "neutíkal" mimo displej */
    .alignleft, 
    .alignright {
        float: none;
        display: block;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%; /* Vynutí, aby nepřetekl */
        height: auto;
        width: auto !important; /* Přebije natvrdo nastavenou šířku z editoru */
    }

    /* Pokud je obrázek v odkazu, zajistíme, aby se odkaz taky neroztahoval */
    a img.alignleft, 
    a img.alignright {
        float: none;
    }
    
    /* Odstranění horizontálního posunu celé stránky */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
}


/* =====================================================
   11. UNIVERZÁLNÍ ROZCESTNÍK (DLAŽDICE) - PŮVODNÍ ROZMĚR
   ===================================================== */
.mwzk-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px; 
    margin: 30px 0;
    width: 100%;
}

.mwzk-grid-card {
    display: block;
    width: 260px;
    height: 210px;
    background-size: cover;
    background-position: center;
    border: 3px solid #A6C6EC; /* Zesílený modrý rám šablony */
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mwzk-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(26, 60, 94, 0.2);
    border-color: #B00000; /* Při najetí myší se rám rozsvítí červeně */
}

.mwzk-grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92); /* Bílé pozadí pro text s lehkým krytím */
    padding: 10px;
    border-top: 2px solid #A6C6EC; /* Zvýrazněná linka nad nadpisem */
}

.mwzk-grid-title {
    display: block;
    color: #1A3C5E;
    font-family: Georgia, serif;
    font-weight: bold;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .mwzk-grid-container {
        justify-content: center;
    }
}