/* Reset e Configurações Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #f4f4f4;
    --text-color: #333;
    --header-bg: #2c3e50;
    --card-bg: white;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --card-hover-shadow: 0 10px 25px rgba(0,0,0,0.2);
    --primary-color: #3498db;
    --secondary-color: #e74c3c;
    --border-color: #e0e0e0;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --header-bg: #0d1b2a;
    --card-bg: #2d3748;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.3);
    --card-hover-shadow: 0 10px 25px rgba(0,0,0,0.5);
    --primary-color: #4fc3f7;
    --secondary-color: #ff6b6b;
    --border-color: #4a5568;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--header-bg);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

#site-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.logo h1 {
    font-size: 1.5rem;
    color: white;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.pin {
    font-size: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--primary-color);
}

/* Interruptor de Tema */
.theme-toggle {
    margin-left: auto;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    z-index: 2;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.theme-icons {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
}

.sun, .moon {
    font-size: 14px;
    transition: opacity 0.3s;
}

.sun {
    opacity: 0;
}

.moon {
    opacity: 1;
}

input:checked ~ .theme-icons .sun {
    opacity: 1;
}

input:checked ~ .theme-icons .moon {
    opacity: 0;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* Banner */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 120px 0 60px;
    margin-top: 70px;
}

.banner h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Notícias */
.noticias {
    padding: 60px 0;
}

.noticias h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--text-color);
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.noticia-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.noticia-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.noticia-imagem img,
.noticia-video video {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.noticia-video video {
    background: #000;
}

.categoria {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.noticia-imagem,
.noticia-video {
    position: relative;
}

/* Assinatura da Foto */
.assinatura-foto {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-style: italic;
    z-index: 2;
}

.noticia-conteudo {
    padding: 1.5rem;
}

.noticia-conteudo h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.data {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.resumo {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ler-mais {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.ler-mais:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 2% auto;
    padding: 30px;
    border-radius: 15px;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    background: rgba(255,255,255,0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close:hover {
    background: var(--secondary-color);
    color: white;
}

.noticia-completa {
    padding: 20px 0;
}

.noticia-completa h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.3;
}

.imagem-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 25px;
}

.imagem-modal {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
}

/* Assinatura no Modal */
.imagem-container::after {
    content: "Foto: Divulgação";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-style: italic;
}

.video-modal {
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: 400px;
    border-radius: 10px;
    margin: 0 auto 25px;
    display: block;
    background: #000;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.conteudo-modal {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-color);
    text-align: justify;
}

.conteudo-modal p {
    margin-bottom: 1.5rem;
}

.conteudo-modal h3 {
    color: var(--text-color);
    margin: 2rem 0 1rem;
    font-size: 1.4rem;
}

.conteudo-modal ul, .conteudo-modal ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.conteudo-modal li {
    margin-bottom: 0.5rem;
}

/* Footer Atualizado */
.footer {
    background: var(--header-bg);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.location-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-link {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
    border-radius: 5px;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* Estilos para o QR Code Seguro */
.qr-code-container {
    position: relative;
    display: inline-block;
    text-align: center;
}

.qr-trigger {
    cursor: pointer;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
}

.qr-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.dev-label {
    font-weight: 500;
    font-size: 0.95rem;
}

.qr-hint {
    font-size: 0.75rem;
    opacity: 0.6;
    color: #ccc;
}

.qr-code-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-15px);
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    border: 2px solid var(--primary-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1000;
    min-width: 220px;
    text-align: center;
}

/* Mostrar QR code no hover (desktop) */
.no-touch-device .qr-code-container:hover .qr-code-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-20px);
}

/* Mostrar QR code no active (mobile) */
.qr-code-container.active .qr-code-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-20px);
}

/* Overlay para mobile */
.qr-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1998;
}

.qr-code-container.active ~ .qr-overlay {
    display: block;
}

