/* ============================================================
   ANCU - Estilos principales
   Paleta: verde selva, dorado, crema
   ============================================================ */

:root {
  --green:   #2D5016;
  --green2:  #3D6B22;
  --sage:    #52796F;
  --gold:    #B8860B;
  --gold2:   #D4A017;
  --cream:   #F5F0E8;
  --cream2:  #EDE5D0;
  --text:    #1E1E1E;
  --muted:   #6B6B5A;
  --white:   #FFFFFF;
  --red:     #C0392B;
  --radius:  8px;
  --shadow:  0 2px 12px rgba(0,0,0,.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; }

/* ── Tipografía ── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--green); }
h1 { font-size: clamp(1.8rem,4vw,2.8rem); }
h2 { font-size: clamp(1.4rem,3vw,2rem); }
h3 { font-size: 1.25rem; }

/* ── Contenedor ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.2rem; }

/* ── Botones ── */
.btn {
  display: inline-block;
  padding: .55rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
  text-align: center;
  line-height: 1.4;
}
.btn-primary   { background: var(--green);  color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green2); color: #fff; }
.btn-gold      { background: var(--gold);   color: #fff; border-color: var(--gold); }
.btn-gold:hover{ background: var(--gold2);  color: #fff; }
.btn-outline   { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-sm        { padding: .35rem .9rem; font-size: .85rem; }
.btn-danger    { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { opacity: .88; }

/* ── Navbar ── */
.navbar {
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
}
.navbar-brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.navbar-logo  { height: 46px; width: auto; }
.navbar-brand span { color: var(--gold2); font-size: 1.3rem; font-weight: 800; letter-spacing: .03em; }

.nav-links {
  display: flex;
  list-style: none;
  gap: .2rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: #dde8cc;
  font-weight: 500;
  padding: .45rem .8rem;
  border-radius: 5px;
  font-size: .93rem;
  transition: all .15s;
}
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,.15); color: #fff; }

.navbar-menu { flex: 1; }

.navbar-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

/* dropdown */
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: ' ▾'; font-size: .75em; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
  list-style: none;
  padding: .5rem 0;
  border: 1px solid var(--cream2);
  z-index: 200;
}
.dropdown.dropdown-right { left: auto; right: 0; }
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: .45rem 1rem;
  color: var(--text);
  font-size: .9rem;
}
.dropdown li a:hover { background: var(--cream); color: var(--green); }

/* burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.burger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: #dde8cc;
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .7rem;
  border-radius: 5px;
  font-size: .9rem;
  transition: .15s;
}
.btn-icon:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── Flash ── */
.flash-container { position: fixed; top: 72px; right: 1rem; z-index: 999; display: flex; flex-direction: column; gap: .5rem; max-width: 380px; }
.flash {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .92rem;
  box-shadow: var(--shadow);
  animation: slideIn .25s ease;
}
.flash-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #2e7d32; }
.flash-error   { background: #ffebee; color: #c62828; border-left: 4px solid #c62828; }
.flash-info    { background: #e3f2fd; color: #1565c0; border-left: 4px solid #1565c0; }
.flash-close   { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 1.1rem; line-height: 1; color: inherit; opacity: .6; }
.flash-close:hover { opacity: 1; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, #1a3a0a 60%, #2c4a1e 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/animales.png') center/cover no-repeat;
  opacity: .08;
  pointer-events: none;
}
.hero h1 { color: #fff; margin-bottom: .75rem; }
.hero .subtitle { color: #b8d48a; font-size: 1.1rem; max-width: 620px; margin: 0 auto 1.5rem; }
.hero-btns { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ── Sección ── */
.section { padding: 3rem 0; }
.section-title {
  text-align: center;
  margin-bottom: 2rem;
}
.section-title h2 { margin-bottom: .5rem; }
.section-title p { color: var(--muted); }
.divider-gold {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: .75rem auto 0;
  border-radius: 2px;
}

/* ── Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,.14); }

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--green) 0%, var(--sage) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.card-body { padding: 1.2rem; }
.card-tipo {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .2rem .6rem;
  border-radius: 4px;
  margin-bottom: .5rem;
}
.tipo-noticia { background: #e8f0da; color: var(--green); }
.tipo-evento  { background: #fef3cd; color: #7A6000; }
.card-title { font-size: 1.05rem; margin: .3rem 0 .5rem; }
.card-title a { color: var(--green); }
.card-title a:hover { color: var(--gold); }
.card-date { font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
.card-excerpt { font-size: .9rem; color: var(--muted); line-height: 1.55; margin-bottom: 1rem; }

/* ── Post single ── */
.post-header { padding: 2.5rem 0 1.5rem; }
.post-meta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin: .75rem 0 1rem; color: var(--muted); font-size: .88rem; }
.post-img-main { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 2rem; }
.post-body { max-width: 780px; }
.post-body p  { margin-bottom: 1rem; }
.post-body h2 { margin: 1.5rem 0 .75rem; }
.post-body h3 { margin: 1.2rem 0 .5rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-body li { margin-bottom: .3rem; }
.post-body blockquote { border-left: 4px solid var(--gold); padding: .5rem 1rem; color: var(--muted); font-style: italic; margin: 1rem 0; background: var(--cream2); border-radius: 0 4px 4px 0; }
.post-body img { border-radius: var(--radius); margin: 1rem 0; }

/* ── Formularios ── */
.form-group { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--green); }
input[type="text"],input[type="email"],input[type="password"],input[type="tel"],
input[type="number"],input[type="date"],select,textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid #ccc;
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  background: #fff;
  transition: border-color .2s;
}
input:focus,select:focus,textarea:focus { outline: none; border-color: var(--green); }
textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-help { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.form-error { font-size: .85rem; color: var(--red); margin-top: .3rem; }

/* Checkbox/radio custom */
.check-label { display: flex; align-items: center; gap: .5rem; font-weight: normal; cursor: pointer; }
input[type="checkbox"] { width: auto; }

/* ── Auth box ── */
.auth-wrap { max-width: 420px; margin: 3rem auto; padding: 0 1rem; }
.auth-box { background: #fff; border-radius: var(--radius); padding: 2rem 2.2rem; box-shadow: var(--shadow); }
.auth-box h2 { margin-bottom: 1.5rem; text-align: center; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.auth-logo img { height: 64px; width: auto; }
.auth-links { text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.auth-links a { color: var(--green); font-weight: 600; }

/* ── Panel admin sidebar ── */
.admin-wrap { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
  width: 230px;
  background: var(--green);
  flex-shrink: 0;
  padding: 1.5rem 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.admin-sidebar .sidebar-title { color: var(--gold2); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: .5rem 1.2rem; margin-top: .5rem; }
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1.2rem;
  color: #c8dba8;
  font-size: .9rem;
  transition: .15s;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-sidebar a .icon { font-size: 1.1rem; }

.admin-content { flex: 1; padding: 2rem 1.5rem; background: #f4f1ec; overflow: auto; }
.admin-page-title { margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.admin-page-title h1 { font-size: 1.5rem; margin: 0; }

/* ── Stats cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); text-align: center; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--green); }
.stat-label { font-size: .82rem; color: var(--muted); margin-top: .2rem; }

/* ── Tabla admin ── */
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { background: var(--green); color: #fff; padding: .65rem 1rem; text-align: left; font-weight: 600; white-space: nowrap; }
.data-table td { padding: .6rem 1rem; border-bottom: 1px solid #eee; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--cream); }
.data-table .actions { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
}
.badge-green  { background: #e8f5e9; color: #2e7d32; }
.badge-red    { background: #ffebee; color: #c62828; }
.badge-gold   { background: #fef3cd; color: #7A6000; }
.badge-gray   { background: #f0f0f0; color: #555; }
.badge-blue   { background: #e3f2fd; color: #1565c0; }

/* ── Paginación ── */
.pagination { display: flex; justify-content: center; gap: .4rem; padding: 1.5rem 0; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: .9rem;
  background: #fff;
  border: 1.5px solid #ddd;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: .15s;
}
.page-btn:hover { border-color: var(--green); color: var(--green); }
.page-btn.active { background: var(--green); color: #fff; border-color: var(--green); }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Footer ── */
footer {
  background: var(--green);
  color: #b0c890;
  padding: 2.5rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { color: #fff; margin-bottom: .75rem; font-size: .95rem; }
.footer-col p, .footer-col a { font-size: .88rem; color: #a8c484; line-height: 1.8; }
.footer-col a:hover { color: var(--gold2); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; text-align: center; font-size: .82rem; color: #7a9a5a; }
.social-links { display: flex; gap: .75rem; margin-top: .5rem; }
.social-links a {
  display: flex; align-items: center; gap: .4rem;
  color: #a8c484; font-size: .88rem; transition: .15s;
}
.social-links a:hover { color: var(--gold2); }

/* ── Breadcrumb ── */
.breadcrumb { padding: .75rem 0; font-size: .85rem; color: var(--muted); }
.breadcrumb a { color: var(--green); }
.breadcrumb span { margin: 0 .4rem; }

/* ── Cuota área socio ── */
.cuota-card { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.cuota-card .estado { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.cuota-hist-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cuota-hist-table th { padding: .5rem .75rem; border-bottom: 2px solid #eee; text-align: left; color: var(--muted); font-weight: 600; }
.cuota-hist-table td { padding: .5rem .75rem; border-bottom: 1px solid #f0f0f0; }

/* ── Sobre nosotros ── */
.nosotros-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.valores-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.valor-card { background: #fff; padding: 1.5rem; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.valor-icon { font-size: 2.2rem; margin-bottom: .5rem; }
.valor-card h3 { font-size: 1rem; margin-bottom: .4rem; }
.valor-card p { font-size: .88rem; color: var(--muted); }

/* ── Contacto ── */
.contacto-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; }
.contact-info-item { display: flex; gap: .75rem; margin-bottom: 1.25rem; align-items: flex-start; }
.contact-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.contact-info-item h4 { margin-bottom: .1rem; font-size: .95rem; }
.contact-info-item p, .contact-info-item a { font-size: .9rem; color: var(--muted); }

/* ── Barra anuncio ── */
.announcement-bar {
  background: var(--gold);
  color: #fff;
  text-align: center;
  padding: .45rem 1rem;
  font-size: .88rem;
  font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; }
  .nosotros-grid { grid-template-columns: 1fr; }
  .contacto-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
  .navbar-menu { display: none; }
  .navbar-menu.open { display: block; position: absolute; top: 64px; left: 0; right: 0; background: var(--green); padding: 1rem; z-index: 99; }
  .nav-links { flex-direction: column; }
  .burger { display: flex; }
  .cards-grid { grid-template-columns: 1fr; }
}
