/* === Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === CSS variable for footer height & theme duration === */
:root {
    --footer-height: 64px; /* adjust if your footer height changes */
    --theme-duration: 1500ms; /* used as default; JS overrides duration inline */
}

/* === Základní layout === */
body {
    display: grid;
    grid-template-rows: 1fr auto; /* main grows, footer stays auto */
    min-height: 100vh;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f8fbff;
    color: #333;
}


/* Ensure main content fills remaining height */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: 50px 20px 50px; /* top/bottom padding */
    position: relative;
    z-index: 1; /* above theme circle */
    max-width: 100%; 
}

/* === Navigace === */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center; /* vertically centers everything */
    background: #b8e9f7;
    height: 64px; /* fixed header height */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 0 30px;
}

/* === Navigation links styled like buttons === */
.nav-links a {
    display: inline-block;
    padding: 12px 25px;   /* ZVĚTŠENO: více místa okolo textu */
    border-radius: 12px;
    font-weight: 400;     /* ZMĚNA: trochu tučnější písmo vypadá lépe */
    font-size: 1.15rem;   /* NOVÉ: zvětšení písma (cca 18-19px) */
    color: #005577;
    text-decoration: none;
    background: transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
    background-color: #005577; /* dark blue background on hover */
    color: #fff; /* white text on hover */
}

.brand {
    display: flex;
    align-items: center;
    height: 100%;
}

.brand a {
    display: inline-block;
    height: 100%;
}

.brand .logo {
    height: 100%;
    max-height: calc(var(--header-height) - 12px); /* keep some breathing room */
    width: auto;
    display: block;
    object-fit: contain;
}

/* Nav links centered */
.nav-links {
    display: flex;
    gap: 50px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto; /* prevent stretching */
}

/* Log in button flush right */
.nav-actions {
    flex: 0 0 auto; /* prevent stretching */
}

/* Buttons */
.btn {
    background: #ffcd4a;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    background: #ffdb6e;
}

.btn.small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn.small_acc {
    background: transparent;
    border: 2px solid #80fc03;
    color: #005577;
    
    /* MENŠÍ ROZMĚRY (aby se vešla 3 vedle sebe) */
    padding: 6px 14px;      
    font-size: 0.95rem;     
    font-weight: 600;
    border-radius: 10px;
    
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Přidáme malou mezeru, aby nebyla nalepená na sebe */
    margin-left: 5px;       
}

/* 2. SPECIÁLNÍ ÚPRAVA: Pouze tlačítko "Přihlášení" (když nejste uvnitř) bude VELKÉ */
#loginBtn {
    padding: 12px 25px;     /* VELKÉ (stejně jako menu) */
    font-size: 1.15rem;     /* VELKÉ */
    border-radius: 12px;
}

/* Společný efekt po najetí myší (HOVER) */
.btn.small_acc:hover {
    background: #80fc03;
    color: #333;
    box-shadow: 0 0 15px rgba(128, 252, 3, 0.6);
    transform: scale(1.05);
}
}

.btn.small_adm {
    background: #f5491ed3;
    color: #333;
    padding: 10px;
    margin: 10px;
    font-size: 0.9rem;
}

.welcome {
    font-size: 0.9rem;
    color: #005577;
}

label {
    display: block;
    margin: 10px 0 4px;
    font-weight: 500;
} 

input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
} 

input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* === LOGIN BOX === */
#loginBox {
    background: white;
    border: 1px solid #ddd;
    padding: 20px;
    width: 300px;
    border-radius: 8px;
    position: fixed; /* changed from absolute so it moves with page */
    top: 70px;
    right: 20px; /* flush right with a little margin */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 2000 !important;
}

/* Stack login form elements vertically */
#loginBox label,
#loginBox input {
    display: block;
    width: 100%;
}

#loginBox input {
    margin-bottom: 12px;
}

/* Skryté prvky — použito pro login a register */
.hidden {
    display: none !important;
}

/* === MODÁLNÍ OKNO (REGISTER) === */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
} 

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    width: 320px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
} 

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    } 
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Hlavní obsah styling (headings, paragraphs) === */
main h1, main h2 {
    color: #0078a8;
    margin-bottom: 20px;
}

main p {
    max-width: 800px;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* === Galerie === */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1000px;
    margin: 30px auto;
}

.gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* === Galerie kurzů === */
.course-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    max-width: 800px;
}

.course-link {
    display: inline-block;
    background: #ffcd4a;
    color: #333;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s ease;
}

.course-link:hover {
    background: #ffdb6e;
}

