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

html, body {
    margin: 0;
    padding: 0;
}

.jn-veiculos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1100px;
    margin: auto;
    justify-items: center;
}

/* Media queries para grid de veículos */
@media (max-width: 768px) {
    .jn-veiculos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .jn-veiculos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
}

.jn-veiculo-item {
    background: #fff;
    display: block;
    text-decoration: none !important;
    color: inherit;
}

.jn-veiculo-capa {
    width: 100%;
    object-fit: contain;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.jn-veiculo-capa-loading {
    width: 100%;
    min-height: 475px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.jn-veiculo-nome {
    padding: 0;
    margin: 0;
    font-size: 1.2rem;
    text-align: center;
    color: #333;
    text-decoration: none !important;
    font-weight: 600;
}

/* Estilos para lista de edições */
.jn-editions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 3rem;
    padding: 2rem 1rem;
    max-width: 1100px;
    margin: auto;
    justify-content: center;
    justify-items: center;
}

@media (max-width: 768px) {
    .jn-editions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
    
    .jn-edition-thumbnail {
        height: 150px;
    }
    
    .jn-today-edition {
        width: 100%;
        max-width: 280px;
    }
    
    .jn-today-thumbnail {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .jn-editions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .jn-edition-item {
        width: 220px;
        margin: 0 auto;
    }

    .jn-edition-thumbnail {
        height: 180px;
    }
    
    .jn-today-edition {
        width: 100%;
        max-width: 260px;
    }
    
    .jn-today-thumbnail {
        height: 250px;
    }
}

.jn-edition-item,
.jn-edition-item-redirect {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    max-width: 180px;
}

.jn-edition-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.jn-edition-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #f5f5f5;
}

.jn-edition-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
    display: block;
}

.jn-edition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.jn-edition-item:hover .jn-edition-overlay,
.jn-edition-item-redirect:hover .jn-edition-overlay {
    opacity: 1;
}

.jn-edition-info {
    padding: 0.5rem;
    text-align: center;
    background: #f5f5f5;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.jn-edition-date {
    font-size: 0.8rem;
    color: #222;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.jn-edition-btn {
    background: #bbbbbb;
    color: #fff;
    border: none;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: normal;
    border-radius: 4px;
    transition: background-color 0.2s;
    max-height: 32px !important;
}

.jn-edition-btn:hover {
    background: #999999;
}

/* Media queries para botões */
@media (max-width: 480px) {
    .jn-edition-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-height: 32px;
    }
}

.jn-today-edition .jn-edition-btn {
    background: #009fe3;
}

