/* https://www.magicpattern.design/tools/css-backgrounds */

::-webkit-scrollbar {
    width: 14px;
}
  
::-webkit-scrollbar-track {
    background: linear-gradient(
        to bottom,
        #f7dede 0%,
        #f2caca 40%,
        #e9b5b5 100%
    );
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        to bottom,
        #c94b4b 0%,
        #b63a3a 50%,
        #9e2f2f 100%
    );
    border-radius: 10px;
    border: 3px solid #f2caca; 
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        to bottom,
        #d65a5a 0%,
        #c44545 50%,
        #a83737 100%
    );
}

* {
    scrollbar-width: thin;
    scrollbar-color: #b63a3a #f2caca;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f1f1;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    background-color: #f6f1f1;
    background-image: radial-gradient(#b42c2c 0.5px, #f6f1f1 0.5px);
    background-size: 10px 10px;
}

.no-scroll {
    overflow: hidden;
}

header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #E8E4E3;
    padding: 0 100px;
    justify-content: space-between;
    background-color: #f6f1f1;
}

header div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

header img.logo {
    height: 50px;
    margin: 10px;
}

header .menu {
    display: flex;
    gap: 15px;
    flex-direction: row;
}

header .menu a {
    position: relative;
    text-decoration: none;
    font-size: 1.1rem;
    color: black;
}


header .menu a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -3px;
    width: 0;
    height: 2px;
    background-color: #b42c2c;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

header .menu a:hover::after, header .menu a.active::after {
    width: 100%;
}

header .hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

header .hamburger:hover {
    transform: scale(1.1);
}

header .mobile-menu {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 71px;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #b42c2c;
    background-size: 10px 10px;
    background-image: repeating-linear-gradient(45deg, #cc2626 0, #cc2626 1px, #b42c2c 0, #b42c2c 50%);
}

header .mobile-menu.hidden {
    display: none;
}

header .mobile-menu .mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

header .mobile-menu .mobile-menu-content a {
    text-decoration: none;
    color: black;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 10px;
    border-bottom: 1px solid #E8E4E3;
    transition: all 0.3s ease;
}

header .mobile-menu .mobile-menu-content a:hover {
    color: white;
    transition: all 0.3s ease;
}


main {
    flex: 1;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    max-width: 65%;
}

main h1 {
    font-size: 2.5rem;
    font-weight: 500;
}

main h2 {
    font-size: 1.5rem;
    font-weight: 400;
}

main section.articles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 30px;
    gap: 20px;
    justify-content: center;
}

main section.articles article {
    background-color: white;
    display: flex;
    flex-direction: column;
    border-radius: 5px;
    box-shadow: 0px 10px 15px -3px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(24px);
    animation: cardIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* flow in animace karticek */
  
main section.articles article:nth-child(1) { animation-delay: 0.05s; }
main section.articles article:nth-child(2) { animation-delay: 0.15s; }
  
@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

main section.articles article .article-image {
    position: relative;
    height: 400px;
    width: 100%;
    overflow: hidden;
}
  
main section.articles article .article-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1);
    transform-origin: center center;
    animation: bgZoom 15s ease-in-out infinite;
}

/* zoom animace pozadi */