.btn-back {
    display: inline-block;
    background: #b8e9f7;
    color: #005577;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: 0.2s ease;
}

.btn-back:hover {
    background: #c9f1fa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    padding: 20px 0;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* === Dashboard === */
.dashboard {
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
    text-align: center;
}

.dashboard h2 {
    color: #0078a8;
}

.project, .photo {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-top: 20px;
}

/* === Footer === */
.footer {
    width: 100%;
    min-height: var(--footer-height);
    padding: 16px 0;
    background: #b8e9f7;
    text-align: center;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
    z-index: 2;
    top: 90px;
    
}


.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #005577;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* === Image Button Grid (2x2 responsive) === */
.image-button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 90%;
    max-width: 900px;
    margin: 50px auto 100px;
}

/* kuzry */
.image-grid-courses {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 90%;
    margin: 50px auto 100px;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }
    .timetable {
    min-width: 900px; /* relax if extremely narrow; otherwise horizontal scroll appears */
  }
    .image-button-grid {
        grid-template-columns: 1fr;
    }
    .image-grid-courses {
        grid-template-columns: 1fr;
    }
    .nav {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    height: auto;
    padding: 6px 12px; /* a little more breathing room */
    overflow-x: visible; /* prevent cutting off content */
  }

  .brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .brand .logo {
    max-height: 40px;
    width: auto;
  }

  .nav-links {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    min-width: 0; /* allow shrink */
    overflow: hidden; /* prevent overflow scrolling */
  }

  .nav-links a {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 8px;
    white-space: nowrap; /* keep text in one line */
  }

  .nav-actions {
    flex-shrink: 0; /* prevent it from getting squeezed */
    margin-left: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .btn.small_acc {
    padding: 4px 10px;
    font-size: 0.8rem;
    white-space: nowrap; /* keep text visible */
  }

}

.image-button {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-decoration: none;
    color: white;
    font-weight: 600;
    height: 0;
    padding-bottom: 60%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-button img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;        /* keep fill + crop */
    object-position: left top; /* crop from top-left instead of center */
    display: block;
    transition: transform 0.3s ease;
}


.image-button span {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.image-button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.image-button:hover img {
    transform: scale(1.05);
}

/* === DARK THEME === */
body.dark-theme {
    background: #121212;
    color: #f0f0f0;
}

/* Header and footer colors in dark mode */
body.dark-theme .nav,
body.dark-theme .footer {
    background: #ffcd4a;
    color: #000;
}

/* Buttons */
body.dark-theme .btn {
    background: #ffcd4a;
    color: #000;
}

/* Slightly darker small buttons */
body.dark-theme .btn.small {
    background: #e6c200; /* darker than #ffd700 */
    color: #000;
}

/* Even darker accent buttons */
body.dark-theme .btn.small_acc {
    background: #ccad00; /* even darker */
    color: #000;
}

/* === Links === */

/* Default links (everywhere except header/footer) */
body.dark-theme a {
    color: #ffd54a;
}

/* Links inside header and footer are black */
body.dark-theme .nav a,
body.dark-theme .footer a {
    color: #000;
}

/* Optional subtle hover differences */
body.dark-theme a:hover {
    color: #ffea82;
}

body.dark-theme .nav a:hover,
body.dark-theme .footer a:hover {
    color: #333;
}

/* Dark theme: course-link colors */
body.dark-theme .course-link,
body.dark-theme .course-link a {
    color: #000;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Base background slightly darker for contrast */
body.dark-theme .course-link {
    background: #ffd54a; /* same as header/footer yellow */
}

/* On hover — darker background, text turns lighter for readability */
body.dark-theme .course-link:hover {
    background: #e6c200; /* darker yellow for contrast */
    color: #fff; /* text becomes white */
}

/* Ensure the inner <a> text also turns white on hover */
body.dark-theme .course-link:hover a {
    color: #fff;
}


/* === THEME TRANSITION CIRCLE === */
.theme-transition {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #121212; /* black by default */
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 0; /* behind content */
    pointer-events: none;
    transition: transform var(--theme-duration) cubic-bezier(.22,.9,.3,1);
}

.theme-transition.reverse {
    background: #ffd54a;
}

/* Make sure all content sits above the circle */
body > * {
    position: relative;
    z-index: 1;
}

/* header/footer themed look (applied when circle reaches them) */
.nav.themed {
    background: #ffd54a !important;
    color: #000 !important;
    transition: background-color 600ms ease, color 600ms ease;
}

.footer.themed {
    background: #ffd54a !important;
    color: #000 !important;
    transition: background-color 600ms ease, color 600ms ease;
}

/* smooth revert for header/footer */
.nav, .footer {
    transition: background-color 1s ease-in-out, color 1s ease-in-out;
}

/* flip-section scoped flip card styles */
.flip-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 40px;
  font-family: 'Lato', 'Segoe Ui', sans-serif;
}

.flip-section .flip-card-container {
  --hue: 150;
  --primary: hsl(var(--hue), 50%, 50%);
  --white-1: hsl(0, 0%, 90%);
  --white-2: hsl(0, 0%, 80%);
  --dark: hsl(var(--hue), 25%, 10%);
  --grey: hsl(0, 0%, 50%);
  width: 310px;
  height: 500px;
  perspective: 1000px;
  position: relative;
}

.flip-section .flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: 0.6s 0.1s;
}

