/* Index Page — Competition Themes styles
   Consolidated here to avoid duplicates in /css. Mirrors Eligibility look. */
/* Stats section — mirrored structure and behavior from Registration Benefits */
#themes { background: #fff; border-top: 1px solid var(--tg-grey); }  
#themes .container { padding: 38px 0; max-width: 1500px; margin: 0 auto; position: relative; }

@media (min-width: 1900px) {
  #themes .container { width: 80vw; max-width: none; }
}
.section-title { text-align: center; }
#themes-header h2 { color: var(--tg-navy); font-size: clamp(1.6rem, 2.6vw, 2rem); animation: revealUp 500ms ease both; }
#themes-header p { color: var(--tg-charcoal); font-size: clamp(1rem, 1.5vw, 1.125rem); animation: fadeIn 700ms ease both 120ms; }
.header-accent   {height: 6px; max-width: 160px; border-radius: 3px; background: linear-gradient(90deg, var(--primary, #0d6efd), var(--secondary, #00c2ff)); margin: 12px auto 9px;}   
#themes-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 18px; justify-items: center; }
#themes-card { background: var(--tg-offwhite); border: 1px solid var(--tg-grey); border-radius: var(--radius-8); padding: 18px; text-align: center; box-shadow: var(--shadow-1); transition: transform 0.2s ease, box-shadow 0.2s ease; }
#themes-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(12,35,64,0.18); }
.elegibility-number { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 800; color: var(--tg-navy); display: block; }
#themes-label { color: var(--tg-charcoal); font-size: clamp(0.9rem, 1vw + 0.6rem, 1.05rem); }

.themes .section-title h2 {
  margin: 0 0 18px 0;
}

.themes .themes-division {
  margin-bottom: 24px;
}

.themes .themes-container {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 778px) {
  .themes .themes-container { grid-template-columns: repeat(2, 1fr); }
}

/* Card — 3D, glassy look (matching Eligibility aesthetics) */
.themes .card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e6e8eb;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.1),
    0 3px 8px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.6);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  transform-style: preserve-3d;
  backdrop-filter: blur(8px);
  /* Default accent color, can be overridden per-card */
  --color: var(--primary, #0d6efd);
}

.themes .card:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(1deg);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.15),
    0 8px 20px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.themes .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color, #0d6efd), var(--secondary, #00c2ff));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.themes .card:hover::before { opacity: 1; }

/* Header — icon, title on the left; 3D image tile on the right */
.themes .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 10px;
  background: linear-gradient(354deg, rgb(229 234 241 / 90%) 0%, #f59e0be3 100%);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  position: relative;
  backdrop-filter: blur(16px);
}

.themes .card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  position: relative;
  background: linear-gradient(135deg, var(--color, #0d6efd), var(--secondary, #00c2ff));
  box-shadow:
    0 10px 18px rgba(13, 110, 253, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.8);
  display: grid;
  place-items: center;
  transform: perspective(120px) rotateX(10deg) rotateY(-8deg);
  transition: all 0.3s ease;
}

.themes .card-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -6px;
  height: 10px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.0));
  filter: blur(2px);
}

.themes .card-icon i {
  color: #ffffff;
  font-size: 22px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.themes .card:hover .card-icon {
  transform: perspective(120px) rotateX(0deg) rotateY(0deg) scale(1.06);
  box-shadow: 0 14px 24px rgba(13, 110, 253, 0.3), inset 0 1px 0 rgba(255,255,255,0.9);
}

.themes .card-title h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary, var(--tg-navy));
  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.themes .card-title p {
  margin: 2px 0 0;
  color: var(--secondary, var(--tg-pine));
  font-size: 0.9rem;
  font-weight: 500;
}

.themes .card-header-image {
  flex-shrink: 0;
  width: 220px;
  padding: 6px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--color, #0d6efd) 0%, var(--secondary, #00c2ff) 100%);
  text-align: center;
}

.themes .card-header-image img {
  width: 100%;
  height: 100px;
  object-fit: fill;
  border-radius: 4px;
  box-shadow:
    0 6px 18px rgba(0,0,0,0.15),
    0 3px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 2px solid rgba(255,255,255,0.8);
}

/* Ensure card images are governed by Themes (not base) */
.themes .card img {
  max-width: 100%;
  display: block;
}

.themes .card:hover .card-header-image img {
  transform: scale(1.05) rotate(2deg);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.2),
    0 4px 8px rgba(0,0,0,0.15);
}

/* Body */
.themes .card-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgb(124 229 29 / 55%) 100%);
}

.themes .card-body ul {
  margin: 0;
  padding-left: 20px;
}

.themes .card-body li {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 6px;
  position: relative;
  padding: 5px 20px;
  transition: all 0.2s ease;
}

.themes .card-body li::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color, #0d6efd);
  font-weight: bold;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.themes .card:hover .card-body li::before {
  color: var(--secondary, #00c2ff);
  transform: translateX(2px);
}

.themes .card-body li:hover {
  color: var(--color, #0d6efd);
  transform: translateX(4px);
}

/* Division-specific accent mapping — per card color */
.themes .themes-container .card:nth-child(1) { --color: #ff4d78; }
.themes .themes-container .card:nth-child(2) { --color: #1f2f98; }
.themes .themes-container .card:nth-child(3) { --color: #10b981; }
.themes .themes-container .card:nth-child(4) { --color: #f59e0b; }
.themes .themes-container .card:nth-child(5) { --color: #06b6d4; }

/* Responsive tweaks */
@media (max-width: 777px) {
  .themes .card-header-image { width: 100px; }
  .themes .card-header-image img { height: 70px; object-fit: cover; }
}
