/* Tipografia */
.section-title {
    font-size: var(--font-size-250);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

/* HERO SLIDER */

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    margin-bottom: 4rem;
}

.hero-slider-container {
    position: relative;
    height: 100%;
}

.hero-slides {
    position: relative;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-slide.active {
    opacity: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(59, 130, 246, 0.6));
    z-index: 2;
}

.hero-content {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    position: relative;
    z-index: 3;
    width: 100%;
    color: var(--text-white);
    padding: 2rem 0;
    margin-top: auto;
}

.hero-text {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: var(--font-size-300);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-title a {
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-title a:hover {
    color: #93c5fd;
}

.hero-subtitle {
    font-size: var(--font-size-150);
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
}

/* Controles do Hero Slider */
.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--text-white);
    font-size: var(--font-size-200);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 4;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 2rem;
}

.hero-next {
    right: 2rem;
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 4;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-indicator.active {
    background: var(--bg-primary);
    transform: scale(1.2);
}

/* LINKS INSTITUCIONAIS */

.institutional-links {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.institutional-links::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20" fill="none"><path d="M0,10 Q25,0 50,10 T100,10 V20 H0 Z" fill="rgba(255,255,255,0.1)"/></svg>') repeat-x;
    background-size: 100px 20px;
    opacity: 0.5;
}

.institutional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.institutional-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.institutional-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.institutional-card:hover::before {
    left: 100%;
}

.institutional-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-orange, #ff6b35);
}

/* Ícones específicos para cada tipo */
.institutional-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-150);
    color: var(--text-white);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.institutional-card:hover .institutional-icon {
    transform: scale(1.1);
}

/* Cores específicas para cada card */
.institutional-card.prefeitura .institutional-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.institutional-card.camara .institutional-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.institutional-card.diario .institutional-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.institutional-card.site-antigo .institutional-icon {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: var(--text-tertiary);
}

/* Conteúdo do card */
.institutional-content {
    flex-grow: 1;
}

.institutional-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: var(--font-size-125);
    font-weight: 600;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.institutional-content p {
    margin: 0;
    font-size: var(--font-size-075);
    color: var(--text-tertiary);
    line-height: 1.4;
}

.institutional-card:hover .institutional-content h3 {
    color: var(--primary-orange, #ff6b35);
}

/* Seta de link externo */
.institutional-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-075);
    color: var(--text-tertiary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.institutional-card:hover .institutional-arrow {
    background: var(--primary-orange, #ff6b35);
    color: var(--text-white);
    transform: translateX(4px);
}

/* Responsividade */

/* Tablets */
@media (max-width: 768px) {
    .institutional-links {
        padding: 2.5rem 0;
    }
    
    .institutional-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.25rem;
    }
    
    .institutional-card {
        padding: 1.25rem;
    }
    
    .institutional-icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-125);
    }
    
    .institutional-content h3 {
        font-size: var(--font-size-100);
    }
    
    .institutional-content p {
        font-size: var(--font-size-075);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .institutional-links {
        padding: 2rem 0;
    }
    
    .institutional-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .institutional-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .institutional-icon {
        width: 45px;
        height: 45px;
        font-size: var(--font-size-125);
    }
    
    .institutional-content h3 {
        font-size: var(--font-size-100);
    }
    
    .institutional-content p {
        font-size: var(--font-size-075);
    }
    
    .institutional-arrow {
        width: 20px;
        height: 20px;
        font-size: var(--font-size-075);
    }
}

/* Animações */

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.institutional-card {
    animation: slideInFromLeft 0.6s ease-out forwards;
}

/* Delay escalonado para cada card */
.institutional-card:nth-child(1) { animation-delay: 0.1s; }
.institutional-card:nth-child(2) { animation-delay: 0.2s; }
.institutional-card:nth-child(3) { animation-delay: 0.3s; }
.institutional-card:nth-child(4) { animation-delay: 0.4s; }

/* Estado inicial para animação */
.institutional-card {
    opacity: 0;
    transform: translateX(-30px);
}

/* Acessibilidade */

.institutional-card:focus {
    outline: 2px solid var(--primary-orange, #ff6b35);
    outline-offset: 4px;
}

.institutional-card:focus:not(:focus-visible) {
    outline: none;
}

/* Efeitos */

/* Efeito de ripple ao clicar */
.institutional-card {
    position: relative;
    overflow: hidden;
}

.institutional-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    pointer-events: none;
}

