:root {
    /* --- Color Palette --- */
    /* Primary - School Blue */
    --color-primary: #2b61c9;
    --color-primary-hover: #1e4bb0;
    --color-primary-light: #eff6ff;

    /* Secondary - School Red */
    --color-accent: #f25b5b;
    --color-accent-hover: #d94545;

    /* Gradient */
    --gradient-primary: linear-gradient(90deg, #2b61c9 0%, #f25b5b 100%);

    /* Neutrals */
    --color-bg-body: #f8fafc;
    --color-bg-surface: #ffffff;
    --color-bg-surface-alt: #f1f5f9;

    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    --color-text-inverted: #ffffff;

    /* Borders */
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;

    /* --- Typography --- */
    --font-main: "Inter", system-ui, -apple-system, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* --- Shadows & Effects --- */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    --transition-base: all 0.2s ease-in-out;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    background-color: #2b61c9;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: var(--line-height-base);
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

.safe-area-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 0px);
    background: var(--gradient-primary);
    z-index: 10000;
    pointer-events: none;
}

@media (max-width: 900px) {
    .safe-area-top {
        height: max(env(safe-area-inset-top, 0px), 17px);
    }
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

/* --- Layout Utilities --- */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section--muted {
    background-color: var(--color-bg-surface-alt);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 0.95rem;
    border: 1px solid transparent;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--primary {
    background: var(--gradient-primary);
    color: var(--color-text-inverted);
    box-shadow: var(--shadow-md);
    border: none;
}

.btn--primary:hover {
    opacity: 0.9;
}

.btn--outline {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--color-text-main);
}

.btn--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.btn--ghost {
    background-color: transparent;
    color: var(--color-text-muted);
}

.btn--ghost:hover {
    color: var(--color-primary);
    background-color: var(--color-bg-surface-alt);
}

.btm--red {
    background-color: var(--color-accent, #ef4444);
    color: #ffffff;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btm--red:hover {
    background-color: var(--color-accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hero buttons — hover glow */
.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.hero-btn.btn--outline:hover {
    color: #2b61c9 !important;
    border-color: #2b61c9 !important;
    background: white !important;
}

/* Hero buttons — mobile full width */
@media (max-width: 640px) {
    .hero-btns {
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 0 1rem;
    }
    .hero-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* --- Header & Nav --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--gradient-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: calc(0.75rem + env(safe-area-inset-top)) 0 0.75rem;
    transition: var(--transition-base);
    color: white;
}

header .container {
    display: flex;
    align-items: center;
}

.logo a {
    display: block;
}

.logo img {
    height: 60px;
    width: auto;
    padding: 5px 0;
}

/* Desktop Menu */
.menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.menu>ul {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.menu>ul>li>a {
    font-weight: 600;
    color: #ffffff;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 99;
}

/* Tab effect on hover - white bg connected to submenu */
.menu>ul>li:hover>a {
    background: var(--color-bg-surface);
    color: var(--color-accent);
    text-shadow: none;
}

/* Active page indicator */
.menu>ul>li.active>a {
    color: #ffffff;
}

.menu>ul>li.active>a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
}

/* When active item is hovered, also show tab */
.menu>ul>li.active:hover>a {
    color: var(--color-accent);
}

.menu>ul>li.active:hover>a::after {
    content: '';
}


/* Submenu */
.menu>ul>li {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-surface);
    min-width: 280px;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: none;
    border-left: 3px solid var(--color-primary);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    text-shadow: none;
    max-height: 70vh;
    overflow-y: auto;
}

.menu>ul>li:hover .submenu {
    opacity: 1;
    visibility: visible;
}

.submenu li a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: none;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.submenu li a:hover {
    background-color: var(--color-primary-light, rgba(43, 97, 201, 0.08));
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    padding-left: 1.15rem;
    transform: none;
}

.submenu hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: 0.4rem 0;
}

/* Icons in menu */
.icon-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Unified Icon Button Style */
.icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 70px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

/* Login button specific adjustments */
a[href="./login.html"] .icon-btn {
    width: 70px;
}

a[href="./login.html"] .icon-btn img {
    width: 16px;
    height: auto;
}

/* Instagram Icon - Style to match .icon-btn */
.icon-ig {
    width: 40px;
    height: 40px;
    padding: 9px;
    /* Adjust to match icon size */
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    filter: brightness(0) invert(1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.icon-item a:hover .icon-ig {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Hamburger */
/* Hamburger - mobile */
/* Hamburger - mobile styles moved to bottom media query */

/* Hamburger for larger screens */
.hamburger {
    display: none;
}

/* Hide old Instagram img icon */
.icon-ig {
    display: none;
}

.hero {
    padding: 10rem 0 6rem;
    background-color: #1a336e;
    background-image:
        linear-gradient(135deg, #1a336e 0%, #1e3f8a 60%, #2b1a2e 100%),
        radial-gradient(circle at 75% 20%, rgba(242, 91, 91, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 15% 80%, rgba(242, 91, 91, 0.10) 0%, transparent 35%);
    background-blend-mode: normal, screen, screen;
    position: relative;
    overflow: hidden;
}

/* Ensure hero text is white on top of background images/overlays */
.hero .hero__text,
.hero .hero__text h1,
.hero .hero__text p,
.hero .hero__text .hero__subtitle,
.hero .hero__content span,
.hero .hero__content .btn--primary,
.hero .hero__content .btn--secondary {
    color: #ffffff !important;
}

.hero .hero__text p {
    color: rgba(255,255,255,0.95) !important;
}

.hero__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
    /* Make video subtle */
}

.hero__content {
    position: relative;
    z-index: 2;
    display: grid;
    /* grid-template-columns: 1.5fr 0.5fr; */
    gap: 4rem;
    align-items: center;
}

.hero__text h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero__text p {
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    color: rgba(255,255,255,0.95);
    margin-bottom: 1.5rem;
    max-width: 640px;
}

.hero__cta {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Hero CTA — animated gradient border (rotating) + split-fill hover */
@property --border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes hero-btn-border-rotate {
    to { --border-angle: 360deg; }
}

.hero__cta .btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: transparent;
    border: 3px solid transparent;
    transition: color 0.3s ease;
}

/* Rotating conic-gradient ring (only the border area) */
.hero__cta .btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 3px;
    background: conic-gradient(from var(--border-angle, 0deg), #2b61c9, #f25b5b, #ffd27a, #2b61c9, #f25b5b, #2b61c9);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: hero-btn-border-rotate 4s linear infinite;
    pointer-events: none;
    z-index: -1;
}

/* Hover split-fill (blue from left + red from right, skewed meeting line) */
.hero__cta .btn::after {
    content: "";
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: -2;
    transform: skewX(-18deg);
    background:
        linear-gradient(90deg, var(--color-primary), var(--color-primary)) no-repeat left center / 0 100%,
        linear-gradient(90deg, var(--color-accent), var(--color-accent)) no-repeat right center / 0 100%;
    transition: background-size 0.45s cubic-bezier(0.77, 0, 0.175, 1);
    pointer-events: none;
}

/* Hover only on devices that actually hover (prevents sticky state on mobile tap) */
@media (hover: hover) and (pointer: fine) {
    .hero__cta .btn:hover::after {
        background-size: 50% 100%, 50% 100%;
    }

    .hero__cta .btn:hover::before {
        animation-play-state: paused;
    }

    .hero__cta .btn:hover {
        font-weight: bold;
        color: #ffffff !important;
    }
}

/* Touch tap — active only, clears when finger lifts */
.hero__cta .btn:active::after {
    background-size: 50% 100%, 50% 100%;
}

.hero__cta .btn:active::before {
    animation-play-state: paused;
}

.hero__cta .btn:active {
    font-weight: bold;
    color: #ffffff !important;
}

.hero__subtitle {
    display: block;
    color: #ffffff;
    font-size: clamp(0.9rem, 3.2vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    white-space: nowrap;
}

/* --- Cards Grid --- */
.cards {
    display: grid;
    gap: 2rem;
}

.cards--two {
    grid-template-columns: repeat(2, 1fr);
}

.cards--three {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;

    /* Initial State for Animation */
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.card.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Obor Cards */
.card--obor {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card--obor h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.card--obor h3 strong {
    display: block;
    font-size: 1.75rem;
    color: var(--color-text-main);
    margin-top: 0.25rem;
    font-weight: 700;
}

.card--obor h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin: 1.5rem 0 0.75rem;
}

.card--obor ul {
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card--obor ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-muted);
}

.card--obor ul li::before {
    content: "•";
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.card--obor .btn {
    width: 100%;
    text-align: center;
}

.study-program-card__icon {
    line-height: 1;
}

@media (max-width: 768px) {
    .page-obory .study-program-card > .study-program-card__icon {
        height: auto;
        margin-bottom: 0 !important;
    }
}

/* --- News Section --- */
.news-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.news-column h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-item {
    background: var(--color-bg-surface);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.news-item:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
}

.news-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.news-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
}

.news-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* Event Items */
.news-item--event {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
}

.event-date {
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 70px;
}

.event-day {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.event-month {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 0.25rem;
    font-weight: 600;
}

.event-content {
    flex: 1;
}

/* --- Benefits Section --- */
.section--benefits .card {
    text-align: center;
    padding: 2.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section--benefits .card p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* --- Detail Section --- */
.section--detail {
    background-color: var(--color-bg-surface);
    border-top: 1px solid var(--color-border);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.detail-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.detail-text h2 span {
    display: block;
    font-size: 1rem;
    color: var(--color-text-light);
    font-weight: 400;
    margin-top: 0.5rem;
}

.detail-text p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* --- Footer --- */
.site-footer {
    background-color: #1e293b;
    /* Dark slate */
    color: #e2e8f0;
    padding: 4rem 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-col h3,
.footer-col h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-col p {
    color: #94a3b8;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-col a {
    color: #60a5fa;
    /* Light blue */
}

.footer-col a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.footer__bottom {
    border-top: 1px solid #334155;
    padding: 1.5rem 0;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__cta {
        justify-content: center;
    }

    .cards--three {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    /* Animated hamburger */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1001;
        margin-left: auto;
    }

    .hamburger__line {
        display: block;
        width: 24px;
        height: 2px;
        background: #ffffff;
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
        transform-origin: center;
    }

    .hamburger.active .hamburger__line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .hamburger__line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .hamburger__line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hamburger.active {
        opacity: 0;
        pointer-events: none;
    }

    /* Slide-in panel */
    .menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        background: var(--color-bg-surface);
        flex-direction: column;
        padding: 0;
        padding-top: 0;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        visibility: hidden;
    }

    .menu.open {
        display: flex;
        transform: translateX(0);
        visibility: visible;
    }

    /* Backdrop overlay */
    .menu-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .menu-backdrop.open {
        display: block;
    }

    body.menu-open {
        overflow: hidden;
    }

    .menu {
        justify-content: flex-start;
        align-items: stretch;
    }

    .menu>ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .menu>ul>li {
        width: 100%;
    }

    .menu>ul>li:not(.icons-container)>a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.9rem 1.5rem;
        border-bottom: 1px solid var(--color-border);
        color: var(--color-text-main) !important;
        position: relative;
        font-size: 1rem;
        border-radius: 0 !important;
        background: none !important;
        text-shadow: none !important;
    }

    /* Reset all desktop ::after (underline) on mobile */
    .menu>ul>li>a::after,
    .menu>ul>li.active>a::after,
    .menu>ul>li.active:hover>a::after {
        content: none !important;
        display: none !important;
        position: static !important;
        width: 0 !important;
        height: 0 !important;
        background: none !important;
    }

    /* Chevron for items with submenu only */
    .menu>ul>li:has(.submenu)>a::after {
        content: '›' !important;
        display: inline !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        font-size: 1.3rem;
        color: var(--color-text-muted);
        transition: transform 0.2s;
        font-weight: 300;
        transform: none;
        border-radius: 0;
        left: auto;
    }

    /* Rotate chevron when submenu is open */
    .menu>ul>li.active:has(.submenu)>a::after {
        content: '›' !important;
        display: inline !important;
        color: var(--color-primary);
        transform: rotate(90deg) !important;
    }

    /* Active item in mobile - subtle left border instead of desktop tab */
    .menu>ul>li:not(.icons-container).active>a {
        border-left: 3px solid var(--color-primary);
        background: none !important;
    }

    .menu>ul>li:not(.icons-container)>a:hover {
        background-color: var(--color-bg-surface-alt) !important;
    }

    /* Hide desktop hover tab effect on mobile */
    .menu>ul>li:not(.icons-container):hover>a {
        color: var(--color-text-main) !important;
    }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-left: none;
        padding: 0;
        display: none;
        background-color: rgba(0, 0, 0, 0.03);
        width: 100%;
        min-width: 0;
        max-height: none;
    }

    .submenu li a {
        padding: 0.8rem 1rem 0.8rem 2.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        font-size: 0.9rem;
        color: var(--color-text-muted);
        border-left: none;
    }

    .submenu li a:hover {
        color: var(--color-primary);
        background-color: rgba(0, 0, 0, 0.05);
        padding-left: 2.5rem;
        border-left: none;
    }

    .submenu.open {
        display: block;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Fix for hover state interfering with mobile menu */
    .menu>ul>li:hover .submenu {
        transform: none;
    }

    .news-layout {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 780px) {
    .cards--two {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    .cards--three {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 6rem 0 4rem;
    }
}

/* Obor card — heading (icon + title) */
.obor-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.obor-heading__icon {
    font-size: 3rem;
    line-height: 1;
    flex-shrink: 0;
}
.obor-heading__title {
    font-size: 1.5rem;
    margin-bottom: 0.15rem;
}
.obor-heading__code {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Obor card — zaměření list */
.obor-zamereni {
    word-spacing: 0.02em;
    list-style: disc outside;
}

.obor-zamereni li::marker {
    color: var(--color-primary);
    font-size: 1.1em;
}

.card[style*="--color-accent"] .obor-zamereni li::marker,
.obor-zamereni--accent li::marker {
    color: var(--color-accent);
}

.obor-zamereni li strong {
    letter-spacing: 0.01em;
    hyphens: auto;
    overflow-wrap: break-word;
}

@media (max-width: 640px) {
    .obor-zamereni li {
        font-size: 0.85rem;
        line-height: 1.4 !important;
    }

    .obor-zamereni li strong {
        letter-spacing: 0;
    }
}

@media (max-width: 450px) {
    .obor-zamereni li {
        font-size: 0.78rem;
    }

    .hero {
        padding: 5rem 0 3rem;
    }

    .hero__text h1 {
        font-size: 1.75rem;
        line-height: 1.15;
        letter-spacing: -0.02em;
        margin-bottom: 0.75rem;
    }

    .hero__subtitle {
        font-size: 0.95rem;
        font-weight: 800;
        white-space: normal;
        margin-bottom: 0.75rem;
        letter-spacing: 0.02em;
        color: #ffffff !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    }

    .hero__text p {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
        padding: 0 0.5rem;
    }

    .hero__cta {
        flex-direction: column;
        gap: 0.6rem;
        margin-top: 1rem;
        align-items: stretch;
        padding: 0 0.5rem;
    }

    .hero__cta .btn {
        width: 100%;
        text-align: center;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}

/* --- Forms --- */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- Admin: action buttons --- */
form.admin-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    align-items: center;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}
td:has(.admin-actions) {
    white-space: nowrap;
    min-width: 130px;
}
.admin-actions .btn-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    flex-shrink: 0;
}
.admin-actions .btn-action.btn-action--primary   { background: var(--color-primary) !important; }
.admin-actions .btn-action.btn-action--danger    { background: #ef4444 !important; }
.admin-actions .btn-action.btn-action--success   { background: #10b981 !important; }
.admin-actions .btn-action.btn-action--secondary { background: #64748b !important; }
.admin-actions .btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.18);
    color: #fff !important;
}

/* --- Admin: table --- */
.table-custom {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.table-custom th, .table-custom td {
    padding: 0.75rem;
    vertical-align: top;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
}
.table-custom th {
    border-bottom: 2px solid #dee2e6;
    font-weight: bold;
}
.table-responsive {
    overflow-x: auto;
}
@media (max-width: 700px) {
    .hide-mobile { display: none !important; }
}

/* --- Admin: form card --- */
.form-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}
.form-card .form-group { margin-bottom: 1.5rem; }
.form-card .form-control {
    display: block;
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #1f2937;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-card .form-control:focus {
    border-color: var(--color-primary);
    background: #fff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-card textarea.form-control {
    resize: vertical;
    min-height: 80px;
}
.form-card .label-bold {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: #1f2937;
    font-size: 0.92rem;
}
.form-card .text-muted {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 0.35rem;
    display: block;
}
.form-card .check-group {
    display: flex;
    align-items: center;
    background: #f0fdf4;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}
.form-card .label-pointer {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.form-card .label-pointer input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

/* Fix checkbox/radio inputs inside forms */
.form-card input[type="checkbox"],
.form-card input[type="radio"] {
    width: auto;
    padding: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Titulni foto preview */
.form-card .mb-2 img {
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
}
.form-card .mb-2 label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: normal;
    font-size: 0.9rem;
    vertical-align: middle;
}

/* Admin form layout */
.form-card .row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
}
.form-card .col-md-6 {
    flex: 1;
    min-width: 240px;
}

/* Admin form footer buttons */
.form-card .form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.form-card .form-actions .btn {
    width: auto;
    margin-top: 0;
}

/* Admin alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.alert--danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

@media (max-width: 768px) {
    .form-card { padding: 1.5rem; }
    .form-card .row { flex-direction: column; gap: 0; }
    .form-card .col-md-6 { min-width: 100%; }
}

/* Avatar picker (edit-user) */
.avatar-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.avatar-option {
    cursor: pointer;
    text-align: center;
    padding: 0.5rem;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
    background: #f9fafb;
}
.avatar-option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.avatar-option--active {
    border-color: #2563eb;
    background: #eff6ff;
}
.avatar-option input {
    display: none;
}
.avatar-option img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 0.25rem;
}
.avatar-option__name {
    font-size: 0.7rem;
    color: #6b7280;
    display: block;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Gallery admin - existing photos grid */
.gallery-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.gallery-admin__item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.gallery-admin__item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}
.gallery-admin__actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 3px;
}
.gallery-admin__edit-btn,
.gallery-admin__delete-btn {
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}
.gallery-admin__edit-btn:hover {
    background: #3b82f6;
}
.gallery-admin__delete-btn:hover {
    background: #ef4444;
}
.gallery-admin__name {
    display: block;
    font-size: 0.65rem;
    color: #6b7280;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Gallery upload drop zone */
.gallery-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    background: #fafbfc;
    transition: all 0.25s;
    margin-top: 0.5rem;
}
.gallery-upload-zone--active,
.gallery-upload-zone:hover {
    border-color: var(--color-primary);
    background: #eff6ff;
}
.gallery-upload-zone__content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}
.gallery-upload-zone__icon {
    font-size: 1.5rem;
}
.gallery-upload-zone__btn {
    cursor: pointer;
    font-size: 0.85rem !important;
    padding: 0.4rem 1rem !important;
}

/* Gallery preview (selected files before upload) */
.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}
.gallery-preview:empty {
    display: none;
}
.gallery-preview__item {
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    position: relative;
}
.gallery-preview__remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.6);
    color: white;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}
.gallery-preview__remove:hover {
    background: #ef4444;
}
.gallery-preview__item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}
.gallery-preview__name {
    display: block;
    font-size: 0.6rem;
    color: #6b7280;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- File upload zone (oznámení soubory) --- */
.file-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    background: #fafbfc;
    transition: all 0.25s;
    margin-top: 0.5rem;
}
.file-upload-zone--active,
.file-upload-zone:hover {
    border-color: var(--color-primary);
    background: #eff6ff;
}
.file-upload-zone__content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}
.file-upload-zone__icon {
    font-size: 1.5rem;
}
.file-upload-zone__progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #6b7280;
}
.file-upload-zone__bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
.file-upload-zone__bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.2s;
}

/* File list */
.file-list {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.file-list:empty {
    display: none;
}
.file-list__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
}
.file-list__icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}
.file-list__info {
    flex: 1;
    min-width: 0;
}
.file-list__name {
    font-weight: 600;
    color: var(--color-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-list__size {
    font-size: 0.75rem;
    color: #9ca3af;
}
.file-list__copy {
    flex-shrink: 0;
    font-size: 0.8rem !important;
    padding: 0.3rem 0.6rem !important;
    white-space: nowrap;
}
.file-list__delete {
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .file-list__item {
        flex-wrap: wrap;
    }
    .file-list__copy {
        width: 100%;
        text-align: center;
    }
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
    font-size: 0.95rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-surface);
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--color-text-main);
    transition: var(--transition-base);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form specific button adjustments if needed */
form button[type="submit"]:not(.btn-action):not(.btn) {
    width: 100%;
    margin-top: 1rem;
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

form button[type="submit"]:not(.btn-action):not(.btn):hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   CONSOLIDATED PAGE STYLES (moved from inline <style> blocks)
   ============================================================ */

/* --- Utility Classes --- */
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mx-2 { margin: 0 0.5rem; }
.text-muted { color: var(--color-text-muted); }
.h-100 { height: 100%; display: flex; flex-direction: column; align-items: flex-start; }
.link-hover:hover { color: var(--color-primary); }

/* --- Shared Layout --- */
.row-layout {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}
.col-main { flex: 1 1 400px; }
.col-side { flex: 0 0 300px; }

@media (max-width: 800px) {
    .col-side { flex: 1 1 100%; }
}

/* --- Shared Container --- */
.container--narrow { max-width: 780px; }

/* --- Shared Table --- */
.table {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    font-size: 1rem;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}
.table thead th {
    background-color: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    text-align: left;
    padding: 1.25rem 2rem;
    border-bottom: 2px solid #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}
.table tbody td {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: middle;
}
.table tbody tr:last-child td {
    border-bottom: none;
}
.table tbody tr:hover {
    background-color: #f8fafc;
}

/* --- Page Gallery (jídelna, domov, hala) --- */
.page-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.page-gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}
@media (max-width: 900px) {
    .page-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 600px) {
    .page-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .page-gallery img {
        height: 140px;
    }
}

/* --- Doc Link (default: dokumenty/vzory-formularu) --- */
.doc-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text-main);
    background: #fff;
    transition: all 0.2s ease;
}
.doc-link:hover {
    background: var(--color-bg-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Doc Link variant: domov-mladeze */
.page-domov-mladeze .doc-link {
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--color-bg-surface);
    border-radius: var(--radius-md);
    font-weight: 500;
}
.page-domov-mladeze .doc-link:hover {
    background: var(--color-bg-surface-alt);
    transform: translateY(-2px);
}

/* Doc Link variant: skolni-jidelna */
.page-skolni-jidelna .doc-link {
    display: block;
    padding: 0.5rem;
    background: var(--color-bg-light);
    border: none;
    color: var(--color-primary);
    font-weight: 500;
}
.page-skolni-jidelna .doc-link:hover {
    background: #e2e8f0;
}

/* --- Card Interactive --- */
.card--interactive {
    transition: transform 0.2s, box-shadow 0.2s;
}
.card--interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.page-maturita .card--interactive:hover {
    background-color: var(--color-bg-light);
}
.page-redakcni-system .card--interactive:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- Repo Card (OneDrive) --- */
.repo-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem;
    text-decoration: none;
}
.repo-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.repo-card__info {
    text-align: left;
}
.repo-card__info h4 {
    margin: 0 0 0.15rem;
}

/* --- Badge --- */
.badge {
    padding: 0.35em 0.85em;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}
.badge--primary {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}
.badge--subtle {
    background-color: #f1f5f9;
    color: var(--color-text-muted);
}

/* ============================================================
   INDEX PAGE
   ============================================================ */

/* --- Quick Links Strip --- */
.ql-strip {
    background: white;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ql-grid {
    display: flex;
    justify-content: center;
    gap: 0;
}
.ql-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.1rem 2rem;
    color: var(--color-text-main);
    font-size: 0.875rem;
    font-weight: 600;
    border-right: 1px solid var(--color-border);
    transition: background 0.2s, color 0.2s;
    text-align: center;
}
.ql-item:first-child { border-left: 1px solid var(--color-border); }
.ql-item:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.ql-icon { font-size: 1.4rem; line-height: 1; }

/* --- Aktuality + Ze života (2-col grid) --- */
.hn-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: start;
}
.hn-col-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
}
.hn-col-header h3 { margin: 0; font-size: 1.4rem; }
.hn-col-header--blue { border-bottom: 2px solid var(--color-primary); }
.hn-col-header--blue h3 { color: var(--color-primary); }
.hn-col-header--red { border-bottom: 2px solid var(--color-accent); }
.hn-col-header--red h3 { color: var(--color-accent); }

/* --- Event cards (sidebar style) --- */
.ev-card {
    display: flex;
    gap: 0.85rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.ev-card--featured {
    flex-direction: column;
    gap: 0;
}
.ev-card__img {
    position: relative;
    flex-shrink: 0;
    width: 110px;
    overflow: hidden;
}
.ev-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ev-card__img--sm { height: 80px; }
.ev-card--featured .ev-card__img {
    width: 100%;
    height: 180px;
}
.ev-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}
.ev-card__body {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
}
.ev-card__date {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}
.ev-card__body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}
.ev-card__body h4 a { color: var(--color-text-main); }
.ev-card__body h4 a:hover { color: var(--color-accent); }
.ev-card__body p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Proc card & partner logo --- */
.proc-card {
    background: white;
    border: 1px solid rgba(43,97,201,0.12);
    border-radius: 12px;
    padding: 2rem 1.75rem;
}
.proc-icon { font-size: 2.4rem; margin-bottom: 1rem; display: block; }
.proc-card h3 { color: var(--color-primary); font-size: 1.15rem; font-weight: 700; margin-bottom: 0.6rem; }
.proc-card p { color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.6; margin: 0; }

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    width: 180px;
    transition: transform 0.2s, opacity 0.2s;
}
.partner-logo:hover { transform: scale(1.05); opacity: 0.85; }
.partner-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* --- Oznámení + Přijímací řízení grid --- */
.news-cta-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 940px) {
    .news-cta-grid { grid-template-columns: 1fr; }
}

