/* Responsive Design - Mobile First */
/* Autor: Sistema de Otimização SEO */
/* Data: 2025 */

/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cor-primaria: #667eea;
    --cor-secundaria: #764ba2;
    --cor-secundaria-clara: #f093fb;
    --cor-secundaria-escura: #f5576c;
    --cor-texto: #2c3e50;
    --cor-texto-claro: #7f8c8d;
    --cor-fundo: #f8f9fa;
    --cor-branco: #ffffff;
    --cor-sombra: rgba(0, 0, 0, 0.1);
    --cor-sombra-hover: rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--cor-texto);
    background: var(--cor-fundo);
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 0px;
    border-radius: 0px;
}

/* Header Styles */
.main-header {
  background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
  padding: 0px 0;
  width: 100vw; /* <- muda para 100vw */
  margin-left: calc(-50vw + 50%); /* <- garante largura total mesmo se estiver dentro de um container centralizado */
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}



.header-content {
    position: relative;
    z-index: 1;
    text-align: none;
}

/* Zerar completamente o espaço do topo */
html, body {
  margin: 0;
  padding: 0;
}


.main-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.search-section {
  margin-top: 20px;
  position: relative;
  z-index: 10;
  padding: 0 15px; /* espaçamento lateral */
} 

.search-box {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
  background: var(--cor-branco);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-btn {
    padding: 12px 16px;
    border: none;
    background: var(--cor-primaria);
    color: var(--cor-branco);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.search-btn:hover {
    background: var(--cor-secundaria);
}

/* Navigation Styles */
.main-nav {
    background: var(--cor-branco);
    box-shadow: 0 2px 10px var(--cor-sombra);
    position: sticky; 
    top: 0;
    z-index: 999;
}

.nav-categories {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-categories::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--cor-texto-claro);
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-width: 80px;
    white-space: nowrap;
}

.nav-text {
    color: #000000; /* ou a cor que quiser */
}
.nav-item:hover,
.nav-item.active {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    color: var(--cor-branco);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--cor-sombra-hover);
}

.nav-item:hover .nav-text {
    color: #ffffff; /* branco */
}

.nav-categories .nav-item.active .nav-text,
.nav-categories .nav-item.active .nav-icon {
    color: #ffffff !important;
}


.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 30px 0;
    min-height: 60vh;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: var(--cor-texto);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--cor-primaria), var(--cor-secundaria));
    border-radius: 2px;
}

/* Subtemas Grid */
.subtemas-section {
    margin-bottom: 40px;
}

.subtemas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.subtema-card {
    background: var(--cor-branco);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px var(--cor-sombra);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.subtema-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--cor-sombra-hover);
    border-color: var(--cor-primaria);
}

.subtema-card.active {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    color: var(--cor-branco);
}

.subtema-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.subtema-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtema-count {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Frases Section */
.frases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.frases-controls {
    display: flex;
    gap: 10px;
}

.btn-control {
    padding: 10px 16px;
    border: none;
    background: var(--cor-primaria);
    color: var(--cor-branco);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-control:hover {
    background: var(--cor-secundaria);
    transform: translateY(-2px);
}

/* Frases Container */
@media (min-width: 800px) {
  .frases-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .bloco-frase {
    max-width: 750px;
    width: 70%;
    margin-bottom: 50px;
  }

  .bloco-frase img {
    max-width: 100%;
    height: auto;
    aspect-ratio: 1.91 / 1;
    object-fit: cover;
    border-radius: 0px;
  }
}

.frase-card {
    background: var(--cor-branco);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px var(--cor-sombra);
    transition: var(--transition);
    cursor: pointer;
}

.frase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--cor-sombra-hover);
}

.frase-imagem {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
    border-radius: 0px;
}

.frase-card:hover .frase-imagem {
    transform: scale(1.05);
}

/* Responsividade aprimorada para todas as imagens */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Imagens específicas do site */
.categoria-card img,
.subcategoria-card img,
.frase-destaque img,
.hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: var(--border-radius);
}

/* Logo responsiva */
.logo-section img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    position: relative; /* ou absolute/fixed/sticky */
    z-index: 10;
}


/* Ajustes responsivos específicos para imagens */
@media (max-width: 1024px) {
    .frase-imagem {
        height: 180px;
    }
    
    .logo-section img {
        max-height: 55px;
    }
}

@media (max-width: 768px) {
    .frase-imagem {
        height: 160px;
    }
    
    .logo-section img {
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .frase-imagem {
        height: 140px;
    }
    
    .logo-section img {
        max-height: 45px;
    }
}

@media (max-width: 360px) {
    .frase-imagem {
        height: 120px;
    }
    
    .logo-section img {
        max-height: 40px;
    }
}

.frase-content {
    padding: 20px;
}

.frase-texto {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--cor-texto);
    font-weight: 500;
}

.frase-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--cor-texto-claro);
}

.frase-categoria,
.frase-subtema {
    background: var(--cor-fundo);
    padding: 4px 8px;
    border-radius: 0px;
    font-weight: 500;
}

/* Navigation */
.frases-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.nav-btn {
    padding: 12px 20px;
    border: none;
    background: var(--cor-primaria);
    color: var(--cor-branco);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.nav-btn:hover:not(:disabled) {
    background: var(--cor-secundaria);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background: var(--cor-texto-claro);
    cursor: not-allowed;
    transform: none;
}

.nav-info {
    font-weight: 600;
    color: var(--cor-texto);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--cor-branco);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--cor-texto-claro);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--cor-fundo);
    color: var(--cor-texto);
}

