/* =====================================================================
   SGC Médico — Site Público
   Fonte: Nunito (títulos em peso 800/900, texto em 400/600)
   Adaptado do layout original, tornado 100% dinâmico e responsivo.
   ===================================================================== */

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

:root {
    --primary: #1E40AF;
    --primary-hover: #1E3A8A;
    --accent: #3B82F6;
    --background: #FFFFFF;
    --foreground: #1F2937;
    --secondary: #F3F4F6;
    --border: #E5E7EB;
    --muted: #6B7280;
}

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }

/* ---------------------------------------------------------------- */
/* Navegação                                                          */
/* ---------------------------------------------------------------- */
nav {
    position: sticky; top: 0; z-index: 50;
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.nav-content { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.nav-logo { display: flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; font-weight: 900; color: var(--primary); }
.nav-logo .logo-mark { width: 2.1rem; height: 2.1rem; border-radius: 0.6rem; overflow: hidden; background: rgba(30,64,175,0.1); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.nav-logo .logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav-logo svg { width: 1.5rem; height: 1.5rem; fill: var(--primary); }

.nav-menu { display: none; gap: 2rem; list-style: none; align-items: center; }
@media (min-width: 900px) { .nav-menu { display: flex; } }
.nav-menu a {
    font-size: 0.9rem; font-weight: 700; color: var(--muted); text-decoration: none;
    cursor: pointer; transition: color 0.3s; border-bottom: 2px solid transparent; padding-bottom: 0.25rem;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); border-bottom-color: var(--primary); }

.nav-toggle {
    display: flex; width: 2.4rem; height: 2.4rem; border-radius: 0.5rem;
    border: 1px solid var(--border); background: var(--background);
    align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer;
}
@media (min-width: 900px) { .nav-toggle { display: none; } }

.nav-mobile-menu {
    display: none; flex-direction: column; gap: 0.25rem;
    padding: 1rem 0 1.25rem; border-top: 1px solid var(--border);
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a { padding: 0.65rem 0.25rem; font-weight: 700; color: var(--foreground); text-decoration: none; }

/* ---------------------------------------------------------------- */
/* Botões                                                              */
/* ---------------------------------------------------------------- */
.btn {
    padding: 0.75rem 1.5rem; border-radius: 0.6rem; font-weight: 800;
    text-decoration: none; cursor: pointer; border: none; transition: all 0.3s;
    font-size: 0.95rem; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(30,64,175,0.3); }
.btn-outline { background-color: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background-color: var(--secondary); }

/* ---------------------------------------------------------------- */
/* Hero                                                                */
/* ---------------------------------------------------------------- */
.hero { position: relative; padding: 4rem 0; overflow: hidden; }
@media (min-width: 768px) { .hero { padding: 7rem 0; } }
.hero-content { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 768px) { .hero-content { grid-template-columns: 1fr 1fr; } }
.hero-eyebrow { color: var(--primary); font-weight: 800; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.75rem; }
.hero-text h1 { font-size: 2.5rem; font-weight: 900; line-height: 1.15; margin-bottom: 1.5rem; color: var(--foreground); }
@media (min-width: 768px) { .hero-text h1 { font-size: 3.5rem; } }
.hero-text p { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.75rem; line-height: 1.8; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image { border-radius: 0.75rem; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.1); height: 22rem; background: var(--secondary); }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

.divider { height: 1px; background: linear-gradient(to right, transparent, var(--border), transparent); }

/* ---------------------------------------------------------------- */
/* Seções (genérico)                                                   */
/* ---------------------------------------------------------------- */
section { padding: 4rem 0; }
@media (min-width: 768px) { section { padding: 6.5rem 0; } }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label { color: var(--primary); font-weight: 800; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.section-title { font-size: 2rem; font-weight: 900; color: var(--foreground); margin-bottom: 1rem; }
@media (min-width: 768px) { .section-title { font-size: 2.75rem; } }
.section-description { color: var(--muted); max-width: 42rem; margin: 0 auto; font-size: 1.05rem; }

/* ---------------------------------------------------------------- */
/* Diretoria                                                           */
/* ---------------------------------------------------------------- */
#diretoria { background-color: var(--secondary); }
.directors-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .directors-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .directors-grid { grid-template-columns: repeat(3,1fr); } }
.director-card { background-color: white; padding: 1.5rem; border-radius: 0.75rem; border: 1px solid var(--border); transition: box-shadow 0.3s, transform 0.3s; }
.director-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.08); transform: translateY(-3px); }
.director-photo { width: 3.5rem; height: 3.5rem; border-radius: 50%; margin-bottom: 1rem; object-fit: cover; background: rgba(30,64,175,0.1); }
.director-icon { width: 3.5rem; height: 3.5rem; background-color: rgba(30,64,175,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.director-icon svg { width: 1.6rem; height: 1.6rem; color: var(--primary); fill: var(--primary); }
.director-name { font-size: 1.1rem; font-weight: 800; color: var(--foreground); margin-bottom: 0.35rem; }
.director-position { color: var(--primary); font-weight: 700; font-size: 0.875rem; }
.director-bio { color: var(--muted); font-size: 0.85rem; margin-top: 0.6rem; }

/* ---------------------------------------------------------------- */
/* História                                                             */
/* ---------------------------------------------------------------- */
.history-content { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 768px) { .history-content { grid-template-columns: 1fr 1fr; } }
.history-image { border-radius: 0.75rem; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.1); height: 22rem; order: 2; background: var(--secondary); }
@media (min-width: 768px) { .history-image { order: 1; } }
.history-image img { width: 100%; height: 100%; object-fit: cover; }
.history-text { order: 1; }
@media (min-width: 768px) { .history-text { order: 2; } }
.history-text h2 { font-size: 2rem; font-weight: 900; color: var(--foreground); margin-bottom: 1.5rem; }
@media (min-width: 768px) { .history-text h2 { font-size: 2.75rem; } }
.history-text p { font-size: 1.05rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.8; white-space: pre-line; }
.highlight-box { border-left: 4px solid var(--primary); padding-left: 1rem; margin-bottom: 1.5rem; }
.highlight-box h3 { font-weight: 800; color: var(--foreground); margin-bottom: 0.5rem; }
.highlight-box p { color: var(--muted); font-size: 0.95rem; }

#first-board { background-color: var(--secondary); }
.first-board-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .first-board-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .first-board-grid { grid-template-columns: repeat(4,1fr); } }

/* ---------------------------------------------------------------- */
/* Eventos                                                              */
/* ---------------------------------------------------------------- */
.congress-highlight {
    background: linear-gradient(135deg, rgba(30,64,175,0.05) 0%, rgba(59,130,246,0.05) 100%);
    padding: 2rem 2.25rem; border-radius: 0.75rem; border: 1px solid rgba(30,64,175,0.12); margin-bottom: 2.5rem;
}
.congress-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.congress-icon { width: 3.5rem; height: 3.5rem; background: rgba(30,64,175,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.congress-header h3 { font-size: 1.6rem; font-weight: 900; color: var(--foreground); }
.congress-header p { color: var(--primary); font-weight: 700; font-size: 0.875rem; }
.congress-description { color: var(--muted); font-size: 1.05rem; line-height: 1.8; }
.congress-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; font-size: 0.9rem; color: var(--muted); font-weight: 700; }

.carousel-container { position: relative; margin-bottom: 3rem; }
.carousel { display: flex; overflow-x: auto; gap: 1.5rem; scroll-behavior: smooth; padding: 1rem 0; }
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-track { background: var(--secondary); border-radius: 10px; }
.carousel::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
.carousel-item { flex: 0 0 calc(100% - 1rem); background: white; border: 2px solid rgba(30,64,175,0.15); border-radius: 0.75rem; padding: 1.5rem; transition: all 0.3s; }
@media (min-width: 768px) { .carousel-item { flex: 0 0 calc(50% - 0.75rem); } }
@media (min-width: 1024px) { .carousel-item { flex: 0 0 calc(33.333% - 1rem); } }
.carousel-item:hover { border-color: var(--primary); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.carousel-item-icon { font-size: 2rem; margin-bottom: 1rem; }
.carousel-item-title { font-size: 1.15rem; font-weight: 800; color: var(--foreground); margin-bottom: 0.7rem; }
.carousel-item-description { color: var(--muted); font-size: 0.875rem; line-height: 1.6; }

.carousel-controls { display: flex; gap: 1rem; justify-content: center; margin-top: 1.25rem; }
.carousel-btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--primary); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; font-size: 1.2rem; }
.carousel-btn:hover { background: var(--primary-hover); transform: scale(1.1); }

.other-events { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 2.5rem; }
@media (min-width: 768px) { .other-events { grid-template-columns: repeat(2,1fr); } }
.event-card { background: var(--secondary); padding: 2rem; border-radius: 0.75rem; border: 1px solid var(--border); transition: box-shadow 0.3s; }
.event-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.event-card-header { display: flex; gap: 1rem; margin-bottom: 1rem; align-items: center; }
.event-icon { width: 3rem; height: 3rem; background: rgba(30,64,175,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.event-card h3 { font-size: 1.2rem; font-weight: 800; color: var(--foreground); }
.event-card p { color: var(--muted); margin-bottom: 1rem; }
.event-card-image { border-radius: 0.6rem; overflow: hidden; height: 10rem; margin-bottom: 1rem; background: var(--border); }
.event-card-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- */
/* Notícias                                                            */
/* ---------------------------------------------------------------- */
#noticias { background: var(--background); }
.news-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-card { border: 1px solid var(--border); border-radius: 0.75rem; overflow: hidden; text-decoration: none; color: inherit; transition: all 0.3s; display: flex; flex-direction: column; background: white; }
.news-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.08); transform: translateY(-3px); }
.news-card-image { height: 12rem; background: var(--secondary); overflow: hidden; }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.news-card:hover .news-card-image img { transform: scale(1.05); }
.news-card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.news-card-category { color: var(--primary); font-weight: 800; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.news-card-title { font-size: 1.1rem; font-weight: 800; color: var(--foreground); margin-bottom: 0.6rem; line-height: 1.35; }
.news-card-excerpt { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; flex: 1; }
.news-card-date { color: var(--muted); font-size: 0.8rem; font-weight: 700; }

.news-article { max-width: 760px; margin: 0 auto; }
.news-article-cover { border-radius: 0.75rem; overflow: hidden; height: 22rem; margin-bottom: 2rem; background: var(--secondary); }
.news-article-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-article-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 1rem; font-weight: 700; }
.news-article h1 { font-size: 2.1rem; font-weight: 900; margin-bottom: 0.75rem; line-height: 1.25; }
.news-article .subtitulo { font-size: 1.15rem; color: var(--muted); margin-bottom: 1.5rem; }
.news-article-content { font-size: 1.05rem; line-height: 1.85; color: var(--foreground); }
.news-article-content p { margin-bottom: 1.2rem; }
.news-article-content ul, .news-article-content ol { margin: 0 0 1.2rem 1.5rem; }
.news-article-content h3 { margin: 1.75rem 0 0.9rem; font-weight: 800; }

/* ---------------------------------------------------------------- */
/* Galeria                                                              */
/* ---------------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.album-card { border-radius: 0.75rem; overflow: hidden; text-decoration: none; color: inherit; border: 1px solid var(--border); background: white; transition: all 0.3s; }
.album-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.08); transform: translateY(-3px); }
.album-cover { height: 10rem; background: var(--secondary); position: relative; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-count { position: absolute; bottom: 0.6rem; right: 0.6rem; background: rgba(0,0,0,0.65); color: white; font-size: 0.72rem; font-weight: 800; padding: 0.25rem 0.6rem; border-radius: 999px; }
.album-body { padding: 1rem 1.15rem; }
.album-title { font-weight: 800; margin-bottom: 0.25rem; }
.album-date { color: var(--muted); font-size: 0.8rem; }

.photo-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1024px) { .photo-grid { grid-template-columns: repeat(4,1fr); } }
.photo-item { border-radius: 0.6rem; overflow: hidden; height: 180px; background: var(--secondary); cursor: pointer; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.photo-item:hover img { transform: scale(1.06); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; z-index: 200; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 0.5rem; }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; color: white; font-size: 2rem; cursor: pointer; background: none; border: none; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); color: white; border: none; width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.lightbox-prev { left: 1.5rem; } .lightbox-next { right: 1.5rem; }

/* ---------------------------------------------------------------- */
/* Contato                                                              */
/* ---------------------------------------------------------------- */
#contato { background-color: var(--primary); color: white; }
.contact-header h2 { font-size: 2rem; font-weight: 900; color: white; }
@media (min-width: 768px) { .contact-header h2 { font-size: 2.75rem; } }
.contact-header p { color: rgba(255,255,255,0.82); margin-top: 1rem; }

.contact-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; margin-top: 3rem; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 1fr 1.2fr; } }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.contact-card { background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); padding: 1.5rem; border-radius: 0.75rem; border: 1px solid rgba(255,255,255,0.2); }
.contact-card svg { width: 1.75rem; height: 1.75rem; margin-bottom: 0.75rem; stroke: white; stroke-width: 2; fill: none; }
.contact-card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.4rem; }
.contact-card p { color: rgba(255,255,255,0.82); font-size: 0.875rem; }
.contact-card a { color: white; text-decoration: none; transition: opacity 0.3s; }
.contact-card a:hover { opacity: 0.8; }

