/* ===== APPLE WATCH STYLE ACHIEVEMENTS GRID ===== */

.aw-section { max-width: 1100px; }

/* Honeycomb-ish rounded grid */
.aw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
@media(min-width:900px) {
  .aw-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
  }
  /* Make some cards bigger for visual rhythm */
  .aw-card:nth-child(1) { grid-row: span 2; }
  .aw-card:nth-child(4) { grid-column: span 2; }
  .aw-card:nth-child(7) { grid-row: span 2; }
}
@media(max-width:600px) {
  .aw-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; gap: 0.8rem; }
  .aw-card-emoji{font-size:2.5rem}
  .aw-card-text{padding:0.6rem 0.8rem;border-radius:12px}
  .aw-card-text h3{font-size:0.78rem}
  .aw-card-text p{font-size:0.65rem;-webkit-line-clamp:1}
  .aw-modal{border-radius:20px;max-height:90vh}
  .aw-modal-hero{padding:1.5rem 1rem 1rem;border-radius:20px 20px 0 0}
  .aw-modal-emoji{font-size:2.5rem}
  .aw-modal-hero-text h2{font-size:1rem}
  .aw-modal-body-inner{padding:1rem}
  .aw-modal-detail{font-size:0.82rem}
}
@media(max-width:400px) {
  .aw-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
}

/* ===== CARD ===== */
.aw-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.aw-card:hover {
  transform: scale(1.06);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  z-index: 10;
}
.aw-card:active { transform: scale(0.98); }

/* Background fill */
.aw-card-bg {
  position: absolute; inset: 0;
  transition: filter 0.4s ease;
}
.aw-card:hover .aw-card-bg { filter: brightness(1.08); }

/* Content overlay */
.aw-card-content {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
}

/* Text overlay — solid dark at bottom */
.aw-card-text {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
}
.aw-card-text h3 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.aw-card-text p {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== MODAL ===== */
.aw-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.aw-modal-overlay.open { opacity: 1; pointer-events: all; }

.aw-modal {
  width: 100%; max-width: 580px;
  max-height: 88vh; overflow-y: auto;
  border-radius: 28px;
  position: relative;
  transform: scale(0.88) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.aw-modal-overlay.open .aw-modal { transform: scale(1) translateY(0); }
.aw-modal::-webkit-scrollbar { width: 4px; }
.aw-modal::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

.aw-modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 10;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: var(--transition);
}
.aw-modal-close:hover { background: rgba(255,255,255,0.35); transform: scale(1.1); }
.aw-modal-close [data-lucide] { width: 1rem; height: 1rem; stroke: #fff; stroke-width: 2.5; }

/* Modal hero */
.aw-modal-hero {
  padding: 2.5rem 1.5rem 1.5rem;
  display: flex; align-items: center; gap: 1.2rem;
  border-radius: 28px 28px 0 0;
}
.aw-modal-emoji { font-size: 3.5rem; flex-shrink: 0; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
.aw-modal-hero-text h2 {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 800; color: #fff;
  margin-bottom: 0.3rem; line-height: 1.3;
}
.aw-modal-hero-text p { font-size: 0.85rem; color: rgba(255,255,255,0.75); font-weight: 500; }

/* Modal body */
.aw-modal-body-inner { padding: 1.5rem; }
.aw-modal-detail { font-size: 0.9rem; color: var(--text-dim); line-height: 1.75; margin-bottom: 1.2rem; }

.aw-modal-video {
  position: relative; padding-bottom: 56.25%; height: 0;
  border-radius: 16px; overflow: hidden; margin-bottom: 1.2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.aw-modal-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

.aw-modal-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.aw-modal-tags span {
  padding: 0.25rem 0.7rem; border-radius: 980px; font-size: 0.72rem; font-weight: 600;
  background: rgba(94,92,230,0.1); color: var(--accent2);
  border: 1px solid rgba(94,92,230,0.15);
}

/* ===== PHOTO GALLERY IN MODAL ===== */
.aw-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
  border-radius: 12px;
  overflow: hidden;
}
.aw-gallery-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s ease, filter 0.3s ease;
  border-radius: 8px;
}
.aw-gallery-img:hover {
  transform: scale(1.04);
  filter: brightness(1.08);
  z-index: 2;
  position: relative;
}
@media(max-width:480px) {
  .aw-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ===== VIDEO LINK (replaces blocked iframe) ===== */
.aw-video-link { display:block; text-decoration:none; margin:1rem 0; }
.aw-video-thumb {
  display:flex; align-items:center; gap:1rem;
  padding:1rem 1.2rem;
  background:linear-gradient(135deg,#1a73e8,#0d47a1);
  border-radius:14px;
  color:#fff;
  transition:transform 0.3s var(--spring), box-shadow 0.3s;
}
.aw-video-thumb:hover { transform:scale(1.02); box-shadow:0 8px 24px rgba(26,115,232,0.4); }
.aw-video-play {
  width:44px; height:44px; border-radius:50%;
  background:rgba(255,255,255,0.2);
  display:flex; align-items:center; justify-content:center;
  font-size:1.1rem; flex-shrink:0;
}
.aw-video-thumb p { font-size:0.9rem; font-weight:600; }
