/* ========= BASE VARIABLES & GLOBAL RULES ========= */
:root {
  --color-main: #1366d6;
  --color-accent: #ffe600;
  --color-bg: #f7f9fb;
  --color-card: #fff;
  --color-cat: #eaf0fd;
  --color-txt: #18213a;
  --color-grey: #eef3fa;
  --color-cta: #008080;
  --font-main: 'Montserrat', Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--color-txt);
  background: var(--color-bg);
  margin: 0;
}

/* ========= HERO SECTION ========= */
.hero {
  background: linear-gradient(100deg, #1371d6 70%, #009c96 100%);
  color: #fff;
  padding-bottom: 60px;
  position: relative;
  min-height: 300px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=cover&w=1200&q=80')
    center/cover no-repeat;
  opacity: 0.24;
  z-index: 1;
}
.hero-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 5vw 0;
}
.hero-logo {
  background: #23232a;
  border-radius: 18px;
  padding: 7px 24px 7px 20px;
  border: 2.5px solid var(--color-accent);
  box-shadow: 0 2px 18px #0005;
  display: inline-block;
}
.hero-logo img {
  height: 54px;
  max-width: 340px;
  object-fit: contain;
}
.hero-content {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  padding: 0 5vw;
}
.hero-content h1 {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 15px;
  letter-spacing: -1px;
}
.hero-content p {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0;
}

/* ========= BOTONES ========= */
/* Estilos base para botones con variantes */
button,
.btn-main,
.btn-sec,
.btn-votar,
.btn-link {
  font-family: var(--font-main);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-main {
  background: var(--color-accent);
  color: #23272f;
  font-weight: 800;
  border-radius: 9px;
  font-size: 1.09rem;
  padding: 11px 24px;
  box-shadow: 0 2px 9px #0001;
}
.btn-main:hover {
  background: #ffe600d1;
}
.btn-sec {
  background: #fff;
  color: var(--color-main);
  border-radius: 8px;
  padding: 11px 19px;
  font-weight: 700;
  font-size: 1.04rem;
  box-shadow: 0 1px 6px #0001;
}
.btn-link {
  background: none;
  color: var(--color-main);
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: underline;
  padding: 2px 7px;
  margin: 18px 0;
}

/* ========= SECCIÓN CATEGORÍAS & TARJETAS ========= */
.categorias {
  max-width: 1250px;
  margin: -62px auto 0;
  background: var(--color-card);
  border-radius: 22px;
  box-shadow: 0 6px 30px #11367c18;
  padding: 42px 3vw 36px;
  position: relative;
  z-index: 10;
}
.categorias h2 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 25px;
  color: #222d44;
}
.cat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 12px;
  justify-content: flex-start;
}
.cat-card {
  background: var(--color-cat);
  border-radius: 17px;
  box-shadow: 0 2px 14px #17428717;
  width: 200px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 12px 18px;
  border: 2.7px solid transparent;
  transition: background 0.15s, box-shadow 0.18s;
}
.cat-card:hover {
  background: #dbefff;
  box-shadow: 0 8px 38px #1742871f;
  border-color: var(--color-accent);
}
.cat-icon {
  font-size: 2.9rem;
  margin-bottom: 9px;
}
.cat-titulo {
  font-weight: 800;
  color: var(--color-main);
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.cat-desc {
  font-size: 0.98rem;
  color: #29405e;
  margin-bottom: 5px;
}
.cat-vermas {
  color: var(--color-cta);
  font-weight: 700;
  text-decoration: underline;
  font-size: 1.01rem;
}

/* ========= SECCIÓN RANKING ========= */
.ranking {
  max-width: 1200px;
  margin: 48px auto 0;
  background: var(--color-card);
  border-radius: 18px;
  box-shadow: 0 4px 26px #11367c15;
  padding: 42px 3vw 32px;
}
.ranking h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #123067;
  margin-bottom: 30px;
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.07rem;
}
.ranking-table th,
.ranking-table td {
  padding: 13px 12px;
  text-align: left;
}
.ranking-table th {
  color: #095487;
  font-weight: 900;
  font-size: 1.04rem;
  border-bottom: 2.2px solid #e3e7ef;
}
.ranking-table td {
  color: #212226;
  border-bottom: 1.2px solid #eef1f7;
}
.ranking-table .votar {
  text-align: center;
}
.btn-votar {
  background: var(--color-cta);
  color: #fff;
  border-radius: 8px;
  padding: 8px 24px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 1px 8px #0eaea231;
  transition: background 0.14s;
}
.btn-votar:hover {
  background: #1371d6;
}
.ranking-table .ganador {
  background: #fffbe7;
  color: #cd9200;
  border-radius: 7px;
  padding: 3px 12px;
  font-weight: 700;
  font-size: 1.01rem;
  margin-left: 8px;
}
/* Encabezado específico para la sección Ranking */
#rankingSection h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0d1b2a;
  margin-top: 16px;
  margin-bottom: 14px;
  text-align: center;
}

/* ========= NEGOCIOS RANKING ========= */
#negociosRanking {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 10px 0;
}
.negocio-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  width: 180px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  font-family: var(--font-main);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.negocio-card:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.negocio-card .emoji {
  font-size: 24px;
  margin-bottom: 6px;
}
.negocio-card .nombre {
  font-weight: 600;
  margin-bottom: 4px;
}
.negocio-card .categoria {
  font-size: 13px;
  color: #666;
}