/* --- Oznámení split: mimořádné vlevo, ostatní vpravo --- */
.oznameni-split {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}
.oznameni-split__left {
    display: flex;
}
.oznameni-split__left .news-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.oznameni-split__right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 768px) {
    .oznameni-split {
        grid-template-columns: 1fr;
    }
}

/* --- Přijímací řízení split: mimořádné vlevo, prioritní vpravo --- */
.prijmacky-split {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}
.prijmacky-split__left {
    display: flex;
}
.prijmacky-split__right {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}
@media (max-width: 768px) {
    .prijmacky-split {
        grid-template-columns: 1fr;
    }
}

/* --- Ze života školy: Foto mozaika --- */
.glr-section {
    background: #0f172a;
    padding: 5rem 0 4rem;
}
.glr-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
}
.glr-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.glr-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
}
.glr-archive-btn {
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.2);
    flex-shrink: 0;
}
.glr-archive-btn:hover {
    color: white;
    border-color: white;
    background: rgba(255,255,255,0.08);
}

.glr-mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 280px 200px;
    gap: 4px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.glr-item {
    position: relative;
    overflow: hidden;
    display: block;
    background: #1e293b;
}
.glr-item--featured {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}
.glr-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease;
    filter: brightness(0.85);
}
.glr-item:hover img {
    transform: scale(1.07);
    filter: brightness(1);
}
.glr-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.2) 70%, transparent 100%);
    transform: translateY(4px);
    transition: transform 0.3s ease;
}
.glr-item:hover .glr-overlay {
    transform: translateY(0);
}
.glr-overlay__date {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.65);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}
.glr-overlay__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}
.glr-item--featured .glr-overlay__title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}
.glr-overlay__desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.45;
    margin-top: 0.3rem;
    max-width: 480px;
}

