/*
Theme Name: ZŠ Zlíchov
Author: Barley Solutions
Description: Wordpress theme pro ZŠ Zlíchov
Version: 1.0
*/

/* --- 1. CONFIGURATION (Tady se děje magie) --- */
:root {
    /* Paleta barev - Moderní Slate/Indigo */
    --primary: #00509D;
    --primary-dark: rgb(8, 25, 102);
    --primary-shade: #33699c;
    --secondary: #A5BE00;
    --secondary-dark: #94a700;
    --secondary-shade: #b8cb00;
    --tag-bg: rgba(165, 190, 0, 0.15);
    --bg-main: #fcfcfd;
    --white: #ffffff;
    --card-bg: #ffffff;
    --text-main: #00000088;
    --heading-main: #252525;
    --shade: #00000025;
    --text-white: hwb(0 100% 0% / 0.8);

    /* Fonty */
    --font-heading: 'Lexend', sans-serif;
    --font-body: 'Varela Round', sans-serif;

    /* --- TYPE SCALE --- */
    --base-size: 16px;
    /* 16px */

    /* Změň toto pro jiný "vibe" (1.200, 1.250, 1.333, 1.414) */
    --ratio: 1.250;

    /* Výpočty (neměnit) */
    --h4: calc(var(--base-size) * var(--ratio));
    --h3: calc(var(--h4) * var(--ratio));
    --h2: calc(var(--h3) * var(--ratio));
    --h1: calc(var(--h2) * var(--ratio));
    --small: calc(var(--base-size) / var(--ratio));

    /* Layout */
    --container-width: 1200px;
    --content-max-width: 1120px;
    /* Ideální šířka pro čtení */
}

/* --- PPP (Poradna) téma --- */
.theme-poradna {
    --primary: #2D7D6B;
    --primary-dark: rgb(20, 70, 60);
    --primary-shade: #5A9E8E;
    --secondary: #E8A87C;
    --tag-bg: rgba(232, 168, 124, 0.15);
}

/* --- 2. BASE STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    padding: 0;
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--base-size);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    position: relative;
    /* Allows absolute children to span the full document height */
}

main {
    min-height: 60vh;

}

/* --- 3. TYPOGRAFIE --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--heading-main);
}

h1 {
    font-size: var(--h1);
    margin-top: 2rem;
}

h2 {
    font-size: var(--h2);
    margin-top: 1.75rem;
}

h3 {
    font-size: var(--h3);
}

h4 {
    font-size: var(--h4);
}

p {
    font-family: var(--font-body);
    font-size: var(--base-size)
}

.lead {
    font-size: var(--h4);
    color: var(--text-muted);
    font-weight: 400;
}

small {
    font-size: var(--small);
}

/* --- 4. RESPONZIVNÍ LAYOUT --- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.content-box {
    max-width: var(--content-max-width);
    /* Klíčové pro Single Column */
    margin: 3rem auto;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* --- TLAČÍTKA --- */

.wp-block-button__link {
    background-color: var(--primary);
    color: var(--white);
    padding: 8px 32px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
    font-size: var(--base-size);
}

.wp-block-button__link:hover {
    background-color: var(--primary-dark);
}

button {
    padding: 16px 32px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: var(--primary-dark);
}

/* --- 5. BREAKPOINTS --- */

/* Mobil / Tablet */
@media (max-width: 768px) {
    :root {
        --base-size: 14px;
        /* Menší písmo na mobilních zařízeních */
        --ratio: 1.200;
        /* Menší skoky v nadpisech na mobilu vypadají líp */
    }

    .content-box {
        padding: 1.5rem;
        margin: 1.5rem auto;
        border-radius: 1rem;
    }
}

/* Laptop / Desktop */
@media (min-width: 1024px) {
    .site-header {
        padding: 1.5rem 0;
    }
}

/* --- 6. COOKIE CONSENT BANNER --- */
.cookie-consent-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: var(--white);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 0;
    border-top: 3px solid var(--primary);
}

.cookie-consent-overlay.visible {
    transform: translateY(0);
}

.cookie-consent-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-header svg {
    flex-shrink: 0;
}

.cookie-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--h3);
    color: var(--primary);
}

.cookie-text {
    color: var(--text-main);
    line-height: 1.6;
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 10px 24px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.cookie-btn-primary {
    background: var(--primary);
    color: var(--white);
}

.cookie-btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.cookie-btn-secondary {
    background: transparent;
    color: var(--primary);
}

.cookie-btn-secondary:hover {
    background: rgba(0, 80, 157, 0.08);
}

.cookie-btn-link {
    background: none;
    border: none;
    color: var(--text-main);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 8px;
}

.cookie-btn-link:hover {
    color: var(--primary);
}

.cookie-customize {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 0;
    margin: 0;
}

.cookie-customize.expanded {
    max-height: 300px;
    opacity: 1;
    margin: 8px 0 0 0;
}

.cookie-customize-inner {
    background: var(--bg-main);
    border-radius: 8px;
    padding: 16px 20px;
}

.cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--shade);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-label {
    flex: 1;
}

.cookie-category-label strong {
    display: block;
    color: var(--heading-main);
    font-family: var(--font-heading);
    font-size: 15px;
}

.cookie-category-label span {
    font-size: 13px;
    color: var(--text-main);
}

.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

