* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
  font-family: 'FenomenSans-Bold';
  src: url('../fonts/FenomenSans-Bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'FenomenSans-Regular';
  src: url('../fonts/FenomenSans-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'FenomenSans-Light';
  src: url('../fonts/FenomenSans-Light.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #0d1b3e);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'FenomenSans-Light', sans-serif;
    padding: 20px;
}

.calendar-container {
    max-width: 1200px;
    width: 100%;
}

h1 {
    text-align: center;
    font-family: 'FenomenSans-Bold', sans-serif;
    color: #fff;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h2 {
    text-align: center;
    font-family: 'FenomenSans-Regular', sans-serif;
    color: #fff;
    margin-bottom: 30px;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h3 {
    text-align: left;
    font-family: 'FenomenSans-Regular', sans-serif;
    color: #fff;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

p {
    text-align: block;
    color: #fff;
    margin-bottom: 30px;
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#sources-info {
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

a {
    color: #ffdd57;
    text-decoration: none;
    font-weight: bold;
}

.logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-bottom: 20px;
    margin-top: 20px;
}

.logos img {
    height: 80px;
    width: auto;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    perspective: 1000px;
}

.calendar-tile {
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
}

.calendar-tile.locked {
    cursor: not-allowed;
}

.tile-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.calendar-tile:hover:not(.locked) .tile-inner {
    transform: translateY(5px);
}

.tile-front {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #405da5, #1e3a7e);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.calendar-tile.locked .tile-front {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    opacity: 0.6;
}

.tile-number {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.tile-icon {
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.icon-img {
    width: 80px;
    height: 80px;
}

.lock-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    opacity: 0.7;
}

.photo {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-top: 15px;
}

/* Window wings animation */
.window-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    display: none;
}

.window-container.active {
    display: block;
    pointer-events: all;
}

.window-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.6s ease;
}

.window-container.active .window-background {
    background: rgba(0, 0, 0, 0.85);
    transition: background 0.6s ease;
}

.window-wings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.window-wing {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(145deg, #2a4a9e, #1e3a7e);
    border: 3px solid rgba(255, 255, 255, 0.3);
    transform-origin: center;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.window-wing-left {
    left: 0;
    border-right: 1.5px solid rgba(255, 255, 255, 0.3);
    transform-origin: left center;
}

.window-wing-right {
    right: 0;
    border-left: 1.5px solid rgba(255, 255, 255, 0.3);
    transform-origin: right center;
}

.window-container.opening .window-wing-left {
    transform: perspective(1000px) rotateY(-120deg);
}

.window-container.opening .window-wing-right {
    transform: perspective(1000px) rotateY(120deg);
}

.wing-content {
    font-size: 3rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.window-wing-left .wing-content {
    margin-right: -20px;
}

.window-wing-right .wing-content {
    margin-left: -20px;
}

/* Modal content */
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(145deg, #2a4a9e, #1e3a7e);
    border-radius: 8px;
    padding: 40px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    color: #fff;
    opacity: 0;
    transition: transform 0.7s ease 0.4s, opacity 0.5s ease 0.4s;
    z-index: 10;
}

.window-container.opening .modal-content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.modal-title {
    font-size: 2rem;
    font-weight: bold;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 11s ease, transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-icon {
    font-size: 4rem;
    text-align: center;
    margin: 20px 0;
}

.modal-body {
    line-height: 1.6;
    font-size: 1.1rem;
}

/* MENU */
  .top-right-menu {
    z-index: 9999;
  }

  .menu-button {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #405da5;
    background: #405da5;
    cursor: pointer;
    font-size: 14px;
    min-width: 0;
    text-align: right;
    color: #fff;
  }

  .menu-dropdown {
    position: fixed;
    top: 40px;
    right: 10px;
    margin-top: 4px;
    padding: 4px 0;
    border-radius: 4px;
    border: 1px solid #405da5;
    background: #405da5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    min-width: 100px;
    display: none;
  }

  .menu-dropdown a {
    display: block;
    padding: 6px 10px;
    font-size: 14px;
    text-decoration: none;
    color: #ffffff;
  }

  .menu-dropdown a:hover {
    background: #0d1b3e;
  }

  /* když má wrapper třídu .open, zobrazíme dropdown */
  .top-right-menu.open .menu-dropdown {
    display: block;
  }


@media (max-width: 768px) {
    .calendar-container {
        padding-top: 40px;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .tile-number {
        font-size: 1.5rem;
    }

    .tile-icon {
        font-size: 2rem;
    }

    .modal-content {
        padding: 30px;
    }

    .window-wings {
        width: 150px;
        height: 150px;
    }

    .wing-content {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .window-wings {
        width: 120px;
        height: 120px;
    }

    .logos {
        gap: 30px;
    }

    .logos img {
        height: 60px;
        width: auto;
    }
}

