/* ==========================================================================
   Paulo Pinhal — tema base
   Paleta:
   fundo #121824 | cards #1a2332 | linhas #17202e | bordas #243249
   texto #f8fafc | muted #94a3b8 | azul #2563eb | azul claro #60a5fa
   verde #047857 | vermelho #b91c1c | amarelo #f59e0b
   ========================================================================== */

:root {
    --bg: #121824;
    --card: #1a2332;
    --row: #17202e;
    --border: #243249;
    --text: #f8fafc;
    --muted: #94a3b8;
    --blue: #2563eb;
    --blue-light: #60a5fa;
    --green: #047857;
    --green-dark: #065f46;
    --red: #b91c1c;
    --red-dark: #991b1b;
    --yellow: #f59e0b;
    --radius: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
}

a {
    color: var(--blue-light);
}

a:hover {
    color: #93c5fd;
}

:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 3px;
}

/* Bootstrap overrides para contraste no fundo escuro */
.text-primary {
    color: var(--blue-light) !important;
}

.text-muted {
    color: var(--muted) !important;
}

.text-white {
    color: var(--text) !important;
}

.text-warning {
    color: var(--yellow) !important;
}

/* Acessibilidade: saltar para o conteúdo */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: var(--blue);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 6px 0;
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    left: 0;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.navbar-brand {
    color: var(--text) !important;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    margin-right: 0.5rem;
}

.logo-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nav-link-custom {
    color: var(--muted);
    text-decoration: none;
    margin: 0 12px;
    font-weight: 500;
    transition: color 0.2s ease;
    background: none;
    border: 0;
    padding: 4px 0;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--blue-light);
}

.nav-link-custom.active {
    font-weight: 700;
}

.btn-login {
    background-color: var(--green);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    display: inline-block;
    border: 0;
}

.btn-login:hover {
    background-color: var(--green-dark);
    color: #fff;
}

.navbar-toggler {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 1.1rem;
    cursor: pointer;
}

.navbar-toggler:hover {
    border-color: var(--blue);
}

@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        flex-grow: 0;
        width: auto;
        flex-wrap: nowrap;
    }

    .navbar-toggler {
        display: none;
    }

    .navbar > .container,
    .navbar > .container-fluid {
        flex-wrap: nowrap;
    }

    #nav-links {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
    }

    #nav-links .nav-item {
        display: flex;
        align-items: center;
        white-space: nowrap;
    }

    #nav-links .nav-item + .nav-item::before {
        content: "|";
        color: #475569;
        margin: 0 3px;
        font-weight: 400;
        line-height: 1;
    }

    #nav-links .ms-lg-3 {
        margin-left: 0 !important;
    }

    .nav-link-custom {
        margin: 0 7px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    #nav-links .btn-login {
        margin-left: 6px;
        white-space: nowrap;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-brand {
        font-size: 1.15rem;
    }

    .nav-link-custom {
        font-size: 0.82rem;
        margin: 0 5px;
    }

    #nav-links .nav-item + .nav-item::before {
        margin: 0 1px;
    }

    #nav-links .btn-login {
        padding: 7px 12px;
        font-size: 0.82rem;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none;
        width: 100%;
        padding-top: 12px;
    }

    .navbar-collapse.show {
        display: block;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: stretch !important;
        gap: 4px;
    }

    .nav-link-custom {
        display: block;
        margin: 0;
        padding: 8px 0;
    }

    .navbar-nav .ms-lg-3 {
        margin-left: 0 !important;
    }

    .btn-login {
        display: inline-block;
        margin-top: 8px;
    }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-section {
    padding: 60px 20px 40px;
    background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
}

.hero-section h1 {
    color: var(--text);
}

.hero-section .lead {
    color: var(--muted) !important;
}

/* ==========================================================================
   Carousel
   ========================================================================== */

.carousel-section {
    margin-bottom: 3rem;
}

.carousel {
    position: relative;
}

.carousel-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1744 / 608;
    background-color: var(--card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.carousel-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.carousel-item.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    background: linear-gradient(to top, rgba(18, 24, 36, 0.96) 0%, rgba(18, 24, 36, 0.45) 45%, rgba(0, 0, 0, 0) 75%);
    color: #fff;
    text-decoration: none;
}

.slide-overlay:hover {
    color: #fff;
}

.slide-overlay h2 {
    color: var(--text);
    font-weight: 700;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    margin: 0 0 4px;
}

.slide-overlay p {
    color: #cbd5e1;
    margin: 0 0 12px;
    max-width: 640px;
}

.slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue-light);
    font-weight: 700;
    font-size: 0.95rem;
}

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(18, 24, 36, 0.65);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.carousel-control-prev {
    left: 14px;
}

.carousel-control-next {
    right: 14px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--blue);
}

.carousel-indicators {
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 0;
}

.carousel-indicators button {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.carousel-indicators button::before {
    content: "";
    position: absolute;
    inset: 7.5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel-indicators button.active::before {
    background: var(--blue-light);
    transform: scale(1.25);
}

@media (max-width: 768px) {
    .carousel-inner {
        aspect-ratio: 4 / 3;
    }

    .slide-overlay {
        padding: 1.25rem;
    }

    .slide-overlay p {
        display: none;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 36px;
        height: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .carousel-item {
        transition: none;
    }
}

/* ==========================================================================
   Secções expansíveis
   ========================================================================== */

.section-row {
    background-color: var(--row);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 15px;
    overflow: hidden;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    scroll-margin-top: 90px;
}

.section-row.is-open {
    border-color: var(--blue);
    background-color: var(--card);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.15);
}

.section-heading {
    margin: 0;
}

.section-header {
    width: 100%;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    transition: background-color 0.2s;
}

.section-header:hover {
    background-color: #1f2b3e;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}

.section-title i {
    margin-right: 0.75rem;
    color: var(--blue-light);
}

.arrow-icon {
    font-size: 1rem;
    color: var(--muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

.section-row.is-open .arrow-icon {
    transform: rotate(180deg);
    color: var(--blue-light);
}

.section-content {
    padding: 30px 24px;
    border-top: 1px solid var(--border);
    background-color: var(--bg);
}

.section-content[hidden] {
    display: none;
}

.section-loading {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

/* Botões de ação das secções */
.section-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.btn-action-close,
.btn-action-top {
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-action-close {
    background-color: var(--red);
}

.btn-action-close:hover {
    background-color: var(--red-dark);
}

.btn-action-top {
    background-color: #475569;
}

.btn-action-top:hover {
    background-color: #334155;
}

/* ==========================================================================
   Conteúdo interno das secções
   ========================================================================== */

.badge-tech {
    background-color: var(--blue);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 6px;
    margin-bottom: 6px;
    display: inline-block;
}

.content-box {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    height: 100%;
}

.content-box .text-muted {
    color: #cbd5e1 !important;
}

.content-box ol li,
.content-box ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.content-box p:last-child {
    margin-bottom: 0;
}

.hub-chapter {
    color: #34d399;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #34d399;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 25px;
}

.hub-chapter:first-of-type {
    margin-top: 10px;
}

.hub-chapter i {
    margin-right: 10px;
}

/* Grupos (details/summary — acessível por teclado) */
.conteudo-group {
    margin-bottom: 10px;
}

.conteudo-group-header {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 2px solid var(--blue);
    margin-bottom: 15px;
}

.conteudo-group-header::-webkit-details-marker {
    display: none;
}

.conteudo-group-header:hover .group-title {
    color: var(--blue-light);
}

.group-title-wrap {
    flex: 1;
    min-width: 0;
}

.group-title {
    display: block;
    margin: 0;
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
}

.group-desc {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.toggle-icon {
    color: var(--muted);
    font-size: 1.1rem;
    margin-top: 5px;
    flex-shrink: 0;
}

.conteudo-group[open] .toggle-closed,
.conteudo-group:not([open]) .toggle-open {
    display: none;
}

.group-content-wrapper {
    padding-top: 10px;
}

/* Listas de itens */
.conteudo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.conteudo-list li {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s, padding-left 0.2s;
}

.conteudo-list li:hover {
    background-color: rgba(37, 99, 235, 0.05);
    padding-left: 8px;
}

.conteudo-list li:last-child {
    border-bottom: none;
}

.item-num {
    color: var(--blue-light);
    font-weight: 700;
    margin-right: 15px;
    min-width: 25px;
}

.item-link {
    color: var(--text);
    text-decoration: none;
    flex-grow: 1;
    font-weight: 500;
}

.item-link:hover {
    color: var(--blue-light);
}

.item-date {
    color: var(--muted);
    font-size: 0.85rem;
    margin-left: 15px;
    white-space: nowrap;
}

.icon-pdf {
    color: #f87171;
    margin-right: 10px;
}

.icon-zip {
    color: var(--yellow);
    margin-right: 10px;
}

.icon-link {
    color: #34d399;
    margin-right: 10px;
}

/* Vídeos */
.media-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 10px;
    background-color: #000;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.media-embed-container iframe,
.media-embed-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.media-title {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Imagem solta */
.single-image-container {
    text-align: center;
    margin: 25px 0;
}

.single-image-container img {
    max-width: 80%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    cursor: zoom-in;
}

.single-image-caption {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 12px;
    font-style: italic;
}

/* Texto livre */
.text-item {
    margin-bottom: 20px;
}

.text-item h4 {
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 10px;
}

.text-item p {
    color: #cbd5e1;
}

/* Miniatura de música/vídeo */
.media-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Fichas de cinema */
.filme-card {
    display: flex;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.filme-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.filme-poster {
    width: 120px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 4px 0 0 4px;
}

.filme-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.filme-titulo {
    color: var(--text);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.filme-sinopse {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.filme-action {
    display: flex;
    align-items: center;
    padding: 15px;
}

.btn-trailer {
    background-color: var(--red);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.btn-trailer:hover {
    background-color: var(--red-dark);
    color: #fff;
}

@media (max-width: 576px) {
    .filme-card {
        flex-direction: column;
    }

    .filme-poster {
        width: 100%;
        height: 220px;
        aspect-ratio: auto;
    }

    .filme-action {
        padding-top: 0;
        justify-content: flex-end;
    }
}

/* ==========================================================================
   Cartões de conteúdo uniformes
   ========================================================================== */

.content-intro {
    margin-bottom: 1.75rem;
}

.content-intro p:last-child {
    margin-bottom: 0;
}

.chapter-desc {
    color: var(--muted);
    margin: -0.5rem 0 1.25rem;
    max-width: 860px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.content-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover {
    border-color: #33507f;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.content-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0d1420;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.content-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.content-card-icon {
    font-size: 2.4rem;
    color: #3b82f6;
    opacity: 0.75;
}

.content-card-type,
.content-card-date {
    position: absolute;
    background: rgba(11, 16, 26, 0.86);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #cbd5e1;
    backdrop-filter: blur(3px);
}

.content-card-type {
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.content-card-date {
    bottom: 8px;
    right: 8px;
    color: var(--muted);
}

.content-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.content-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.content-card-desc {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.5;
}

.content-card-actions {
    margin-top: auto;
    padding-top: 6px;
}

.btn-card {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.45);
    color: #bfdbfe;
    border-radius: 7px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-card:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.btn-card.is-copied {
    background: rgba(5, 150, 105, 0.2);
    border-color: rgba(52, 211, 153, 0.6);
    color: #a7f3d0;
}

/* Cartão de texto: ocupa a largura toda e mostra o bloco copiável. */
.content-card--text {
    grid-column: 1 / -1;
}

.content-card--text .content-card-media {
    aspect-ratio: auto;
    min-height: 54px;
    justify-content: flex-start;
    padding-left: 14px;
}

.content-card--text .content-card-icon {
    font-size: 1.4rem;
}

.content-text {
    margin: 0;
    background: #0b101a;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 12px 14px;
    max-height: 320px;
    overflow: auto;
    color: #dbeafe;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Leitor de vídeo */

dialog.media-dialog {
    position: relative;
    width: min(1000px, 94vw);
    margin: auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0b101a;
    color: var(--text);
    overflow: hidden;
}

dialog.media-dialog::backdrop {
    background: rgba(0, 0, 0, 0.86);
}

.media-dialog-frame {
    aspect-ratio: 16 / 9;
    background: #000;
}

.media-dialog-frame iframe,
.media-dialog-frame video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.media-dialog-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(11, 16, 26, 0.8);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.media-dialog-close:hover {
    background: var(--blue);
}

.media-dialog-caption {
    margin: 0;
    padding: 10px 16px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Galerias
   ========================================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-external {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.gallery-external a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gallery-external a:hover {
    text-decoration: underline;
}

.gallery-item {
    display: block;
    border: 0;
    padding: 0;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: zoom-in;
    text-decoration: none;
}

.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
    opacity: 0.92;
}

.gallery-count {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 400;
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.6rem;
    }
}

/* ==========================================================================
   Lightbox (dialog nativo)
   ========================================================================== */

dialog.lightbox {
    margin: auto;
    padding: 0;
    border: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    background: transparent;
    color: #fff;
    overflow: hidden;
}

dialog.lightbox[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

dialog.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.94);
}

.lightbox-stage {
    flex: 1;
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

.lightbox-img {
    display: block;
    max-width: 90vw;
    max-height: 78vh;
    border-radius: 6px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    transform-origin: center center;
    will-change: transform;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-img.is-zoomed {
    cursor: grab;
}

.lightbox-img.is-dragging {
    cursor: grabbing;
}

.lightbox-caption {
    color: #cbd5e1;
    font-size: 0.95rem;
    text-align: center;
    margin: 8px 0 64px;
    max-width: 80vw;
}

.lightbox-toolbar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(18, 24, 36, 0.82);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 8px;
    backdrop-filter: blur(6px);
}

.lightbox-zoom-btn,
.lightbox-zoom-reset {
    border: 0;
    background: transparent;
    color: #fff;
    border-radius: 999px;
    height: 34px;
    min-width: 34px;
    padding: 0 8px;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.lightbox-zoom-reset {
    font-size: 0.75rem;
    color: #cbd5e1;
}

.lightbox-zoom-btn:hover,
.lightbox-zoom-reset:hover {
    background: var(--blue);
    color: #fff;
}

.lightbox-zoom-level {
    min-width: 52px;
    text-align: center;
    color: #cbd5e1;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    z-index: 2;
    background: rgba(18, 24, 36, 0.7);
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    top: 20px;
    right: 24px;
    font-size: 2rem;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--blue);
}

@media (max-width: 576px) {
    .lightbox-prev {
        left: 6px;
    }

    .lightbox-next {
        right: 6px;
    }

    .lightbox-close {
        right: 10px;
    }

    .lightbox-img {
        max-height: 74vh;
    }

    .lightbox-caption {
        margin-bottom: 60px;
    }

    .lightbox-toolbar {
        bottom: 10px;
    }
}

/* ==========================================================================
   Contacto
   ========================================================================== */

.contact-section {
    margin-top: 80px;
    scroll-margin-top: 90px;
}

.contact-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.form-control-custom {
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 12px;
}

.form-control-custom:focus {
    background-color: var(--bg);
    border-color: var(--blue);
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.form-check-label-custom {
    display: block;
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.form-check-input-custom:checked + .form-check-label-custom {
    background-color: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.form-check-label-custom:hover {
    border-color: #475569;
}

.btn-submit {
    background-color: var(--blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: #1d4ed8;
}

.form-status {
    margin-top: 1rem;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-status.success {
    background: rgba(4, 120, 87, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #a7f3d0;
}

.form-status.error {
    background: rgba(185, 28, 28, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fecaca;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

/* ==========================================================================
   Área reservada
   ========================================================================== */

.private-form {
    max-width: 460px;
    margin: 1.5rem auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
}

.private-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.private-form input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.private-form input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.private-form button {
    width: 100%;
}

.private-hint {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 12px 0 0;
}

.private-error {
    color: #fca5a5;
    font-size: 0.9rem;
    margin: 0 0 12px;
}

.private-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background-color: #0b0f17;
    border-top: 1px solid var(--card);
    padding: 30px 0;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 80px;
}

.social-links a {
    color: var(--muted);
    font-size: 1.2rem;
    margin: 0 12px;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--blue-light);
}

/* ==========================================================================
   Páginas temporárias / manutenção
   ========================================================================== */

.maintenance-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(37, 99, 235, 0.35);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.maintenance-shell {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.maintenance-card {
    background: rgba(26, 35, 50, 0.9);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.maintenance-main {
    padding: 48px 36px;
}

.maintenance-subtitle {
    color: var(--muted);
    max-width: 680px;
    margin: 0 auto 30px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.maintenance-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
}

.btn-primary-custom,
.btn-secondary-custom {
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s;
    display: inline-block;
}

.btn-primary-custom {
    background-color: var(--blue);
}

.btn-primary-custom:hover {
    background-color: #1d4ed8;
    color: #fff;
}

.btn-secondary-custom {
    background-color: var(--green);
}

.btn-secondary-custom:hover {
    background-color: var(--green-dark);
    color: #fff;
}

.maintenance-notes {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 24px 36px 30px;
}

.note-item {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.8;
}

.gallery-page {
    padding: 60px 20px 80px;
}

.gallery-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.thumb {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.thumb:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

@media (max-width: 576px) {
    .maintenance-main {
        padding: 32px 20px;
    }

    .maintenance-notes {
        padding: 20px;
    }

    .gallery-card {
        padding: 20px;
    }
}

/* ==========================================================================
   Utilitários
   ========================================================================== */

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(148, 163, 184, 0.3);
    border-top-color: var(--blue-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation-duration: 2s;
    }
}
