/*
Theme Name: Instituto Felicidade
Theme URI: https://institutofelicidade.org.br/
Author: Auria
Description: Tema personalizado para o Instituto Felicidade - Humanizando o cuidado, transformando vidas
Version: 1.0.0
Text Domain: instituto-felicidade
*/

/* ============================================
   INSTITUTO FELICIDADE — DESIGN SYSTEM
   ============================================ */

:root {
  --azul: #1A3A5C;
  --azul-med: #2B5F8A;
  --azul-claro: #EBF2FA;
  --verde: #2D6A4F;
  --verde-med: #40916C;
  --verde-suave: #D8F3DC;
  --ambar: #C77D1A;
  --ambar-claro: #FFF3E0;
  --creme: #FAF7F2;
  --branco: #FFFFFF;
  --texto: #1C2B3A;
  --texto-med: #4A5568;
  --texto-suave: #718096;
  --borda: #DDE3EB;
  --f-display: 'Playfair Display', Georgia, serif;
  --f-corpo: 'DM Sans', system-ui, sans-serif;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--f-corpo);
  background: var(--creme);
  color: var(--texto);
  line-height: 1.7;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-content {
  margin: 0 auto;  
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.1rem 0;
  transition: all 0.3s ease;
  background: rgba(250, 247, 242, 0.96);
}

.site-header.scrolled {
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--borda);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.site-header.scrolled .logo {
  color: var(--azul);
}

.logo-nariz {
  width: 36px;
  height: 36px;
  background: var(--ambar);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Menu */
.nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav a {
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 50px;
  color: var(--texto-med);
  text-decoration: none;
  transition: all 0.18s;
}

.site-header.scrolled .nav a {
  color: var(--texto-med);
}

.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.site-header.scrolled .nav a:hover {
  color: var(--azul);
  background: var(--azul-claro);
}

.btn-doar {
  background: var(--ambar) !important;
  color: #fff !important;
  padding: 0.55rem 1.25rem !important;
  box-shadow: 0 2px 10px rgba(199, 125, 26, 0.3);
}

.btn-doar:hover {
  background: #b06816 !important;
}

#menu-item-1947 {
  background: var(--ambar) !important;
  color: #fff !important;
  padding: 0.55rem 1.25rem !important;
  box-shadow: 0 2px 10px rgba(199, 125, 26, 0.3);
  border-radius: 50px;
  margin-top: -10px;
}

#menu-item-1947:hover {
  background: #b06816 !important;
}

/* ============================================
   MENU MOBILE CORRIGIDO
   ============================================ */

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
}

/* Menu Mobile Panel */
.menu-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: #1A3A5C;
    z-index: 1000;
    padding: 0;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
}

.menu-mobile.open {
    right: 0;
}

.menu-mobile-inner {
    padding: 80px 24px 40px;
}

/* Botão fechar */
.close-menu {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Lista do menu mobile */
.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    margin-bottom: 8px;
}