/* Virtual Tour Modal */
.vt-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}
.vt-modal.open {
    display: flex;
    animation: fadeIn 0.3s;
}
.vt-modal-content {
    background-color: #000;
    width: 90%;
    height: 80%;
    max-width: 1400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}
.vt-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.vt-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.2s;
}
.vt-close:hover {
    color: var(--color-primary);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Index responsive */
@media (max-width: 900px) {
    .hn-grid { grid-template-columns: 1fr; gap: 2rem; }
    .proc-studovat [style*="grid-template-columns: repeat(3"] { grid-template-columns: 1fr 1fr !important; }
    .glr-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .glr-mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 180px 180px; }
    .glr-item--featured { grid-column: 1 / 3; grid-row: 1 / 2; }
}
@media (max-width: 600px) {
    .proc-studovat [style*="grid-template-columns: repeat(3"],
    .proc-studovat [style*="grid-template-columns: repeat(4"] { grid-template-columns: 1fr !important; }
    .glr-mosaic { grid-template-columns: 1fr; grid-template-rows: none; }
    .glr-item--featured { grid-column: auto; grid-row: auto; }
    .glr-item { height: 200px; }
    .glr-item--featured { height: 260px; }
}

/* ============================================================
   KONTAKTY PAGE
   ============================================================ */

