/* ==========================================================================
   AdmitMe.co.uk — Homepage Styles
   Editorial Magazine Design System
   ========================================================================== */

/* ---------- Google Fonts loaded via PHP ---------- */

/* ---------- Design Tokens ---------- */
:root {
  --am-bg:          #0f0f0f;
  --am-surface:     #141414;
  --am-card:        #1d1d1d;
  --am-card-hover:  #252525;
  --am-accent:      #d4a853;
  --am-accent2:     #c19748;
  --am-text:        #f0f0f0;
  --am-text-sec:    #a0a0a0;
  --am-divider:     #2a2a2a;
  --am-radius:      0px; /* Sharp editorial look */
  --am-radius-sm:   0px;
  --am-shadow:      0 10px 30px rgba(0,0,0,.5);
  --am-shadow-hover:0 20px 50px rgba(0,0,0,.8);
  --am-transition:  .4s cubic-bezier(.165,.84,.44,1);
  --am-font-head:   'Playfair Display', Georgia, serif;
  --am-font-body:   'Inter', -apple-system, sans-serif;
  --am-container:   1300px;
}

/* ---------- Global Overrides (scoped) ---------- */
.admitme-home {
  background: var(--am-bg);
  color: var(--am-text);
  font-family: var(--am-font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Force Astra container to full-width */
.admitme-home .ast-container {
  max-width: 100% !important;
  padding: 0 !important;
}
.admitme-home #primary {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.admitme-home .entry-content {
  margin: 0 !important;
  padding: 0 !important;
}

/* ---------- Utility ---------- */
.am-container {
  max-width: var(--am-container);
  margin: 0 auto;
  padding: 0 24px;
}

.am-section {
  padding: 80px 0;
  position: relative;
}

.am-section-title {
  font-family: var(--am-font-head);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--am-text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.am-section-subtitle {
  font-size: 1rem;
  color: var(--am-text-sec);
  margin-bottom: 48px;
  font-weight: 400;
}

.am-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}

.am-section-header .am-section-subtitle {
  margin-bottom: 0;
}

.am-view-all {
  font-size: .875rem;
  color: var(--am-accent);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color var(--am-transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.am-view-all:hover { color: var(--am-accent2); }
.am-view-all::after { content: '→'; transition: transform var(--am-transition); }
.am-view-all:hover::after { transform: translateX(4px); }

/* Category label badge */
.am-cat-label {
  display: inline-block;
  background: var(--am-accent);
  color: #0f0f0f;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 3px;
  text-decoration: none;
  transition: background var(--am-transition);
}
.am-cat-label:hover {
  background: var(--am-accent2);
  color: #0f0f0f;
}

.am-date {
  font-size: .8rem;
  color: var(--am-text-sec);
}

/* Scroll reveal animation */
.am-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.am-reveal.am-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   § 1. HERO BANNER
   ========================================================================== */
.am-hero {
  position: relative;
  width: 100%;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
}

.am-hero__video {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.am-hero__video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6) saturate(0.8);
}

.am-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.am-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: amKenBurns 20s ease-in-out infinite alternate;
}

@keyframes amKenBurns {
  0%   { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.am-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15,15,15,.95) 0%,
    rgba(15,15,15,.6) 40%,
    rgba(15,15,15,.2) 100%
  );
  z-index: 2;
}

.am-hero__content {
  position: relative;
  z-index: 3;
  padding: 60px 0;
  max-width: 720px;
}

.am-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.am-hero__tag .am-cat-label {
  background: var(--am-accent2);
}
.am-hero__tag span {
  font-size: .8rem;
  color: var(--am-text-sec);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.am-hero__title {
  font-family: var(--am-font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.am-hero__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--am-transition);
}
.am-hero__title a:hover { color: var(--am-accent); }

.am-hero__excerpt {
  font-size: 1.05rem;
  color: rgba(240,236,226,.75);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 600px;
}

.am-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--am-accent);
  color: #0f0f0f;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  border-radius: var(--am-radius-sm);
  transition: all var(--am-transition);
  letter-spacing: .02em;
}
.am-hero__cta:hover {
  background: #fff;
  color: #0f0f0f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,168,83,.3);
}

/* Ticker Tape */
.am-ticker {
  background: #1a1a1a;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  padding: 12px 0;
  overflow: hidden;
  position: relative;
  z-index: 10;
}
.am-ticker__inner {
  display: flex;
  white-space: nowrap;
  animation: amTicker 40s linear infinite;
}
.am-ticker__item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 40px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
}
.am-ticker__item strong { color: var(--am-accent); }
@keyframes amTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ==========================================================================
   § 2. CATEGORY NAVIGATION — DEPRECATED (Moved to Index)
   ========================================================================== */

