/* estilo para mobile */
html {
    font-size: 17px;
    scroll-behavior: smooth; /* navegação suave ao clicar na nav */
}

* {
    box-sizing: border-box;
    font-family: "Antonio", sans-serif;
}

/* Bordas arredondadas em todas as imagens e vídeos do site */
img,
video {
    border-radius: 8px;
    border: 2px solid #ffffff;
}

body {
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Header (mobile: coluna, centralizado) ===== */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000000;
    text-align: center;
    width: 100%;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #ffffff;
}

header p {
    font-size: 0.95rem;
    color: #ffffff;
}

.logo {
    width: 140px;
    height: auto;
    padding: 10px;
    margin: 0;
    border: none !important;
}

.contact-box {
    margin: 10px 0;
    color: #ffffff;
    text-align: center;
}

.contact-box h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-box p {
    font-size: 1.2rem;
}

.contact-box p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.contact-box a {
    color: #ffffff;
    text-decoration: none;
}

.contact-box a:hover {
    color: gray;
}

.contact-box .icon {
    width: 14px;
    height: auto;
}

/* ===== CONTACT BUTTON ===== */
.contact-button {
    background: #ffffff;
    color: #000000;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    max-width: 250px;
    width: 100%;
}

.contact-button:hover {
    background: #dddddd;
    transform: scale(1.03);
}

.contact-button:active {
    transform: scale(0.98);
}

/* ===== nav ===== */
nav {
    width: 100%;
    background: #ffffff;
    text-align: center;
    padding: 10px 8px;
    margin-top: 10px;
}

nav a {
    color: #000000;
    margin: 4px 8px;
    padding: 6px 4px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
    text-decoration: none;
}

nav a:hover {
    color: gray;
    text-decoration: none;
}

/* ===== Sections (mobile: pouco margem, full width) ===== */
section {
    margin: 0 auto;
    padding: 4px 12px 8px;
    font-size: 0.95rem;
    width: 100%;
    max-width: 100%;
}

section h2 {
    text-align: center;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    color: #ffffff;
    margin-bottom: 4px;
    margin-top: 0;
}

/* ===== News (mobile: coluna, imagens full width) ===== */
#novidades {
    font-size: 0.95rem;
    color: #ffffff;
    padding: 0 12px;
    margin: 0 auto;
}

/* Frases abaixo de cada seção: centralizadas e organizadas a partir do ponto final */
#novidades p,
#sobre p,
#galeria p,
#excursao p,
section p {
    text-align: center;
    line-height: 1.5;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

#novidades p {
    margin-bottom: 0;
}

.news-section {
    margin: 8px auto;
}

.news {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Caixa do news igual à da gallery */
.news-item-box {
    border: 1px solid #ddd;
    padding: 8px;
    background: #fff;
    text-align: center;
    border-radius: 8px;
    max-width: 90%;
    margin: 0 auto;
}

.news-item-box .news-item,
.news img,
.news video {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    cursor: pointer;
    margin: 0 auto;
    transition: transform 0.3s ease;
    box-sizing: border-box;
    /* add consistent border and rounding for better visuals */
    border: 1px solid #ccc;
    border-radius: 8px;
}

.news-item-box:hover .news-item,
.news img:hover,
.news video:hover {
    transform: scale(1.03);
}

.news-caption {
    text-align: center;
    color: rgb(255, 255, 255);
    margin-top: 6px;
    font-size: 0.95rem;
    padding: 0 10px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.news-item p {
    margin-top: 8px;
    font-size: 14px;
    font-weight: bold;
}


/* ===== Popup Exclusivo da Seção News ===== */

#popup {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

#popup-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

#popup-content img,
#popup-content video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
}

/* ===== About ===== */
#sobre {
    font-size: 0.95rem;
    color: #ffffff;
    margin: 0 auto;
    line-height: 1.5;
}

/* ===== Galeria (mobile: 1 coluna) ===== */
#galeria {
    padding: 0 12px;
    margin: 0 auto;
    font-size: 0.95rem;
    color: #ffffff;
}

#excursao {
    margin: 0 auto;
    padding-bottom: 4px;
    font-size: 0.95rem;
    color: #ffffff;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px;
    margin: 8px auto 12px;
    width: 100%;
    max-width: 100%;
}