@keyframes bgZoom {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

main section.articles article .article-image.image-1 {
    background-image: url('../media/book.jpeg');
    background-position: center;
}

main section.articles article .article-image.image-2 {
    background-image: url('../media/ikeda.jpeg');
}

main section.articles article .article-header {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid #E8E4E3;
}

main section.articles article .article-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

main section.articles article .article-footer {
    width: 100%;
    padding: 25px;
    border-top: 1px solid #E8E4E3;
}

main section.articles article .article-footer a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    background-color: #b42c2c;
    padding: 10px 20px;
    border-radius: 3px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

main section.articles article .article-footer a:hover {
    background-color: #9e2f2f;

}

main section.links {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    padding: 30px;
}

main section.links a#avc-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

main .hero {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    border-radius: 10px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0px 10px 15px -3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

main .hero div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 20px;
}

main .hero img {
    mask-image: linear-gradient(to right, transparent 0%, black 30%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 30%);
    object-fit: cover;
    object-position: 0 0;
}

main section.system {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
}

main section.system .system-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

main .system-table-button {
    color: white;
    font-weight: 500;
    background-color: none;
    color: #b42c2c;
    border: 2px solid #b42c2c;
    padding: 6px 16px;
    border-radius: 3px;
    transition: all 0.3s ease;
    background-color: white;
}

main .system-table-button:hover, main .system-table-button.active {
    background-color: #b42c2c;
    border: none;
    color: white;
    border: 2px solid #b42c2c;
}

main .system-tables-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

main .system-tables-container button {
    color: white;
    font-weight: 500;
    background-color: none;
    color: #b42c2c;
    border: 2px solid #b42c2c;
    padding: 6px 16px;
    border-radius: 3px;
    transition: all 0.3s ease;
    background-color: white;
}

main .system-tables-container button:hover, main .system-tables-container button.active {
    background-color: #b42c2c;
    border: none;
    color: white;
    border: 2px solid #b42c2c;
}

main div.system-tables {
    overflow-x: auto;
    background-color: white;
    box-shadow: 0px 10px 15px -3px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 20px;
}

main div.system-tables table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

main div.system-tables th, 
main div.system-tables td {
    padding: 12px 15px;
    border-bottom: 1px solid #E8E4E3;
    vertical-align: top;
}

main div.system-tables tbody tr:last-of-type td {
    border-bottom: none;
}

main div.system-tables tbody tr:nth-of-type(even) {
    background-color: #faf8f8;
}

main div.system-tables tbody tr:hover {
    background-color: #fdf2f2;
    transition: background-color 0.2s ease;
}

main div.system-tables td b {
    color: #b42c2c;
    font-weight: 600;
    font-size: 1.05rem;
    display: inline-block;
    padding-top: 10px; 
}

main div.system-tables td:nth-child(2) {
    font-weight: 600;
    color: #555;
}

main iframe {
    padding: 20px;
    border: 0;
}

main #medailon {
    margin: 20px 0;
}

main #medailon h2 {
    text-align: left;
    margin: 10px 0;
}

main #medailon p {
    text-align: justify;
    margin: 10px 0;
    line-height: 1.5;
    font-size: 1.2rem;
}

main #medailon .gallery {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
}

main #medailon video {
    max-width: 600px;
}


main #medailon i {
    color: #b42c2c;
}

hr {
    border: 1px solid #E8E4E3;
}

main section.links article {
    display: flex;
    flex-direction: row;
    padding: 20px;
    gap: 20px;
    text-align: left;
}

main section.links article:first-child {
    border-right: 1px solid #E8E4E3;
}

main section.links article i {
    font-size: 2rem;
}

main section.links a {
    color: #b42c2c;
    text-decoration: none;
    transition: all 0.3s ease;
}


footer {
    width: 100%;
    display: flex;
    flex-direction: column;
}

footer .footer-content {
    color: white;
    padding: 10px;
    text-align: center;
    background-color: #090909;
    background-image:  linear-gradient(#1F1F1F 2px, transparent 2px), linear-gradient(90deg, #1F1F1F 2px, transparent 2px), linear-gradient(#1F1F1F 1px, transparent 1px), linear-gradient(90deg, #1F1F1F 1px, #090909 1px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
}

footer .footer-content a {
    color: white;
    text-decoration: underline;
    text-decoration-color: #b42c2c;
}

footer .footer-bottom {
    text-align: center;
    background-color: #1F1F1F;
    color: white;
    padding: 3px;
}


@media (max-width: 1200px) {
    header {
        flex-direction: column;
    }

    main section.articles {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: row;
    }
    header div span {
        display: none;
    }
    header .menu {
        display: none;
    }

    header .hamburger {
        display: block;
    }
    main {
        max-width: 90%;
    }

    main section.links {
        flex-direction: column;
    }

    main section.links article ul {
        padding-left: 20px;
    }

    main section.links article:first-child {
        border-right: none;
        border-bottom: 1px solid #E8E4E3;
    }

    main section.links a#avc-link img {
        display: none;
    }

    main .hero {
        flex-direction: column;
    }

    main .hero img {
        mask-image: none;
        -webkit-mask-image: none;
    }

    main section.system {
        grid-template-columns: 1fr;
    }

    main .system-tables-container {
        max-width: 100%;
        min-width: 0;
    }

    main #digital-button {
        margin-bottom: 10px;
    }
    
    main #medailon video {
        max-width: 100%
    }
}

@media (max-width: 480px) {
    header {
        padding: 0 20px;
    }
    main {
        max-width: 100%;
    }
}