/* =========================================
   VARIÁVEIS E IDENTIDADE VISUAL
========================================= */

:root {
    --primary: #20294f;
    --primary-dark: #151d3b;
    --primary-light: #eef1f8;

    --institutional-green: #a6ce48;

    --christmas-green: #103f2d;
    --christmas-green-light: #19583f;

    --christmas-red: #b91c32;
    --christmas-red-dark: #941629;

    --gold: #d4af37;
    --gold-light: #f4e4b8;
    --cream: #fffaf0;

    --white: #ffffff;
    --background: #f6f7fa;
    --ink: #252b39;
    --muted: #657080;
    --line: #e0e5eb;

    --radius: 12px;
    --shadow: 0 5px 20px rgba(32, 41, 79, 0.07);
    --transition: 0.25s ease;
}


/* =========================================
   RESET E CONFIGURAÇÕES GLOBAIS
========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    line-height: 1.6;

    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
p {
    margin: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.container {
    width: calc(100% - 64px);
    max-width: 1320px;
    margin-inline: auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

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


/* =========================================
   BARRA DE ACESSIBILIDADE
========================================= */

.accessibility-bar {
    background: #e8eaed;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}

.accessibility-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-block: 7px;
}

.accessibility-bar a {
    color: var(--primary);
    transition: color var(--transition);
}

.accessibility-bar a:hover {
    text-decoration: underline;
}


/* =========================================
   CABEÇALHO INSTITUCIONAL
========================================= */

.institutional {
    position: relative;
    overflow: hidden;
    background: var(--primary);
    color: var(--white);
    padding: 25px 0;
}

.institutional-inner {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 28px;
}

.header-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 380px;
    height: 100%;

    background: repeating-linear-gradient(
        -45deg,
        transparent 0,
        transparent 30px,
        rgba(255, 255, 255, 0.035) 30px,
        rgba(255, 255, 255, 0.035) 60px
    );

    pointer-events: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    width: 200px;
    max-height: 90px;
    object-fit: contain;
}

.header-divider {
    width: 1px;
    height: 65px;
    background: rgba(255, 255, 255, 0.25);
}

.event-brand {
    display: flex;
    flex-direction: column;
}

.event-label {
    color: var(--institutional-green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.event-title {
    color: var(--white);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    margin-block: 3px;
}

.event-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
}

.header-location {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    text-align: right;
}

.header-location span {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
}

.header-location strong {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
}


/* =========================================
   FAIXA DE CORES INSTITUCIONAIS
========================================= */

.institutional-stripe {
    display: flex;
    width: 100%;
    height: 7px;
}

.institutional-stripe span:nth-child(1) {
    background: var(--institutional-green);
    flex: 5;
}

.institutional-stripe span:nth-child(2) {
    background: #a6a8ac;
    flex: 2;
}

.institutional-stripe span:nth-child(3) {
    background: #d9dadd;
    flex: 3;
}


/* =========================================
   BANNER PRINCIPAL DE NATAL
========================================= */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    background-color: var(--christmas-green);

    background-image:
        linear-gradient(
            90deg,
            rgba(9, 35, 25, 0.95) 0%,
            rgba(9, 35, 25, 0.76) 42%,
            rgba(9, 35, 25, 0.15) 100%
        ),
        url('images/banner-natal.png');

    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;

    color: var(--white);
    min-height: 420px;

    display: flex;
    align-items: center;

    padding: 65px 0 80px;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;

    background: linear-gradient(
        90deg,
        #9c7625,
        #e5ca7c,
        #f7e7b7,
        #d4af37,
        #9c7625
    );
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background: radial-gradient(
        ellipse at 90% 40%,
        rgba(212, 175, 55, 0.13),
        transparent 55%
    );
}

