/**
 * Estilos para o plugin As 100+ de Araucária
 * Baseado no estilo dos cards da home do tema Frame News
 */

/* Container Principal */
.as100-main {
    max-width: 84rem;
    margin: 0 auto;
    padding: 2rem 0;
}

.as100-container {
    width: 100%;
    padding: 0 10px;
}

/* Remove padding lateral em desktop */
@media (min-width: 769px) {
    .as100-container {
        padding: 0;
    }
}

/* Cabeçalho da Página */
.as100-page-header {
    margin-bottom: 1.5rem;
}

.as100-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.as100-header-left {
    flex: 1;
}

.as100-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--grid-title-color, #1a1a1a);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

/* Logo do plugin */
.as100-logo-container {
    display: block;
    margin-bottom: 0.5rem;
}

.as100-logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    display: block;
}

/* Logo centralizado no mobile */
@media (max-width: 768px) {
    .as100-logo-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .as100-logo {
        margin: 0 auto;
        display: block;
    }
}

/* Oculta H1 visualmente mas mantém para SEO */
.as100-page-title.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.as100-page-description {
    font-size: 1.125rem;
    color: var(--grid-text-color, #666);
    margin: 0;
    line-height: 1.6;
}

.as100-header-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 280px;
}

/* Botão Baixar Edição - Design O Popular */
.as100-download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #a9cf46;
    color: #ffffff;
    padding: 0.875rem 1.75rem;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(169, 207, 70, 0.3);
    border: 2px solid #a9cf46;
}

.as100-download-button:hover {
    background: #95b83d;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(169, 207, 70, 0.5);
    color: #ffffff;
    border-color: #95b83d;
}

.as100-download-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(169, 207, 70, 0.3);
}

/* Conteúdo interno do botão */
.as100-download-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    width: 100%;
}

.as100-download-top {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.as100-download-top i {
    font-size: 1.125rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Texto da Edição dentro do botão */
.as100-edition-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Seletor de Anos (no header) - Design O Popular */
.as100-header-right .as100-year-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #201e1f;
    padding: 0.625rem 1rem;
    border-radius: 4px;
    border: 2px solid #a9cf46;
}

.as100-year-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    color: #a9cf46;
    font-size: 0.8125rem;
    margin: 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.as100-year-label i {
    color: #a9cf46;
    font-size: 0.875rem;
}

.as100-year-selector {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 2px solid #a9cf46;
    border-radius: 3px;
    background-color: #201e1f;
    color: #FFFFFF;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a9cf46' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    min-width: 90px;
}

.as100-year-selector:hover {
    background-color: #2a2828;
    border-color: #b8dc5a;
    box-shadow: 0 0 10px rgba(169, 207, 70, 0.3);
}

.as100-year-selector:focus {
    outline: none;
    border-color: #b8dc5a;
    box-shadow: 0 0 0 3px rgba(169, 207, 70, 0.2);
}

/* Mensagem de Loading */
.as100-loading-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #495057;
    font-size: 1.125rem;
}

.as100-loading-message i {
    margin-right: 0.5rem;
    color: #0066cc;
}

