@charset "utf-8";

/* =========================================================
   TachoEdu – Teal / Emerald Professional design
   Alternativní elegantní vzhled
   ========================================================= */

:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --primary-soft: #ccfbf1;
    --accent: #0f4c81;
    --bg: #f0fdfa;
    --bg-card: #ffffff;
    --text: #134e4a;
    --text-muted: #5eead4;
    --text-body: #1e293b;
    --border: #99f6e4;
    --border-light: #e2e8f0;
    --shadow: 0 4px 24px rgba(13, 148, 136, 0.10);
    --shadow-hover: 0 10px 32px rgba(13, 148, 136, 0.16);
    --radius: 14px;
    --radius-sm: 9px;
    --transition: all 0.25s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-body);
    background: linear-gradient(160deg, #f0fdfa 0%, #ecfeff 50%, #f8fafc 100%);
    -webkit-font-smoothing: antialiased;
}

/* ---------- HLAVNÍ KONTEJNER ---------- */
.page {
    max-width: 1160px;
    margin: 28px auto;
    background: var(--bg-card);
    border: 1px solid rgba(13, 148, 136, 0.12);
    border-radius: 18px;
    box-shadow: var(--shadow);
    min-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* ---------- HORNÍ BANNER + LOGO ---------- */
.top {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 24px 30px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 55%, #115e59 100%);
    color: white;
}

.logo { flex-shrink: 0; }

.logo img,
img.logo {
    width: 280px;
    max-width: min(280px, 42vw);
    height: auto;
    border-radius: 12px;
    background: white;
    padding: 8px 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.22);
    object-fit: contain;
}

.banner {
    background: transparent;
    color: white;
    padding: 6px 10px;
    font-size: 1.32rem;
    font-weight: 600;
    line-height: 1.35;
    flex: 1;
    text-align: center;
    letter-spacing: -0.01em;
}

/* ---------- MENU ---------- */
.menu-toggle {
    display: none;
    background: var(--primary-dark);
    color: white;
    padding: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.04em;
    transition: var(--transition);
}

.menu-toggle:hover { background: #115e59; }

nav#main-menu {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 2000;
    overflow: visible;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    box-shadow: 0 2px 14px rgba(13, 148, 136, 0.06);
}

nav#main-menu > a,
nav#main-menu > .has-submenu {
    position: relative;
}

nav#main-menu a,
nav#main-menu .menu-label {
    display: block;
    padding: 15px 18px;
    color: #334155;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.94rem;
    letter-spacing: 0.02em;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

nav#main-menu a:hover,
nav#main-menu .has-submenu:hover > .menu-label {
    background: #f0fdfa;
    color: var(--primary-dark);
    border-bottom-color: var(--primary-light);
}

nav#main-menu a.active {
    background: #ccfbf1;
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

/* Podmenu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(13, 148, 136, 0.18);
    padding: 8px 0;
    z-index: 2100;
    font-size: 0.92rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    border: 1px solid #e2e8f0;
    border-top: none;
}

.has-submenu:hover > .submenu { display: block; }

.level-2 {
    top: 0;
    left: 100%;
    min-width: 220px;
    border-radius: var(--radius-sm);
    border-top: 1px solid #e2e8f0;
}

.submenu-title {
    padding: 10px 22px;
    font-weight: 700;
    color: var(--primary-dark);
    background: #f0fdfa;
    margin-bottom: 4px;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.menu-divider {
    margin: 8px 16px;
    border: 0;
    border-top: 1px solid #e2e8f0;
}

.submenu a {
    display: block;
    padding: 10px 22px;
    color: #334155;
    text-decoration: none;
    line-height: 1.4;
    transition: var(--transition);
}

.submenu a:hover {
    background: var(--primary);
    color: white;
}

.submenu a.active {
    background: #ccfbf1;
    color: var(--primary-dark);
    font-weight: 700;
}

/* ---------- OBSAH ---------- */
.content {
    padding: 34px 38px;
    flex: 1;
}

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

.nadpis1 {
    color: var(--primary-dark);
    text-align: center;
    line-height: 1.25;
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

.nadpis2,
.nadpis3 {
    color: #0f766e;
    line-height: 1.35;
    font-weight: 600;
}

h1, h2, h3, h4 {
    color: #0f766e;
    line-height: 1.3;
}

p {
    line-height: 1.7;
    margin: 0 0 1em;
    color: #1e293b;
}

.li, ul li {
    line-height: 1.7;
    margin-bottom: 0.45em;
}

ul { padding-left: 1.4em; }

/* Tooltipy */
.tooltip {
    position: relative;
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
}

.tooltip:hover { color: var(--primary-dark); }

.tooltiptext {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #134e4a;
    color: #fff;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s;
    z-index: 50;
}

.tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #134e4a transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    opacity: 1;
    visibility: visible;
}