.qr-security-notice {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.qr-code {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.developer-name {
    font-size: 0.85rem;
    margin: 8px 0;
    color: var(--text-color);
    font-weight: 600;
}

.qr-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.whatsapp-btn {
    display: inline-block;
    background: #25D366;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.qr-close-btn {
    background: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qr-close-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.qr-timer {
    margin-top: 10px;
    padding: 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 6px;
}

.timer-text {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.8;
}

.timer-count {
    font-weight: bold;
    color: var(--secondary-color);
}

/* Responsividade para o QR Code */
@media (max-width: 768px) {
    .qr-code-popup {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        z-index: 1999;
        width: 90%;
        max-width: 280px;
    }
    
    .qr-code-container.active .qr-code-popup {
        transform: translate(-50%, -50%) scale(1);
    }
    
    .qr-trigger {
        min-width: 180px;
        padding: 10px 14px;
    }
}

/* Esconder hint em mobile pequeno */
@media (max-width: 480px) {
    .qr-hint {
        display: none;
    }
    
    .qr-trigger {
        min-width: 160px;
        padding: 8px 12px;
    }
    
    .dev-label {
        font-size: 0.9rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    animation: fadeIn 0.3s ease-out;
}

.noticia-card {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar personalizada para o modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Dark mode scrollbar */
[data-theme="dark"] .modal-content::-webkit-scrollbar-track {
    background: #2d3748;
}

[data-theme="dark"] .modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

/* Responsividade */
@media (max-width: 1024px) {
    .location-header {
        display: none;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--header-bg);
        transition: left 0.3s;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }

    .nav.active {
        left: 0;
    }

    .nav ul {
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
    }

    .theme-toggle {
        margin-left: 0;
    }

    .banner h2 {
        font-size: 2rem;
    }

    .noticias-grid {
        grid-template-columns: 1fr;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .header .container {
        padding: 0 15px;
        gap: 15px;
    }

    /* Ajuste de imagem para mobile */
    .noticia-imagem img,
    .noticia-video video {
        height: 220px;
    }

    /* Modal Mobile */
    .modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
        max-height: 85vh;
    }

    .noticia-completa h2 {
        font-size: 1.5rem;
        text-align: left;
    }

    .imagem-container {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .imagem-modal {
        max-height: 250px;
    }

    .video-modal {
        max-width: 100%;
        max-height: 300px;
        margin-bottom: 20px;
    }

    .conteudo-modal {
        font-size: 1rem;
        line-height: 1.6;
        text-align: left;
    }

    .close {
        right: 15px;
        top: 10px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }

    /* Assinatura Mobile */
    .assinatura-foto {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    .imagem-container::after {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .banner {
        padding: 100px 0 40px;
    }

    .banner h2 {
        font-size: 1.5rem;
    }

    .noticias h2 {
        font-size: 1.5rem;
    }

    .noticia-conteudo {
        padding: 1rem;
    }

    .noticias-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Ajuste de imagem para mobile pequeno */
    .noticia-imagem img,
    .noticia-video video {
        height: 200px;
    }

    /* Modal Mobile Pequeno */
    .modal-content {
        margin: 10% auto;
        padding: 15px;
        width: 95%;
        max-height: 80vh;
    }

    .noticia-completa {
        padding: 10px 0;
    }

    .noticia-completa h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .imagem-modal {
        max-height: 200px;
    }

    .video-modal {
        max-height: 250px;
        margin-bottom: 15px;
    }

    .conteudo-modal {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .close {
        right: 10px;
        top: 5px;
        width: 30px;
        height: 30px;
        font-size: 1.3rem;
    }

    /* Assinatura Mobile Pequeno */
    .assinatura-foto {
        font-size: 0.6rem;
        padding: 2px 4px;
        bottom: 5px;
        right: 5px;
    }

    .imagem-container::after {
        font-size: 0.65rem;
        padding: 2px 4px;
        bottom: 5px;
        right: 5px;
    }
}