.hero-decoration {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background-image:
        radial-gradient(circle at 12% 15%, #ffffff40 1px, transparent 2px),
        radial-gradient(circle at 82% 70%, #f4e4b840 1px, transparent 2px),
        radial-gradient(circle at 55% 35%, #ffffff20 1px, transparent 2px);

    background-size:
        120px 120px,
        180px 180px,
        230px 230px;
}

.hero-inner {
    position: relative;
}

.hero-content {
    max-width: 650px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 7px 15px;

    border: 1px solid rgba(244, 228, 184, 0.4);
    border-radius: 30px;

    background: rgba(255, 255, 255, 0.05);

    color: var(--gold-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-label::before {
    content: '✦';
    font-size: 13px;
}

.hero h1 {
    margin: 20px 0;

    font-size: clamp(36px, 4.6vw, 62px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.hero h1 span {
    display: block;
    color: var(--gold-light);
}

.hero p {
    max-width: 540px;

    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    background: var(--christmas-red);
    color: var(--white);

    padding: 14px 24px;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 700;

    box-shadow: 0 5px 20px rgba(185, 28, 50, 0.2);

    transition:
        background var(--transition),
        transform var(--transition);
}

.hero-button:hover {
    background: var(--christmas-red-dark);
    transform: translateY(-3px);
}

.hero-button span {
    font-size: 21px;
    line-height: 1;
}

.period {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    font-size: 13px;
    font-weight: 700;
    color: var(--white);
}

.status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--institutional-green);
    box-shadow: 0 0 0 5px rgba(166, 206, 72, 0.15);
}

.period-closed .status-dot {
    background: #e55b66;
    box-shadow: 0 0 0 5px rgba(229, 91, 102, 0.15);
}


/* =========================================
   CONTEÚDO PRINCIPAL
========================================= */

.main-content {
    flex: 1;
    padding-block: 30px 65px;
}


/* =========================================
   INFORMAÇÕES DA VOTAÇÃO
========================================= */

.voting-info {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    background: var(--cream);
    border: 1px solid #e8d9af;
    border-left: 5px solid var(--gold);
    border-radius: var(--radius);

    padding: 23px 28px;
    margin-bottom: 45px;

    box-shadow: var(--shadow);
}

.voting-info-content {
    display: flex;
    align-items: center;
    gap: 18px;
}

.voting-info-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;

    width: 52px;
    height: 52px;

    background: #f3e6c4;
    color: #89651f;
    border-radius: 50%;
}

.voting-info h2 {
    color: var(--primary);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.voting-info p {
    color: var(--muted);
    font-size: 14px;
}

.participants-count {
    display: flex;
    flex-direction: column;
    align-items: center;

    border-left: 1px solid #e3d7b8;
    padding-left: 28px;

    flex-shrink: 0;
}

.participants-count strong {
    color: var(--christmas-green);
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
}

.participants-count span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}


/* =========================================
   TÍTULO DA LISTAGEM
========================================= */

.participants-section {
    scroll-margin-top: 25px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 28px;
}

.section-title {
    flex: 1;
}

.section-label {
    display: inline-block;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    color: #89651f;

    margin-bottom: 9px;
}

.section-heading h2 {
    color: var(--primary);
    font-size: clamp(23px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 6px;
}

.section-heading p {
    color: var(--muted);
    font-size: 14px;
}


/* =========================================
   CAMPO DE BUSCA
========================================= */

.search {
    position: relative;
    width: 340px;
    max-width: 100%;
    flex-shrink: 0;
}

.search-icon {
    position: absolute;
    z-index: 1;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);

    color: var(--muted);
    pointer-events: none;
}

input {
    display: block;
    width: 100%;

    border: 1px solid #d2d8e1;
    border-radius: 8px;

    background: var(--white);
    color: var(--ink);

    padding: 13px 15px;
    font-size: 15px;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

input::placeholder {
    color: #7b8491;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(32, 41, 79, 0.08);
}

.search input {
    padding: 14px 16px 14px 45px;
    font-size: 13px;
    font-weight: 500;
}


/* =========================================
   GRID DAS ÁRVORES
========================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}


/* =========================================
   CARDS DAS ÁRVORES
========================================= */

.tree-card {
    position: relative;

    display: flex;
    flex-direction: column;
    min-width: 0;

    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;

    box-shadow: var(--shadow);

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.tree-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-light);
    box-shadow: 0 12px 28px rgba(32, 41, 79, 0.12);
}

.tree-photo {
    position: relative;

    display: grid;
    place-items: center;

    aspect-ratio: 4 / 5;

    background: #e9eeeb;
    overflow: hidden;
}

.tree-photo img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition: transform 0.5s ease;
}

.tree-card:hover .tree-photo img {
    transform: scale(1.045);
}

.tree-number {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;

    padding: 6px 13px;

    border-radius: 6px;
    background: var(--white);

    color: var(--primary);
    font-size: 12px;
    font-weight: 800;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.13);
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 100%;
    min-height: 180px;

    color: #647e6d;
    font-size: 13px;
    font-weight: 600;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;

    gap: 10px;
    padding: 20px;
}

.card-category {
    color: #89651f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.card-body h3 {
    flex: 1;
    min-height: 44px;

    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;

    overflow-wrap: anywhere;
}


/* =========================================
   BOTÕES
========================================= */

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    width: 100%;
    min-height: 44px;

    background: var(--christmas-red);
    color: var(--white);

    padding: 12px 15px;

    border: 0;
    border-radius: 7px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.button svg {
    flex-shrink: 0;
}

.button:hover {
    background: var(--christmas-red-dark);
    box-shadow: 0 4px 15px rgba(185, 28, 50, 0.2);
}

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

.button.disabled {
    background: #68717c;
    box-shadow: none;
    cursor: default;
    transform: none;
}


/* =========================================
   MENSAGENS E ESTADOS VAZIOS
========================================= */

.notice {
    background: #e9f6ed;
    color: #245b37;

    border: 1px solid #c1dfc9;
    border-left: 4px solid #32945a;
    border-radius: 8px;

    padding: 16px 20px;
    margin-bottom: 22px;

    font-size: 14px;
    font-weight: 600;
}

.empty {
    grid-column: 1 / -1;

    padding: 50px 20px;
    text-align: center;

    background: var(--white);
    border: 1px dashed #ced5df;
    border-radius: var(--radius);

    color: var(--muted);
}

.empty h3 {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 5px;
}


/* =========================================
   PÁGINA DE VOTAÇÃO
========================================= */

.vote {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: var(--primary);
    font-size: 14px;
    font-weight: 700;

    margin-bottom: 25px;

    transition: color var(--transition);
}

.back:hover {
    color: var(--christmas-red);
}

.vote-heading {
    margin-bottom: 30px;
}

.vote-heading h1 {
    color: var(--primary);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
}

.vote-heading p {
    color: var(--muted);
    font-size: 15px;
}

.vote-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 30px;
}


/* =========================================
   ÁRVORE SELECIONADA
========================================= */

.vote-tree-card {
    background: var(--white);

    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;

    box-shadow: var(--shadow);
}

.vote-photo-wrapper {
    position: relative;
    overflow: hidden;

    display: grid;
    place-items: center;

    aspect-ratio: 4 / 5;
    background: #e9eeeb;
}

.vote-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.vote-tree-body {
    padding: 23px;
}

.vote-tree-body h2 {
    color: var(--primary);
    font-size: 25px;
    font-weight: 800;

    margin-top: 8px;
    margin-bottom: 6px;

    overflow-wrap: anywhere;
}

.vote-tree-body p {
    color: var(--muted);
    font-size: 14px;
}


/* =========================================
   FORMULÁRIO DE VOTAÇÃO
========================================= */

.vote-form-card {
    min-width: 0;

    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);

    padding: 32px;

    box-shadow: var(--shadow);
}

