/**
 * TFISOFT CMS FREE 
 * www.tfisoft.com.br
 * @version 1.0.0
 * @author Moreira / DevKinG 
 * @copyright (c) 2026 TFISFOT, All Rights Reserved
 *
 */
/* TFISOFT - galeria de noticias V3 */
.tfi-gallery-admin {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #69513d;
    border-radius: 10px;
    background: #171923;
    color: #f5eadb;
}
.tfi-gallery-admin h3 {
    margin: 0 0 8px;
    color: #e9bd7c;
    font-size: 19px;
}
.tfi-gallery-admin p {
    color: #cfc6ba;
}
.tfi-gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.tfi-gallery-admin-card {
    min-width: 0;
    padding: 12px;
    background: #222331;
    border: 1px solid #66513e;
    border-radius: 8px;
}
.tfi-gallery-admin-card input[type="file"] {
    max-width: 100%;
    font-size: 12px;
}
.tfi-news-gallery {
    margin: 24px 0 8px;
    clear: both;
}
.tfi-news-gallery h4 {
    color: #e9bd7c;
    margin-bottom: 14px;
    font-family: Georgia, serif;
}
.tfi-news-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.tfi-news-gallery-grid a {
    display: block;
    overflow: hidden;
    border: 1px solid #74523e;
    border-radius: 8px;
    background: #15141d;
}
.tfi-news-gallery-grid img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.2s;
}
.tfi-news-gallery-grid a:hover img {
    transform: scale(1.035);
}
@media (max-width: 700px) {
    .tfi-gallery-admin-grid,
    .tfi-news-gallery-grid {
        grid-template-columns: 1fr;
    }
    .tfi-news-gallery-grid img {
        height: auto;
        max-height: 360px;
    }
}

/* TFISOFT | Lightbox V4 - isolado para noticias */
.tfi-news-lightbox[hidden] {
    display: none !important;
}
.tfi-news-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 58px 18px 25px;
    background: rgba(4, 5, 10, 0.94);
    box-sizing: border-box;
}
.tfi-news-lightbox-image {
    display: block;
    max-width: min(1100px, 95vw);
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid #a77a4c;
    border-radius: 8px;
    box-shadow: 0 12px 50px #000;
}
.tfi-news-lightbox-close {
    position: absolute;
    right: 18px;
    top: 12px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #b98a55;
    border-radius: 8px;
    background: #241a20;
    color: #f7cc7e;
    font:
        700 30px/1 Arial,
        sans-serif;
    cursor: pointer;
}
.tfi-news-lightbox-close:hover,
.tfi-news-lightbox-close:focus-visible {
    background: #493039;
    color: #fff;
    outline: 2px solid #f7cc7e;
}
.tfi-news-gallery-grid a {
    cursor: zoom-in;
}
body.tfi-news-lightbox-active {
    overflow: hidden !important;
}
@media (max-width: 650px) {
    .tfi-news-lightbox {
        padding: 62px 10px 20px;
    }
    .tfi-news-lightbox-image {
        max-width: 100%;
        max-height: calc(100dvh - 100px);
    }
}

/* V5: grade responsiva sem afetar outras tabelas/menus */
@media (min-width: 701px) and (max-width: 1024px) {
    .tfi-news-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tfi-news-gallery-grid img {
        height: 190px;
    }
}
@media (max-width: 700px) {
    .tfi-news-gallery {
        max-width: 100%;
        min-width: 0;
    }
    .tfi-news-gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .tfi-news-gallery-grid a {
        max-width: 100%;
    }
    .tfi-news-gallery-grid img {
        width: 100%;
        height: auto;
        max-height: 380px;
        object-fit: contain;
    }
}
