 body {
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Header */
.header-img {
  width: 100%;
  background: #f0f0f0;
  text-align: center;
}

.header-img img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain; /* 🔥 nunca se recorta */
}

/* móvil */
@media (max-width: 768px) {
  .header-img img {
    max-height: 120px;
  }
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;

  background: #1b5e20; /* 🌿 verde oscuro */
}

.menu-toggle {
  font-size: 26px;
  background: none;
  border: none;
  color: white; /* 🔥 ahora sí visible */
  cursor: pointer;
}

nav {
  display: flex;
  gap: 15px;
  background: #2e7d32; /* 🌿 verde principal */
  padding: 10px 20px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  transition: 0.3s;
}

nav a:hover {
  background: #66bb6a;
  border-radius: 5px;
}

/* Hero */
.hero {
  padding: 40px;
  text-align: center;
  background: #ecf0f1;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.custom-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.custom-card h3 {
  background-color: #2e7d32;
  color: white;
  padding: 12px;
  margin: -20px -20px 15px -20px;
  border-radius: 12px 12px 0 0;
  font-size: 1.2rem;
}

/* Footer */
footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 10px;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .cards {
    flex-direction: column;
    align-items: center;
  }

  nav {
    display: flex;
    flex-direction: column;
  }

  nav a {
    margin: 5px 0;
  }
}

/* NAVBAR MEJORADO */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Botón hamburguesa */
.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* NAV DESKTOP */
nav {
  display: flex;
  gap: 15px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 5px 10px;
  transition: 0.3s;
}

nav a:hover {
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
}

/* 📱 MODO MÓVIL */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  nav {
    width: 100%;
    flex-direction: column;

    /* 🔥 clave para animación tipo despliegue */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  nav a {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  nav.active {
    max-height: 400px; /* ajusta según cantidad de links */
  }
}

.card img {
  width: 150px;
  margin-bottom: 10px;
}

.login-container {
  width: 300px;
  margin: 100px auto;
  text-align: center;
}

.login-container input {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
}

.login-container button {
  padding: 10px;
  width: 100%;
  background: #2c3e50;
  color: white;
  border: none;
}

.error-box {
  background-color: #ffdddd;
  color: #a94442;
  border: 1px solid #a94442;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 5px;
}

.search-panel {
    max-width: 1200px;
    margin: auto;
    padding: 30px;
}

.panel-header {
    text-align: center;
    margin-bottom: 40px;
}

.panel-header h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.panel-header p {
    color: #666;
    font-size: 1rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.custom-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transition: all .3s ease;
    text-align: center;
}

.custom-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.custom-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.custom-card p {
    color: #666;
    min-height: 60px;
}

.custom-card a {
    display: inline-block;
    margin-top: 15px;
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: .3s;
}

.custom-card a:hover {
    background: #2980b9;
}

/* Tarjeta destacada */
.featured {
    border: 2px solid #27ae60;
    background: #f8fff9;
}

.featured a {
    background: #27ae60;
}

.featured a:hover {
    background: #1e8449;
}

.resultados {
    margin-top: 50px;
}


.resultados {
    margin-top: 50px;
}

.tabla-ejidatarios {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.tabla-ejidatarios thead {
    background: #2c3e50;
    color: white;
}

.tabla-ejidatarios th,
.tabla-ejidatarios td {
    padding: 12px 15px;
    text-align: left;
}

.tabla-ejidatarios tbody tr {
    border-bottom: 1px solid #eee;
}

.tabla-ejidatarios tbody tr:hover {
    background: #f8f9fa;
}

.btn-consultar {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-consultar:hover {
    background: #1e8449;
}