.vote-form-heading {
    margin-bottom: 25px;
}

.vote-form-icon {
    display: grid;
    place-items: center;

    width: 58px;
    height: 58px;

    border-radius: 12px;

    background: var(--primary-light);
    color: var(--primary);

    margin-bottom: 18px;
}

.vote-form-heading h2 {
    font-size: 25px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--primary);

    margin-bottom: 8px;
}

.vote-form-heading p {
    color: var(--muted);
    font-size: 14px;
}

.vote-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.vote-form label {
    display: block;

    color: var(--primary);
    font-weight: 700;
    font-size: 14px;

    margin-bottom: 7px;
}

.vote-form input {
    min-height: 51px;
    font-size: 16px;
}

.vote-form .helptext {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
}


/* =========================================
   PRIVACIDADE
========================================= */

.privacy-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 15px;

    background: #eef5ef;
    border: 1px solid #d8e8d9;
    border-radius: 8px;

    color: var(--christmas-green);
}

.privacy-box svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.privacy-box strong {
    display: block;

    color: var(--christmas-green);
    font-size: 13px;
    font-weight: 800;

    margin-bottom: 4px;
}

.privacy {
    color: #4b6554;
    font-size: 12px;
    line-height: 1.7;
}


/* =========================================
   CLOUDFLARE TURNSTILE
========================================= */

.captcha-wrapper {
    width: 100%;
    min-width: 0;
}

.cf-turnstile {
    max-width: 100%;
}

.confirm-vote-button {
    min-height: 53px;
    font-size: 15px;
    font-weight: 800;
}

.vote-disclaimer {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}


