/* ============================= */
/* VARIABLES (TEMA VERDE) */
/* ============================= */

:root {
  --primary-text-color: #29503b;
  --primary-text-hover-color: #14261d;

  --primary-background-color: #e8f4ec;

  --surface-color: #ffffff;
  --card-shadow: 0 6px 18px rgba(0,0,0,0.08);

  --accent-color: #2f6f4e;
  --accent-light: #a9c7b5;

  --border-color: #c0d6ca;
}

/* ============================= */
/* BODY + CENTRADO APP */
/* ============================= */

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
    url("../images/fondo.svg");
  background-size: 60px 60px;
  background-repeat: repeat;  
  color: var(--primary-text-color);
}

/* contenedor tipo “app centrada” */
.emprendimientos-app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  background: var(--surface-color);
  min-height: 100vh;
  box-shadow: 0 0 30px rgba(0,0,0,0.05);
}

/* ============================= */
/* HEADER */
/* ============================= */

.app-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px 10px;
  border-bottom: 1px solid var(--border-color);
  min-height: 100px;
  box-sizing: border-box;
}

.logo1 {
  position: absolute;
  left: 0;
  height: 90px;
  border-radius: 50%;
}

.logo2 {
  position: absolute;
  right: 0px;
  height: 90px;
  border-radius: 50%;
}

.app-header h1 {
  font-size: 28px;
  margin: 0;
  text-align: center;
  color: var(--primary-text-color);
}
.titulos {
  text-align: center;
}

.app-header button {
  position: absolute;
  right: 100px;
}

/* ============================= */
/* FILTROS */
/* ============================= */

.filtros {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 8px;
  margin: 25px 0;
  background-color: var(--primary-background-color);
}

/* fila búsqueda */
.filtros .busqueda {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
}
/* fila búsqueda */
.filtros span {
  font-size: 14px;
  padding: 10px;
}
   
/* input */
input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: var(--accent-color);
}
    /* Cruz DENTRO del input */
    .filtros .busqueda .clear-button {
        display: none;

        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);

        border: none;
        background: transparent;

        color:var(--accent-color);
        font-size: 24px;
        line-height: 1;

        cursor: pointer;
        padding: 0;
    }

    .filtros .busqueda .clear-button:hover {
        color:var(--primary-text-color);
    }
/* chips */

  .filtro-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .filtro-chips.activo {
    max-height: 500px;
  }

.filter-icon {
  width: 20px;
  height: 20px;
  gap: 6px;
  color: var(--primary-text-color);
}
/* ============================= */
/* CHIPS */
/* ============================= */
.categorias-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  cursor: pointer;  
  user-select: none;
}

.flecha {
  display: inline-block;
  color: var(--primary-text-color);
  transition: transform 0.3s ease;
  transform-origin: center;
  font-size: 0.9rem;
}
.categorias-header.activo .flecha {
    transform: rotate(180deg);
}

#toggle-categorias {
  display: block;
  border: none;
  background: transparent;
  color: var(--primary-color);
  cursor: pointer;
}

.categoria-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--accent-light);
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  transition: all 0.2s ease;
  color: var(--primary-text-color);
  background: #f7faf8;
}

.categoria-tag:hover {
  background: var(--accent-light);
  color: var(--primary-text-hover-color);
}

.categoria-tag.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* ============================= */
/* GRID */
/* ============================= */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

/* ============================= */
/* CARDS */
/* ============================= */

.card {
  background: var(--surface-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
0 2px 8px rgba(0,0,0,.06),
0 12px 24px rgba(0,0,0,.08);
  transition: transform .25s,box-shadow .25s;
  border: 1px solid var(--border-color);
  border-top:3px solid var(--accent-color);
}

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

.card a {
  text-decoration: none;
  color: inherit;
  padding: 18px;
  text-align: center;
  display:flex;
  flex-direction:column;
  height:100%;
}

.card a img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 14px;
}

.card h3 {
  font-size: 15px;
  margin: 0;
  color: var(--primary-text-color);
}
.card p{
    flex:1;
}

.logo.empty.card {
  width: 100px;
  height: 100px;
  font-size: 12px;
  align-self: center;
}

/* ============================= */
/* FOOTER */
/* ============================= */

footer {
  text-align: center;
  padding: 25px 10px;
  font-size: 13px;
  color: var(--primary-text-color);
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
}

.links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 768px) {

  .app-header {
    min-height: 60px;
    padding: 10px 10px;
    box-sizing: border-box;
  }

  .logo1 {
    left: 10px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
  }

  .logo2 {
    right: 0px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .app-header h1 {
    font-size: 20px;
    line-height: 1.2;
  }

  #volver-btn{
    display: none;
  }

 .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}