.institutional-card:active::after {
    width: 200px;
    height: 200px;
}

/* Gradiente sutil de fundo */
.institutional-links {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(76, 175, 80, 0.1) 0%, transparent 50%);
}

/* SERVICES SECTION */

.services {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.services-grid a {
    text-decoration: none;
    color: inherit;
}

.service-card {
    background: var(--bg-primary);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: var(--font-size-300);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.service-card h3 {
    font-size: var(--font-size-150);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary)
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* GALERIA DE POSTS */

.blog-posts {
    padding: 4rem 0;
    background: #f8f9fa;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Thumbnail da postagem */
.post-thumb {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #e9ecef;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

.post-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-white);
}

.placeholder-icon {
    font-size: var(--font-size-300);
    opacity: 0.8;
}

/* Overlay do post */
.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover .post-overlay {
    opacity: 1;
}

.read-icon {
    font-size: var(--font-size-200);
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

/* Conteúdo do post */
.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-content h3 {
    margin: 0 0 1rem 0;
    font-size: var(--font-size-125);
    line-height: 1.4;
    font-weight: 600;
}

.post-content h3 a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content h3 a:hover {
    color: var(--primary-orange, #ff6b35);
}

/* Meta informações */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: var(--font-size-075);
    color: #6c757d;
    flex-wrap: wrap;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-date::before {
    content: "📅";
    font-size: var(--font-size-075);
}

.sutia-noticia {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: var(--font-size-075);
    font-weight: 500;
}

/* Excerpt */
.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Botão "Leia Mais" */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-orange, #ff6b35);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-075);
    margin-top: auto;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.read-more:hover {
    color: var(--primary-green, #4caf50);
    transform: translateX(4px);
}

.read-more .arrow {
    transition: transform 0.3s ease;
}

.read-more:hover .arrow {
    transform: translateX(4px);
}

/* Ações dos posts */
.posts-actions {
    text-align: center;
    margin-top: 3rem;
}

.btn-view-more {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-orange, #ff6b35) 0%, var(--primary-green, #4caf50) 100%);
    color: var(--text-white);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-view-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

/* Estado quando não há posts */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: var(--font-size-125);
}

/* Responsividade */

/* Tablets */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .post-thumb {
        height: 200px;
    }
    
    .post-content {
        padding: 1.25rem;
    }
    
    .post-content h3 {
        font-size: var(--font-size-125);
    }
    
    .blog-posts {
        padding: 3rem 0;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .post-thumb {
        height: 180px;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-meta {
        font-size: var(--font-size-075);
        gap: 0.75rem;
    }
    
    .sutia-noticia {
        font-size: var(--font-size-075);
        padding: 0.2rem 0.4rem;
    }
    
    .blog-posts {
        padding: 2rem 0;
    }
    
    .btn-view-more {
        padding: 0.875rem 1.5rem;
        font-size: var(--font-size-100);
    }
}

/* Animações e efeitos */

/* Animação de entrada */
.post-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Delay escalonado para animação */
.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }
.post-card:nth-child(6) { animation-delay: 0.6s; }
.post-card:nth-child(7) { animation-delay: 0.7s; }
.post-card:nth-child(8) { animation-delay: 0.8s; }
.post-card:nth-child(9) { animation-delay: 0.9s; }

/* Estados iniciais para animação */
.post-card {
    opacity: 0;
    transform: translateY(30px);
}

/* Efeito de loading skeleton (opcional) */
.post-card.loading {
    position: relative;
    overflow: hidden;
}

.post-card.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* Animações */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Acessibilidade */

.screen-reader-text {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Focus states */
button:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Responsividade */

@media (max-width: 1024px) {
    .hero-slider {
        height: 60vh;
        min-height: 400px;
    }

    .hero-title {
        font-size: var(--font-size-250);
    }

    .section-title {
        font-size: var(--font-size-200);
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .hero-slider {
        height: 50vh;
        min-height: 350px;
    }

    .hero-title {
        font-size: var(--font-size-200);
    }

    .hero-subtitle {
        font-size: var(--font-size-125);
    }

    .hero-excerpt {
        font-size: var(--font-size-100);
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .hero-prev,
    .hero-next {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-150);
    }

    .hero-prev {
        left: 1rem;
    }

    .hero-next {
        right: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .services {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: var(--font-size-175);
    }

    .section-title {
        font-size: var(--font-size-175);
    }

    .service-card {
        padding: 2rem 1.5rem;
    }
}