/* =========================================
   ERROS DO FORMULÁRIO DJANGO
========================================= */

.errorlist {
    padding: 12px 15px 12px 32px;
    margin: 0;

    background: #fdf0f1;
    border: 1px solid #f0cbd1;
    border-radius: 7px;

    color: var(--christmas-red-dark);
    font-size: 13px;
    font-weight: 600;
}

.errorlist li + li {
    margin-top: 5px;
}

.vote-form [aria-invalid="true"] {
    border-color: var(--christmas-red);
}

.voting-closed-notice {
    background: #fff4e5;
    border-color: #e9d2aa;
    border-left-color: var(--gold);

    color: #79571f;
    margin-bottom: 0;
}

.voting-closed-notice strong {
    display: block;
    margin-bottom: 6px;
}


/* =========================================
   COMO PARTICIPAR
========================================= */

.footer {
    margin-top: auto;
}

.instructions {
    padding: 35px 0 45px;

    border-top: 1px solid var(--line);
}

.instructions-heading {
    text-align: center;
    margin-bottom: 30px;
}

.instructions-heading h2 {
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.instruction-item {
    display: flex;
    flex-direction: column;
    align-items: center;

    background: var(--white);

    padding: 25px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);

    text-align: center;

    transition: transform var(--transition);
}

.instruction-item:hover {
    transform: translateY(-3px);
}

.step-number {
    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: #eef4e1;
    color: var(--primary);

    font-size: 19px;
    font-weight: 800;

    margin-bottom: 12px;
}

.instruction-item strong {
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;

    margin-bottom: 5px;
}

.instruction-item p {
    color: var(--muted);
    font-size: 13px;
}


/* =========================================
   RODAPÉ INSTITUCIONAL
========================================= */

