/* =====================================================
   MŠ Letohradská – nový web
   Paleta: oranžová #FF8C2D, žlutá #FFD600
   Styl: hravý, zaoblené rohy, čisté CSS
   ===================================================== */

/* ---------- Reset & základ ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --orange:       #FF8C2D;
    --orange-dark:  #E06A00;
    --orange-light: #FFD0A0;
    --yellow:       #FFD600;
    --yellow-light: #FFF7C0;
    --bg:           #FFF9F2;
    --bg-sidebar:   #FFF3E0;
    --bg-card:      #FFFFFF;
    --text:         #2E2E2E;
    --text-muted:   #757575;
    --border:       #FFD0A0;
    --radius:       14px;
    --radius-sm:    8px;
    --shadow:       0 2px 12px rgba(255, 140, 45, 0.15);
    --shadow-hover: 0 6px 24px rgba(255, 140, 45, 0.28);
    --font-main:    'Nunito', 'Segoe UI', Arial, sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: var(--orange-dark);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover { color: var(--orange); text-decoration: underline; }

img { max-width: 100%; height: auto; }

.user-avatar {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px;
    min-height: 72px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
}

.avatar-circle {
    display: inline-block !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    background: #fff;
    border: 3px solid #E3AE2C;
    flex-shrink: 0;
    position: relative;
}

.avatar-circle img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    max-width: none !important;
    max-height: none !important;
}

.sidebar-avatar {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    display: block !important;
    margin: 0 auto 14px !important;
    text-align: center;
}

.profile-avatar {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
}

/* ---------- Wrapper ---------- */
.page-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- HEADER ---------- */
.site-header {
    display: block;
    line-height: 0;
}

.site-header a {
    display: block;
}

.site-header-logo {
    width: 100%;
    max-width: 1320px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ---------- NAVIGACE ---------- */
.main-nav {
    background: var(--orange-dark);
}

.main-nav ul {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.main-nav ul li a {
    display: block;
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 11px 18px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: background 0.2s;
    letter-spacing: 0.02em;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background: var(--orange);
    color: #fff;
    text-decoration: none;
}

/* ---------- DVOUSLOUPCOVÉ TĚLO ---------- */
.page-body {
    max-width: 1320px;
    margin: 28px auto 0;
    padding: 0 16px 40px;
    display: grid;
    grid-template-columns: 220px 1fr 240px;
    gap: 24px;
    align-items: start;
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}
.breadcrumb a { color: var(--orange); }
.breadcrumb span::before { content: " › "; }

/* ---------- KARTY ČLÁNKŮ ---------- */
.articles-list { display: flex; flex-direction: column; gap: 22px; }

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 28px;
    border-left: 5px solid var(--orange);
    transition: box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.article-card h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--orange-dark);
}

.article-card h2 a { color: inherit; }
.article-card h2 a:hover { text-decoration: underline; }

.article-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.article-meta .tag {
    background: var(--yellow-light);
    color: var(--orange-dark);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
}