.contact-icon {
    font-size: 1.4em;
    margin-left: 8px;
    vertical-align: middle;
    transition: transform 0.25s ease;
}

.contact-icon.email { color: #e11d48; }
.contact-icon.phone { color: #0d9488; }

.contact-icon:hover { transform: scale(1.25); }

/* Obrázky */
.obrazek-modry {
    border-radius: 14px;
    border: 5px solid var(--primary);
    max-width: 100%;
    height: auto;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.obrazek-modry:hover { box-shadow: var(--shadow-hover); }

.image-wrapper {
    margin: 18px 0;
    text-align: center;
}

.image-wrapper img {
    height: auto;
    display: block;
    margin: 0 auto;
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* Layout */
.content-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.two-column {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    align-items: flex-start;
}

.column {
    flex: 1;
    min-width: 280px;
}

.column.left { order: 1; }
.column.right { order: 2; }

.columns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.col {
    flex: 1;
    min-width: 250px;
}

/* Tabulky */
.responsive-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-sm);
    overflow: visible;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.responsive-table th {
    background: var(--primary);
    color: white;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
}

.responsive-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.responsive-table tr:hover td {
    background: #f0fdfa;
}

/* ---------- FOOTER ---------- */
footer {
    text-align: center;
    padding: 22px 20px;
    color: #64748b;
    background: #f0fdfa;
    border-top: 1px solid #ccfbf1;
    margin-top: auto;
    font-size: 0.92rem;
}

/* ---------- DISKUZE / POSTY ---------- */
.container,
.post,
.post-form {
    padding: 18px;
    margin: 14px auto;
    width: 100%;
    max-width: 100%;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(13, 148, 136, 0.06);
    border: 1px solid #e2e8f0;
}

@media (min-width: 769px) {
    .container { padding: 28px; max-width: 900px; }
    .post { padding: 22px; }
}

.post { margin-bottom: 18px; }

.like-btn, .btn, .download-btn, .delete-btn {
    display: inline-block;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn:hover, .download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.like-btn {
    background: #f0fdfa;
    color: var(--primary-dark);
    border: 1px solid #99f6e4;
}

.like-btn:hover { background: #ccfbf1; }

.delete-btn {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.delete-btn:hover { background: #fee2e2; }

.discussion-image {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 10px 0;
}

/* ---------- FORMULÁŘE ---------- */
.registration-form { max-width: 100%; margin: 0 auto; }

.participant-block {
    border: 2px solid #99f6e4;
    padding: 22px;
    margin-bottom: 24px;
    border-radius: var(--radius);
    background: #f0fdfa;
}

.participant-block h4 {
    color: var(--primary-dark);
    margin-top: 0;
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #334155;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 16px;
    box-sizing: border-box;
    transition: var(--transition);
    background: white;
    color: #1e293b;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.consent-section {
    background: #f0fdfa;
    padding: 20px;
    border-radius: var(--radius);
    margin: 24px 0;
    border-left: 5px solid var(--primary);
}

.confirmation-summary {
    background: #f0fdf4;
    padding: 24px;
    border-radius: var(--radius);
    border: 2px solid #86efac;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.summary-table th, .summary-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.summary-table th {
    background: #ccfbf1;
    color: var(--primary-dark);
}

.login-box, .register-box {
    max-width: 420px;
    margin: 40px auto;
    padding: 36px 32px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
}

.login-box h2, .register-box h2 {
    text-align: center;
    margin-top: 0;
    color: var(--primary-dark);
}

.msg {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.msg.success, .success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}

.msg.error, .error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

a {
    color: var(--primary);
    transition: color 0.2s;
}

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

/* ---------- RESPONZIVITA ---------- */
@media (max-width: 900px) {
    .page {
        margin: 12px;
        border-radius: 14px;
    }
    .top {
        flex-direction: column;
        text-align: center;
        padding: 18px 16px;
        gap: 12px;
    }
    .logo img, img.logo { width: 200px; max-width: 70vw; }
    .banner { font-size: 1.12rem; padding: 4px; }
    .content { padding: 22px 18px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }

    nav#main-menu {
        display: none;
        flex-direction: column;
        background: white;
        border-bottom: none;
        box-shadow: none;
    }

    nav#main-menu.show { display: flex; }

    nav#main-menu > a,
    nav#main-menu > .has-submenu > .menu-label,
    nav#main-menu > .has-submenu > a {
        padding: 15px 20px;
        border-bottom: 1px solid #e2e8f0;
        border-left: 3px solid transparent;
    }

    nav#main-menu a.active,
    nav#main-menu a:hover {
        border-left-color: var(--primary);
        border-bottom-color: #e2e8f0;
        background: #f0fdfa;
    }

    .submenu {
        position: relative;
        top: 0;
        left: 0;
        box-shadow: none;
        background: #f0fdfa;
        display: none;
        border: none;
        border-radius: 0;
    }

    .has-submenu.open > .submenu,
    .submenu.open { display: block; }

    .level-2 {
        left: 0;
        padding-left: 16px;
        background: #ecfdf5;
        border: none;
    }

    .two-column {
        flex-direction: column;
        gap: 24px;
    }

    .column { min-width: 100%; }

    .obrazek-modry {
        width: 100% !important;
        border-width: 4px;
    }

    .responsive-table {
        min-width: auto;
        display: block;
        overflow-x: auto;
    }

    .responsive-table td,
    .responsive-table th {
        padding: 8px 6px;
        font-size: 0.9em;
    }

    .nadpis1 { font-size: 1.5rem; }
    body { font-size: 15px; }
    h1 { font-size: 1.4rem; }
    h2, h3 { font-size: 1.15rem; }

    .participant-block {
        padding: 16px;
        margin-bottom: 18px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select { font-size: 16px; }

    .confirmation-summary { padding: 16px; }

    .login-box, .register-box {
        margin: 20px 15px;
        padding: 28px 20px;
    }

    .col, .column {
        width: 100% !important;
        margin: 0 0 15px 0;
    }
}

@media (max-width: 480px) {
    .page {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }
    .banner { font-size: 1.05rem; }
    .content { padding: 16px 14px; }
}

.download-container {
    text-align: center;
    margin: 24px 0;
}

.admin-pass {
    font-family: monospace;
    background: #f0fdfa;
    padding: 4px 8px;
    border-radius: 4px;
}

.link {
    color: var(--primary);
    font-weight: 500;
}

[align="center"] { text-align: center; }
[align="justify"] { text-align: justify; }

/* ===== Menu tlačítka: plná barva JEN s třídou .active ===== */

/* Základ – jako běžná položka menu (ne „svítí“) */
nav#main-menu > a.menu-btn,
nav#main-menu a.menu-btn {
    border-radius: 8px;
    margin: 4px 3px;
    padding: 12px 14px !important;
    font-weight: 600;
    align-self: center;
    background: transparent !important;
    color: #334155 !important;
    border: 1px solid transparent !important;
    border-bottom: 3px solid transparent !important;
    box-shadow: none !important;
}

nav#main-menu > a.menu-btn:hover,
nav#main-menu a.menu-btn:hover {
    background: #f0fdfa !important;
    color: #0f766e !important;
    border-bottom-color: #14b8a6 !important;
}

/* Primary – aktivní */
nav#main-menu a.menu-btn-primary.active {
    background: #0d9488 !important;
    color: #ffffff !important;
    border: 1px solid #0f766e !important;
    border-bottom: 3px solid #0f766e !important;
}

/* Outline – aktivní */
nav#main-menu a.menu-btn-outline.active {
    background: #ccfbf1 !important;
    color: #0f766e !important;
    border: 2px solid #0d9488 !important;
}

/* Admin – aktivní */
nav#main-menu a.menu-btn-admin.active {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #0f172a !important;
}

/* Běžné active (ne tlačítko) */
nav#main-menu > a.active:not(.menu-btn) {
    background: #ccfbf1;
    color: #0f766e;
    border-bottom-color: #0d9488;
}

nav#main-menu .menu-label.active {
    background: #ccfbf1;
    color: #0f766e;
    border-bottom: 3px solid #0d9488;
}

nav#main-menu .submenu a.active {
    background: #0d9488 !important;
    color: #fff !important;
    font-weight: 700;
}

@media (max-width: 768px) {
    /* Všechna položky menu na mobilu zarovnat vlevo (včetně .menu-btn) */
    nav#main-menu > a,
    nav#main-menu > .has-submenu > .menu-label,
    nav#main-menu a.menu-btn {
        text-align: left !important;
        align-self: stretch !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 15px 20px !important;
        border-left: 3px solid transparent !important;
        border-bottom: 1px solid #e2e8f0 !important;
        border-right: none !important;
        border-top: none !important;
    }
    nav#main-menu a.menu-btn.active,
    nav#main-menu a.menu-btn:hover {
        border-left-color: var(--primary) !important;
        background: #f0fdfa !important;
        color: #0f766e !important;
    }
}