/* ==========================================================================
   PROJETO OÁSIS NO SERTÃO — CSS GLOBAL & THEME SYSTEM (LIGHT MODE)
   ========================================================================== */

:root {
  /* Color Palette — Inspiração Natureza Brasileira / Caatinga */
  --primary: #2e7255;
  --primary-hover: #225740;
  --primary-light: #40916c;
  --accent: #8b5e3c;
  --accent-hover: #724c30;
  --accent-light: #d8a47f;
  --success: #40916c;
  --bg-body: #f8f9fa;
  --bg-card: #ffffff;
  --bg-surface: #f4f1ea;
  --bg-topbar: #000000;
  --bg-header: #2e7255;
  --bg-footer: #2e7255;
  --text-main: #2b2d42;
  --text-muted: #52575d;
  --text-light: #ffffff;
  --border: #e9ecef;
  --border-focus: #40916c;

  /* Typography */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing & Layout */
  --container-max: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover, a:focus-visible {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

/* Container Global */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Page Layout Grid */
.main-wrapper {
  padding: 2rem 0;
  flex: 1;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .content-grid {
    grid-template-columns: 280px 1fr;
  }
}

/* Card Content Box */
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: var(--bg-surface);
  color: var(--primary);
  font-weight: 700;
}

tr:nth-child(even) {
  background-color: #fdfdfd;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Imagens responsivas */
img {
    max-width: 100%;
    height: auto !important;
    object-fit: contain !important;
}

/* Nunca ultrapassar a largura da tela */
img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