.article-excerpt { font-size: 0.95rem; color: #444; margin-bottom: 14px; }

.btn {
    display: inline-block;
    padding: 7px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border: none;
}

.btn-primary {
    background: #E3AE2C;
    color: #fff;
}

.btn-primary:hover {
    background: #c49520;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(163,123,20,0.4);
}

.btn-secondary {
    background: #fdf0c4;
    color: #7a5a00;
}

.btn-secondary:hover {
    background: #E3AE2C;
    color: #fff;
    text-decoration: none;
}

/* ---------- DETAIL ČLÁNKU ---------- */
.article-full {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 36px;
}

.article-full h1 {
    font-size: 1.7rem;
    color: var(--orange-dark);
    font-weight: 800;
    margin-bottom: 8px;
}

.admin-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.admin-dashboard-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--yellow-light); color: var(--text); transition: border-color 0.2s, transform 0.2s; }
.admin-dashboard-card strong { color: var(--orange-dark); font-size: 1.1rem; }
.admin-dashboard-card span { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.admin-dashboard-card:hover { border-color: var(--orange); color: var(--text); text-decoration: none; transform: translateY(-2px); }
.profile-overview { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.profile-overview-avatar { flex: 0 0 auto; }
.profile-avatar-fallback { width: 80px; height: 80px; border-radius: 50%; background: #E3AE2C; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; }
.profile-overview-details p { margin: 0 0 10px; }
.profile-overview-details strong, .profile-overview-details span { display: block; }
.profile-overview-details strong { color: var(--orange-dark); font-size: 0.85rem; }
.settings-avatar-row { display: flex; align-items: center; gap: 20px; }
.settings-help { display: block; font-size: 0.78rem; margin-top: 4px; }
.settings-divider { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.user-permissions-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.user-permissions-form select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--text); }
.user-permissions-form .btn { padding: 6px 10px; border: 0; cursor: pointer; }
.page-order-form { display: inline-flex; gap: 4px; }
.order-button { width: 28px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: var(--yellow-light); color: var(--orange-dark); cursor: pointer; }
.order-button:hover { background: var(--orange); color: #fff; }

@media (max-width: 760px) {
    .admin-dashboard-grid { grid-template-columns: 1fr; }
}

.article-full .article-meta { margin-bottom: 20px; }

.article-full .content { line-height: 1.8; }
.article-full .content p { margin-bottom: 1rem; }
.article-full .content h2 { color: var(--orange-dark); margin: 1.4rem 0 0.6rem; font-size: 1.15rem; }
.article-full .content ul,
.article-full .content ol { margin: 0.6rem 0 1rem 1.6rem; }

/* ---------- STRÁNKOVÁNÍ ---------- */
.pagination {
    display: flex;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--bg-card);
    color: var(--orange-dark);
    border: 2px solid var(--border);
    transition: background 0.2s, color 0.2s;
}

.pagination a:hover { background: var(--orange); color: #fff; text-decoration: none; border-color: var(--orange); }
.pagination span.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* ---------- SIDEBAR ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-block {
    background: var(--bg-sidebar);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar-block-title {
    background: #E3AE2C;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 10px 18px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar-block-body { padding: 14px 18px; }

.sidebar-nav { list-style: none; }

.sidebar-nav li + li { border-top: 1px solid var(--border); }

.sidebar-nav li a {
    display: block;
    padding: 9px 4px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    transition: color 0.2s, padding-left 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: var(--orange-dark);
    padding-left: 8px;
    text-decoration: none;
}

.sidebar-nav li a::before { content: "›  "; color: var(--orange); font-weight: 900; }

/* info box */
.info-box {
    background: var(--yellow-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.88rem;
    color: var(--text);
    border-left: 4px solid var(--yellow);
}

.info-box strong { color: var(--orange-dark); }

/* ---------- PŘIHLÁŠENÍ (sidebar) ---------- */
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    margin-bottom: 8px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.login-form input:focus { border-color: var(--orange); }

.login-form .btn { width: 100%; justify-content: center; }

/* ---------- HERO BANNER (volitelný) ---------- */
.hero {
    background: linear-gradient(135deg, var(--orange) 0%, var(--yellow) 100%);
    border-radius: var(--radius);
    padding: 36px 36px;
    color: #fff;
    margin-bottom: 22px;
    box-shadow: var(--shadow-hover);
    text-align: center;
}

.hero h1 {
    font-size: 1.9rem;
    font-weight: 900;
    text-shadow: 0 2px 6px rgba(0,0,0,0.18);
    margin-bottom: 10px;
}

.hero p { font-size: 1rem; opacity: 0.93; }

/* ---------- TABULKY ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 12px;
}

.data-table th {
    background: var(--orange);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
}

.data-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
}

.data-table tr:hover td { background: var(--yellow-light); }

/* ---------- FORMULÁŘE ---------- */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 5px;
    color: var(--orange-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255,140,45,0.15);
}

.form-group textarea { min-height: 120px; resize: vertical; }

.rich-editor { width: 100%; border: 2px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--yellow-light); border-bottom: 1px solid var(--border); }
.rich-button { border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--orange-dark); padding: 6px 9px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.rich-button:hover, .rich-button:focus { background: var(--orange); color: #fff; }
.rich-select { border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--orange-dark); padding: 5px 7px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.rich-color { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--orange-dark); padding: 3px 6px; cursor: pointer; }
.rich-color span { font-weight: 800; }
.rich-color input { width: 24px; height: 24px; padding: 0; border: 0; cursor: pointer; }
.rich-content { display: block; width: 100%; min-height: 260px; max-height: 560px; overflow-y: auto; box-sizing: border-box; padding: 14px; outline: none; line-height: 1.6; border: 0; }
.rich-content:focus { box-shadow: inset 0 0 0 2px rgba(255,140,45,0.15); }
.rich-content h2 { color: var(--orange-dark); margin: 1rem 0 0.5rem; font-size: 1.2rem; }
.rich-content ul, .rich-content ol { margin: 0.6rem 0 1rem 1.6rem; }
.rich-content blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--orange); }
.sidebar-separator { margin: 10px 0 4px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--yellow-light); color: var(--orange-dark); font-weight: 800; font-size: 0.82rem; }
.article-full .content font[size="2"] { font-size: 0.85em; }
.article-full .content font[size="4"] { font-size: 1.25em; }
.article-full .content font[size="5"] { font-size: 1.5em; }
.article-full .content div[align="center"] { text-align: center; }
.article-full .content div[align="right"] { text-align: right; }
.article-full .content div[align="justify"] { text-align: justify; }
.article-full .content p[align="center"] { text-align: center; }
.article-full .content p[align="right"] { text-align: right; }
.article-full .content p[align="justify"] { text-align: justify; }
.article-full .content [align="left"] { text-align: left; }
.article-full .content [align="center"] { text-align: center; }
.article-full .content [align="right"] { text-align: right; }
.article-full .content [align="justify"] { text-align: justify; }
.article-full .content img { max-width: 100%; height: auto; }
.article-full .content img[align="left"] { display: block; margin: 0 auto 12px 0; }
.article-full .content img[align="center"] { display: block; margin: 0 auto 12px; }
.article-full .content img[align="right"] { display: block; margin: 0 0 12px auto; }
.rich-content img { max-width: 100%; height: auto; cursor: pointer; }
.rich-content img[align="center"] { display: block; margin: 0 auto; }
.rich-content img[align="right"] { display: block; margin-left: auto; }
.rich-content [align="left"] { text-align: left; }
.rich-content [align="center"] { text-align: center; }
.rich-content [align="right"] { text-align: right; }
.rich-content [align="justify"] { text-align: justify; }
.article-full .content table,
.rich-content table { width: 100%; margin: 16px 0; border-collapse: collapse; table-layout: fixed; }
.rich-content table:focus,
.rich-content table[data-active="true"] { outline: 2px solid var(--orange); outline-offset: 2px; }
.article-full .content th,
.article-full .content td,
.rich-content th,
.rich-content td { padding: 9px 10px; border: 1px solid var(--table-border-color, var(--border)); text-align: left; vertical-align: top; word-wrap: break-word; }
.article-full .content table[data-border-color="transparent"] th,
.article-full .content table[data-border-color="transparent"] td,
.rich-content table[data-border-color="transparent"] th,
.rich-content table[data-border-color="transparent"] td { border-color: transparent; }
.article-full .content table[data-border-color="#d95f02"] th,
.article-full .content table[data-border-color="#d95f02"] td,
.rich-content table[data-border-color="#d95f02"] th,
.rich-content table[data-border-color="#d95f02"] td { border-color: #d95f02; }
.article-full .content table[data-border-color="#e3ae2c"] th,
.article-full .content table[data-border-color="#e3ae2c"] td,
.rich-content table[data-border-color="#e3ae2c"] th,
.rich-content table[data-border-color="#e3ae2c"] td { border-color: #e3ae2c; }
.article-full .content table[data-border-color="#5b9bd5"] th,
.article-full .content table[data-border-color="#5b9bd5"] td,
.rich-content table[data-border-color="#5b9bd5"] th,
.rich-content table[data-border-color="#5b9bd5"] td { border-color: #5b9bd5; }
.article-full .content table[data-border-color="#6aaa64"] th,
.article-full .content table[data-border-color="#6aaa64"] td,
.rich-content table[data-border-color="#6aaa64"] th,
.rich-content table[data-border-color="#6aaa64"] td { border-color: #6aaa64; }
.article-full .content table[data-border-color="#555555"] th,
.article-full .content table[data-border-color="#555555"] td,
.rich-content table[data-border-color="#555555"] th,
.rich-content table[data-border-color="#555555"] td { border-color: #555555; }
.article-full .content th,
.rich-content th { background: var(--yellow-light); color: var(--orange-dark); font-weight: 800; }
.article-full .content table[bgcolor="transparent"],
.rich-content table[bgcolor="transparent"] { background: transparent; }

.form-error {
    color: #c0392b;
    font-size: 0.83rem;
    margin-top: 4px;
}

.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 0.92rem;
}

.alert-success { background: #e8f8e8; color: #1a6e1a; border-left: 4px solid #27ae60; }
.alert-error   { background: #fdecea; color: #891a1a; border-left: 4px solid #e74c3c; }
.alert-info    { background: var(--yellow-light); color: var(--orange-dark); border-left: 4px solid var(--yellow); }

.download-list { display: grid; gap: 14px; }
.download-item, .download-admin-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; background: #fff; }
.download-item { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.download-item h2 { margin: 0 0 6px; font-size: 1.1rem; color: var(--orange-dark); }
.download-item p { margin: 0 0 6px; }
.download-admin-item { margin-top: 14px; }
.download-admin-item .form-group { margin-bottom: 10px; }
.download-admin-item .form-group label { color: var(--orange-dark); }
.download-admin-item .btn { margin: 10px 8px 0 0; }

/* ---------- FOOTER ---------- */
.site-footer {
    background: #FFF9F2;
    color: var(--text);
    padding: 30px 0 16px;
    margin-top: 40px;
    font-size: 0.87rem;
}

.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
}

.footer-section h4 {
    color: #E3AE2C;
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.footer-section p,
.footer-section address { font-style: normal; line-height: 1.8; }

.footer-section a { color: var(--text); }
.footer-section a:hover { color: #E3AE2C; }

.footer-bottom {
    max-width: 1320px;
    margin: 20px auto 0;
    padding: 16px 16px 0;
    border-top: 1px solid #E3AE2C;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- UTILITY ---------- */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); font-size: 0.88rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