.mobile-menu-list a {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.mobile-menu-list a:hover {
    color: #C77D1A;
    padding-left: 8px;
}

/* Botão Doar no mobile */
.btn-doar-mobile {
    background: #C77D1A;
    text-align: center;
    border-radius: 50px;
    margin-top: 30px;
    padding: 14px 20px !important;
    color: #fff !important;
    font-weight: 600;
    display: block;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-doar-mobile:hover {
    background: #b06816;
    transform: translateY(-2px);
}

/* Hamburguer button */
.hamburguer {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    z-index: 1001;
    position: relative;
}

.hamburguer span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.site-header.scrolled .hamburguer span {
    background: #1A3A5C;
}

/* Hamburguer animado (vira X quando aberto) */
.hamburguer.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburguer.active span:nth-child(2) {
    opacity: 0;
}

.hamburguer.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Responsivo - mostra o hamburguer no mobile */
@media (max-width: 768px) {
    .hamburguer {
        display: flex;
    }
    
    .nav {
        display: none;
    }
}

/* Ajuste para o header no mobile */
@media (max-width: 768px) {
    .site-header {
        padding: 0.8rem 0;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo-nariz {
        width: 32px;
        height: 32px;
    }
}

/* Main Content */
.site-main {  
  min-height: 70vh;
}

/* Páginas Internas */
.page-header {
  background: var(--azul);
  color: #fff;
  padding: 40px 0 60px;
  text-align: center;
}

.page-title {
  font-family: var(--f-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  margin-bottom: 16px;
}

.page-content {
  padding: 0;
}

.page-content h2 {
  font-family: var(--f-display);
  font-size: 28px;
  color: var(--azul);
  margin: 32px 0 16px;
}

.page-content h3 {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--azul);
  margin: 24px 0 12px;
}

.page-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.page-content a {
  color: var(--ambar);
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.22s ease;
  border: 2px solid transparent;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--verde);
  color: #fff;
}

.btn-primary:hover {
  background: var(--verde-med);
}

.btn-secondary {
  background: transparent;
  border-color: var(--azul);
  color: var(--azul);
}

.btn-secondary:hover {
  background: var(--azul);
  color: #fff;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.card {
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: 24px;
  padding: 32px;
  transition: all 0.26s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(26, 58, 92, 0.12);
}

/* Footer */
.site-footer {
  background: var(--texto);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 32px;
}

.footer-logo {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

/* Responsivo */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .hamburguer {
    display: flex;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .hero-grid-mobile {
        grid-template-columns: 1fr !important;
    }
    
	.hero-card-mobile {
        display: none;
    }
}

/* ============================================
   RESPONSIVIDADE COMPLETA
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-grid-instituto {
        gap: 40px;
    }
    
    .hero-h1-instituto {
        font-size: 42px;
    }
}

/* Mobile (até 768px) */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 16px;
    }
    
    /* Header */
    .site-header {
        padding: 0.8rem 0;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo-nariz {
        width: 32px;
        height: 32px;
    }
    
    /* Hero */
    .hero-grid-instituto {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }
    
    .hero-h1-instituto {
        font-size: 32px;
    }
    
    .hero-sub-instituto {
        font-size: 16px;
        max-width: 100%;
    }
    
    .hero-ctas-instituto {
        justify-content: center;
    }
    
    .hero-stats-instituto {
        justify-content: center;
    }
    
    /* Esconde o card lateral no mobile */
    .hero-card {
        display: none;
    }
    
    /* Grids */
    .grid-2col,
    .grid-3col,
    .grid-4col {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
    
    /* Cards */
    .card, .pilar-card-instituto, .projeto-card {
        padding: 20px;
    }
    
    /* Seções */
    .section {
        padding: 50px 0;
    }
    
    /* Títulos */
    .section-h2, .page-title, .hero-h1-instituto {
        font-size: 28px;
    }
    
    /* Botões */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .footer-col h4:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    /* Páginas internas */
    .page-header {
        padding: 30px 0 40px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .page-content {
        padding: 0;
    }
    
    .page-content h2 {
        font-size: 24px;
    }
    
    .page-content h3 {
        font-size: 20px;
    }
    
    /* Formulários */
    input, textarea, select {
        font-size: 16px; /* Evita zoom no iOS */
    }
}

/* Mobile pequeno (até 480px) */
@media (max-width: 480px) {
    .hero-h1-instituto {
        font-size: 28px;
    }
    
    .section-h2 {
        font-size: 24px;
    }
    
    .hero-ctas-instituto {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .footer-logo-img {
        max-width: 140px;
        margin: 0 auto;
    }
}

/* Ajustes para telas muito grandes */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
}

/* Prevenir quebra de layout */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Melhorar toque em elementos interativos no mobile */
@media (max-width: 768px) {
    a, button, .btn, .nav a, .month-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}