:root {
    --blue: #1a3a8f;
    --red: #e63329;
    --white: #ffffff;
    --light-gray: #f5f7fa;
    --text: #1a1a2e;
    --text-muted: #555;
    --font:  system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --green: #16a34a;
    --radius: 8px;
    --transition: 0.25s ease;
    --max-width: 1160px;
    --avatar-size: 150px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* NAVBAR */
header { background: var(--white); border-bottom: 1px solid #e8eaf0; position: sticky; top: 0; z-index: 100; }
.navbar { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; height: 72px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; }
.logo img { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-family: var(--font); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); transition: color var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--red); }
a.btn-netlab { background: var(--blue); color: var(--white); padding: 0.5rem 1.2rem; border-radius: var(--radius); text-align: center; display: inline-block; transition: background var(--transition); }
a.btn-netlab:hover { opacity: 0.85; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--blue); cursor: pointer; }

/* SECTIONS */
section { scroll-margin-top: 72px; }
.section-header { text-align: center; padding: 4rem 2rem 2.5rem; background: var(--light-gray); border-bottom: 1px solid #dde1eb; }
.section-header h2 { font-family: var(--font); font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; color: var(--blue); margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); }
.section-content { max-width: var(--max-width); margin: 0 auto; padding: 3rem 2rem; }

/* HERO — levá strana identická s portálem (informacni-site/index.html)
   padding-top musí odpovídat .content { padding: 2.5rem } v predmet.css (vizuální zarovnání avatara) */
#uvod { min-height: calc(100vh - 72px); display: flex; flex-direction: column; padding: 2.5rem 2rem; }
.hero { flex: 1; max-width: var(--max-width); width: 100%; margin: 0 auto; padding: 1.5rem 2rem 3rem; display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 1.5rem; position: relative; }
/* Gradient border: nahoře i dole viditelná linka + kousek bočních, uprostřed mizí */
.hero::before { content: ''; position: absolute; inset: 0;
                border-radius: var(--radius); padding: 1px;
                background: linear-gradient(to bottom, #c7d2fe 0%, #c7d2fe 5%, transparent 20%, transparent 80%, #c7d2fe 95%, #c7d2fe 100%);
                -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
                -webkit-mask-composite: xor;
                mask-composite: exclude;
                pointer-events: none; }
#intro-icon { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: clamp(160px, 28vw, 360px); height: auto; pointer-events: none; z-index: 1000; }
.bubble-cursor { display: inline-block; width: 2px; height: 1em; background: var(--blue); margin-left: 2px; vertical-align: text-bottom; animation: blink 0.8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* AVATAR + BUBLINA (z predmet.css — home-view) */
.home-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1rem 0 0.25rem;
    margin-bottom: 0.25rem;
    position: relative;
}
.home-avatar-wrap {
    flex-shrink: 0;
    margin-top: -1rem;
    margin-bottom: 15px;
}
.home-avatar-wrap canvas { width: var(--avatar-size); height: var(--avatar-size); display: block; }
.home-bubble-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 0.5rem;
    margin-bottom: 15px;
}
.home-bubble {
    position: relative;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0 10px 10px 10px;
    padding: 0.75rem 1.1rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
}
.home-chat-sender {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 0.2rem;
}

