/* ===================== ESTILOS GENERALES ===================== */
 :root {
      --verde-oscuro: #2e4a1f;
      --verde-claro:  #7fa97a;
      --marrón-tierra: #a47551;
      --beige-suave:  #f5f0e1;
      --gris-texto:   #333333;
      --gris-claro:   #f0eee8;
      --sombra-oscura: rgba(0, 0, 0, 0.15);
}
    body {
      margin: 0;
      padding: 0;
      font-family: Arial, sans-serif;
      background-color: var(--beige-suave);
      color: var(--texto-principal);
    }

h2 {
    color: #333;
    font-size: 2rem;
    margin-top: 30px;
    text-align: center;
}

.banner {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.banner {
  vertical-align: bottom;
  display: block;
}
a:hover {
      color: var(--verde-claro);
    }

/* ===================== HEADER ===================== */
    header {
      background-color: var(--verde-oscuro);
      color: white;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 2.5rem 1rem;
      flex-wrap: wrap;
      font-size: 1.25rem;            /* Tamaño del texto (16px por defecto) */

    }
    .logo-container {
      display: flex;
      align-items: center;
    }
    .logo {
      height: 40px;
      margin-right: 0.5rem;
    }
    header h1 {
      margin: 0;
      font-size: 1.5rem;
    }
    nav ul {
      list-style: none;
      display: flex;
      gap: 1rem;
      margin: 0;
      padding: 0;
    }
    nav ul li a {
      color: white;
      text-decoration: none;
      font-weight: bold;
    }
    nav ul li a:hover {
      text-decoration: underline;
    }
    .user-info {
      display: none;
      align-items: center;
    }
    #usernameDisplay {
      margin-right: 0.5rem;
    }

/* ===================== MODALES ===================== */
/* ------------ MODALES (Login / Registro) ------------ */
    .modal {
      display: none; /* Oculto por defecto */
      position: fixed;
      z-index: 1000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0,0,0,0.5);
    }
    .modal-content {
      background-color: #fff;
      margin: 5% auto;
      padding: 1rem 2rem;
      border: 1px solid #888;
      width: 90%;
      max-width: 400px;
      border-radius: 8px;
      position: relative;
    }
    .modal-content h2 {
      margin-top: 0;
    }
    .modal-content .close {
      position: absolute;
      top: 0.5rem;
      right: 1rem;
      font-size: 1.5rem;
      font-weight: bold;
      cursor: pointer;
    }
    .form-group {
      margin-bottom: 1rem;
    }
    .form-group label {
      display: block;
      margin-bottom: 0.3rem;
      font-weight: bold;
    }
    .form-group input {
      width: 100%;
      padding: 0.5rem;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-sizing: border-box;
    }
    .form-group button {
      background-color: var(--verde-claro);
      color: white;
      padding: 0.5rem 1rem;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 1rem;
    }
    .form-group button:hover {
      background-color: var(--verde-oscuro);
    }
    .switch-form {
      text-align: center;
      margin-top: 0.5rem;
    }
    .switch-form a {
      color: var(--verde-oscuro);
      cursor: pointer;
      text-decoration: none;
      font-weight: bold;
    }
    .switch-form a:hover {
      text-decoration: underline;
    }

/* ===================== FORMULARIOS ===================== */
.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group button {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.form-group button {
    background-color: #2E7D32;
    color: white;
    border: none;
}

.form-group button:hover {
    background-color: #1B5E20;
}

.switch-form {
    text-align: center;
    margin-top: 15px;
}

.switch-form a {
    color: #2E7D32;
    cursor: pointer;
}

/* ===================== BARRA DE BÚSQUEDA Y MENÚ ===================== */
#busqueda-explora {
    padding: 20px 7px;
    text-align: center;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    position: relative;
}

.search-bar input {
    width: 300px;
    padding: 10px 40px 10px 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 1.25rem;            /* Tamaño del texto (16px por defecto) */

}

.search-icon {
    position: center;
    right: 12px;
    top: 10px;
    color: #aaa;
}

.menu-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}

.menu-item i {
    font-size: 24px;
    color: #2E7D32;
    margin-bottom: 5px;
}

