/* ============================================================
   alexrix-child — ar-home.css
   Front page only. Loaded by functions.php via wp_enqueue_scripts.
   ============================================================ */

/* ── Hard reset Neve chrome on the front page ── */
body.ar-front,
body.home {
  padding-top: 0 !important;
  margin-top:  0 !important;
}

/* Hide Neve's header builder and footer builder elements */
body.ar-front .hfg-header,
body.ar-front .nv-header-wrapper,
body.ar-front #header,
body.ar-front .site-header,
body.ar-front .nv-sidebar-wrap,
body.ar-front .neve-main,
body.ar-front .nv-content-wrap,
body.ar-front .hfg-footer,
body.ar-front .site-footer,
body.ar-front #footer {
  display: none !important;
}

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

body.ar-front {
  background: #fff;
  color: #000;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
}

/* ── Nav ─────────────────────────────────────────── */
.ar-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 32px 48px;
  position: relative;
  z-index: 10;
}

.ar-nav__name {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.81rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
}

.ar-nav__links {
  display: flex;
  gap: 48px;
  list-style: none;
}

.ar-nav__links a {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.81rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.ar-nav__links a:hover { opacity: 1; }

/* ── Grid — JS sets absolute positions ─────────────── */
.ar-grid {
  position: relative;
  width: 100%;
  padding: 0 48px 120px;
}

/* ── Card ─────────────────────────────────────────── */
.ar-cell {
  position: absolute;
  display: block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

.ar-cell img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

/* ── Card hover info panel ────────────────────────── */
.ar-cell__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.52) 0%, transparent 100%);
  transform: translateY(5px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.ar-cell__info-date {
  display: block;
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 5px;
}

.ar-cell__info-title {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 0.85rem;
  line-height: 1.3;
  color: #fff;
}

.ar-cell:hover .ar-cell__info,
.ar-cell:focus-visible .ar-cell__info {
  opacity: 1;
  transform: translateY(0);
}

.ar-cell:hover img { opacity: 0.92; }
.ar-cell:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

/* ── Overlay ──────────────────────────────────────── */
.ar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fff;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.ar-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ar-overlay__photo {
  flex: 1 1 65%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 48px;
}

.ar-overlay__photo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.18s ease;
}

.ar-overlay__photo img.is-changing { opacity: 0; }

.ar-overlay__info {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 40px 48px;
  border-left: 1px solid #e4e4e4;
  position: relative;
}

.ar-overlay__close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  cursor: pointer;
  color: #000;
  opacity: 0.3;
  transition: opacity 0.15s;
  padding: 6px;
  line-height: 1;
}
.ar-overlay__close:hover { opacity: 1; }

.ar-overlay__date {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 20px;
}

.ar-overlay__title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 1.25rem;
  line-height: 1.35;
  margin-bottom: 20px;
}

.ar-overlay__excerpt {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 0.8rem;
  line-height: 1.8;
  color: #666;
  margin-bottom: 36px;
}

.ar-overlay__link {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid #000;
  padding-bottom: 3px;
  align-self: flex-start;
  transition: opacity 0.15s;
}
.ar-overlay__link:hover { opacity: 0.4; }

/* ── Slideshow nav ────────────────────────────────── */
.ar-overlay__nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid #e4e4e4;
}

.ar-overlay__nav-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 2px;
  cursor: pointer;
  padding: 10px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  color: #000;
  opacity: 0.5;
  transition: opacity 0.15s, border-color 0.15s;
  line-height: 1;
}
.ar-overlay__nav-btn:hover  { opacity: 1; border-color: #000; }
.ar-overlay__nav-btn:disabled { opacity: 0.15; cursor: default; border-color: #e4e4e4; }

.ar-overlay__nav-count {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: #999;
}

/* ── Tablet ───────────────────────────────────────── */
@media (max-width: 860px) {
  .ar-nav  { padding: 24px 28px; }
  .ar-grid { padding: 0 28px 80px; }
  .ar-overlay__info { flex: 0 0 260px; padding: 48px 28px 36px; }
}

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 600px) {
  .ar-nav  { padding: 20px; }
  .ar-grid { padding: 0 16px 60px; }

  .ar-overlay {
    flex-direction: column;
    overflow-y: auto;
  }
  .ar-overlay__photo {
    flex: 0 0 auto;
    min-height: 52vw;
    max-height: 56vh;
    padding: 20px;
  }
  .ar-overlay__info {
    flex: 0 0 auto;
    width: 100%;
    border-left: none;
    border-top: 1px solid #e4e4e4;
    padding: 28px 20px 36px;
    justify-content: flex-start;
  }
  .ar-overlay__close {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    padding: 8px;
  }
  .ar-overlay__nav {
    margin-top: 24px;
    padding-top: 0;
  }

  /* On touch, always show the hover info panel */
  .ar-cell__info {
    opacity: 1;
    transform: translateY(0);
  }
}
