/* ---------- Fontes (self-hosted) ---------- */
@font-face {
  font-family: "Marcellus";
  src: url("assets/fonts/marcellus-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "Karla";
  src: url("assets/fonts/karla-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "Karla";
  src: url("assets/fonts/karla-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}

/* ---------- Tokens (identidade "vigília") ---------- */
:root {
  --bg-deep: #0d1226;
  --bg-panel: #141b36;
  --bg-panel-2: #182047;
  --border: #26305a;
  --border-soft: rgba(154, 163, 199, 0.14);
  --flame: #f2a541;
  --flame-light: #ffd58a;
  --text: #eef0fa;
  --text-muted: #e5e8f3;
  --text-footer: #b9becf;
  --danger: #e0616b;
  --success: #6fcf97;

  --font-display: "Marcellus", "Georgia", serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 18px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 0 0 1px rgba(242, 165, 65, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.5);

  --flame-light: #f8c266;
  --dark-bg: #1f2841; /* Cor escura de fundo da sua página para destacar o botão */
  --whatsapp-color: #1f2841;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at top, var(--bg-panel) 0%, var(--bg-deep) 55%) fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0 0 0.5rem;
}

a {
  color: var(--flame-light);
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

button:active {
  transform: scale(0.97);
}

input,
select,
textarea,
button {
  font-size: 1rem;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.25rem, 1.6rem + 3vw, 3.75rem) 1rem clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  background: radial-gradient(ellipse at 50% 0%, var(--bg-panel) 0%, var(--bg-deep) 70%);
  position: relative;
  overflow: hidden;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft), transparent);
}

/* Lockup das duas marcas, lado a lado, equilibrado pela área visual:
   o emblema Gaditas (~1:1) é mais alto que o logo Fogo (3,2:1). */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 0.4rem + 2.6vw, 2.5rem);
  position: relative;
  z-index: 1;
}

.brand-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

/* Brilho de fundo próprio de cada marca */
.brand-item::before {
  content: "";
  position: absolute;
  inset: -45% -22%;
  z-index: -1;
  background: radial-gradient(
    closest-side,
    rgba(242, 165, 65, 0.42) 0%,
    rgba(242, 165, 65, 0.16) 55%,
    transparent 100%
  );
  pointer-events: none;
}

.brand-item--gaditas::before {
  inset: -18%;
}

.brand-mark,
.brand-word {
  display: block;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(242, 165, 65, 0.45));
}

/* Fogo para as Nações — 1870×585 */
.brand-mark {
  height: clamp(50px, 30px + 6vw, 88px);
}

/* Gaditas — 1278×1078 */
.brand-word {
  height: clamp(90px, 52px + 11vw, 150px);
}

.brand-divider {
  align-self: stretch;
  flex: none;
  width: 1px;
  margin: 0.75rem 0;
  background: linear-gradient(180deg, transparent, rgba(242, 165, 65, 0.6), transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .brand-item::before {
    animation: brand-glow 6s ease-in-out infinite;
  }
}

@keyframes brand-glow {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(0.97);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

/* Telas muito estreitas: empilha, com o divisor na horizontal */
@media (max-width: 339px) {
  .brand {
    flex-direction: column;
    gap: 1rem;
  }
  .brand-divider {
    align-self: center;
    width: 96px;
    height: 1px;
    margin: 0;
    background: linear-gradient(90deg, transparent, rgba(242, 165, 65, 0.6), transparent);
  }
}

.hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
}

/* ---------- Sections / cards ---------- */

section {
  margin: 1.5rem auto;
}

.card {
  background: linear-gradient(160deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card > h2 {
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.card > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--flame), transparent);
}

/* ---------- Introdução ---------- */

.intro-card {
  padding: 1.5rem 0.5rem 0.5rem;
  text-align: center;
}

.intro-card h1 {
  color: var(--flame-light);
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  margin-bottom: 0;
}

.intro-card h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 0.9rem auto 1.1rem;
  background: linear-gradient(90deg, transparent, var(--flame), transparent);
}

.intro-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: left;
  max-width: 34rem;
  margin: 0 auto 0.9rem;
}

.intro-lead {
  color: var(--flame-light);
  font-style: italic;
  text-align: left !important;
}

.intro-more {
  text-align: left;
  max-width: 34rem;
  margin: 0 auto;
}

.intro-more summary {
  color: var(--flame-light);
  cursor: pointer;
  font-weight: bold;
  font-size: 0.85rem;
  margin: 0 auto 0.9rem;
  list-style: none;
  display: table;
  text-align: center;
  opacity: 0.85;
}

.intro-more summary:hover {
  opacity: 1;
}

.intro-more summary::-webkit-details-marker {
  display: none;
}

.intro-more summary::after {
  content: " ▾";
}

.intro-more[open] summary::after {
  content: " ▴";
}

.intro-closing {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 34rem;
  margin: 1rem auto 0 !important;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-soft);
}

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