/* Quick bar */
.kt-quickbar {
    background: var(--color-primary);
    padding: 1.5rem 0;
}
.kt-quickbar__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.kt-quickbar__item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    color: white;
}
.kt-quickbar__item > i {
    font-size: 1.3rem;
    margin-top: 2px;
    opacity: .85;
    flex-shrink: 0;
}
.kt-quickbar__label  { font-size: .75rem; opacity: .75; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kt-quickbar__value  { font-size: .95rem; font-weight: 600; margin-top: 2px; }
.kt-quickbar__value a { color: white; text-decoration: underline; text-underline-offset: 3px; }
.kt-quickbar__value a:hover { opacity: .8; }

/* Section header */
.kt-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
}
.kt-section-header__badge {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: grid; place-items: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.kt-section-header__badge--green  { background: #d1fae5; color: #065f46; }
.kt-section-header__badge--teal   { background: #ccfbf1; color: #0f766e; }
.kt-section-header__badge--purple { background: #ede9fe; color: #6d28d9; }
.kt-section-header__title { font-size: 1.5rem; font-weight: 800; margin: 0; }
.kt-section-header__sub   { font-size: .85rem; color: var(--color-text-muted); margin: 2px 0 0; }

/* Grids */
.kt-grid {
    display: grid;
    gap: 1.25rem;
}
.kt-grid--two   { grid-template-columns: repeat(2, 1fr); }
.kt-grid--three { grid-template-columns: repeat(3, 1fr); }
.kt-grid--four  { grid-template-columns: repeat(4, 1fr); }

/* Contact Card */
.kt-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    transition: box-shadow .2s, transform .2s;
}
.kt-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.kt-card--compact { padding: 1.1rem 1.25rem; }

.kt-card__avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    display: grid; place-items: center;
    flex-shrink: 0;
    overflow: hidden;
}
.kt-card__avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.kt-card__avatar--green  { background: linear-gradient(135deg, #10b981, #059669); }
.kt-card__avatar--teal   { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.kt-card__avatar--purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

.kt-card__body   { flex: 1; min-width: 0; }
.kt-card__name   { font-weight: 700; font-size: .97rem; color: var(--color-text-main); line-height: 1.3; margin-bottom: .2rem; }
.kt-card__role   { font-size: .78rem; color: var(--color-text-muted); font-style: italic; margin-bottom: .65rem; line-height: 1.3; }
.kt-card__contacts { display: flex; flex-direction: column; gap: .3rem; }

.kt-card__line {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .8rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kt-card__line i { font-size: .75rem; flex-shrink: 0; color: var(--color-primary); opacity: .7; }
.kt-card__line:hover { color: var(--color-primary); }
.kt-card__line--email { color: var(--color-text-muted); }
.kt-card__line--email:hover { color: var(--color-primary); }
.kt-card__ext { font-size: .72rem; background: var(--color-bg-surface-alt); border-radius: 4px; padding: 0 5px; margin-left: 2px; color: var(--color-text-muted); }

/* Social */
.social-section {
    padding-bottom: 60px;
    text-align: center;
    background-color: #f8f9fa;
}
.social-title { margin-bottom: 30px; font-family: sans-serif; color: #333; }
.social-links { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.social-link {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: #555;
    transition: transform 0.3s ease, color 0.3s ease;
}
.social-link img { width: 50px; height: auto; margin-bottom: 10px; }
.social-link:hover { transform: translateY(-5px); color: #000; }
.social-link.fb:hover { color: #1877F2; }
.social-link.ig:hover { color: #E4405F; }

/* Kontakty responsive */
@media (max-width: 1100px) {
    .kt-grid--four { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .kt-quickbar__grid { grid-template-columns: repeat(2, 1fr); }
    .kt-grid--three    { grid-template-columns: repeat(2, 1fr); }
    .kt-grid--four     { grid-template-columns: repeat(2, 1fr); }
    .kt-card__line     { white-space: normal; }
    .kt-card__line--email { word-break: break-all; }
}
@media (max-width: 640px) {
    .kt-grid--two,
    .kt-grid--three,
    .kt-grid--four     { grid-template-columns: 1fr; }
    .kt-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem 1rem;
    }
    .kt-card--compact  { flex-direction: row; align-items: flex-start; text-align: left; }
    .kt-card__contacts { align-items: flex-start; }
    .page-kontakty .hero { padding: 6rem 0 3.5rem !important; }
}
@media (max-width: 480px) {
    .kt-quickbar__grid { grid-template-columns: 1fr; }
    .kt-quickbar__item { border-bottom: 1px solid rgba(255,255,255,.15); padding-bottom: .75rem; }
    .kt-quickbar__item:last-child { border-bottom: none; }
    .kt-card--compact  { flex-direction: column; align-items: center; text-align: center; }
    .kt-card--compact .kt-card__contacts { align-items: center; }
    .page-kontakty .hero { padding: 5rem 0 3rem !important; }
}

/* ============================================================
   ORGANIZACE ŠKOLNÍHO ROKU
   ============================================================ */

/* Accordion */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.accordion__item {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02), 0 2px 4px -1px rgba(0,0,0,0.02);
    overflow: hidden;
    transition: box-shadow 0.3s ease, margin 0.3s ease;
}
.accordion__item:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.025);
    border-color: rgba(37, 99, 235, 0.2);
}
.accordion__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: white;
    border: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-main);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}
.accordion__header:hover {
    background: #f8fafc;
}
.accordion__header[aria-expanded="true"] {
    background: #f1f5f9;
    color: var(--color-primary);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.accordion__icon-wrapper {
    background: #e2e8f0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.accordion__header[aria-expanded="true"] .accordion__icon-wrapper {
    background: var(--color-primary);
    color: white;
}
.accordion__icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 18px;
    height: 18px;
}
.accordion__header[aria-expanded="true"] .accordion__icon {
    transform: rotate(180deg);
}
.accordion__content {
    display: none;
    padding: 0;
    background: white;
}

/* Event List */
.events-list {
    display: flex;
    flex-direction: column;
}
.event-item {
    display: flex;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
    position: relative;
    gap: 2rem;
}
.event-item:hover {
    background: #f8fafc;
}
.event-item:last-child {
    border-bottom: none;
}
.event-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}
.type-vacation::before { background-color: #10b981; }
.type-holiday::before { background-color: #10b981; }
.type-exam::before { background-color: #ef4444; }
.type-open-day::before { background-color: #f59e0b; }
.type-meeting::before { background-color: #8b5cf6; }
.type-admin::before { background-color: #64748b; }
.type-start::before { background-color: #2563eb; }
.type-action::before { background-color: #0ea5e9; }

.event-date-wrapper {
    flex-shrink: 0;
    width: 140px;
    display: flex;
    justify-content: flex-start;
}
.event-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.8rem;
    background: #f1f5f9;
    border-radius: 8px;
    color: #475569;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    white-space: nowrap;
}
.type-vacation .event-date-badge { background: #ecfdf5; color: #047857; }
.type-exam .event-date-badge { background: #fef2f2; color: #b91c1c; }
.type-open-day .event-date-badge { background: #fffbeb; color: #b45309; }
.type-start .event-date-badge { background: #eff6ff; color: #1e40af; }

.event-info {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.event-name {
    font-size: 1.05rem;
    color: #0f172a;
    font-weight: 600;
    line-height: 1.4;
}
.event-type-label {
    flex-shrink: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #94a3b8;
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .event-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
    }
    .event-date-wrapper {
        width: 100%;
    }
    .event-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .event-type-label {
        font-size: 0.65rem;
        align-self: flex-start;
    }
    .card {
        flex-direction: column !important;
    }
    .card>div:first-child {
        height: 200px;
    }
}

/* ============================================================
   SHOW-EVENT PAGE
   ============================================================ */

/* Hero */
.ev-hero {
    position: relative;
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    background: #1e293b;
    display: flex;
    justify-content: center;
}
.ev-hero img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}
.ev-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.35) 100%);
}

/* Article layout */
.ev-article { padding: 3rem 0 5rem; }

.ev-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.ev-breadcrumb a { color: var(--color-text-muted); }
.ev-breadcrumb a:hover { color: var(--color-primary); }
.ev-breadcrumb span { color: var(--color-text-light); }

.ev-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ev-title {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
    margin-bottom: 1.25rem;
}

.ev-lead {
    font-size: 1.2rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    margin-bottom: 1.75rem;
    border-left: 4px solid var(--color-primary);
    padding-left: 1.25rem;
}

.ev-author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2.5rem;
}
.ev-author__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ev-author__name { font-weight: 600; font-size: 0.95rem; }
.ev-author__role { font-size: 0.82rem; color: var(--color-text-muted); }

/* Body content */
.ev-body {
    font-size: 1.1rem;
    line-height: 1.85;
    color: #334155;
    margin-bottom: 3.5rem;
}
.ev-body p { margin-bottom: 1.4rem; }
.ev-body h2 { font-size: 1.7rem; font-weight: 700; margin: 2.5rem 0 1rem; color: var(--color-text-main); }
.ev-body h3 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.ev-body img { border-radius: var(--radius-md); max-width: 100%; height: auto; }
.ev-body a { color: var(--color-primary); text-decoration: underline; }
.ev-body ul, .ev-body ol { padding-left: 1.5rem; margin-bottom: 1.4rem; }
.ev-body li { margin-bottom: 0.4rem; }

.ev-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.ev-body table thead tr {
    background: var(--color-primary);
    color: white;
}
.ev-body table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: none;
}
.ev-body table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    color: var(--color-text-main);
}
.ev-body table tbody tr:last-child td { border-bottom: none; }
.ev-body table tbody tr:nth-child(even) { background: var(--color-bg-surface-alt); }
.ev-body table tbody tr:hover { background: var(--color-primary-light); }
@media (max-width: 600px) {
    .ev-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Gallery grid */
.ev-gallery { margin-bottom: 3.5rem; }
.ev-gallery__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--color-text-main);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
}
.ev-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.ev-gallery__item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius-md);
    display: block;
    cursor: pointer;
    background: #e2e8f0;
}
.ev-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.ev-gallery__item:hover img { transform: scale(1.07); }
.ev-gallery__zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.25s;
}
.ev-gallery__item:hover .ev-gallery__zoom { opacity: 1; }

/* Event navigation */
.ev-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    margin-top: 1rem;
}
.ev-nav__link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--color-text-main);
}
.ev-nav__link:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}
.ev-nav__link--right { text-align: right; }
.ev-nav__dir { font-size: 0.8rem; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.ev-nav__name { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }

@media (max-width: 700px) {
    .ev-gallery__grid { grid-template-columns: repeat(2, 1fr); }
    .ev-nav { grid-template-columns: 1fr; }
    .ev-nav__link--right { text-align: left; }
    .lb__arrow { width: 40px; height: 40px; font-size: 2rem; }
    .lb__arrow--prev { left: 0.5rem; }
    .lb__arrow--next { right: 0.5rem; }
}
@media (max-width: 480px) {
    .ev-gallery__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   SHOW-NEWS PAGE
   ============================================================ */

.article-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.25;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 3rem;
}
.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 4rem;
}
.article-body p { margin-bottom: 1.5rem; }
.article-body h2 { font-size: 1.8rem; margin: 2.5rem 0 1rem; color: var(--color-text-main); font-weight: 700; }
.article-body h3 { font-size: 1.4rem; margin: 2rem 0 1rem; }
.article-body img { border-radius: 8px; max-width: 100%; height: auto; }
.article-body a { color: var(--color-primary); text-decoration: underline; }
.article-body ul, .article-body ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.article-body ul li { margin-bottom: 0.5rem; }

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.article-body table thead tr {
    background: var(--color-primary);
    color: white;
}
.article-body table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: none;
}
.article-body table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    color: var(--color-text-main);
}
.article-body table tbody tr:last-child td {
    border-bottom: none;
}
.article-body table tbody tr:nth-child(even) {
    background: var(--color-bg-surface-alt);
}
.article-body table tbody tr:hover {
    background: var(--color-primary-light);
}
@media (max-width: 600px) {
    .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    margin-top: 3rem;
}
.nav-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: opacity 0.2s;
}
.nav-link:hover { opacity: 0.7; }
.nav-link.next { text-align: right; align-items: flex-end; }
.nav-link .label { font-size: 0.85rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.nav-link .title { font-weight: 700; color: var(--color-text-main); font-size: 1.1rem; line-height: 1.3; }

@media (max-width: 600px) {
    .post-navigation { grid-template-columns: 1fr; gap: 1.5rem; }
    .nav-link.next { text-align: left; align-items: flex-start; }
}

/* PDF Icon Button */
.pdf-card-icon {
    display: inline-block;
    margin: 1rem 1rem 1rem 0;
    width: 70px;
    height: 70px;
    background: #fee2e2;
    border-radius: 12px;
    transition: var(--transition-base);
}
.pdf-file-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ef4444;
    text-decoration: none !important;
    font-weight: 600;
}
.pdf-file-card svg { width: 32px; height: 32px; stroke-width: 1.5; }
.pdf-ext { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; margin-top: 2px; }

