/* ==========================================================================
   ILAMA BOOKS — HEADER & FOOTER
   ========================================================================== */

/* ---------- Shared reset for our elements ---------- */
#il-home *,
.il-header *,
.il-footer *,
.il-float-wa * {
  box-sizing: border-box;
}
#il-home img,
.il-header img,
.il-footer img {
  max-width: 100%;
  height: auto;
  display: block;
}
#il-home ul,
.il-header ul,
.il-footer ul { list-style: none; margin: 0; padding: 0; }
#il-home a,
.il-header a,
.il-footer a { color: inherit; text-decoration: none; }
#il-home :is(h1,h2,h3,p),
.il-header :is(h1,h2,h3,p),
.il-footer :is(h1,h2,h3,p) { margin: 0; }

/* ---------- Remove GP chrome that sits around our content ---------- */
.inside-header,
.inside-footer,
.site-info,
.navigation-branding,
.site-branding { display: none !important; }

.site-content,
.content-area,
.entry-content,
.inside-article,
#primary,
#content {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---------- Shared container ---------- */
.il-container {
  width: 100%;
  max-width: var(--il-max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Shared button base ---------- */
.il-btn {
  display: inline-block;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--il-radius);
  font-weight: 700;
  font-size: 15px;
  font-family: "Lato", "Segoe UI", Roboto, Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
  text-decoration: none !important;
}
.il-btn:hover { transform: translateY(-2px); }
.il-btn--primary { background: var(--il-accent); color: #fff !important; }
.il-btn--primary:hover { background: var(--il-accent-dark); }
.il-btn--whatsapp { background: var(--il-wa); color: #fff !important; }
.il-btn--whatsapp:hover { background: var(--il-wa-dark); }
.il-btn--secondary {
  background: transparent;
  color: var(--il-ink) !important;
  border: 1.5px solid #d4d4d8;
}
.il-btn--secondary:hover {
  border-color: var(--il-accent);
  color: var(--il-accent) !important;
}
.il-btn--block { display: block; width: 100%; padding: 10px 12px; font-size: 14px; }

/* ---------- Focus styles ---------- */
.il-header a:focus-visible,
.il-header button:focus-visible,
#il-home a:focus-visible {
  outline: 3px solid var(--il-accent);
  outline-offset: 2px;
}

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

.il-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .08);
  font-family: "Lato", "Segoe UI", Roboto, Arial, sans-serif;
}

.il-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  max-width: var(--il-max);
  margin: 0 auto;
  padding: 0 16px;
}

.il-logo img { height: 56px; width: auto; }

/* Desktop nav */
.il-nav { display: flex; align-items: center; gap: 24px; }
.il-nav__list { display: flex; gap: 22px; }
.il-nav__list a {
  font-weight: 600;
  font-size: 15px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: var(--il-ink) !important;
}
.il-nav__list a:hover,
.il-nav__list a[aria-current="page"] {
  color: var(--il-accent) !important;
  border-bottom-color: var(--il-accent);
}
.il-nav__cta { padding: 10px 18px; }

/* Hamburger button */
.il-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.il-nav-toggle__bar {
  display: block;
  height: 3px;
  background: var(--il-ink);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
/* Animate to ✕ when open */
.il-nav-toggle[aria-expanded="true"] .il-nav-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.il-nav-toggle[aria-expanded="true"] .il-nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.il-nav-toggle[aria-expanded="true"] .il-nav-toggle__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

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

.il-footer {
  background: var(--il-footer);
  color: #d8d8d8;
  font-family: "Lato", "Segoe UI", Roboto, Arial, sans-serif;
}

.il-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 40px;
  max-width: var(--il-max);
  margin: 0 auto;
  padding: 56px 16px 40px;
}

.il-footer__brand img {
  height: 60px;
  width: auto;
  margin-bottom: 14px;
  background: #fff;
  padding: 8px 12px;
  border-radius: var(--il-radius);
}
.il-footer__brand p { font-size: 14px; color: #aaa; }

.il-footer__heading {
  color: #fff;
  font-size: 17px;
  margin-bottom: 14px;
}
.il-footer__col li { margin-bottom: 8px; }
.il-footer a { color: #d8d8d8 !important; text-decoration: none !important; }
.il-footer a:hover { color: var(--il-accent) !important; }

.il-footer__bottom {
  border-top: 1px solid #2a2a2a;
  padding: 16px;
  font-size: 14px;
  text-align: center;
  max-width: var(--il-max);
  margin: 0 auto;
}

/* =====================================================================
   FLOATING WHATSAPP BUTTON
   ===================================================================== */

.il-float-wa {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--il-wa);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  animation: il-pulse 2.4s infinite;
  text-decoration: none !important;
}
.il-float-wa:hover { background: var(--il-wa-dark); }
.il-float-wa__icon { width: 34px; height: 34px; }

@keyframes il-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(37,211,102,.55), 0 6px 18px rgba(0,0,0,.3); }
  70%  { box-shadow: 0 0 0 16px rgba(37,211,102,0),  0 6px 18px rgba(0,0,0,.3); }
  100% { box-shadow: 0 0 0 0   rgba(37,211,102,0),  0 6px 18px rgba(0,0,0,.3); }
}

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

@media (max-width: 782px) {
  /* Show hamburger, hide desktop nav */
  .il-nav-toggle { display: flex; }
  .il-nav {
    display: none;
    position: absolute;
    top: 74px; /* height of header */
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 16px 22px;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,.1);
    z-index: 499;
  }
  .il-nav.is-open { display: flex; }
  .il-nav__list { flex-direction: column; gap: 4px; }
  .il-nav__list a { display: block; padding: 10px 0; }

  .il-footer__inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .il-float-wa { animation: none; }
  .il-btn { transition: none; }
}
