/* ---------- BASE ---------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: #f2f4f8;
    color: #333;
}

h1, h2, h3 { 
    margin: 0; 
}

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

/* ---------- HEADER ---------- */
header {
    background: #0b6b4f;
    color: #fff;
    padding: 20px 0;
}

header h1 { 
    margin-left: 20px; 
    font-size: 28px; 
}

header .subtitle { 
    margin-left: 20px; 
    font-size: 14px; 
    opacity: 0.85; 
}

/* ---------- LAYOUT ---------- */
.container { 
    max-width: 1100px; 
    margin: 20px auto; 
    padding: 0 15px; 
}

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

.card { 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.08); 
    padding: 20px; 
    box-sizing: border-box;
}

/* ---------- FORMULARIO (columna derecha) ---------- */
.card form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px; /* separación uniforme entre campos */
    padding: 6px 0;
    box-sizing: border-box;
}

/* Etiquetas */
.card form label {
    margin: 0;
    font-weight: 700;
    line-height: 1.1;
}

/* Inputs y textarea */
.card form input[type="text"],
.card form textarea,
.card form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Grupo de checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0;
}

/* Botones */
button {
    background: #0b6b4f;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

button:hover { 
    background: #09503b; 
}

/* Botones del formulario */
.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 6px;
    margin: 0;
    align-items: center;
}

/* Mensaje de estado */
#msg {
    margin-top: 6px;
    font-size: 14px;
    min-height: 1.2em;
}

/* ---------- LISTA Y FILTROS (columna izquierda) ---------- */
.filters { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 15px; 
}

.filters input, 
.filters select { 
    flex: 1; 
}

.list-item { 
    background: #f9fafb; 
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 12px; 
    transition: 0.2s; 
}

.list-item:hover { 
    background: #f1f3f5; 
}

.meta { 
    font-size: 13px; 
    color: #555; 
    margin-top: 4px; 
}

.tag { 
    display: inline-block; 
    background: #e0f2f1; 
    color: #00796b; 
    padding: 4px 10px; 
    border-radius: 999px; 
    font-size: 12px; 
    font-weight: 600; 
    margin: 3px 3px 0 0; 
}

.small { 
    font-size: 13px; 
    color: #666; 
}

/* ---------- RESPONSIVE ---------- */
@media(max-width: 900px) { 
    .grid { 
        grid-template-columns: 1fr; 
    } 
}

/* MOBILE: reducir gaps y padding */
@media (max-width: 480px) {
    .card form { gap: 10px; }
    .card form input[type="text"], 
    .card form textarea { padding: 8px; }
}

/* ---------- CONTADORES SUPERIORES ---------- */
.stats-section {
  margin-top: 40px;
  text-align: center;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-card {
  background: #0b6b4f;
  color: #fff;
  border-radius: 12px;
  padding: 25px 35px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, background 0.3s;
}

.stat-card:hover {
  transform: translateY(-6px);
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 15px;
  opacity: 0.9;
}

/* ---------- ÁMBITOS DE SOSTENIBILIDAD ---------- */
.realms-section {
  margin: 60px 0;
  text-align: center;
  color: #fff;
  background: #0b6b4f;
  border-radius: 16px;
  padding: 50px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.realms-section h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.underline {
  width: 70px;
  height: 3px;
  background: #fff;
  margin: 12px auto 35px;
  border-radius: 2px;
}

.realms-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.realm-card {
  background: #ffffff;
  border-radius: 14px;
  width: 300px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.realm-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.realm-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.realm-card h3 {
  color: #0b6b4f;
  margin: 15px 0 5px;
  font-weight: 700;
}

.realm-card p {
  color: #333;
  font-size: 14px;
  padding: 0 15px 15px;
  line-height: 1.5em;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .stats-grid,
  .realms-grid {
    flex-direction: column;
    align-items: center;
  }
  .realm-card {
    width: 90%;
  }
}

/* ---------- EMOJIS DE ÁMBITOS ---------- */
.realm-emoji {
  font-size: 90px;       /* tamaño aumentado */
  margin-top: 15px;
  margin-bottom: 10px;
  text-align: center;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;         /* mantiene proporción vertical */
  transition: transform 0.2s ease;
}

.realm-card:hover .realm-emoji {
  transform: scale(1.1); /* efecto sutil al pasar el ratón */
}