/* ==========================================================================
   § 3. FEATURED / EDITOR'S PICKS
   ========================================================================== */
.am-featured__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.am-featured__main {
  position: relative;
  border-radius: var(--am-radius);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
}
.am-featured__main .am-card__img {
  position: absolute;
  inset: 0;
}
.am-featured__main .am-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.am-featured__main:hover .am-card__img img {
  transform: scale(1.05);
}
.am-featured__main .am-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,15,15,.9) 0%, transparent 60%);
  z-index: 1;
}
.am-featured__main .am-card__body {
  position: relative;
  z-index: 2;
  padding: 32px;
}
.am-featured__main .am-card__title {
  font-family: var(--am-font-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 12px 0;
}
.am-featured__main .am-card__title a {
  color: #fff;
  text-decoration: none;
}
.am-featured__main .am-card__title a:hover {
  color: var(--am-accent);
}
.am-featured__main .am-card__excerpt {
  color: rgba(240,236,226,.7);
  font-size: .95rem;
  line-height: 1.6;
  margin-top: 8px;
}

.am-featured__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.am-featured__side-card {
  position: relative;
  border-radius: var(--am-radius);
  overflow: hidden;
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
}
.am-featured__side-card .am-card__img {
  position: absolute;
  inset: 0;
}
.am-featured__side-card .am-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.am-featured__side-card:hover .am-card__img img {
  transform: scale(1.05);
}
.am-featured__side-card .am-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,15,15,.9) 0%, transparent 50%);
  z-index: 1;
}
.am-featured__side-card .am-card__body {
  position: relative;
  z-index: 2;
  padding: 24px;
}
.am-featured__side-card .am-card__title {
  font-family: var(--am-font-head);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 8px 0 0;
}
.am-featured__side-card .am-card__title a {
  color: #fff;
  text-decoration: none;
}
.am-featured__side-card .am-card__title a:hover {
  color: var(--am-accent);
}

/* ==========================================================================
   § 4. LATEST REVIEWS — Card Grid
   ========================================================================== */
.am-latest {
  background: var(--am-bg);
}

.am-latest__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.am-post-card {
  background: var(--am-card);
  border-radius: var(--am-radius);
  overflow: hidden;
  border: 1px solid var(--am-divider);
  transition: all var(--am-transition);
  display: flex;
  flex-direction: column;
}
.am-post-card:hover {
  border-color: var(--am-accent);
  transform: translateY(-6px);
  box-shadow: var(--am-shadow-hover);
}

.am-post-card__img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.am-post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.am-post-card:hover .am-post-card__img img {
  transform: scale(1.06);
}
.am-post-card__img .am-cat-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

.am-post-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.am-post-card__title {
  font-family: var(--am-font-head);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
}
.am-post-card__title a {
  color: var(--am-text);
  text-decoration: none;
  transition: color var(--am-transition);
}
.am-post-card__title a:hover { color: var(--am-accent); }

.am-post-card__excerpt {
  font-size: .88rem;
  color: var(--am-text-sec);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.am-post-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: var(--am-text-sec);
  padding-top: 16px;
  border-top: 1px solid var(--am-divider);
}

.am-post-card__read {
  color: var(--am-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .03em;
  transition: color var(--am-transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.am-post-card__read:hover { color: var(--am-accent2); }

/* ==========================================================================
   § 5. NEWSLETTER CTA
   ========================================================================== */
.am-newsletter {
  background: var(--am-surface);
  padding: 100px 0;
}

.am-newsletter__card {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 56px 48px;
  background: rgba(34,34,34,.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212,168,83,.2);
  border-radius: 20px;
  text-align: center;
  overflow: hidden;
}
.am-newsletter__card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: linear-gradient(135deg, var(--am-accent), var(--am-accent2), transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.am-newsletter__icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.am-newsletter__title {
  font-family: var(--am-font-head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--am-text);
  margin-bottom: 12px;
}

.am-newsletter__desc {
  color: var(--am-text-sec);
  font-size: .95rem;
  margin-bottom: 32px;
  line-height: 1.6;
}

.am-newsletter__form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 20px;
}

.am-newsletter__input {
  flex: 1;
  padding: 14px 20px;
  background: rgba(15,15,15,.6);
  border: 1px solid var(--am-divider);
  border-radius: var(--am-radius-sm);
  color: var(--am-text);
  font-size: .95rem;
  font-family: var(--am-font-body);
  outline: none;
  transition: border-color var(--am-transition);
}
.am-newsletter__input::placeholder { color: var(--am-text-sec); }
.am-newsletter__input:focus { border-color: var(--am-accent); }

.am-newsletter__btn {
  padding: 14px 28px;
  background: var(--am-accent);
  color: #0f0f0f;
  border: none;
  border-radius: var(--am-radius-sm);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--am-transition);
  font-family: var(--am-font-body);
  white-space: nowrap;
}
.am-newsletter__btn:hover {
  background: #fff;
  transform: translateY(-2px);
}

.am-newsletter__trust {
  font-size: .75rem;
  color: var(--am-text-sec);
}

/* ==========================================================================
   § 6. POPULAR THIS WEEK
   ========================================================================== */
.am-popular {
  background: var(--am-bg);
}

.am-popular__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.am-popular__item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--am-divider);
  transition: background var(--am-transition);
  text-decoration: none;
  color: inherit;
}
.am-popular__item:first-child { border-top: 1px solid var(--am-divider); }
.am-popular__item:hover { background: rgba(255,255,255,.02); }