/* ===================== SECCIÓN DE PUEBLOS ===================== */
.featured-towns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 100px;
    padding: 20px;
}

.town-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 280px;
    text-align: center;
}

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

.town-card h3 {
    margin: 10px 0;
    color: #333;
}

.town-card p {
    padding: 0 10px 10px;
    font-size: 14px;
    color: #555;
}

.town-card a {
    display: block;
    background-color: #2E7D32;
    color: white;
    margin: 10px;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
}

.town-card a:hover {
    background-color: #1B5E20;
}

/* ===================== SECCIÓN DE ESTADOS ===================== */
.states {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    padding: 20px;
}
.state-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 280px;          /* Igual que town-card */
    text-align: center;
}

.state-card img {
    width: 180px;
    margin-top: 15px;
}

.state-card h3 {
    color: #333;
    margin: 10px 0;
}

.state-card p {
    padding: 0 10px 15px;
    color: #666;
    font-size: 14px;
}

/* ===================== SECCIÓN DE PALABRAS ===================== */


.seccion-presentacion {
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 16px;
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', 'Open Sans', sans-serif;
}

.seccion-presentacion h2 {
    font-size: 26px;
    color: #004d40;
    margin-bottom: 20px;
    text-align: center;
}

.seccion-presentacion p {
    font-size: 18px;
    line-height: 1.7;
    color: #333;
    text-align: justify;
}

/* ===================== ESTADOS ===================== */

.states {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  padding: 20px;
}
.state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white; /* fondo blanco */
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: var(--verde-oscuro); /* texto verde oscuro */
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  padding-bottom: 12px;
  max-width: 220px;
  margin: auto;
}

.state-card:hover,
.state-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(47, 94, 30, 0.3); /* sombra verde */
  outline: none;
}

.state-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.state-card h3 {
  font-size: 1.1rem;
  margin: 10px 12px 4px;
  color: var(--verde-oscuro); /* verde oscuro */
}

.state-card p {
  font-size: 0.85rem;
  margin: 0 12px 12px;
  line-height: 1.4;
  color: var(--verde-claro); /* verde claro para contraste */
}


/* ===================== ESTADOS ===================== */
.states1 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* más pequeñas */
  gap: 20px;
  padding: 20px;
}

.state-card1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white; /* fondo blanco */
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: var(--verde-oscuro); /* texto verde oscuro */
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  padding-bottom: 12px;
  max-width: 220px;
  margin: auto;
}

.state-card1:hover,
.state-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(47, 94, 30, 0.3); /* sombra verde */
  outline: none;
}

.state-card1 img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.state-card1 h3 {
  font-size: 1.1rem;
  margin: 10px 12px 4px;
  color: var(--verde-oscuro); /* verde oscuro */
}

.state-card1 p {
  font-size: 0.85rem;
  margin: 0 12px 12px;
  line-height: 1.4;
  color: black; /* verde claro para contraste */
}
/* ===================== FOOTER ===================== */
footer {
      background-color: var(--verde-oscuro);
      color: white;
      text-align: center;
      padding: 1rem 0;
      margin-top: 2rem;
    }
    footer nav ul {
      list-style: none;
      display: flex;
      justify-content: center;
      gap: 1rem;
      margin: 0;
      padding: 0;
    }
    footer nav ul li a {
      color: white;
      text-decoration: none;
      font-size: 0.9rem;
    }
    footer nav ul li a:hover {
      text-decoration: underline;
    }

/* ===================== ACCESIBILIDAD: FOCO VISIBLE ===================== */
a:focus, button:focus {
    outline: 2px solid #1B5E20;
    outline-offset: 2px;
}
/* Pantallas pequeñas: móviles */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .search-bar input {
        width: 90%;
        max-width: 300px;
    }

    .featured-towns, .states {
        flex-direction: column;
        align-items: center;
    }

    .town-card, .state-card {
        width: 90%;
        max-width: 320px;
    }
}
/* ===================== BOTONES ===================== */


/* Tablets */
@media (min-width: 601px) and (max-width: 900px) {
    .featured-towns, .states {
        justify-content: space-around;
    }

    .town-card {
        width: 45%;
    }

    .state-card {
        width: 40%;
    }
}
/* ===================== BOTONES DE HAMBURGUES===================== */


