/* =========================================
   HERO ИЗОБРАЖЕНИЕ
========================================= */
.hero-image {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: 0;
}

.hero-image img {
    width: 100%;
    max-width: none;
    display: block;
}


/* =========================================
   МОЗАЙКА В INDEX.HTML
========================================= */
.home-gallery-grid {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    display: block;
}

.gallery-grid {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.gallery-grid img {
    width: 100%;
    max-width: none;
    display: block;
}


/* =========================================
   ОБЩА ЛОГИКА ЗА ДВИЖЕЩАТА СЕ ЛЕНТА
========================================= */
.sea-gallery {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.sea-track {
    display: flex;
    width: max-content;
    animation: scroll-sea 88s linear infinite;
}

.sea-item {
    width: 500px;
    margin-right: 20px;
    flex-shrink: 0;
    text-align: center;
}

.sea-item img {
    width: 100%;
    display: block;
}

.sea-item h3 {
    margin-top: 10px;
    font-size: 22px;
    color: rgb(15,55,23);
}


/* =========================================
   САМО ЗА INDEX.HTML
========================================= */
.home-gallery .sea-item {
    width: 390px;
    margin-right: 5px;
}


/* =========================================
   КОЛАЖЕН ФОН ЗАД ДВИЖЕЩАТА СЕ ЛЕНТА
   ВРЪЩАМ СТАРИЯ КОД
========================================= */
.patriotic-gallery {
    width: 100%;
     max-width: none;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    line-height: 0;
    margin-top: 0px;
    margin-bottom: 10px;
}

.patriotic-bg {
    width: 100%;
    height: auto;
    display: block;
}

.sea-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;   /* или 15px, тествай */
    transform: none;
}

.patriotic-gallery .sea-track {
    animation: scroll-sea 150s linear infinite;
}

.home-gallery.patriotic-gallery .sea-overlay {
    bottom: 70px;
}


/* =========================================
   АНИМАЦИЯ
========================================= */
@keyframes scroll-sea {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}


/* =========================================
   БЛОГ ПРЕГЛЕД В INDEX.HTML
========================================= */
.blog-preview {
    width: 80%;
    margin: 40px auto;
    background-color: #ffffff;
    padding: 30px 35px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    box-sizing: border-box;
}

.blog-title {
    margin: 0 0 25px 0;
    text-align: center;
    font-size: 2rem;
    line-height: 1.3;
}

.blog-title a {
    color: rgb(15,55,23);
    text-decoration: none;
    transition: 0.3s;
}

.blog-title a:hover {
    color: #ff0000;
}

.blog-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.blog-images img {
    width: 100%;
    display: block;
    border-radius: 4px;
}

.blog-intro {
    margin: 0 0 35px 0;
    text-align: left;
    line-height: 1.7;
    color: rgb(15,55,23);
}

.category {
    margin-bottom: 30px;
}

.category:last-child {
    margin-bottom: 0;
}

.category h3 {
    margin: 0 0 10px 0;
    text-align: left;
    font-size: 1.6rem;
    line-height: 1.3;
    color: rgb(15,55,23);
}

.category p {
    margin: 0;
    text-align: left;
    line-height: 1.8;
    font-size: 1.1rem;
    color: rgb(15,55,23);
}

/* =========================================
   ОБВИВКА – ДВЕ ТАБЛИЦИ
========================================= */
.tables-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 40px auto;
    display: flex;
    gap: 40px;
    justify-content: center;
}


/* =========================================
   ОСНОВНА ТАБЛИЦА
========================================= */
.history-table {
    width: 48%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}


/* =========================================
   ЗАГЛАВИЕ НА ТАБЛИЦАТА
========================================= */
.history-table caption {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
    color: rgb(15,55,23);
}


/* =========================================
   КЛЕТКИ
========================================= */
.history-table th,
.history-table td {
    border: 2px solid #ffffff;     /* бели линии между клетките */
    padding: 8px 12px;
    text-align: center;
    font-size: 18px;
}


/* =========================================
   HEADER (първи ред)
========================================= */
.history-table th {
    background-color: #cfdcd3;     /* по-светло */
    font-weight: bold;
}