/* FAQ v bublině */
.bubble-faq-list { display: none; list-style: none; margin: 0.5rem 0 0; padding: 0; }
.bubble-faq-list li { margin: 0.3rem 0; }
.bubble-faq-list button { background: none; border: none; padding: 0.25rem 0; cursor: pointer; color: var(--blue); font-size: 0.95rem; text-align: left; text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s; }
.bubble-faq-list button:hover { color: var(--blue); }
.bubble-faq-close { display: none; position: absolute; top: 0.5rem; right: 0.6rem; background: none; border: none; color: #a0a8c0; font-size: 0.85rem; line-height: 1; cursor: pointer; padding: 0.1rem 0.2rem; transition: color 0.2s; }
.bubble-faq-close:hover { color: var(--text); }

/* FAQ MODAL */
.faq-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 500; align-items: center; justify-content: center; padding: 1rem; }
.faq-modal-overlay.open { display: flex; }
.faq-modal { background: var(--white); border-radius: 12px; padding: 1.75rem 2rem; max-width: 520px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,0.18); position: relative; max-height: 80vh; overflow-y: auto; }
.faq-modal-close { position: absolute; top: 0.75rem; right: 0.9rem; background: none; border: none; font-size: 1.3rem; color: #636363; cursor: pointer; line-height: 1; }
.faq-modal-close:hover { color: var(--text); }
.faq-modal-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.faq-modal-avatar { width: 36px; height: 36px; border-radius: 50%; }
.faq-modal-name { font-size: 0.72rem; font-weight: 700; color: var(--blue); letter-spacing: 0.04em; }
.faq-modal-question { font-size: 1.1rem; font-weight: 800; color: var(--blue); margin-bottom: 1rem; line-height: 1.4; }
.faq-modal-answer { font-size: 0.92rem; line-height: 1.7; color: var(--text); }
.faq-modal-answer p { margin-bottom: 0.75rem; }
.faq-modal-answer table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 0.75rem 0; }
.faq-modal-answer th, .faq-modal-answer td { padding: 0.45rem 0.75rem; border: 1px solid #c7d2fe; text-align: left; }
.faq-modal-answer th { background: #dde6ff; font-weight: 600; color: var(--blue); }
.faq-modal-btns { margin-top: 1.25rem; display: flex; gap: 0.5rem; }
.faq-modal-back { display: inline-flex; align-items: center; padding: 0.4rem 0.85rem; border-radius: var(--radius); font-size: 0.82rem; cursor: pointer; transition: background 0.2s, color 0.2s; background: #eef2ff; border: 1px solid #c7d2fe; color: var(--blue); }
.faq-modal-back:hover { background: #dde6ff; }

/* PANEL HLÁŠENÍ */
.hero-news { display: flex; flex-direction: column;
             align-items: center; gap: 0.75rem;
             padding: 2.5rem 3rem; border-radius: var(--radius);
             background: transparent; border: none; position: relative; overflow: hidden; }
/* Horní linka — stejný efekt jako divider, mizí do stran */
.hero-news::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
                     background: linear-gradient(to right, transparent 0%, #c7d2fe 15%, #c7d2fe 85%, transparent 100%);
                     pointer-events: none; }
.hero-news-text { font-size: 0.95rem; color: var(--text); line-height: 1.65; flex: 1; min-width: 0; text-align: center; }
.hero-news-text code { font-family: monospace; background: #e8edf8; padding: 0.1em 0.4em;
                       border-radius: 3px; font-size: 0.85em; }
.hero-news-novinka-row { display: flex; align-items: center; justify-content: center; gap: 0.55rem; width: 100%; }
.hero-news-novinka-icon { flex-shrink: 0; color: var(--blue); display: flex; align-items: center; opacity: 0.75; }
.hero-news-novinka { font-size: 0.88rem; color: var(--blue); font-weight: 600; transition: opacity 0.4s ease; text-align: center; }
.hero-news-dots { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 0.5rem; }
.hero-news-dot { width: 5px; height: 5px; border-radius: 50%; background: #c7d2fe; transition: background 0.3s; }
.hero-news-dot.active { background: var(--blue); }
.hero-news-quote { display: block; font-size: 1.15rem; font-style: italic; text-align: center; line-height: 1.75; color: var(--text-muted); }
.hero-news-author { display: block; text-align: right; font-size: 0.82rem; color: var(--text-muted); margin-top: 0.6rem; letter-spacing: 0.03em; }
.hero-news-divider { border: none; height: 1px;
                     background: linear-gradient(to right, transparent 5%, #c7d2fe 15%, #c7d2fe 85%, transparent 95%);
                     margin: 2rem 0; }

/* KARTY PŘEDMĚTŮ */
.hero-subjects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.subject-card { position: relative; border-radius: var(--radius); padding: 1.25rem 1.75rem; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; color: inherit; transition: box-shadow var(--transition), transform var(--transition); }
.subject-card-is  { background: #eef2ff; border: 1px solid #c7d2fe; color: #1a56c4; }
.subject-card-os  { background: #fff7ed; border: 1px solid #fdba74; color: #c2410c; }
.subject-card-iot { background: #f0f7f4; border: 1px solid #a3c9b8; color: #3d7a5f; }
.subject-card-kb  { background: #f5f0ff; border: 1px solid #d4bbfc; color: #7c3aed; }
.subject-card.disabled { opacity: 0.45; filter: grayscale(0.3); pointer-events: none; }
.subject-card-badge { flex-basis: 100%; margin-top: 0.5rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
a.subject-card:hover { box-shadow: 0 4px 20px rgba(26,58,143,0.12); transform: translateY(-2px); }
.subject-card-bg { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); opacity: 0.12; pointer-events: none; }
.subject-card-bg svg { width: 80px; height: auto; }
.subject-card-content { flex-basis: 100%; }
.subject-card-name { font-family: var(--font); font-weight: 800; font-size: 1.1rem; color: currentColor; margin-bottom: 0.2rem; }
.subject-card-cta { font-family: var(--font); font-weight: 700; font-size: 0.88rem; color: var(--blue); white-space: nowrap; margin-top: 0.5rem; }

/* ROADMAPA */
.hero-roadmap-wrap { padding: 0.5rem 1rem; }
.roadmap-track { display: flex; align-items: flex-start; position: relative; }
/* Horizontální linka přes celou šířku */
.roadmap-track::before { content: ''; position: absolute; top: 8px; left: 0; right: 0; height: 1px;
                          background: linear-gradient(to right, transparent 0%, #c7d2fe 8%, #c7d2fe 92%, transparent 100%);
                          z-index: 0; }
.roadmap-node { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.55rem; position: relative; z-index: 1; }
.roadmap-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; box-sizing: border-box; }
.roadmap-dot-done     { background: var(--blue); }
.roadmap-dot-active   { background: #fff; border: 2px solid var(--blue); box-shadow: 0 0 0 3px rgba(26,58,143,0.15); }
.roadmap-dot-upcoming { background: #eef2ff; border: 2px solid #c7d2fe; }
.roadmap-info { text-align: center; }
.roadmap-info strong  { display: block; font-size: 0.78rem; font-weight: 700; color: var(--blue); line-height: 1.4; }
.roadmap-info span    { display: block; font-size: 0.73rem; color: var(--text-muted); line-height: 1.4; margin-top: 0.1rem; }


/* KALENDÁŘ */
.calendar-embed { border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 20px rgba(26,58,143,0.10); }

/* FOOTER */
footer { background: var(--light-gray); border-top: 1px solid #dde1eb; text-align: center; padding: 2rem; font-family: var(--font); font-weight: 700; color: var(--blue); font-size: 0.95rem; }
footer .copyright { font-weight: 400; font-family: var(--font); color: var(--text-muted); font-size: 0.85rem; margin-top: 0.3rem; }

/* BTN NAHORU */
#btn-nahoru { position: fixed; bottom: 2rem; right: 2rem; background: var(--blue); color: var(--white); border: none; border-radius: 50%; width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(26,58,143,0.2); transition: background var(--transition), transform var(--transition); z-index: 99; }
#btn-nahoru:hover { background: var(--blue); transform: translateY(-2px); }
#btn-nahoru.visible { display: flex; }

/* KALENDÁŘ */
#kalendar    { background: var(--light-gray); }
#kal-widget  { padding: 1.25rem 1.5rem; background: var(--white); }
#kalendar .section-content { padding-bottom: 100px; }
#kal-content { height: 550px; overflow-y: auto; }
.kal-footer  { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; }
#kal-updated { font-size: 0.72rem; color: #636363; }
.kal-add-link { font-size: 0.72rem; color: var(--blue); text-decoration: none; }
.kal-add-link:hover { text-decoration: underline; }
.kal-grid { width: 100%; }
.kal-weekdays { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin-bottom: 4px; }
.kal-weekday  { text-align: center; font-weight: 800; font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: #636363; padding: 0.2rem 0; }
.kal-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.kal-day  { min-height: 80px; border-radius: 6px; border: 1px solid #c8cdd8; padding: 0.35rem 0.4rem; background: var(--white); min-width: 0; overflow: hidden; }
.kal-day.other-month .kal-day-num { color: #767676; font-weight: 400; }
.kal-day.today { border-color: var(--blue); border-width: 2px; }
.kal-day.today .kal-day-num { background: var(--blue); color: var(--white); }
.kal-day-num  { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 0.78rem; font-weight: 800; color: #111; margin-bottom: 2px; }
.kal-day-events { display: flex; flex-direction: column; gap: 2px; }
.kal-event { font-size: 0.68rem; line-height: 1.3; padding: 1px 4px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.kal-event.allday { background: var(--blue); color: var(--white); border-radius: 3px; }
.kal-event.timed  { background: none; color: #333; padding-left: 0; }
.kal-event.timed::before { content: "●"; color: var(--blue); font-size: 0.7em; vertical-align: middle; margin-right: 3px; }
.kal-event.cont   { background: var(--blue); color: var(--white); border-radius: 3px; }
.kal-more { font-size: 0.65rem; color: #636363; padding: 0 4px; }
.kal-list { display: flex; flex-direction: column; gap: 0.4rem; }
.kal-list-month { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.07em; text-transform: uppercase; color: #636363; padding: 0.75rem 0 0.3rem; border-bottom: 1px solid #e8eaf0; margin-bottom: 0.2rem; }
.kal-item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.5rem 0.65rem; border-radius: 6px; border: 1px solid #d0d4e0; background: var(--white); cursor: pointer; }
.kal-item.today-ev { border-color: var(--blue); border-left-width: 3px; }
.kal-item-date { flex-shrink: 0; text-align: center; min-width: 36px; }
.kal-item-day  { font-weight: 800; font-size: 1.1rem; color: var(--blue); line-height: 1; }
.kal-item-dow  { font-size: 0.68rem; color: #636363; text-transform: uppercase; letter-spacing: 0.05em; }
.kal-item-body { flex: 1; min-width: 0; }
.kal-item-title { font-weight: 600; font-size: 0.9rem; line-height: 1.3; }
.kal-item-sub   { font-size: 0.76rem; color: #636363; margin-top: 1px; }
.kal-controls { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.85rem; flex-wrap: wrap; }
.kal-view-switcher { display: flex; border: 1px solid #dde1eb; border-radius: 6px; overflow: hidden; }
.kal-vbtn { padding: 0.25rem 0.7rem; background: var(--white); border: none; color: #636363; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.kal-vbtn.active { background: var(--blue); color: var(--white); }
.kal-nav { display: flex; align-items: center; gap: 0.35rem; margin-left: 0.35rem; }
.kal-nav-btn { width: 26px; height: 26px; border-radius: 5px; border: 1px solid #dde1eb; background: var(--white); color: #636363; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; line-height: 1; padding: 0; }
.kal-nav-btn:hover { border-color: var(--blue); color: var(--blue); }
#kal-month-label { font-size: 0.88rem; font-weight: 700; color: var(--blue); min-width: 120px; text-align: center; }
.kal-btn-dnes { margin-left: auto; padding: 0.22rem 0.65rem; border-radius: 5px; border: 1px solid #dde1eb; background: var(--white); color: #636363; font-size: 0.73rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.kal-btn-dnes:hover { border-color: var(--blue); color: var(--blue); }
.kal-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 500; align-items: center; justify-content: center; }
.kal-modal-overlay.open { display: flex; }
.kal-modal { background: var(--white); border-radius: 12px; padding: 1.5rem 1.75rem; max-width: 420px; width: calc(100% - 2rem); box-shadow: 0 8px 32px rgba(0,0,0,0.18); position: relative; }
.kal-modal-close { position: absolute; top: 0.75rem; right: 0.9rem; background: none; border: none; font-size: 1.3rem; color: #636363; cursor: pointer; line-height: 1; }
.kal-modal-close:hover { color: var(--blue); }
.kal-modal-title { font-weight: 800; font-size: 1.05rem; color: var(--text); line-height: 1.3; margin-bottom: 0.6rem; padding-right: 1.5rem; }
.kal-modal-date  { font-size: 0.85rem; color: var(--blue); font-weight: 600; margin-bottom: 0.35rem; }
.kal-modal-time  { font-size: 0.82rem; color: #636363; margin-bottom: 0.35rem; }
.kal-modal-desc  { font-size: 0.85rem; color: #444; margin-top: 0.6rem; border-top: 1px solid #e8eaf0; padding-top: 0.6rem; white-space: pre-wrap; }

/* RESPONSIVE */
@media (max-width: 480px) {
    .home-hero {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .home-avatar-wrap {
        margin-top: 0;
        margin-bottom: 0;
    }
    .home-avatar-wrap canvas { width: 90px; height: 90px; }
    .home-bubble-wrap {
        width: 100%;
        margin-top: 0;
        margin-bottom: 0.5rem;
    }
    .home-bubble { font-size: 0.95rem; border-radius: 10px; }
}
@media (max-width: 768px) {
    .hero { padding: 1.5rem 1rem; gap: 1.25rem; }
    .nav-links { display: none; flex-direction: column; align-items: flex-start; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid #e8eaf0; padding: 1rem 2rem; gap: 0; }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; padding: 0.75rem 0; border-bottom: 1px solid #f0f2f8; }
    .nav-toggle { display: block; }
    /* Karta předmětu na mobilu */
    .hero-subjects { grid-template-columns: 1fr; }
    .subject-card { padding: 1rem 1.25rem; }
    .subject-card-bg { display: none; }
    .hero-news-novinka-icon { display: none; }
    .hero-news { padding: 1.5rem 1.5rem; }
}
@media (max-width: 600px) {
    .kal-day { min-height: 48px; }
    .kal-event { display: none; }
    .kal-view-switcher { display: none; }
}