.hero {
  text-align: center;
  padding: 2.75rem 1.5rem;
  position: relative;
  overflow: hidden;
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  background: radial-gradient(circle at 50% -10%, rgba(242, 165, 65, 0.16) 0%, transparent 55%),
    linear-gradient(160deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
}

.hero .eyebrow {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 0.72rem + 0.7vw, 1.15rem);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero .member-name {
  font-size: 2.15rem;
  color: var(--flame-light);
  margin: 0.5rem 0;
  text-shadow: 0 0 18px rgba(242, 165, 65, 0.45);
}

.btn-wrapper {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.btn-whatsapp {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  background-image: linear-gradient(
    100deg,
    #9e7226 0%,
    #f2c14e 30%,
    #fff3c4 50%,
    #f2c14e 70%,
    #9e7226 100%
  );
  padding: 14px 20px;
  border-radius: 18px; /* Cantos arredondados idênticos aos da imagem */
  text-decoration: none !important;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border: none;
  cursor: pointer;
  margin: 20px 0;
  box-shadow: 0 10px 26px rgba(242, 165, 65, 0.28);
}

/* Reflexo que desliza uma vez sobre o botão e sai pela borda */
.btn-whatsapp::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .btn-whatsapp:hover::after {
    animation: shine-sweep 0.85s ease-in-out;
  }
}

@keyframes shine-sweep {
  from {
    left: -60%;
  }
  to {
    left: 130%;
  }
}

/* Estilização exata do Texto do Botão */
.btn-texto {
  position: relative;
  z-index: 2;
  color: var(--whatsapp-color);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.2px;
}

/* Ícone idêntico ao da imagem com sombra sutil no fundo */
.whatsapp-logo {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  fill: var(--whatsapp-color);
  margin-right: 16px;
  filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.15));
}

/* Efeito de Hover moderno e suave */
.btn-whatsapp:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(255, 213, 138, 0.4);
}

.btn-whatsapp:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: no-preference) {
  .hero .member-name {
    animation: flame-glow 3.5s ease-in-out infinite;
  }
}

@keyframes flame-glow {
  0%,
  100% {
    text-shadow: 0 0 14px rgba(242, 165, 65, 0.35);
  }
  50% {
    text-shadow: 0 0 26px rgba(255, 213, 138, 0.65);
  }
}

.hero .date-extenso {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Calendário ---------- */

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.calendar-nav .nav-arrows {
  display: flex;
  gap: 0.4rem;
}

.calendar-nav button.arrow {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav button.arrow:hover:not(:disabled) {
  border-color: var(--flame-light);
}

.calendar-nav button.arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.calendar-nav .selects {
  display: flex;
  gap: 0.4rem;
}

.calendar-nav select {
  background: var(--bg-deep);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
}

.weekday-row,
.day-grid {
  display: grid;
  /* --cols é definido pelo app.js: nº de dias da semana da corrente (ex.: 5 = seg–sex) */
  grid-template-columns: repeat(var(--cols, 7), 1fr);
  gap: 0.3rem;
}

.weekday-row {
  margin-bottom: 0.3rem;
}

.weekday-row span {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.day-cell {
  min-height: 4.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  padding: 0.3rem 0.15rem;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.day-cell .day-number {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: bold;
  opacity: 0.8;
}

.day-cell .day-name {
  font-size: 0.8rem;
  line-height: 1.15;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
  max-width: 100%;
}

.day-cell.empty {
  visibility: hidden;
  cursor: default;
}

.day-cell.faded {
  opacity: 0.25;
  cursor: default;
}

.day-cell.today {
  border-color: var(--flame);
  box-shadow: 0 0 0 1px var(--flame), 0 0 14px rgba(242, 165, 65, 0.5);
}

.day-cell.today .day-number {
  color: var(--flame-light);
  font-weight: bold;
}

.day-cell:hover:not(.faded):not(.empty) {
  border-color: var(--flame-light);
  transform: translateY(-1px);
}

.day-detail {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  font-size: 0.9rem;
}

.day-detail .name {
  color: var(--flame-light);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

/* ---------- Membros ---------- */

.search-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.9rem;
}

.member-list {
  list-style: none;
  margin: 0;
  padding: 0 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.member-list::-webkit-scrollbar {
  width: 8px;
}

.member-list::-webkit-scrollbar-track {
  background: transparent;
}

.member-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.member-list::-webkit-scrollbar-thumb:hover {
  background: var(--flame);
}

.member-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(238, 240, 250, 0.02);
  gap: 0.5rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.member-list li:hover {
  border-color: rgba(242, 165, 65, 0.35);
  background: rgba(242, 165, 65, 0.05);
}

.member-list .m-main {
  display: flex;
  flex-direction: column;
}

.member-list .m-name {
  font-weight: bold;
}

.member-list .m-days {
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.8;
}

.member-list .m-next {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem 0;
}

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

.site-footer {
  margin-top: 3rem;
  padding: 2.25rem 0 0;
}

.footer-inner {
  display: flex;
  justify-content: center;
  padding-bottom: 0.9rem;
}

.footer-logo {
  height: 88px;
  width: auto;
  object-fit: contain;
  opacity: 0.92;
  margin-bottom: 20px;
}

.footer-bottom {
  background: linear-gradient(180deg, #091121 0%, #0d1730 100%);
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-bottom .container {
    flex-direction: row;
    justify-content: center;
    gap: 17.5rem;
  }

  .site-footer .container {
    padding-left: 0;
    padding-right: 0;
  }
}

.footer-bottom .copy {
  color: var(--text-footer);
  font-size: clamp(0.75rem, 0.65rem + 0.35vw, 0.9rem);
  margin: 0;
}

.footer-bottom .developed {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-footer);
  font-size: clamp(0.75rem, 0.65rem + 0.35vw, 0.9rem);
  margin: 0;
}

.footer-bottom .developed a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 2px 6px;
  line-height: 0;
}

.footer-bottom .developed img {
  height: 16px;
  width: auto;
  object-fit: contain;
}