/* =========================================
   ОБИКНОВЕНИ КЛЕТКИ
========================================= */
.history-table td {
    background-color: #e3ebe5;     /* леко тъмно (като блог) */
}


/* =========================================
   ПЪРВА КОЛОНА (ДНИТЕ)
========================================= */
.history-table td:first-child {
    background-color: #d6e4da;     /* малко по-тъмно */
    font-weight: bold;
}

/* =========================================
   КАРТА / MAP PREVIEW
========================================= */
.map-section {
    width: 100%;
    margin: 0;
}

.map-section iframe {
    width: 100%;
    height: 120px;
    border: 0;
    display: block;
    transition: 0.3s;
}

.map-section:hover iframe {
    filter: brightness(90%);
}

.map-toggle {
    width: 100%;
}

.map-toggle summary {
    list-style: none;
    cursor: pointer;
    display: block;
}

.map-toggle summary::-webkit-details-marker {
    display: none;
}

.map-preview {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.map-preview img {
    width: 100%;
    display: block;
    transition: 0.3s;
}

.map-preview:hover img {
    filter: brightness(90%);
}

.map-toggle[open] .map-preview {
    height: auto;
}


/* =========================================
   MEDIA: ДО 1070px
   ВРЪЩАМ СТАРИЯ КОД
========================================= */
@media (max-width: 1070px){

    /* ===== ФОН ===== */
    .patriotic-bg{
        transform: scale(1.25);
        transform-origin: center;
    }

    .patriotic-gallery{
        overflow: hidden;
    }

    /* ===== С ФОН (index / history) ===== */
    .home-gallery .sea-item{
        width: 320px;
        margin-right: 5px;
    }

    /* ===== БЕЗ ФОН (reki и др.) ===== */
    .sea-gallery:not(.patriotic-gallery) .sea-item{
        width: 400px;
        margin-right: 18px;
    }

    .sea-gallery:not(.patriotic-gallery) .sea-item h3{
        font-size: 20px;
    }

    /* ===== КАРТИ ===== */
    .map-section iframe{
        height: 70px;
    }

    .map-preview{
        height: 70px;
    }
}


/* =========================================
   MEDIA: ДО 770px
========================================= */
@media (max-width: 770px){

    /* ===== С ФОН ===== */
    .home-gallery .sea-item{
        width: 280px;
        margin-right: 5px;
    }

    /* ===== БЕЗ ФОН ===== */
    .sea-gallery:not(.patriotic-gallery) .sea-item{
        width: 320px;
        margin-right: 14px;
    }

    .sea-gallery:not(.patriotic-gallery) .sea-item h3{
        font-size: 18px;
    }

body.history-page .patriotic-gallery .sea-overlay{
    top: auto;
    bottom: 10px;
    transform: none;
}

    /* ===== КАРТИ ===== */
    .map-section iframe{
        height: 65px;
    }

    .map-preview{
        height: 65px;
    }
}


/* =========================================
   MEDIA: ДО 480px
========================================= */
@media (max-width: 480px){

    /* ===== С ФОН (index) ===== */
    .home-gallery .sea-item{
        width: 200px;
        margin-right: 4px;
    }

    /* Начало остава центрирано, но пада само с 5px */
    body:not(.history-page) .patriotic-gallery .sea-overlay{
        top: 50%;
        bottom: auto;
        transform: translateY(calc(-50% + 5px));
    }

    /* ===== САМО ЗА HISTORY ===== */
    body.history-page .patriotic-gallery .sea-overlay{
        top: auto;
        bottom: -8px;
        transform: none;
    }

    body.history-page .patriotic-gallery .sea-item{
        width: 200px;
        margin-right: 4px;
    }

    /* ===== БЕЗ ФОН ===== */
    .sea-gallery:not(.patriotic-gallery) .sea-item{
        width: 230px;
        margin-right: 12px;
    }

    .sea-gallery:not(.patriotic-gallery) .sea-item h3{
        font-size: 17px;
    }

    /* ===== КАРТИ ===== */
    .map-section iframe{
        height: 55px;
    }

    .map-preview{
        height: 55px;
    }
}