.footer-institutional {
    position: relative;

    background: var(--primary);
    color: var(--white);

    border-top: 5px solid var(--institutional-green);

    padding-top: 38px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 35px;
    align-items: start;

    padding-bottom: 30px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.footer-logo {
    width: 180px;
    max-height: 80px;
    object-fit: contain;
}

.footer-brand strong {
    color: var(--white);
    font-size: 17px;
    font-weight: 800;
}

.footer-brand p {
    color: #c1c7d7;
    font-size: 13px;
}

.footer-partners strong {
    display: block;

    color: var(--institutional-green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;

    margin-bottom: 10px;
}

.footer-partners p {
    color: #e2e5ee;
    font-size: 14px;
    margin-bottom: 3px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a,
.footer-links span {
    color: #e2e5ee;
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--institutional-green);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;

    border-top: 1px solid rgba(255, 255, 255, 0.15);

    padding-block: 18px;

    color: #c1c7d7;
    font-size: 11px;
}

.footer-bottom a {
    color: var(--institutional-green);
}

.footer-bottom a:hover {
    text-decoration: underline;
}


/* =========================================
   RESPONSIVIDADE — TABLETS
========================================= */

@media (max-width: 1100px) {

    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .hero {
        min-height: 380px;
    }

    .header-location {
        display: none;
    }

    .card-body {
        padding: 16px;
    }

    .vote-layout {
        gap: 22px;
    }

    .vote-form-card {
        padding: 25px;
    }

}


/* =========================================
   RESPONSIVIDADE — TABLETS E MOBILE
========================================= */

@media (max-width: 768px) {

    .container {
        width: calc(100% - 36px);
    }

    .institutional {
        padding: 20px 0;
    }

    .institutional-inner {
        gap: 18px;
    }

    .brand-logo {
        width: 145px;
    }

    .header-divider {
        height: 50px;
    }

    .event-title {
        font-size: 23px;
    }

    .event-label {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .event-subtitle {
        font-size: 11px;
    }

    .hero {
        min-height: 360px;
        padding: 50px 0;

        background-image:
            linear-gradient(
                90deg,
                rgba(9, 35, 25, 0.94),
                rgba(9, 35, 25, 0.55)
            ),
            url('images/banner-natal.png');

        background-position: 65% center;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 15px;
        max-width: 460px;
    }

    .hero-content {
        max-width: 540px;
    }

    .main-content {
        padding-block: 25px 40px;
    }

    .voting-info {
        padding: 18px;
        margin-bottom: 30px;
        gap: 15px;
    }

    .voting-info-content {
        gap: 12px;
    }

    .voting-info-icon {
        width: 42px;
        height: 42px;
    }

    .voting-info h2 {
        font-size: 17px;
    }

    .voting-info p {
        font-size: 12px;
    }

    .participants-count {
        padding-left: 15px;
    }

    .participants-count strong {
        font-size: 29px;
    }

    .participants-count span {
        font-size: 10px;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .search {
        width: 100%;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .card-body h3 {
        font-size: 16px;
    }

    .vote {
        max-width: 550px;
    }

    .vote-layout {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .vote-photo-wrapper {
        aspect-ratio: 4 / 3;
    }

    .vote-form-card {
        padding: 25px;
    }

    .instructions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

}


/* =========================================
   RESPONSIVIDADE — MOBILE
========================================= */

@media (max-width: 480px) {

    .container {
        width: calc(100% - 30px);
    }

    .accessibility-bar {
        font-size: 10px;
    }

    .accessibility-inner {
        gap: 8px;
    }

    .institutional-inner {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .brand-logo {
        width: 155px;
        max-height: 75px;
    }

    .header-divider {
        display: none;
    }

    .event-brand {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .event-title {
        font-size: 25px;
    }

    .institutional-stripe {
        height: 5px;
    }

    .hero {
        min-height: 390px;
        padding: 40px 0;

        background-image:
            linear-gradient(
                rgba(9, 35, 25, 0.75),
                rgba(9, 35, 25, 0.93)
            ),
            url('images/banner-natal.png');

        background-position: 65% center;
    }

    .hero-label {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .hero h1 {
        font-size: 36px;
        letter-spacing: -0.8px;
        margin-block: 15px;
    }

    .hero p {
        font-size: 14px;
        line-height: 1.75;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-top: 25px;
    }

    .hero-button {
        width: 100%;
    }

    .voting-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 15px;
    }

    .voting-info-content {
        align-items: flex-start;
    }

    .participants-count {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 9px;

        border-left: 0;
        border-top: 1px solid #e3d7b8;

        padding-top: 13px;
        padding-left: 0;
    }

    .participants-count strong {
        font-size: 26px;
    }

    .participants-count span {
        font-size: 12px;
    }

    .section-label {
        font-size: 9px;
        letter-spacing: 1.2px;
    }

    .section-heading h2 {
        font-size: 25px;
    }

    .section-heading p {
        font-size: 13px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tree-photo {
        aspect-ratio: 4 / 4.5;
    }

    .tree-number {
        font-size: 12px;
        padding: 5px 10px;
        left: 10px;
        top: 10px;
    }

    .card-body {
        padding: 17px;
    }

    .card-category {
        font-size: 9px;
    }

    .card-body h3 {
        min-height: auto;
        font-size: 19px;
    }

    .vote-button {
        font-size: 14px;
        min-height: 48px;
    }

    .vote-heading {
        margin-bottom: 20px;
    }

    .vote-heading h1 {
        font-size: 30px;
    }

    .vote-heading p {
        font-size: 13px;
    }

    .vote-form-card {
        padding: 18px;
    }

    .vote-form-heading h2 {
        font-size: 22px;
    }

    .vote-form-heading p {
        font-size: 13px;
    }

    .vote-tree-body {
        padding: 18px;
    }

    .vote-tree-body h2 {
        font-size: 22px;
    }

    .privacy-box {
        padding: 12px;
    }

    .confirm-vote-button {
        font-size: 14px;
    }

    .instructions-heading h2 {
        font-size: 24px;
    }

    .instructions-grid {
        gap: 10px;
    }

    .instruction-item {
        padding: 17px 10px;
    }

    .instruction-item strong {
        font-size: 14px;
    }

    .instruction-item p {
        font-size: 11px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: auto;
    }

}


/* =========================================
   ACESSIBILIDADE — REDUÇÃO DE MOVIMENTOS
========================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .tree-card:hover,
    .tree-card:hover .tree-photo img,
    .hero-button:hover,
    .instruction-item:hover {
        transform: none;
    }

}

/* GALERIA DE FOTOS DAS ÁRVORES */

.tree-photo.gallery {
    position: relative;
    overflow: hidden;
}

.gallery-track {
    position: absolute;
    inset: 0;
}

.gallery-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.gallery-image.is-active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery:hover .gallery-arrow,
.gallery:focus-within .gallery-arrow {
    opacity: 1;
}

.gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.gallery-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-indicator.is-active {
    background: #fff;
    transform: scale(1.25);
}

@media (hover: none) {
    .gallery-arrow {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-image {
        transition: none;
    }
}