/* ============================================================
   UCEBNÍ PLÁNY PAGE
   ============================================================ */

.tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 1rem;
}
.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--color-text-muted);
}
.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.table-plans {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}
.table-plans th, .table-plans td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}
.table-plans th {
    background: var(--color-bg-light);
    font-weight: 600;
}

/* ============================================================
   HEADER — ICONS CONTAINER
   ============================================================ */

.icons-container {
    display: none;
    align-items: center;
    gap: 0.85rem;
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    height: 100%;
}
.icons-container .icon-link {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    position: relative;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    padding: 0;
    margin: 0;
    border-bottom: none;
    background: var(--color-primary, #2563eb);
    color: white;
    border: 1px solid var(--color-primary, #2563eb);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}
.icons-container .icon-link svg,
.icons-container .icon-link img {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
    stroke-width: 2px;
    transition: transform 0.2s;
    margin: 0;
}
.icons-container .icon-link--bakalari img {
    width: 30px;
    height: auto;
    max-height: 28px;
}
.icons-container .icon-link:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: white;
}
.icons-container .icon-link--instagram:hover { color: #db2777; }
.icons-container .icon-link--strava:hover { color: #f97316; }
.icons-container .icon-link--suplovani:hover { color: #7c3aed; }
.icons-container .icon-link i {
    font-size: 22px;
    line-height: 1;
    display: block;
    transition: transform 0.2s;
}
.icons-container .icon-link--login:hover { color: var(--color-primary); }
.icons-container .icon-link--bakalari img {
    transition: transform 0.2s;
}
.icons-container .icon-link--bakalari:hover img { filter: none; }
.icons-container .icon-link--office svg path { transition: fill 0.2s; }
.icons-container .icon-link--office:not(:hover) svg path { fill: white !important; }
.icons-container .icon-link--login.active {
    background: #1e40af;
    border-color: #1e40af;
}
.icons-container .icon-link--login.active:hover {
    background: white;
    color: #1e40af;
}

/* Tooltips */
.icon-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #1e293b;
    color: white;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 10;
}
.icon-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 4px 4px 4px;
    border-style: solid;
    border-color: transparent transparent #1e293b transparent;
}
.icons-container .icon-link:hover .icon-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
@media (max-width: 900px) {
    .icons-container { display: none !important; }
}

/* ============================================================
   HEADER — SEARCH OVERLAY
   ============================================================ */

.search-container {
    display: flex;
    align-items: center;
}
.search-toggle {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: var(--transition-base);
}
.search-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}
.search-mobile__bar    { display: none; }
.search-mobile__results { display: none; }

/* Mobile menu close button */
.menu-close {
    display: none;
}
@media (max-width: 900px) {
    .menu-close {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        padding: 1rem 1rem 0.5rem;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-text-main);
        flex-shrink: 0;
    }
    .menu-close svg {
        width: 36px;
        height: 36px;
        background: var(--color-bg-surface-alt);
        border: 1px solid var(--color-border);
        border-radius: 50%;
        padding: 6px;
        transition: background 0.2s;
    }
    .menu-close:hover svg {
        background: #fee2e2;
        border-color: #fca5a5;
        color: #dc2626;
    }
}
@media (max-width: 900px) {
    .search-container {
        width: 100%;
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1.25rem;
        gap: 0;
        cursor: default;
    }
    .search-toggle { display: none; }
    .search-mobile__bar {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        background: var(--color-bg-surface-alt);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-full);
        padding: 0.5rem 1rem;
    }
    .search-mobile__input {
        flex: 1;
        border: none;
        background: transparent;
        font-size: 0.95rem;
        outline: none;
        color: var(--color-text-main);
        font-family: var(--font-main);
    }
    .search-mobile__results {
        display: block;
        max-height: 55vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 0.35rem;
    }
    .mob-result {
        display: flex;
        align-items: flex-start;
        gap: 0.65rem;
        padding: 0.6rem 0.5rem;
        text-decoration: none;
        color: var(--color-text-main);
        border-radius: var(--radius-sm);
        transition: background 0.15s;
    }
    .mob-result:hover { background: var(--color-bg-surface-alt); }
    .mob-result--contact { background: #f0fdf4; }
    .mob-result--contact:hover { background: #dcfce7; }
    .mob-result__icon { font-size: 1.05rem; flex-shrink: 0; margin-top: 1px; }
    .mob-result__body { flex: 1; min-width: 0; }
    .mob-result__title { font-weight: 600; font-size: 0.88rem; line-height: 1.3; }
    .mob-result__desc  { font-size: 0.78rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
    .mob-result__cta   { font-size: 0.74rem; font-weight: 700; color: #065f46; margin-top: 3px; }
    .mob-search-empty, .mob-search-loading { text-align: center; padding: 0.85rem 0.5rem; font-size: 0.83rem; color: var(--color-text-muted); }
}

/* Full-screen search modal */
.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    padding: 5vh 1rem 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.search-overlay.open { display: block; }

.search-overlay__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.search-overlay__panel {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: var(--radius-lg);
    max-width: 680px;
    margin: 0 auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: srchIn 0.2s ease;
}
@keyframes srchIn {
    from { opacity: 0; transform: translateY(-14px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.search-overlay__box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--color-border);
}
.search-overlay__icon { flex-shrink: 0; stroke: var(--color-primary); }
.search-overlay__input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.15rem;
    outline: none;
    padding: 0.35rem 0;
    color: var(--color-text-main);
    font-family: var(--font-main);
}
.search-overlay__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.search-overlay__count {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    background: var(--color-bg-surface-alt);
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
}
.search-overlay__close {
    background: var(--color-bg-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    padding: 0.35rem 0.65rem;
    transition: var(--transition-base);
}
.search-overlay__close:hover { background: var(--color-accent); color: white; border-color: var(--color-accent); }

/* Search Results */
.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
}
.search-result {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
    margin-bottom: 2px;
}
.search-result:hover { background: var(--color-bg-surface-alt); }
.search-result--contact {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.search-result--contact:hover { background: #dcfce7; border-color: #86efac; }

.search-result__icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.search-result__icon--news    { background: #dbeafe; }
.search-result__icon--event   { background: #fce7f3; }
.search-result__icon--contact { background: #d1fae5; }
.search-result__icon--page    { background: #f3e8ff; }

.search-result__badge {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 2px 7px; border-radius: 4px;
    white-space: nowrap; display: inline-block; margin-bottom: 3px;
}
.search-result__badge--news    { background: #dbeafe; color: #1d4ed8; }
.search-result__badge--event   { background: #fce7f3; color: #be185d; }
.search-result__badge--contact { background: #d1fae5; color: #065f46; }
.search-result__badge--page    { background: #f3e8ff; color: #6b21a8; }

.search-result__body { flex: 1; min-width: 0; }
.search-result__title { font-weight: 600; font-size: 0.95rem; color: var(--color-text-main); }
.search-result__desc {
    font-size: 0.81rem; color: var(--color-text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
.search-result__footer {
    display: flex; align-items: center; justify-content: space-between; margin-top: 4px;
}
.search-result__date { font-size: 0.74rem; color: var(--color-text-light); }
.search-result__cta  { font-size: 0.78rem; font-weight: 700; color: #065f46; }

.search-empty, .search-loading {
    text-align: center; padding: 2.5rem 1rem;
    color: var(--color-text-muted); font-size: 0.9rem;
}
.search-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.search-hint {
    padding: 0.85rem 1.25rem;
    font-size: 0.8rem; color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    text-align: center;
}
.search-hint kbd {
    background: var(--color-bg-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 4px; padding: 1px 6px;
    font-size: 0.75rem; font-family: var(--font-main);
}

@media (max-width: 600px) {
    .search-overlay { padding: 2rem 0.5rem; }
    .search-overlay__input { font-size: 1rem; }
    .search-results { max-height: 65vh; }
    .search-overlay__close { display: none; }
}

/* ============================================================
   HEADER — FIXED SIDEBAR & QUICK LINKS
   ============================================================ */

.fixed-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Accessibility Panel */
.a11y-panel {
    display: flex;
    align-items: flex-start;
    flex-direction: row-reverse;
}
.a11y-panel__toggle {
    background: #d94545;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 0 0 0 10px;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    flex-shrink: 0;
}
.a11y-panel__toggle:hover { background: #b83535; }
.a11y-panel__toggle.active { border-radius: 0; }
.a11y-icon-close { display: none; }
.a11y-panel__toggle.active .a11y-icon-open { display: none; }
.a11y-panel__toggle.active .a11y-icon-close { display: block; }

.a11y-panel__menu {
    display: none;
    background: white;
    border: 1px solid var(--color-border);
    border-right: 3px solid var(--color-primary);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding: 1rem;
    width: 230px;
    box-shadow: var(--shadow-xl);
}
.a11y-panel__menu.open { display: block; }

.a11y-panel__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.a11y-panel__group { margin-bottom: 0.5rem; }
.a11y-panel__group:last-child {
    margin-bottom: 0;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}
.a11y-panel__row { display: flex; }
.a11y-btn {
    background: white;
    border: 1px solid var(--color-border);
    border-bottom: none;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-main);
    transition: var(--transition-base);
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 0;
}
.a11y-panel__group .a11y-panel__row:first-child .a11y-btn {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.a11y-panel__group .a11y-panel__row:last-child .a11y-btn {
    border-bottom: 1px solid var(--color-border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.a11y-panel__group .a11y-panel__row:only-child .a11y-btn {
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}
.a11y-btn:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.a11y-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.a11y-btn__icon {
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.a11y-btn__text { font-size: 0.82rem; }
.a11y-btn--reset {
    justify-content: center;
    background: transparent;
    border: 1px solid var(--color-accent) !important;
    color: var(--color-accent);
    border-radius: var(--radius-sm) !important;
}
.a11y-btn--reset:hover { background: var(--color-accent); color: white; }

/* Accessibility mode classes */
html.a11y-grayscale { filter: grayscale(100%); }

/* High contrast — triple class specificity to beat any !important rule in the stylesheet */
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast *,
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast *::before,
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast *::after {
    background: #000 !important;
    color: #ff0 !important;
    border-color: #ff0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast a {
    text-decoration: underline !important;
    color: #ff0 !important;
}
html.a11y-high-contrast img { filter: brightness(1.2) contrast(1.2); }
/* HC — partner logos: white background so logos are visible on black */
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .partner-logo {
    background: #fff !important;
    padding: 0.5rem !important;
    border-radius: 6px !important;
}
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .partner-logo img {
    filter: none !important;
}
html.a11y-high-contrast .glr-item:hover img {
    transform: scale(1.07);
    filter: none !important;
}
html.a11y-high-contrast video { opacity: 0.3; }

/* High contrast — hamburger lines must stay visible (yellow on black) */
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .hamburger__line {
    background: #ff0 !important;
}
/* High contrast — mobile menu */
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .menu {
    background: #000 !important;
    border-left: 2px solid #ff0 !important;
}
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .menu>ul>li>a,
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .menu .submenu a {
    color: #ff0 !important;
    background: #000 !important;
    border-color: #ff0 !important;
}
/* High contrast — Bakaláři: hide ico img, show yellow SVG logo via background */
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .icon-link--bakalari img,
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .fql-btn--bakalari img {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
}
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .icon-link--bakalari::after {
    content: "" !important;
    display: block !important;
    width: 44px !important;
    height: 44px !important;
    background: url('../img/logo/bakalari-hc.svg') no-repeat center / contain !important;
}
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .fql-btn--bakalari::after {
    content: "" !important;
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    background: url('../img/logo/bakalari-hc.svg') no-repeat center / contain !important;
}
/* High contrast — logo: pure yellow via SVG-friendly filter */
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .logo img {
    filter: brightness(0) invert(1) sepia(1) saturate(10000%) hue-rotate(3deg) !important;
    background: transparent !important;
}
/* High contrast — Office 365 SVG: yellow filled squares */
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .icon-link--office svg path,
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .fql-btn--office svg path {
    fill: #ff0 !important;
}
/* High contrast — SVGs using stroke (Instagram, etc.) */
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .fql-btn svg,
html.a11y-high-contrast.a11y-high-contrast.a11y-high-contrast .icon-link svg {
    color: #ff0 !important;
    stroke: #ff0 !important;
}

html.a11y-negative { filter: invert(100%) hue-rotate(180deg); }
html.a11y-negative img,
html.a11y-negative video { filter: invert(100%) hue-rotate(180deg); }
html.a11y-negative .glr-item:hover img {
    filter: invert(100%) hue-rotate(180deg) !important;
}
/* Negative — logo and Bakaláři: don't re-invert, let them follow page inversion */
html.a11y-negative .logo img,
html.a11y-negative .icon-link--bakalari img,
html.a11y-negative .fql-btn--bakalari img { filter: none; }

/* Fixed Quick Links */
.fixed-quick-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.fql-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--color-primary, #2563eb);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.fql-btn:first-child { border-radius: 10px 0 0 0; }
.fql-btn:last-child { border-radius: 0; }
.fql-btn:hover {
    background: #1e40af;
    transform: translateX(-3px);
}
.fql-btn--instagram:hover { background: #db2777; }
.fql-btn--bakalari:hover { background: #1a7a3a; }
.fql-btn--office:hover { background: #1e40af; }
.fql-btn--strava:hover { background: #e67e22; }
.fql-btn--suplovani:hover { background: #7c3aed; }
.fql-btn i { font-size: 18px; line-height: 1; }
.fql-btn--office svg path { transition: fill 0.2s; }
.fql-btn--office:not(:hover) svg path { fill: white !important; }
.fql-btn--login.active { background: #1e40af; }
.fql-btn img { height: 22px; width: auto; }

@media (max-width: 900px) {
    body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }

    .fixed-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: calc(52px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        flex-direction: row;
        align-items: stretch;
        transform: none;
        border-top: 1px solid rgba(255,255,255,0.15);
        background: var(--color-primary, #2b61c9);
    }

    .fixed-quick-links {
        display: flex;
        flex-direction: row;
        flex: 1;
    }
    .fql-btn {
        flex: 1;
        height: 52px;
        width: auto;
        border-radius: 0 !important;
    }
    .fql-btn:first-child { border-radius: 0 !important; }
    .fql-btn:hover { transform: translateY(-2px); }

    .a11y-panel {
        position: static;
        flex-direction: column;
        align-items: flex-end;
    }
    .a11y-panel__toggle {
        width: 52px;
        height: 52px;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .a11y-panel__menu {
        position: fixed;
        bottom: 52px;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        border-top: 3px solid var(--color-primary);
        max-height: 55vh;
        overflow-y: auto;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    }

    .a11y-panel__group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .a11y-panel__group:last-child { grid-template-columns: 1fr; }
    .a11y-panel__row { display: contents; }
    .a11y-btn {
        border-bottom: 1px solid var(--color-border) !important;
        border-radius: 0 !important;
        justify-content: center;
        padding: 0.8rem 0.5rem;
    }
    .a11y-btn__icon { font-size: 1.2rem; width: auto; }
    .a11y-btn__text { display: block; font-size: 0.75rem; }
}

/* ── CALENDAR — organizace školního roku ─────────────────────────────────── */

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 2rem;
}

.cal-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text);
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 2px solid transparent;
}

.cal-legend__item::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Color definitions */
.cal-green  { --cal-bg: #dcfce7; --cal-border: #86efac; --cal-text: #166534; }
.cal-red    { --cal-bg: #fee2e2; --cal-border: #fca5a5; --cal-text: #991b1b; }
.cal-orange { --cal-bg: #ffedd5; --cal-border: #fdba74; --cal-text: #9a3412; }
.cal-purple { --cal-bg: #f3e8ff; --cal-border: #d8b4fe; --cal-text: #6b21a8; }
.cal-blue   { --cal-bg: #dbeafe; --cal-border: #93c5fd; --cal-text: #1e40af; }
.cal-sky    { --cal-bg: #e0f2fe; --cal-border: #7dd3fc; --cal-text: #075985; }
.cal-slate  { --cal-bg: #f1f5f9; --cal-border: #cbd5e1; --cal-text: #334155; }
.cal-weekend { --cal-bg: #f8fafc; --cal-border: #e2e8f0; --cal-text: #64748b; }

.cal-legend__item.cal-green  { background: var(--cal-bg); border-color: var(--cal-border); color: var(--cal-text); }
.cal-legend__item.cal-red    { background: var(--cal-bg); border-color: var(--cal-border); color: var(--cal-text); }
.cal-legend__item.cal-orange { background: var(--cal-bg); border-color: var(--cal-border); color: var(--cal-text); }
.cal-legend__item.cal-purple { background: var(--cal-bg); border-color: var(--cal-border); color: var(--cal-text); }
.cal-legend__item.cal-blue   { background: var(--cal-bg); border-color: var(--cal-border); color: var(--cal-text); }
.cal-legend__item.cal-sky    { background: var(--cal-bg); border-color: var(--cal-border); color: var(--cal-text); }
.cal-legend__item.cal-slate  { background: var(--cal-bg); border-color: var(--cal-border); color: var(--cal-text); }
.cal-legend__item.cal-weekend { background: var(--cal-bg); border-color: var(--cal-border); color: var(--cal-text); }

.cal-legend__item.cal-green::before  { background: var(--cal-border); }
.cal-legend__item.cal-red::before    { background: var(--cal-border); }
.cal-legend__item.cal-orange::before { background: var(--cal-border); }
.cal-legend__item.cal-purple::before { background: var(--cal-border); }
.cal-legend__item.cal-blue::before   { background: var(--cal-border); }
.cal-legend__item.cal-sky::before    { background: var(--cal-border); }
.cal-legend__item.cal-slate::before  { background: var(--cal-border); }
.cal-legend__item.cal-weekend::before { background: var(--cal-border); }

/* Accordion year list — single column */
/* Export button */
.cal-export {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cal-export__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: var(--shadow-sm);
}

.cal-export__btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
}

.cal-export__hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Per-month ICS download */
.cal-month__ics {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    text-decoration: none;
    transition: background 0.15s;
    flex-shrink: 0;
}

.cal-month__ics:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
}

.cal-year {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Month card */
.cal-month {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

/* Clickable header */
.cal-month__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    background: var(--gradient-primary);
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.cal-month__name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex: 1;
}

.cal-month__year {
    font-size: 0.85rem;
    opacity: 0.75;
}

.cal-month__chevron {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.85;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.cal-month.open .cal-month__chevron {
    transform: rotate(180deg);
}

/* Grid hidden by default, shown when open */
.cal-grid {
    display: none;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.cal-month.open .cal-grid {
    display: grid;
    animation: cal-reveal 0.2s ease;
}

@keyframes cal-reveal {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Day-of-week headers */
.cal-dow {
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    padding: 0.4rem 0;
    color: var(--color-text-light);
    background: #f8fafc;
    border-bottom: 1px solid var(--color-border);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cal-dow--weekend {
    color: #94a3b8;
}

/* Day cells */
.cal-cell {
    position: relative;
    padding: 0.35rem 0.5rem 0.3rem;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    cursor: default;
    transition: filter 0.15s;
    vertical-align: top;
}

.cal-cell:hover:not(.cal-cell--empty) {
    filter: brightness(0.95);
    z-index: 1;
}

.cal-cell--empty {
    background: #fafafa;
}

.cal-cell--weekend {
    background: #f8fafc;
}

/* Event-colored cells */
.cal-cell.cal-green  { background: var(--cal-bg); border-color: var(--cal-border); }
.cal-cell.cal-red    { background: var(--cal-bg); border-color: var(--cal-border); }
.cal-cell.cal-orange { background: var(--cal-bg); border-color: var(--cal-border); }
.cal-cell.cal-purple { background: var(--cal-bg); border-color: var(--cal-border); }
.cal-cell.cal-blue   { background: var(--cal-bg); border-color: var(--cal-border); }
.cal-cell.cal-sky    { background: var(--cal-bg); border-color: var(--cal-border); }
.cal-cell.cal-slate  { background: var(--cal-bg); border-color: var(--cal-border); }

/* Today highlight */
.cal-cell--today {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    border-radius: 2px;
    z-index: 2;
}

.cal-cell--today .cal-cell__num {
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    width: 1.4rem;
    height: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Day number */
.cal-cell__num {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    color: #374151;
    margin-bottom: 0.1rem;
}

.cal-cell--weekend .cal-cell__num,
.cal-cell.cal-green .cal-cell__num,
.cal-cell.cal-red .cal-cell__num,
.cal-cell.cal-orange .cal-cell__num,
.cal-cell.cal-purple .cal-cell__num,
.cal-cell.cal-blue .cal-cell__num,
.cal-cell.cal-sky .cal-cell__num,
.cal-cell.cal-slate .cal-cell__num {
    color: var(--cal-text);
}

/* Mobile day-of-week label — hidden on desktop */
.cal-cell__dow-mobile {
    display: none;
}

/* Event label — fully visible, wraps naturally */
.cal-cell__event {
    display: block;
    font-size: 0.68rem;
    line-height: 1.3;
    color: var(--cal-text, #374151);
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 600px) {
    .cal-month.open .cal-grid {
        grid-template-columns: 1fr;
    }

    .cal-dow { display: none; }

    .cal-cell--empty { display: none; }

    .cal-cell {
        display: flex;
        align-items: baseline;
        gap: 0.6rem;
        padding: 0.55rem 0.75rem;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .cal-cell__dow-mobile {
        display: block;
        font-size: 0.7rem;
        font-weight: 600;
        color: #94a3b8;
        min-width: 1.5rem;
        text-transform: uppercase;
        flex-shrink: 0;
    }

    .cal-cell__num {
        font-size: 0.85rem;
        min-width: 1.6rem;
        text-align: center;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .cal-cell__event {
        font-size: 0.78rem;
        display: inline;
    }

    .cal-cell__event + .cal-cell__event::before {
        content: " · ";
        color: #94a3b8;
    }

    .cal-cell--today .cal-cell__num {
        width: 1.6rem;
        height: 1.6rem;
    }

    .cal-month__name { font-size: 0.95rem; }
}

/* --- Novinka badge --- */
.novinka-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 90px;
    height: 90px;
    z-index: -1;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}

@media (max-width: 600px) {
    .novinka-badge {
        width: 70px;
        height: 70px;
        top: -5px;
        right: -5px;
    }
}

/* --- Aktuality list page --- */
.news-list-item .news-item:hover {
    box-shadow: 0 4px 16px rgba(43, 97, 201, 0.15);
    transform: translateY(-2px);
    border-left-color: var(--color-primary-hover);
}
