/* ser.i5s.com.br — Portal Paciente */
/* Mobile-first, sem framework, sem dependências externas */

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

:root {
  --brand:    #1a5c8f;   /* azul Instituto */
  --brand-dk: #124267;
  --accent:   #d4a017;   /* dourado Modelo S.E.R. */
  --bg:       #f7f9fc;
  --card-bg:  #ffffff;
  --text:     #1e2d3d;
  --muted:    #5a7184;
  --radius:   12px;
  --shadow:   0 2px 12px rgba(26,92,143,.10);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dk) 100%);
  color: #fff;
  padding: 2.5rem 1.25rem 2rem;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .9;
  margin-bottom: 1.25rem;
}
.brand img { border-radius: 8px; }

.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: .5rem;
}

.sub { color: rgba(255,255,255,.8); font-size: .95rem; }
.hero .sub { margin-top: .25rem; }

/* ── Card Grid ── */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  text-decoration: none;
  color: var(--text);
  border: 2px solid transparent;
  min-height: 72px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.card:hover, .card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: 0 6px 20px rgba(26,92,143,.18);
  outline: none;
}

.card.highlight {
  border-color: var(--accent);
  background: linear-gradient(135deg, #fff9ec 0%, #fffdf6 100%);
}
.card.highlight .icon { color: var(--accent); }

.card .icon {
  font-size: 1.75rem;
  line-height: 1;
}

.card .title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
}
.card.highlight .title { color: #8a6000; }

.card .desc {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Cal.com section ── */
.cal-wrap {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}

.cal-wrap h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .25rem;
  color: var(--brand-dk);
}

.cal-wrap .sub {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 1rem;
}

.cal-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  min-height: 700px;
}

.cal-frame iframe {
  width: 100%;
  height: 820px;
  border: none;
  display: block;
}

@media (min-width: 768px) {
  .cal-frame iframe { height: 900px; }
}

/* ── Footer ── */
footer {
  margin-top: auto;
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

footer a {
  color: var(--brand);
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }

.copy { font-size: .75rem; opacity: .7; }

/* ── Acessibilidade ── */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