.flip-section .flip-card-container:hover .flip-card,
.flip-section .flip-card-container:focus-within .flip-card {
  transform: rotateY(180deg);
}

.flip-section .card-front,
.flip-section .card-back {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: var(--dark);
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flip-section .card-front {
  transform: rotateY(0deg);
  z-index: 2;
}

.flip-section .card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

.flip-section figure {
  z-index: -1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.flip-section img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.flip-section figcaption {
  display: block;
  width: auto;
  margin-top: 12%;
  padding: 8px 22px;
  font-weight: bold;
  letter-spacing: 2px;
  word-spacing: 6px;
  text-align: right;
  position: absolute;
  top: 0;
  right: 12px;
  color: var(--white-1);
  background: hsla(var(--hue), 25%, 10%, 0.5);
}

.flip-section .img-bg {
  background: hsla(var(--hue), 25%, 10%, 0.5);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.flip-section .card-front .img-bg {
  clip-path: polygon(0 20%, 100% 40%, 100% 100%, 0 100%);
}

.flip-section .card-front .img-bg::before {
  content: '';
  position: absolute;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(18deg);
  width: 100%;
  height: 6px;
  border: 1px solid var(--primary);
  border-left-color: transparent;
  border-right-color: transparent;
  transition: 0.1s;
}

.flip-section .flip-card-container:hover .card-front .img-bg::before {
  width: 6px;
  border-left-color: var(--primary);
  border-right-color: var(--primary);
}

.flip-section ul {
  padding-top: 50%;
  margin: 0 auto;
  width: 70%;
  list-style: none;
  color: var(--white-1);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.flip-section li {
  width: 100%;
  margin-top: 12px;
  padding-bottom: 12px;
  font-size: 14px;
  text-align: center;
  position: relative;
}

.flip-section li:nth-child(2n) {
  color: var(--white-2);
}

.flip-section li:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.2;
}

.flip-section button {
  font-family: inherit;
  font-weight: bold;
  color: var(--white-1);
  letter-spacing: 2px;
  padding: 9px 20px;
  border: 1px solid var(--grey);
  border-radius: 1000px;
  background: transparent;
  transition: 0.3s;
  cursor: pointer;
}

.flip-section button:hover,
.flip-section button:focus {
  color: var(--primary);
  background: hsla(var(--hue), 25%, 10%, 0.2);
  border-color: currentColor;
}

.flip-section button:active {
  transform: translate(2px);
}

.flip-section .design-container {
  --tr: 90;
  --op: 0.5;
  width: 100%;
  height: 100%;
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.flip-section .design {
  display: block;
  background: var(--grey);
  position: absolute;
  opacity: var(--op);
  transition: 0.3s;
}

/* Line designs */
.flip-section .design--1,
.flip-section .design--2,
.flip-section .design--3,
.flip-section .design--4 {
  width: 1px;
  height: 100%;
}
.flip-section .design--1,
.flip-section .design--2 {
  top: 0;
  transform: translateY(calc((var(--tr) - (var(--tr) * 2)) * 1%));
}
.flip-section .design--1 {
  left: 20%;
}
.flip-section .design--2 {
  left: 80%;
}
.flip-section .design--3,
.flip-section .design--4 {
  bottom: 0;
  transform: translateY(calc((var(--tr) + (var(--tr) - var(--tr))) * 1%));
}
.flip-section .design--3 {
  left: 24%;
}
.flip-section .design--4 {
  left: 76%;
}
.flip-section .design--5,
.flip-section .design--6,
.flip-section .design--7,
.flip-section .design--8 {
  width: 100%;
  height: 1px;
}
.flip-section .design--5,
.flip-section .design--6 {
  left: 0;
  transform: translateX(calc((var(--tr) - (var(--tr) * 2)) * 1%));
}
.flip-section .design--5 {
  top: 41%;
}
.flip-section .design--6 {
  top: 59%;
}
.flip-section .design--7,
.flip-section .design--8 {
  right: 0;
  transform: translateX(calc((var(--tr) + (var(--tr) - var(--tr))) * 1%));
}
.flip-section .design--7 {
  top: 44%;
}
.flip-section .design--8 {
  top: 56%;
}

.flip-section button:hover + .design-container,
.flip-section button:active + .design-container,
.flip-section button:focus + .design-container {
  --tr: 20;
  --op: 0.7;
}

/* === DARK THEME: Full black background overlay === */
body.dark-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    background: #121212; /* main dark background color */
    z-index: 0; /* behind everything else */
    pointer-events: none;
}

/* Ensure all visible content stays above it */
body > * {
    position: relative;
    z-index: 1;
}
/* === TIMETABLE FIX — FULL REPLACEMENT === */

.timetable-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--footer-height) + 18px);
    width: 100%;
}

