/* ====== Demonstrações Grid ====== */
.demo-container {
  margin: 20px 0;
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 8px;
}

.grid-demo {
  background: rgba(0, 216, 255, 0.1);
  border: 2px solid #00d8ff;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  min-height: 200px;
}

.grid-item {
  background: #00d8ff;
  color: #000;
  padding: 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ====== Grid Básico ====== */
.basic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 100px 100px;
  gap: 10px;
}

/* ====== Unidades fr ====== */
.fr-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: 100px;
  gap: 10px;
}

/* ====== Valores Mistos ====== */
.mixed-grid {
  display: grid;
  grid-template-columns: 200px auto 1fr;
  grid-template-rows: 100px;
  gap: 10px;
}

/* ====== Repeat ====== */
.repeat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 100px;
  gap: 10px;
}

/* ====== Posicionamento ====== */
.positioning-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 80px);
  gap: 10px;
}

.item-span {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  background: lightcoral !important;
}

/* ====== Span ====== */
.span-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 80px);
  gap: 10px;
}

.span-item {
  grid-column: span 2;
  background: lightblue !important;
}

/* ====== Grid Template Areas ====== */
.areas-grid {
  display: grid;
  grid-template-areas:
    "header header header"
    "nav    main   aside"
    "footer footer footer";
  grid-template-columns: 150px 1fr 150px;
  grid-template-rows: 60px 200px 60px;
  gap: 10px;
  height: 320px;
}

.grid-header {
  grid-area: header;
  background: lightcoral !important;
}

.grid-nav {
  grid-area: nav;
  background: lightblue !important;
}

.grid-main {
  grid-area: main;
  background: lightgreen !important;
}

.grid-aside {
  grid-area: aside;
  background: lightyellow !important;
  color: #333 !important;
}

.grid-footer {
  grid-area: footer;
  background: lightpink !important;
  color: #333 !important;
}

/* ====== Grid Responsivo ====== */
.responsive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  min-height: 120px;
}

/* ====== Alinhamento ====== */
.alignment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 100px);
  gap: 10px;
  justify-items: center;
  align-items: center;
}

.alignment-grid .grid-item {
  width: 60px;
  height: 60px;
  padding: 10px;
}

.self-alignment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 100px);
  gap: 10px;
}

.self-alignment-grid .grid-item {
  width: 80px;
  height: 60px;
  padding: 10px;
}

.self-center {
  justify-self: center;
  align-self: center;
  background: lightblue !important;
}

.self-end {
  justify-self: end;
  align-self: end;
  background: lightcoral !important;
}

/* ====== Explicações ====== */
.explanation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.explanation div {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 10px;
}

/* ====== Área de Testes ====== */
.teste-css {
  background: rgba(255,255,255,0.05);
  margin-top: 40px;
  padding: 25px;
  border-radius: 12px;
}

.teste-container {
  margin-top: 20px;
}

.teste-grid {
  display: grid;
  background: rgba(0, 216, 255, 0.1);
  border: 2px solid #00d8ff;
  border-radius: 8px;
  padding: 20px;
  min-height: 300px;
  
  /* Altere essas propriedades para testar */
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 120px);
  gap: 15px;
  
  /* Experimente com outras propriedades: */
  /* grid-template-areas: "a a b" "c d d"; */
  /* justify-items: center; */
  /* align-items: center; */
}

.teste-grid-item {
  background: #00d8ff;
  color: #000;
  padding: 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Classes para testar posicionamento individual */
.teste1 {
  background: lightcoral !important;
  /* grid-column: span 2; */
  /* grid-area: a; */
}

.teste2 {
  background: lightblue !important;
  /* grid-row: span 2; */
  /* grid-area: b; */
}

.teste3 {
  background: lightgreen !important;
  /* grid-column: 2 / 4; */
  /* grid-area: c; */
}

.teste4 {
  background: lightyellow !important;
  color: #333 !important;
  /* justify-self: end; */
  /* grid-area: d; */
}

.teste5 {
  background: lightpink !important;
  color: #333 !important;
  /* align-self: end; */
}

.teste6 {
  background: lightgray !important;
  color: #333 !important;
  /* grid-column: 1 / -1; */
}