.modal-frase {
    position: relative;
}

.modal-imagem {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.modal-texto {
    padding: 25px;
}

.modal-frase .frase-texto {
    font-size: 1.3rem;
    line-height: 1.7;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Share Buttons */
.share-buttons {
    padding: 0 25px 25px;
}

.share-buttons h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--cor-texto);
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
}

.share-btn.whatsapp {
    background: #25D366;
    color: var(--cor-branco);
}

.share-btn.facebook {
    background: #1877F2;
    color: var(--cor-branco);
}

.share-btn.twitter {
    background: #1DA1F2;
    color: var(--cor-branco);
}

.share-btn.pinterest {
    background: #E60023;
    color: var(--cor-branco);
}

.share-btn.copy {
    background: var(--cor-fundo);
    color: var(--cor-texto);
    border: 2px solid var(--cor-primaria);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--cor-sombra-hover);
}

.share-icon {
    font-size: 1.1rem;
}

/* Modal Navigation */
.modal-navigation {
    display: flex;
    justify-content: space-between;
    padding: 0 25px 25px;
    gap: 15px;
}

.modal-nav-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: var(--cor-primaria);
    color: var(--cor-branco);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.modal-nav-btn:hover {
    background: var(--cor-secundaria);
}

/* Footer */
.main-footer {
    background: #000000; /* fundo preto */
    color: #ffffff;      /* texto branco */
    padding: 0px 0 0px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: var(--cor-branco);
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--cor-branco);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    opacity: 1;
    color: var(--cor-primaria);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--cor-fundo);
    border-top: 4px solid var(--cor-primaria);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Breakpoints */

/* Tablets */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.7rem;
    }
    
    .main-subtitle {
        font-size: 1rem;
    }
    
    .nav-categories {
        gap: 4px;
        padding: 8px 0;
    }
    
    .nav-item {
        padding: 10px 12px;
        min-width: 70px;
    }
    
    .nav-icon {
        font-size: 1.3rem;
    }
    
    .nav-text {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .subtemas-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .frases-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .frases-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .frases-controls {
        justify-content: center;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-imagem {
        height: 200px;
    }
    
    .share-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .main-header {
        padding: 15px 0;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .main-subtitle {
        font-size: 0.9rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .nav-item {
        padding: 8px 10px;
        min-width: 60px;
    }
    
    .nav-icon {
        font-size: 1.2rem;
    }
    
    .nav-text {
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .subtemas-grid {
        grid-template-columns: 1fr;
    }
    
    .subtema-card {
        padding: 15px;
    }
    
    .frase-card {
        margin-bottom: 15px;
    }
    
    .frase-imagem {
        height: 180px;
    }
    
    .frase-content {
        padding: 15px;
    }
    
    .frase-texto {
        font-size: 1rem;
    }
    
    .frases-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .modal-texto {
        padding: 20px;
    }
    
    .modal-frase .frase-texto {
        font-size: 1.1rem;
    }
    
    .share-buttons {
        padding: 0 20px 20px;
    }
    
    .share-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-navigation {
        flex-direction: column;
        padding: 0 20px 20px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .main-title {
        font-size: 1.3rem;
    }
    
    .nav-categories {
        gap: 2px;
    }
    
    .nav-item {
        padding: 6px 8px;
        min-width: 55px;
    }
    
    .nav-text {
        font-size: 0.7rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .btn-control {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .frase-imagem,
    .modal-imagem {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --cor-texto: #e8eaed;
        --cor-texto-claro: #9aa0a6;
        --cor-fundo: #202124;
        --cor-branco: #303134;
        --cor-sombra: rgba(0, 0, 0, 0.3);
        --cor-sombra-hover: rgba(0, 0, 0, 0.5);
    }
    
    .search-input {
        background: var(--cor-branco);
        color: var(--cor-texto);
    }
    
    .modal-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .main-nav,
    .frases-controls,
    .frases-navigation,
    .share-buttons,
    .modal-navigation,
    .main-footer {
        display: none !important;
    }
    
    .frase-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .main-header {
        background: none !important;
        color: #000 !important;
    }
}

/* === BIO AUTORES GLOBAL === */
.bio-autor {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center; /* centraliza horizontalmente */
  gap: 20px;
  margin: 60px auto;
  padding: 30px;
  max-width: 900px; /* limita largura máxima no desktop */
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.bio-autor-foto {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.bio-autor-texto {
  flex: 1;
}

.bio-autor-texto h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: #333;
}

.bio-autor-texto p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 12px;
}

.bio-autor-link {
  display: inline-block;
  padding: 8px 16px;
  background-color: #6f42c1;
  color: #fff;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
}

/* Responsivo para mobile */
@media (max-width: 768px) {
  .bio-autor {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 40px 20px;
  }

  .bio-autor-foto {
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
  }
}
.autor-header-central {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
}

.autor-foto-central {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.autor-info-central h1 {
  font-size: 2rem;
  margin: 0;
  color: #fff;
}

.subtitulo-autor {
  font-size: 1rem;
  color: #f0f0f0;
  margin-top: 6px;
}

.meta-autoria {
  font-size: 0.9rem;
  color: #ddd;
  margin-top: 8px;
}

.meta-autoria i {
  margin-right: 5px;
}

/* Responsivo */
@media (max-width: 768px){
  .autor-header-central{
    /* se for flex, tudo em coluna */
    display: flex;
    flex-direction: column;
    padding: 0 16px;
  }

  .autor-foto-central {
    width: 80px;
    height: 80px;
  }

  .autor-info-central h1 {
    font-size: 1.6rem;
  }
}