/* Slider de Banners */
.as100-banner-slider-wrapper {
    margin-bottom: 2.5rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.as100-banner-slider {
    width: 100%;
    height: auto;
}

.as100-banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Navegação do Swiper */
.as100-banner-slider .swiper-button-prev,
.as100-banner-slider .swiper-button-next {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.as100-banner-slider .swiper-button-prev:hover,
.as100-banner-slider .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.as100-banner-slider .swiper-button-prev::after,
.as100-banner-slider .swiper-button-next::after {
    font-size: 1.25rem;
}

/* Paginação do Swiper */
.as100-banner-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.6;
    width: 10px;
    height: 10px;
}

.as100-banner-slider .swiper-pagination-bullet-active {
    opacity: 1;
    background: #0066cc;
}

/* Grid de Notícias */
.as100-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

/* Card de Notícia */
.as100-news-card {
    background: var(--grid-card-bg, #fff);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.as100-news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Imagem do Card */
.as100-news-image-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.as100-news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.as100-news-card:hover .as100-news-image {
    transform: scale(1.05);
}

/* Categoria sobre a imagem */
.as100-news-category {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-block;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

/* Conteúdo do Card */
.as100-news-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.as100-news-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    flex-grow: 1;
}

.as100-news-title a {
    color: var(--grid-title-color, #1a1a1a);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.as100-news-title a:hover {
    color: var(--grid-accent-color, #0066cc);
}

/* Meta informações */
.as100-news-meta {
    font-size: 0.8125rem;
    color: var(--grid-text-color, #757575);
    margin-top: auto;
}

.as100-news-date {
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* Mensagem quando não há posts */
.as100-no-posts {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--grid-text-color, #666);
    font-size: 1.125rem;
}

/* Botão Carregar Mais */
.as100-load-more-container {
    text-align: center;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
}

.as100-load-more-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: transparent;
    border: 2px solid #ddd;
    color: #666;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.as100-load-more-button:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
    color: #333;
    transform: translateY(-1px);
}

.as100-load-more-button:active {
    transform: translateY(0);
}

.as100-load-more-button.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.as100-loading-indicator {
    display: inline-flex;
    align-items: center;
}

/* Responsividade */

/* Tablets grandes e desktops pequenos */
@media (max-width: 1400px) {
    .as100-news-grid {
        gap: 1.25rem;
    }
}

/* Tablets */
@media (max-width: 1200px) {
    .as100-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .as100-page-title {
        font-size: 2rem;
    }

    .as100-page-description {
        font-size: 1rem;
    }
}

/* Tablets pequenos */
@media (max-width: 992px) {
    .as100-main {
        padding: 1.5rem 0;
    }

    .as100-news-grid {
        gap: 1rem;
    }

    .as100-news-content {
        padding: 1rem;
    }

    .as100-news-category {
        font-size: 0.5625rem;
        padding: 0.25rem 0.5rem;
    }

    .as100-news-title {
        font-size: 1rem;
    }

    .as100-page-header {
        margin-bottom: 2rem;
    }

    .as100-page-title {
        font-size: 1.75rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .as100-main {
        padding: 1rem 1rem;
    }

    .as100-page-header {
        margin-bottom: 1.5rem;
    }

    .as100-header-content {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 1rem;
    }

    .as100-header-left {
        width: 100%;
    }

    .as100-page-title {
        font-size: 1.75rem;
    }

    .as100-page-description {
        font-size: 0.9375rem;
    }

    /* Mobile: Seletor e Botão responsivos */
    .as100-header-right {
        width: 100%;
        align-items: stretch;
        gap: 0.75rem;
        flex-direction: row;
    }

    .as100-header-right .as100-year-selector-wrapper {
        flex: 1;
        margin-bottom: 0;
        padding: 0.75rem 1rem;
    }

    .as100-year-label {
        font-size: 0.75rem;
    }

    .as100-year-selector {
        flex: 1;
        min-width: auto;
        font-size: 0.875rem;
        padding: 0.5rem 2rem 0.5rem 0.625rem;
    }

    .as100-download-button {
        flex-shrink: 0;
        width: auto;
        min-width: 150px;
        justify-content: center;
        padding: 0.875rem 1.25rem;
    }

    .as100-download-content {
        gap: 0;
    }

    .as100-download-top {
        font-size: 0.875rem;
    }

    .as100-edition-label {
        font-size: 0.625rem;
    }

    .as100-banner-slider-wrapper {
        margin-bottom: 2rem;
    }

    .as100-banner-slider .swiper-button-prev,
    .as100-banner-slider .swiper-button-next {
        width: 36px;
        height: 36px;
    }

    .as100-banner-slider .swiper-button-prev::after,
    .as100-banner-slider .swiper-button-next::after {
        font-size: 1rem;
    }

    .as100-load-more-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Mobile pequeno */
@media (max-width: 576px) {
    .as100-news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .as100-news-image-wrap {
        height: 180px;
    }

    .as100-news-title {
        font-size: 0.9375rem;
    }

    .as100-news-meta {
        font-size: 0.75rem;
    }

    .as100-page-title {
        font-size: 1.375rem;
    }

    .as100-page-description {
        font-size: 0.875rem;
    }

    .as100-load-more-container {
        margin-top: 1.5rem;
    }

    .as100-load-more-button {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile extra pequeno */
@media (max-width: 375px) {
    .as100-news-image-wrap {
        height: 160px;
    }

    .as100-news-content {
        padding: 0.875rem;
    }

    .as100-page-title {
        font-size: 1.25rem;
    }
}