.am-popular__rank {
  font-family: var(--am-font-head);
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(212,168,83,.2);
  min-width: 60px;
  text-align: center;
  line-height: 1;
  transition: color var(--am-transition);
}
.am-popular__item:hover .am-popular__rank {
  color: rgba(212,168,83,.5);
}

.am-popular__thumb {
  width: 100px;
  height: 72px;
  border-radius: var(--am-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.am-popular__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.am-popular__item:hover .am-popular__thumb img {
  transform: scale(1.08);
}

.am-popular__info {
  flex: 1;
  min-width: 0;
}

.am-popular__title {
  font-family: var(--am-font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--am-text);
  margin: 0 0 6px;
  line-height: 1.35;
  transition: color var(--am-transition);
}
.am-popular__item:hover .am-popular__title {
  color: var(--am-accent);
}

.am-popular__meta {
  display: flex;
  gap: 16px;
  font-size: .8rem;
  color: var(--am-text-sec);
}

/* ==========================================================================
   SEARCH OVERLAY
   ========================================================================== */
.am-search-toggle {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--am-transition);
}
.am-search-toggle:hover { color: var(--am-accent, #d4a853); }
.am-search-toggle svg { width: 18px; height: 18px; }

.am-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15,15,15,.96);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.am-search-overlay.am-active {
  opacity: 1;
  visibility: visible;
}

.am-search-overlay__inner {
  width: 90%;
  max-width: 640px;
  text-align: center;
  transform: translateY(20px);
  transition: transform .4s ease;
}
.am-search-overlay.am-active .am-search-overlay__inner {
  transform: translateY(0);
}

.am-search-overlay__label {
  font-family: var(--am-font-head, Georgia, serif);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--am-text-sec, #8a8a8a);
  margin-bottom: 24px;
  letter-spacing: .04em;
}

.am-search-overlay form {
  display: flex;
  border-bottom: 2px solid var(--am-accent, #d4a853);
  padding-bottom: 8px;
}

.am-search-overlay input[type="search"] {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-family: var(--am-font-head, Georgia, serif);
  outline: none;
  padding: 8px 0;
}
.am-search-overlay input[type="search"]::placeholder {
  color: rgba(255,255,255,.2);
}

.am-search-overlay__close {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: none;
  border: 1px solid var(--am-divider, #333);
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--am-transition, .35s ease);
}
.am-search-overlay__close:hover {
  border-color: var(--am-accent, #d4a853);
  color: var(--am-accent, #d4a853);
}

/* Placeholder image fallback */
.am-placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--am-surface) 0%, var(--am-card) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--am-text-sec);
  font-size: .8rem;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .am-featured__grid {
    grid-template-columns: 1fr;
  }
  .am-featured__main { min-height: 380px; }
  .am-featured__side { flex-direction: row; }
  .am-featured__side-card { min-height: 200px; }
}

@media (max-width: 768px) {
  .am-section { padding: 56px 0; }
  .am-container { padding: 0 16px; }

  .am-hero { min-height: 60vh; }

  .am-latest__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .am-featured__side { flex-direction: column; }

  .am-newsletter__form { flex-direction: column; }
  .am-newsletter__card { padding: 40px 28px; }

  .am-popular__rank { font-size: 2rem; min-width: 44px; }
  .am-popular__thumb { width: 80px; height: 58px; }
}

@media (max-width: 480px) {
  .am-latest__grid {
    grid-template-columns: 1fr;
  }

  .am-hero__content { padding: 40px 0; }

  .am-section-header { flex-direction: column; align-items: flex-start; }
}