/* ========= CATEGORÍAS DESTACADAS ========= */
#catDestacadas {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 8px 6px;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ========= TESTIMONIOS ========= */
.testimonio {
  max-width: 900px;
  margin: 42px auto 0;
  padding: 0 3vw;
}
.testi-card {
  display: flex;
  align-items: center;
  background: #eafaf7;
  border-radius: 16px;
  box-shadow: 0 1px 6px #1be5d324;
  padding: 23px 32px;
  gap: 30px;
}
.testi-card img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 18px;
  border: 2.7px solid #009c96;
}
.testi-card p {
  font-size: 1.19rem;
  color: #113249;
  margin-bottom: 7px;
}
.testi-card span {
  color: #008080;
  font-weight: 800;
}

/* ========= CTA ========= */
.cta {
  background: var(--color-cta);
  color: #fff;
  padding: 38px 0 30px;
  margin-top: 42px;
  text-align: center;
}
.cta h2 {
  font-size: 2.1rem;
  font-weight: 900;
  margin-bottom: 20px;
}
.cta .btn-main {
  margin: 0 auto;
  font-size: 1.12rem;
}

/* ========= FOOTER ========= */
footer {
  background: #233557;
  color: #fff;
  padding: 21px 0 15px;
  font-size: 0.99rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-direction: row;
}
footer div {
  margin: 0 38px;
}
footer a {
  color: #fff;
  text-decoration: none;
  margin-right: 26px;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}
footer a:hover {
  text-decoration: underline;
  opacity: 1;
}
footer .redes a img {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  opacity: 0.88;
  vertical-align: middle;
  filter: grayscale(0.3);
}
footer .app-badge {
  height: 34px;
  margin-left: 9px;
  margin-top: 2px;
  box-shadow: 0 2px 10px #0004;
  border-radius: 7px;
  background: #fff;
}
footer .app-badge:first-of-type {
  margin-left: 0;
}

/* ========= MODALES Y PANEL ADMIN ========= */
/* Panel admin - barra superior */
.admin-panel-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 19px;
  justify-content: flex-end;
  align-items: center;
}
/* Modales */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 45, 60, 0.33);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}
.modal-content {
  background: #fff;
  margin: auto;
  padding: 32px 26px 24px;
  border-radius: 16px;
  box-shadow: 0 6px 36px rgba(19, 31, 64, 0.17);
  width: 95vw;
  max-width: 420px;
  min-width: 260px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.close {
  position: absolute;
  right: 14px;
  top: 12px;
  font-size: 2rem;
  color: #c3cadb;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2;
}
.close:hover {
  color: #d02626;
}
/* Estilos comunes para inputs, selects y botones dentro de modales */
.modal-content input,
.modal-content select,
.modal-content button {
  width: 100%;
  padding: 10px 9px;
  margin: 10px 0;
  border-radius: 6px;
  border: 1.5px solid #ddd;
  font-size: 1rem;
}
.modal-content button {
  background: var(--color-accent);
  color: #222;
  font-weight: 700;
  margin-top: 12px;
}
.modal-content button:hover {
  background: #ffd000;
}
#previewImg {
  border: 2px solid #154cce;
  margin-top: 10px;
  display: block;
  max-width: 120px;
  border-radius: 8px;
}

/* Panel admin - Tabs y listas */
#adminTabs {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: wrap;
}
#adminTabs button {
  font-size: 1.04rem;
  border-radius: 8px;
  padding: 8px 19px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}
#adminTabs .btn-main {
  background: #ffe600;
  color: #222;
}
#adminTabs .btn-sec {
  background: #eaf0fd;
  color: #1366d6;
}
#adminTabs button.active {
  background: #1366d6 !important;
  color: #fff !important;
}
#listaCategorias,
#listaNegocios {
  margin: 10px 0 16px;
  padding: 0;
  list-style: none;
  max-height: 250px;
  overflow-y: auto;
}
#listaCategorias li,
#listaNegocios li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 1.09rem;
  background: #f7f9fb;
  border-radius: 7px;
  padding: 6px 8px;
}
#listaCategorias button,
#listaNegocios button {
  margin-left: 6px;
  font-size: 0.94rem;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  background: #eaf0fd;
  color: #174287;
}
#listaCategorias button:hover,
#listaNegocios button:hover {
  background: #ffd000;
  color: #222;
}
#resetVotosTodos {
  margin-left: 18px;
  background: #ffe600;
  color: #1a237e;
  font-weight: 700;
}
.fantasma-row,
.negocio-ghost {
  background: #f6f7fb !important;
  filter: grayscale(0.25) brightness(0.92);
  opacity: 0.72 !important;
  border-left: 6px solid #ffe60088;
  pointer-events: auto;
  color: #292929 !important;
}
.fantasma-row td,
.negocio-ghost * {
  color: #222 !important;
  text-shadow: none !important;
  font-weight: 600;
}
.fantasma-row:hover,
.negocio-ghost:hover {
  filter: grayscale(0.13) brightness(1) !important;
  opacity: 1 !important;
  background: #fffde7 !important;
}
.app-badge {
  box-shadow: 0 2px 14px #0004;
  border-radius: 7px;
  background: #fff;
}
footer .app-badge {
  padding: 0;
  box-shadow: 0 2px 10px #0004;
  margin-left: 8px;
  margin-right: 0;
  vertical-align: middle;
  height: 34px;
}
footer .app-badge:first-of-type {
  margin-left: 0;
}

/* ========= FIN DE ESTILOS BASE ========= */