.gallery-item {
    border: 0.5px solid #ddd;
    padding: 10px;
    background: #fff;
    text-align: center;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    box-sizing: border-box;
    /* nicer media borders */
    border: 1px solid #ccc;
    border-radius: 8px;
}

.gallery-item img:hover,
.gallery-item video:hover {
    transform: scale(1.03);
    transition: transform 0.3s ease;
}

.gallery-item video {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    box-sizing: border-box;
    cursor: pointer;
}

.gallery-item p {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #000;
}

/* ===== Vídeos (mobile: 1 coluna, altura automática) ===== */
.videos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 4px auto 12px;
    padding: 0 12px;
    width: 100%;
    max-width: 100%;
}

.video-section {
    padding: 6px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.video-grid video {
    display: block;
    width: 100%;
    margin: 0;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #ffffff;
    border-radius: 8px;
    box-sizing: border-box;
    /* add border similar to other galleries/videos */
    border: 1px solid #ccc;
}

/* make excursion video borders more pronounced on small screens */
@media (max-width: 767px) {
    .video-grid video {
        border-width: 10px; /* increased per latest request */
    }
}

.video-grid video:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.video-caption {
    margin-top: 4px;
    text-align: center;
    color: #ffffff;
    font-size: 0.9rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Contact (mobile) ===== */
#contato {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.95rem;
    color: #ffffff;
}

#contato p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
}

#contato a {
    color: #ffffff;
    text-decoration: none;
}

#contato .icon {
    width: 14px;
    height: auto;
}

#contato a:hover {
    color: gray;
}

#contato p.contact-message {
    font-size: 1rem;
    margin-top: 8px;
    font-weight: bold;
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* ===== Footer (mobile) ===== */
footer {
    width: 100%;
    background: #ffffff;
    color: #000000;
    text-align: center;
    padding: 12px 10px;
    font-size: 0.8rem;
}

/* ===== Popup Styles ===== */
body.no-scroll {
    overflow: hidden;
}

@keyframes popupBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupContentIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes popupContentFade {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Fade-in suave para seções ao serem focadas pela navegação (hash / nav link) */
@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quando a seção vira alvo da URL (#sobre, #galeria, etc.), aplica o fade-in */
section:target {
    animation: sectionFadeIn 0.5s ease-out;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: default;
    animation: popupBackdropIn 0.25s ease-out;
}

.popup.show {
    display: flex;
}

.popup-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 95vh;
    animation: popupContentIn 0.3s ease-out;
}

/* Galeria e vídeo: mesmo tamanho no popup */
.popup-inner img,
.popup-inner video,
#popupImgElemento,
#popupVideoElemento,
#popup-content img,
#popup-content video {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 8px; /* mesmo raio de borda das demais imagens/vídeos */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
    object-fit: contain;
}

.popup-inner img.popup-fade,
.popup-inner video.popup-fade,
#popup-content.popup-fade img,
#popup-content.popup-fade video {
    animation: popupContentFade 0.2s ease-out;
}

#popup-content.popup-fade {
    animation: popupContentFade 0.2s ease-out;
}

/* Contador (mobile: menor) */
.popup-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    z-index: 2100;
    pointer-events: none;
}

/* Botão fechar (mobile: tamanho touch-friendly) */
.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 32px; /* larger close icon */
    line-height: 0; /* reset to avoid baseline offset */
    padding: 0; /* remove extra text padding */
    cursor: pointer;
    z-index: 2100;
    border-radius: 50%;
    transition: background 0.2s, transform 0.15s, color 0.2s;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.popup-close:active {
    transform: scale(0.92);
}

/* Botões anterior / próximo (mobile: sempre visíveis, touch-friendly) */
.popup-prev,
.popup-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 20px;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2100;
    transition: background 0.2s, transform 0.15s, opacity 0.2s;
    opacity: 1;
}

/* hide arrows on small screens; swipe gestures handle navigation */
@media (max-width: 767px) {
    .popup-prev,
    .popup-next {
        display: none;
    }
}

.popup-prev { left: 12px; right: auto; }
.popup-next { right: 12px; left: auto; }

.popup:hover .popup-prev,
.popup:hover .popup-next,
.popup.show .popup-prev,
.popup.show .popup-next {
    opacity: 1;
}