/* The timetable itself is NOT a grid — rows are the grids */
.timetable {
    display: flex;
    flex-direction: column;
    border: 1px solid #444;
    border-radius: 10px;
    background: #181818;
    margin: 2rem auto 0;
    width: fit-content;
    min-width: 1100px;
}

/* HEADER + ROWS use the SAME grid */
.timetable-header,
.timetable-row {
    display: grid;
    grid-template-columns: 120px repeat(13, 110px); /* days + 13 equal hours */
    border-bottom: 1px solid #333;
}

/* === Header cells === */
.timetable-header {
    background: #222;
    color: #fff;
    font-weight: bold;
}

.corner {
    background: #222;
}

.time-col {
    padding: 8px 4px;
    font-size: 0.85rem;
    border-left: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Day column === */
.day-col {
    background: #1e1e1e;
    color: #ddd;
    font-weight: bold;
    border-right: 1px solid #444;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Empty cell === */
.empty {
    border-right: 1px solid #333;
    height: 70px;
}

/* === Cell with schedule blocks === */
.timetable-row > div:not(.day-col):not(.empty) {
    border-right: 1px solid #333;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    box-sizing: border-box;
}

/* === Schedule block === */
.course-slot {
    width: 100%;
    background: #fff;
    padding: 6px;
    border: 2px solid #333;
    border-radius: 6px;
    font-size: 13px;
    text-align: left;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
}

.course-slot:hover {
    background: #eee;
}

/* Full courses */
.course-slot.full {
    background: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Ensure content starts below fixed header */
.content {
    margin-top: 80px; /* adjust if your nav height changes */
    padding: 0 20px;
}
.about-image {
    text-align: center;
    margin: 40px 0;
}

.about-image img {
    width: 100%;
    max-width: 700px; /* upscale target size */
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* === ÚPRAVA PRO ÚVODNÍ TEXT === */
.intro-text {
    width: 100% !important;      /* Roztáhne kontejner na celou šířku */
    display: block !important;   /* Zruší dvousloupcové řazení */
    text-align: justify;         /* Zarovná text do bloku (zleva i zprava) */
    margin: 0 auto 40px auto;    /* Vycentruje a přidá mezeru pod textem */
    padding: 0 20px;             /* Malý odstup od krajů obrazovky */
}

/* TOTO JE KLÍČOVÉ: Musíme dovolit odstavci, aby byl širší než 800px */
.intro-text p {
    max-width: 1200px !important; /* Povolíme textu mnohem větší šířku */
    width: 100%;                  /* Využij veškeré místo */
    font-size: 1.2rem;            /* (Volitelné) Trochu zvětšíme písmo, když je to úvod */
}
}

/* ---------- Lightbox styles ---------- */
#lightbox.hidden {
  display: none;
}

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000; /* high so it overlays header/footer */
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(2px);
}

.lightbox-content {
  position: relative;
  max-width: 95%;
  max-height: 90%;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  z-index: 5001;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

/* Close button (top-right) */
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5002;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

/* Controls container (overlayed on top of image) */
.lightbox-controls {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5002;
}

/* Buttons and download anchor */
.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 36px;
}

.lb-btn:hover:not(.disabled) {
  background: rgba(255,255,255,0.18);
}

/* Disabled state */
.lb-btn.disabled,
.lb-btn[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

/* Small screens adjustments */
@media (max-width: 600px) {
  .lightbox-content img {
    max-height: 70vh;
  }
  .lightbox-controls {
    top: 8px;
    gap: 6px;
  }
  .lb-btn {
    padding: 7px 8px;
    min-width: 40px;
  }
}

/* Make gallery thumbs keyboard-focusable and consistent */
.gallery-thumb {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
}

/* Visual focus ring for accessibility */
.gallery-thumb:focus {
  outline: 3px solid rgba(37,99,235,0.25);
  outline-offset: 2px;
}

/* === MOBILE HAMBURGER BUTTON === */
.menu-toggle {
  display: none; /* hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 10px;
}

.menu-toggle svg {
  width: 26px;
  height: 26px;
}

/* Show only on small screens */
@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* hide desktop links and actions */
  .nav-links,
  .nav-actions {
    display: none;
  }
}
/* === MOBILE MENU PANEL === */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 1500;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -300px; /* hidden off-screen */
  width: 280px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 12px rgba(0,0,0,0.2);
  z-index: 1600;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.mobile-menu-panel.active {
  right: 0; /* slide in */
}

.mobile-close {
  align-self: flex-end;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  margin-bottom: 10px;
}

/* mobile nav links inside panel */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-link,
.mobile-action {
  color: #005577;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  transition: color 0.2s;
}

.mobile-link:hover,
.mobile-action:hover {
  color: #0078a8;
}

.mobile-sep {
  border: none;
  border-top: 1px solid #ccc;
  margin: 10px 0;
}

.mobile-account {
  margin-top: 10px;
}

.mobile-welcome {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 8px;
}
/* === DARK THEME: MOBILE MENU === */
body.dark-theme .mobile-menu-panel {
  background: #222;
  color: #eee;
}

body.dark-theme .mobile-link,
body.dark-theme .mobile-action {
  color: #ffd54a;
  border-bottom-color: #444;
}

body.dark-theme .mobile-link:hover,
body.dark-theme .mobile-action:hover {
  color: #fff;
}

body.dark-theme .mobile-close {
  color: #ffd54a;
}
@media (max-width: 768px) {
  .nav-actions {
    display: flex;
    align-items: center;
  }
}

/* === MOBILE MENU STYLES === */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.mobile-menu-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 300px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.mobile-menu-panel.open {
  right: 0;
}

.mobile-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #333;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.mobile-link,
.mobile-action {
  display: block;
  color: #005577;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.mobile-link:hover,
.mobile-action:hover {
  color: #0078a8;
}

.mobile-sep {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

/* Logged in state in mobile menu */
.mobile-account {
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}

.mobile-welcome {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
}

/* Show hamburger button only on small screens */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav-links,
  .nav-actions {
    display: none;
  }
}
.learning-section {
    width: 90%;
    max-width: 1100px;
    margin: 60px auto;
}

.crop-image {
    width: 100%;           /* Obrázek se roztáhne na celou šířku kontejneru */
    height: 300px;         /* Zde nastavte požadovanou výšku obrázku */
    object-fit: cover;     /* Klíčové: zachová poměr stran a ořízne přebytky */
    object-position: center; /* Vycentruje obrázek (ořízne vrch i spodek stejně) */
}

/* Put text + image on one line */
.learning-content,
.learning-image {
    display: inline-block;
    vertical-align: middle;
    width: 48%;          /* both fit on one row */
}

/* Optional: image styling */
.learning-image img {
    width: 100%;
    max-width: 450px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .learning-content,
    .learning-image {
        display: block;
        width: 100%;
        text-align: center;
    }
/* === OPRAVA PATIČKY (vložte na úplný konec styles.css) === */
.footer {
    position: relative !important; /* Vynutí relativní pozici */
    z-index: 9999 !important;      /* Vynutí nejvyšší vrstvu (nad obsahem i animacemi) */
    pointer-events: auto !important; /* Vynutí funkčnost klikání */
}

.footer a {
    position: relative;
    z-index: 10000; /* Odkazy ještě o kousek výš */
    cursor: pointer;
}
}

/* === Gallery Navigation & Folders === */
.gallery-nav {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 1.1rem;
}
.crumb-sep {
    margin: 0 8px;
    color: #666;
}
.crumb-link {
    color: #005577;
    text-decoration: none;
    font-weight: 600;
}
.crumb-link:hover { text-decoration: underline; }

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1000px;
    margin: 0 auto 40px;
}
.folder-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.folder-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.folder-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}
.folder-name {
    font-weight: 600;
    word-wrap: break-word;
}

/* === Messages === */
.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}
