/* Progressive image loading styles */
.progressive-img {
  filter: blur(8px);
  transition: filter 0.5s;
}
.progressive-img.loaded {
  filter: blur(0);
}
.back-btn {
  margin-left: 20px;
  display: inline-block;
}
/* @font-face {
    font-family: 'ComicSans';
    src: url('../source/fonts/ComicSansMS.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
} */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    flex-direction: column;
    display: flex;
}

.body-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto;
}

body {
    /* font-family: 'ComicSans', "Comic Sans MS", "Comic Sans", cursive; */
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
th, td {
    border: 1px solid #000000;
    padding: 12px;
    text-align: left;
}

.info {
  margin: 0 20px 20px;
}


.navigation-section {
  margin-left: 26px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
}


.card {
  border: 1px solid #000;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.card p {
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}


.chapter {
    font-size: 64px;
    display: flex;
    margin: 20px 0;
    /* text-align: center;  */

}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 15px;
}

.wide {
    grid-column: span 2;
}

.tall {
    grid-row: span 2;
}

.large {
    grid-column: span 2;
    grid-row: span 2;
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.main-image {
  width: 66%;
  margin-bottom: 1rem;
  align-items: center;
}

.thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 0.5rem;
}

.thumbnails img {
  width: 100%;
  cursor: pointer;
  transition: opacity 0.3s;
}

.thumbnails img:hover {
  opacity: 0.7;
}

.product-title {
  font-size: 2rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.product-meta {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.product-description {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

table.specs {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

table.specs th,
table.specs td {
  border: 1px solid #000;
  padding: 10px;
  font-size: 0.9rem;
  text-align: left;
}

table.specs th {
  width: 30%;
  background: #f5f5f5;
  text-transform: uppercase;
}



.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;

}

.video-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-container {
    width: 100%;
    max-width: 600px;
    position: relative;
    aspect-ratio: 16/9;
    display: none;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#preview-container {
    position: relative;
    display: inline-block;
}

#preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#preview-img {
    max-width: 80vw;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

#close-preview {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 24px;
    color: #000000;
    cursor: pointer;
    font-weight: bold;
    background: rgb(255, 255, 255);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid #000;
    z-index: 1001;
}

.preview-hidden {
    display: none !important;
}

.preview-visible {
    display: flex !important;
}

footer {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    text-align: center;
    color: rgb(140, 140, 140);
    font-size: 0.8em;
    margin-top: auto;
    margin-bottom: 20px;
    width: 100%;
}

@media (max-width: 768px) {    
    #close-preview {
        font-size: 20px;
        width: 25px;
        height: 25px;
        top: -20px;
        right: -20px;
    }
}



@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
}
@media screen and (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .navigation-section {
        order: 1;
    }
    
    .video-section {
        order: 2;
    }

    .footer {
        display: contents;
        margin-bottom: 20px;
    }
    
    .video-container {
        max-width: 100%;
    }

    .copyright {
        text-align: center;
        margin-bottom: 10px;
        margin-top: 20px;
    }
}
@media screen and (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    .wide, .tall, .large {
        grid-column: auto;
        grid-row: auto;
    }


    /* Скрыть колонку технологий на мобильных устройствах */
@media screen and (max-width: 768px) {
    .tech-column {
        display: none;
    }
    
    .info {
        margin: 0 10px 20px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
}
}