/* Estilos para edição do dia */
.jn-today-edition-wrapper {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jn-today-edition {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    width: 260px;
}

.jn-today-edition:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.jn-today-badge {
    display: flex;
    justify-content: flex-end;
    margin: 5px 5px 5px 0;
    height: 24px;
}

.jn-today-badge span {
    border-radius: 5px;
    background: #009fe3;
    color: var(--wp--preset--color--white);
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    font-weight: normal;
    display: block;
}

.jn-today-thumbnail {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.jn-today-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.jn-today-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.jn-today-edition:hover .jn-today-overlay {
    opacity: 1;
}

.jn-today-info {
    padding: 0.5rem;
    text-align: center;
}

.jn-today-date {
    font-size: 0.9rem;
    color: #222;
    margin-bottom: 0.5rem;
}

/* Paginação */
.jn-pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.jn-pagination ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.jn-pagination li {
    margin: 0;
}

.jn-pagination a,
.jn-pagination span {
    display: inline-block;
    padding: .5rem .7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-size: .9rem;
    min-width: 40px;
    text-align: center;
}

/* Media queries para paginação */
@media (max-width: 480px) {
    .jn-pagination ul {
        margin: 1rem 0;
    }
    
    .jn-pagination a,
    .jn-pagination span {
        padding: .4rem .6rem;
        font-size: .8rem;
        min-width: 35px;
    }
}
.jn-pagination a:hover {
    background: #f8f9fa;
    border-color: #0073aa;
    color: #0073aa;
}
.jn-pagination .current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Mensagens de erro e sem resultados */
.jn-error,
.jn-no-editions {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    margin: 2rem 0;
}

.jn-latest-editions-wrapper {
    max-width: 1100px;
    margin: auto;
    min-height: 480px;
}

.jn-latest-editions-wrapper::after {
    content: '';
    position: relative;
    display: block;
    width: calc(100vw - 17px);
    height: 1px;
    background-color: #e0e0e0;
    margin: 2rem auto;
    left: 50%;
    transform: translateX(-50%);
}

.jn-latest-editions-wrapper p {
    color: #222;
    font-size: 17px;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

  .swiper {
    width: auto;
    position: relative;
  }
  .swiper-wrapper {
    align-items: flex-end;
  }
  .swiper-slide {
    color: #111;
    font-weight: bold;
    width: 150px !important;    /* Slides laterais menores */
    height: 320px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.09);
    font-size: 14px;
    user-select: none;
    text-align: center;
    flex-direction: column;
    opacity: 0.5;
  }
  .swiper-slide img {
    max-width: 150px;
    max-height: 430px;
  }
  .swiper-slide.swiper-slide-active .jn-edition-thumbnail {
    height: 100%;
  }
  .swiper-slide .jn-edition-thumbnail {
    height: 260px;
  }
  .swiper-slide.swiper-slide-active {
    background: var(--wp--preset--color--white);
    color: #fff;
    width: 200px !important; /* Slide central maior */
    height: 440px !important; /* Slide central maior */
    font-size: 19px;
    align-items: flex-end;
    box-shadow: 0 8px 28px rgba(5,125,192,0.16);
    z-index: 2;
    opacity: 1;
    filter: none;
    cursor: pointer;
  }
  .swiper-slide.swiper-slide-active img {
    max-width: 200px;
    max-height: 480px;
    display: block;
  }
  /* Setas do Swiper */
  .swiper-button-next, .swiper-button-prev {
    color: #057dc0;
    top: 62%;
    width: 36px;
    height: 36px;
    outline: none;
  }
  .swiper-button-prev { left: 0; }
  .swiper-button-next { right: 0; }

@media (min-width: 995px) {
    /* Swiper */
    .swiper {
        min-height: 480px;
    }
}
  
  @media (max-width: 700px) {
    .secao-slider { 
        max-width: 98vw;
    }

    .swiper-button-next, .swiper-button-prev {
        top: 60%;
    }
  }

/* Estilos para filtro de data */
.jn-date-filter {
    display: flex;
    justify-content: center;
}

.jn-filter-form {
    padding-bottom: 1.5rem;
}

.jn-filter-title {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    margin-top: 0;
    text-align: center;
}

.jn-filter-inputs {
    display: flex;
    align-items: end;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* .jn-filter-group {} */

.jn-filter-separator {
    font-size: 0.8rem;
    color: #333;
    font-weight: 400;
    padding-bottom: 0.45rem;
}

.jn-filter-group label {
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 400;
    color: #666;
    font-size: 0.75rem;
}

.jn-filter-group input[type="date"] {
    padding: 0.25rem;
    border: 1px solid #e8e8e8;
    font-size: 0.8rem;
    background: #fff;
    color: #999;
}

.jn-filter-group input[type="date"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.jn-filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.jn-filter-btn {
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    background: url(../images/search.png) no-repeat left center;
    width: 26px;
    height: 26px;
}

@media (max-width: 768px) {
    .jn-filter-inputs {
        align-items: center;
        justify-content: center;
    }

    .jn-filter-actions {
        justify-content: center;
        margin-top: 1rem;
    }

    .jn-filter-separator {
        padding-bottom: 0;
        padding-top: 0.9rem;
    }
}