.contact-form { background: white; border-radius: 0.75rem; padding: 2rem; color: var(--foreground); }
.contact-form .form-group { margin-bottom: 1.1rem; }
.contact-form label { display: block; font-weight: 800; font-size: 0.85rem; margin-bottom: 0.4rem; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 0.5rem;
    font-family: inherit; font-size: 0.9rem;
}
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }

.social-links { border-top: 1px solid rgba(255,255,255,0.2); padding-top: 2rem; margin-top: 3rem; display: flex; justify-content: center; gap: 1.5rem; }
.social-link { width: 2.6rem; height: 2.6rem; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; transition: all 0.3s; font-weight: 800; }
.social-link:hover { background: rgba(255,255,255,0.22); }

/* ---------------------------------------------------------------- */
/* Rodapé                                                              */
/* ---------------------------------------------------------------- */
footer { background-color: #1f2937; color: #d1d5db; padding: 3rem 0 2rem; border-top: 1px solid #374151; }
.footer-content { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .footer-content { grid-template-columns: repeat(4,1fr); } }
.footer-section h4 { font-weight: 800; color: white; margin-bottom: 1rem; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.5rem; }
.footer-section a { color: #d1d5db; text-decoration: none; transition: color 0.3s; }
.footer-section a:hover { color: white; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 2rem; text-align: center; font-size: 0.875rem; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.footer-logo .logo-mark { width: 1.6rem; height: 1.6rem; border-radius: 0.4rem; overflow: hidden; }
.footer-logo .logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.footer-logo span { font-weight: 800; color: white; }

/* ---------------------------------------------------------------- */
/* Elementos utilitários / estado vazio / paginação / alertas          */
/* ---------------------------------------------------------------- */
.empty-block { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }
.pagination a, .pagination span {
    width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center;
    border-radius: 0.5rem; border: 1px solid var(--border); text-decoration: none; color: var(--foreground); font-weight: 700; font-size: 0.85rem;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: white; border-color: var(--primary); }

.page-hero { background: var(--secondary); padding: 3rem 0; text-align: center; }
.page-hero h1 { font-size: 2.2rem; font-weight: 900; margin-bottom: 0.6rem; }
.page-hero p { color: var(--muted); }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 700; }

.form-alert { padding: 0.9rem 1.15rem; border-radius: 0.5rem; margin-bottom: 1.5rem; font-weight: 700; font-size: 0.9rem; }
.form-alert.success { background: #ECFDF5; color: #15803D; }
.form-alert.error { background: #FEF2F2; color: #B91C1C; }

.wa-float {
    position: fixed; bottom: 1.5rem; right: 1.5rem; width: 3.5rem; height: 3.5rem;
    background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25); z-index: 60; font-size: 1.6rem; text-decoration: none;
}
