/* =========================================================
   Rotary Club Treze Tílias — Design System
   Paleta extraída do site publicado (rotarytt.aquiconecta.com.br)
   ========================================================= */

:root {
  /* Cores institucionais oficiais do Rotary International
     (Guia de Voz e Identidade Visual, dez/2019, p. 29) */
  --color-azure: #0050a2;       /* Rotary Azure — cor principal, usar com mais frequência */
  --color-sky: #019fcb;         /* Rotary Sky Blue — complemento/destaque */
  --color-royal: #0c3c7c;       /* Rotary Royal Blue — complemento/destaque, tons escuros */
  --color-gold: #f7a81b;        /* Rotary Gold — destaque/CTA */
  --color-gold-dark: #d98f0d;

  /* Apelidos usados no restante do CSS */
  --color-navy: var(--color-azure);
  --color-navy-light: var(--color-sky);
  --color-navy-dark: var(--color-royal);

  --color-text-heading: #0c3c7c;
  --color-text-body: #58585a;   /* Rotary Charcoal — cinza neutro institucional */
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fa;
  --color-border: #e2e6ea;

  /* Tipografia oficial (p. 30): Frutiger/Open Sans Condensed para títulos
     e navegação principal (caixa alta); Sentinel/Georgia para corpo de texto. */
  --font-heading: "Open Sans Condensed", "Arial Narrow", sans-serif;
  --font-body: Georgia, "Times New Roman", serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 4px 16px rgba(15, 45, 96, 0.08);
  --shadow-card-hover: 0 10px 28px rgba(15, 45, 96, 0.14);

  --container-max: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text-body);
  background: var(--color-bg);
  line-height: 1.5;
  /* Nunca usar height/min-height:100vh em wrappers de página — foi a causa
     do bug de recorte no mobile no site anterior (iframe travado em 290px). */
}

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

a {
  text-decoration: none;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

/* Título principal em caixa alta condensada — uso "primário" da fonte,
   conforme o guia de marca (p. 30). */
h1 {
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
}

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

.section {
  padding: 64px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  background: rgba(247, 168, 27, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 12px;
}

.section-lead {
  max-width: 640px;
  color: var(--color-text-body);
  font-size: 17px;
  margin-bottom: 40px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

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

.btn--gold {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}

.btn--gold:hover {
  background: var(--color-gold-dark);
}

.btn--outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-white);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--navy {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn--navy:hover {
  background: var(--color-navy-light);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 14px;
}

.link-arrow {
  color: var(--color-navy);
  font-weight: 700;
  font-size: 15px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text-heading);
}

.nav-links a:hover {
  background: var(--color-bg-alt);
}

.nav-cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle::before {
  transform: translateY(-7px);
}

.nav-toggle::after {
  transform: translateY(5px);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 8px 20px 20px;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  padding: 12px 4px;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text-heading);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* ---------- Hero ---------- */

.hero {
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.06) 0, transparent 45%),
    linear-gradient(135deg, var(--color-navy-dark) 0%, var(--color-navy) 55%, var(--color-navy-light) 100%);
  color: var(--color-white);
  padding: 56px 0 64px;
  /* altura livre: cresce conforme o conteúdo, nunca fixa/100vh */
}

.hero .eyebrow {
  background: rgba(247, 168, 27, 0.15);
  color: var(--color-gold);
  border: 1px solid rgba(247, 168, 27, 0.35);
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(32px, 6vw, 56px);
  max-width: 760px;
}

.hero h1 .accent {
  color: var(--color-gold);
  display: block;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  max-width: 560px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Acesso Rápido ---------- */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.quick-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.quick-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.quick-card .icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.quick-card span {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text-heading);
}

/* ---------- Quem Somos / Valores ---------- */

.about-grid {
  display: grid;
  gap: 40px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.value-card .icon {
  font-size: 26px;
  margin-bottom: 8px;
}

.value-card h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.value-card p {
  font-size: 14px;
  margin: 0;
}

/* ---------- Cards genéricos (Projetos / Participe) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.card .icon {
  font-size: 30px;
  margin-bottom: 12px;
}

.card .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-gold-dark);
  margin-bottom: 6px;
}

.card .status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold-dark);
}

.card .tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-body);
  opacity: 0.7;
  margin-bottom: 8px;
}

.card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  flex-grow: 1;
}

/* ---------- Causas (bandeiras institucionais) ---------- */

.causas-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.causa-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-heading);
}

.causa-item .icon {
  font-size: 18px;
}

/* ---------- Cards "como se envolver" (visualmente distintos de Projetos) ---------- */

.card--envolver {
  border: none;
  border-top: 4px solid var(--color-gold);
  background: var(--color-bg-alt);
  box-shadow: none;
}

.card--envolver:hover {
  box-shadow: var(--shadow-card);
}

/* ---------- Carrossel de logos (Apoiadores) ---------- */

.logo-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.logo-marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: logo-scroll 30s linear infinite;
}

.logo-marquee:hover .logo-marquee-track {
  animation-play-state: paused;
}

.logo-marquee-track img {
  height: 56px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.logo-marquee-track img:hover {
  opacity: 1;
}

@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ---------- Apoiadores ---------- */

.apoiadores-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.apoiador-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  text-align: center;
}

.apoiador-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.apoiador-card img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.apoiador-placeholder {
  font-weight: 700;
  color: var(--color-text-heading);
}

.apoiador-name {
  font-size: 13px;
  color: var(--color-text-body);
}

.state-box {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  color: var(--color-text-body);
}

/* ---------- Formulários ---------- */

.form-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  max-width: 560px;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text-heading);
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text-body);
  background: var(--color-white);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 1px;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-body);
  margin-bottom: 20px;
}

.form-consent input {
  margin-top: 3px;
}

.form-message {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.form-message--success {
  background: rgba(34, 154, 94, 0.12);
  color: #1e7e4f;
}

.form-message--error {
  background: rgba(214, 69, 69, 0.12);
  color: #b3312f;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.badge-status--disponivel {
  background: rgba(34, 154, 94, 0.12);
  color: #1e7e4f;
}

.badge-status--emprestado {
  background: rgba(217, 143, 13, 0.14);
  color: var(--color-gold-dark);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

table.data-table th,
table.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
}

table.data-table th {
  background: var(--color-bg-alt);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-heading);
}

/* ---------- Auth helpers ---------- */

.form-help-link {
  display: inline-block;
  font-size: 13px;
  margin-top: 12px;
  color: var(--color-azure);
  text-decoration: underline;
}

.form-subpanel {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
}

.senha-revelada {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  background: rgba(247, 168, 27, 0.15);
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: inline-block;
  margin: 8px 0;
  user-select: all;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 24px;
}

.footer-logo {
  height: 48px;
  width: auto;
  margin-bottom: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h5 {
  color: var(--color-white);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-grid a,
.footer-grid p {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 8px;
}

.footer-grid a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.footer-bottom strong {
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- Utilities ---------- */

.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }

/* =========================================================
   Breakpoints — mobile-first: regras acima valem para telas
   pequenas; a partir daqui ampliamos para telas maiores.
   ========================================================= */

@media (min-width: 640px) {
  .values-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .apoiadores-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .causas-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 860px) {
  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }

  .quick-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .apoiadores-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
