/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #000000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Screen Reader Only */
.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;
}

/* Header */
header {
    background: linear-gradient(135deg, #0D6EFD 0%, #0056b3 100%);
    color: white;
    padding: 1.6rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.site-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
main {
    padding: 1.6rem 0;
}

/* Banner Section */
.banner-section {
    margin-bottom: 2.4rem;
}
.banner-section .container { padding: 0; }

.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.slideshow {
    position: relative;
    width: 100%;
    height: 150px;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.slide-btn:hover {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.slide-btn i {
    font-size: 1.2rem;
    color: #0D6EFD;
}

/* News Section */
.news-section {
    background: transparent;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: 0.1rem;
}

.news-article {
    padding: 0;
}

.news-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.2rem;
    align-items: start;
    margin-bottom: 0.4rem;
}

.news-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0D6EFD;
    color: white;
    padding: 1.2rem;
    border-radius: 10px;
    min-width: 100px;
    margin: 0.3rem;
}

.news-time .time {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}

.news-time .date {
    font-size: 0.9rem;
    opacity: 0.9;
}

.news-image {
    position: relative;
    margin: 0.3rem;
}

.news-image img {
    width: 230px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.image-credit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: white;
}

.editoria-highlight {
    background: #e6b208;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.news-title-section {
    flex: 1;
    background: transparent;
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0 0.5rem 0.5rem 0.5rem;
    line-height: 1.3;
}

.news-preview {
    margin-top: 0.5rem;
}

.first-paragraph {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin: 0 0.5rem;
    font-weight: 400;
    text-align: justify;
    max-height: calc(4 * 1.4 * 0.9rem);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
}

.read-more {
    background: #e6b208;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: fit-content;
    white-space: nowrap;
}

.read-more:hover {
    color: white;
    background: #d4a007;
    transform: translateY(-1px);
}

.read-more i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: scale(1.1);
}

.news-source {
    color: white;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.news-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.expand-btn {
    background: #0D6EFD;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.expand-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.expand-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.advertisement {
    display: flex;
    align-items: center;
}

.advertisement img {
    width: 116px;
    height: 164px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* News Content */
.news-content {
    display: none;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.news-content.show {
    display: block;
    animation: slideDown 0.6s ease-out;
}

.news-text p {
    margin-bottom: 1.5rem;
    color: #ffffff;
    line-height: 1.7;
    text-align: justify;
}

/* Footer */
footer {
    background: transparent;
    color: white;
    text-align: center;
    padding: 1.6rem 0;
    margin-top: 2.4rem;
}

footer p {
    margin: 0;
    opacity: 0.8;
}

/* Loading and Error Messages */
.loading-message {
    text-align: center;
    padding: 2rem;
    color: #ffffff;
    font-size: 1.1rem;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #ffffff;
    font-size: 1.1rem;
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    margin: 1rem 0;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para paginação */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
}

.pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background: rgba(204, 19, 19, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex-wrap: nowrap;
}

.pagination-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
}

.pagination-number {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.pagination-number:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.pagination-number.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.pagination-ellipsis {
    color: rgba(255, 255, 255, 0.6);
    padding: 0.6rem 0.4rem;
    font-weight: 500;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-left: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsividade para paginação */
@media (max-width: 768px) {
    .pagination {
        gap: 0.3rem;
        padding: 0.6rem 0.8rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-width: 35px;
    }
    
    .pagination-number {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
        min-width: 35px;
        height: 35px;
    }
    
    .pagination-info {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
        margin-left: 0.5rem;
    }
}

/* Ocultar elementos mobile no desktop */
@media (min-width: 769px) {
    .mobile-title-section,
    .mobile-metadata,
    .mobile-preview {
        display: none;
    }
}

@media (max-width: 480px) {
    .pagination-container {
        margin: 1rem 0;
        padding: 0.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.2rem;
        padding: 0.5rem;
    }
    
    .pagination-info {
        order: -1;
        width: 100%;
        text-align: center;
        margin: 0 0 0.5rem 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .news-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .news-meta {
        justify-self: center;
    }
    
    .news-controls {
        flex-direction: row;
        justify-content: center;
    }
    
    /* Hide desktop expand button on mobile */
    .desktop-only .expand-btn {
        display: none !important;
    }
    
    /* Reorganize image credit to include date/time */
    .image-credit {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 0.5rem;
        font-size: 0.8rem;
        color: white;
        flex-wrap: wrap;
    }
    
    .image-credit .credit-left {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 1;
    }
    
    .image-credit .mobile-datetime {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        font-size: 0.8rem;
        color: white;
        opacity: 0.9;
        margin-right: 0.8rem;
        padding-right: 0.8rem;
        border-right: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .image-credit .mobile-datetime i {
        font-size: 0.75rem;
        color: #4A90E2;
    }
    
    /* Ocultar elementos desktop no mobile */
    .desktop-only {
        display: none !important;
    }
    
    /* Mostrar elementos mobile */
    .mobile-title-section,
    .mobile-metadata,
    .mobile-preview {
        display: block;
    }
    
    /* Layout do título mobile */
    .mobile-title-section {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .mobile-title-section .news-title {
        font-size: 1.3rem;
        line-height: 1.4;
        margin: 0 0.5rem;
        text-align: center;
        color: #ffffff;
        font-weight: 600;
    }
    
    /* Aumentar tamanho da imagem proporcionalmente */
    .news-image {
        width: 100%;
        max-width: none;
        margin: 0 auto 1rem auto;
    }
    
    .news-image img {
        width: 100%;
        height: auto;
        max-width: 400px;
        margin: 0 auto;
        display: block;
        border-radius: 8px;
    }
    
    /* Metadados centralizados para mobile */
    .mobile-metadata {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
        padding: 1rem;
        text-align: center;
        color: white;
        border-radius: 0 0 8px 8px;
    }
    
    .mobile-datetime,
    .mobile-credit,
    .mobile-agency {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }
    
    .mobile-agency {
        margin-bottom: 0;
    }
    
    .mobile-datetime i,
    .mobile-credit i {
        color: #4A90E2;
        font-size: 0.8rem;
    }
    
    .mobile-agency .editoria-highlight {
        background: #4A90E2;
        color: white;
        padding: 0.3rem 0.8rem;
        border-radius: 15px;
        font-size: 0.75rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Preview mobile */
    .mobile-preview {
        margin-top: 1rem;
    }
    
    .mobile-preview .news-preview {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .mobile-preview .first-paragraph {
        font-size: 0.95rem;
        line-height: 1.5;
        margin: 0 0.5rem 1rem 0.5rem;
        color: #ffffff;
        order: 2;
        max-height: none;
        overflow: visible;
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        -webkit-box-orient: unset;
    }
    
    .mobile-preview .read-more {
        background: #e6b208;
        color: white;
        padding: 0.3rem 0.6rem;
        border-radius: 12px;
        font-weight: bold;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        white-space: nowrap;
        order: 1;
        margin: 0 0 12px 0;
    }
    
    .mobile-preview .read-more:hover {
        color: white;
        background: #d4a007;
        transform: translateY(-1px);
    }
    
    .mobile-preview .read-more i {
        font-size: 0.8rem;
    }
    
    /* Ajustar header grid para mobile */
    .news-header {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    /* Posicionar imagem relativamente para os metadados */
    .news-image {
        position: relative;
    }

    .expand-btn {
        display: none;
    }
    
    .image-credit .mobile-datetime {
        display: none;
    }
    
    .slideshow-container {
        margin: 0 15px;
    }
    
    .slide-btn {
        width: 35px;
        height: 35px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.8rem;
    }
    
    .mobile-title-section .news-title {
        font-size: 1.1rem;
    }
    
    .news-article {
        padding: 1.5rem;
    }
    
    .slideshow {
        height: 120px;
    }
    
    /* Ajustar metadados para telas muito pequenas */
    .mobile-datetime,
    .mobile-credit,
    .mobile-agency {
        font-size: 0.8rem;
    }
    
    .mobile-agency .editoria-highlight {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
}

/* Print Styles */
@media print {
    .banner-section,
    .advertisement,
    .expand-btn,
    footer {
        display: none;
    }
    
    .news-content {
        display: block !important;
    }
    
    body {
        background: white;
    }
    
    .news-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}