.popup-prev:hover,
.popup-next:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.06);
}

.popup-prev:active,
.popup-next:active {
    transform: translateY(-50%) scale(0.95);
}

.popup:active {
    cursor: default;
}

/* ===== Mobile First: telas maiores ===== */

/* 480px+: popup um pouco maior */
@media (min-width: 480px) {
    .popup-close {
        width: 52px;
        height: 52px;
        font-size: 36px; /* bump up icon on small tablets */
        line-height: 0;
        padding: 0;
        top: 16px;
        right: 20px;
    }
    .popup-prev,
    .popup-next {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    .popup-prev { left: 16px; }
    .popup-next { right: 16px; }
    .popup-counter {
        bottom: 20px;
        font-size: 0.9rem;
        padding: 8px 14px;
    }
}

/* 768px+: tablet – logo continua centralizado (com news/nav) */
@media (min-width: 768px) {
    html {
        font-size: 18px;
    }

    .popup-close {
        width: 56px;
        height: 56px;
        font-size: 40px; /* even bigger on larger screens */
        line-height: 0;
        padding: 0;
        top: 20px;
        right: 24px;
    }

    header {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0 20px;
        position: relative;
    }
    .logo {
        width: 200px;
    }
    .contact-box {
        margin: 10px 0 0;
        margin-left: 0;
        margin-right: 0;
    }

    nav {
        padding: 14px;
    }
    nav a {
        margin: 0 14px;
        font-size: 1.05rem;
    }

    section {
        margin: 0 auto;
        padding: 6px 20px 10px;
        font-size: 1rem;
    }
    section h2 {
        font-size: clamp(1.6rem, 4vw, 2.5rem);
        margin-bottom: 4px;
    }

    #novidades,
    #sobre {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    #galeria {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    #excursao {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }

    .news {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }
    .news-item-box .news-item,
    .news img,
    .news video {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 4 / 3;
    }
    .news-caption {
        font-size: 1rem;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 900px;
        margin: 8px auto 12px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 20px;
    }
    .gallery-item p {
        font-size: 14px;
    }

    .videos {
        max-width: 1000px;
        margin: 4px auto 12px;
        margin-left: auto;
        margin-right: auto;
        gap: 12px;
        padding: 0 20px;
    }
    .video-section {
        padding: 8px 0;
    }
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .video-grid video {
        border-width: 8px;
        aspect-ratio: 4 / 3;
    }
    .video-caption {
        font-size: 1rem;
    }

    footer {
        padding: 8px;
        font-size: 0.85rem;
    }

    /* Popup: botões maiores, setas só ao hover (exceto .show) */
    .popup-close {
        width: 56px;
        height: 56px;
        font-size: 36px;
        top: 20px;
        right: 24px;
    }
    .popup-prev,
    .popup-next {
        width: 52px;
        height: 52px;
        font-size: 24px;
        opacity: 0;
    }
    .popup-prev { left: 20px; }
    .popup-next { right: 20px; }
    .popup.show .popup-prev,
    .popup.show .popup-next {
        opacity: 1;
    }
    .popup:hover .popup-prev,
    .popup:hover .popup-next {
        opacity: 1;
    }
    .popup-counter {
        bottom: 24px;
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}

/* 1024px+: desktop – logo centralizado mantido */
@media (min-width: 1024px) {
    html {
        font-size: 19px;
    }

    .logo {
        width: 225px;
    }
    header {
        align-items: center;
    }

    nav a {
        margin: 0 18px;
        font-size: 1.1rem;
    }

    #novidades,
    #sobre {
        max-width: 900px;
    }
    #galeria {
        max-width: 1000px;
    }

    .news {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        max-width: 1200px;
        gap: 12px;
    }
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        max-width: 1200px;
        gap: 12px;
        margin: 8px auto 12px;
    }
    .gallery-item img {
        aspect-ratio: 4 / 3;
    }

    .videos {
        max-width: 1200px;
        gap: 12px;
    }
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .video-grid video {
        aspect-ratio: 4 / 3;
        border-width: 10px;
    }
    .video-caption {
        font-size: 1.05rem;
    }

    footer {
        font-size: 15px;
        padding: 5px;
        gap: 5px;
    }
}