.cookie-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.cookie-toggle input:checked+.cookie-toggle-slider {
    background: var(--secondary);
}

.cookie-toggle input:checked+.cookie-toggle-slider::before {
    transform: translateX(20px);
}

.cookie-toggle input:disabled+.cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-toggle input:disabled+.cookie-toggle-slider::before {
    opacity: 0.8;
}

.cookie-save-btn {
    margin-top: 12px;
    padding: 8px 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-save-btn:hover {
    background: var(--primary-dark);
}

/* Floating cookie settings button */
.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.cookie-settings-btn.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.cookie-settings-btn:hover {
    transform: scale(1.1);
    background: none;
}

.cookie-settings-btn svg {
    width: 100%;
    height: 100%;
    display: block;
    flex: 0 0 auto;

}

.cookie-settings-btn svg path {
    fill: var(--primary-dark);
    transition: fill 0.2s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Map placeholder */
#map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    z-index: 5;
    gap: 12px;
}

#map-placeholder svg {
    opacity: 0.3;
}

#map-placeholder p {
    color: #888;
    font-size: 15px;
    text-align: center;
    max-width: 260px;
    line-height: 1.5;
}

#map-placeholder p strong {
    color: var(--primary);
}

/* Mobile styles for cookie consent */
@media (max-width: 768px) {
    .cookie-consent-inner {
        padding: 20px 16px;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-btn-link {
        text-align: center;
        width: 100%;
    }

    .cookie-header h3 {
        font-size: 18px;
    }
}

/* Background shapes container */
.bg-shapes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    opacity: 0.05;
}

.bg-shape-1 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background-color: var(--primary);
    top: 100px;
    left: -150px;
    box-shadow: 0 2000px 0 var(--primary), 0 4000px 0 var(--primary), 0 6000px 0 var(--primary), 0 8000px 0 var(--primary), 0 10000px 0 var(--primary);
}

.bg-shape-2 {
    width: 300px;
    height: 300px;
    background-color: var(--primary-shade);
    top: 500px;
    right: -100px;
    transform: rotate(30deg);
    box-shadow: 1000px 1732px 0 var(--primary-shade), 2000px 3464px 0 var(--primary-shade), 3000px 5196px 0 var(--primary-shade), 4000px 6928px 0 var(--primary-shade), 5000px 8660px 0 var(--primary-shade);
}

.bg-shape-3 {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--secondary);
    top: 900px;
    left: 10%;
    box-shadow: 0 2000px 0 var(--secondary), 0 4000px 0 var(--secondary), 0 6000px 0 var(--secondary), 0 8000px 0 var(--secondary), 0 10000px 0 var(--secondary);
}

.bg-shape-4 {
    width: 250px;
    height: 250px;
    background-color: var(--primary);
    top: 1300px;
    right: 20%;
    transform: rotate(-15deg);
    box-shadow: -518px 1932px 0 var(--primary), -1035px 3864px 0 var(--primary), -1553px 5796px 0 var(--primary), -2071px 7727px 0 var(--primary), -2588px 9659px 0 var(--primary);
}

.bg-shape-5 {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background-color: var(--primary-shade);
    top: 1600px;
    left: -50px;
    box-shadow: 0 2000px 0 var(--primary-shade), 0 4000px 0 var(--primary-shade), 0 6000px 0 var(--primary-shade), 0 8000px 0 var(--primary-shade), 0 10000px 0 var(--primary-shade);
}

.bg-shape-6 {
    width: 200px;
    height: 200px;
    background-color: var(--secondary);
    top: 1900px;
    right: 10%;
    transform: rotate(45deg);
    box-shadow: 1414px 1414px 0 var(--secondary), 2828px 2828px 0 var(--secondary), 4243px 4243px 0 var(--secondary), 5657px 5657px 0 var(--secondary), 7071px 7071px 0 var(--secondary);
}

@media (max-width: 768px) {

    /* Zmenšíme a rovnoměrně rozprostřeme všech 6 tvarů, aby design na mobilu působil bohatěji, ale ne přeplácaně */
    .bg-shape-1 {
        width: 180px;
        height: 180px;
        left: -80px;
        top: 100px;
    }

    .bg-shape-2 {
        width: 150px;
        height: 150px;
        right: -50px;
        top: 400px;
    }

    .bg-shape-3 {
        width: 80px;
        height: 80px;
        left: 10%;
        top: 750px;
    }

    .bg-shape-4 {
        width: 120px;
        height: 120px;
        right: -20px;
        top: 1100px;
    }

    .bg-shape-5 {
        width: 160px;
        height: 160px;
        left: -30px;
        top: 1450px;
    }

    .bg-shape-6 {
        width: 100px;
        height: 100px;
        right: 10%;
        top: 1800px;
    }
}

.page-hero {
    background-color: var(--primary);
    padding: 40px 0;
    position: relative;
    margin-bottom: 40px;
    color: var(--white);
    overflow: hidden;
    /* Pro oříznutí tvarů */
}

/* Geometrické tvary na pozadí */
.page-hero::before,
.page-hero::after {
    content: '';
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
}

.page-hero::before {
    width: 300px;
    height: 300px;
    background: white;
    border-radius: 50%;
    top: -100px;
    right: 10%;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    color: var(--white);
    margin: 0;
    text-align: center;
    font-size: var(--h1);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    margin-top: 10px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}