/* ============================================================
   GRAPHICS PAGE + DARK MODE + HOVER ANIMATIONS
   Applies to graphics.html — also adds dark mode & animations
   to index.html when included via shared style.css additions
   ============================================================ */

/* ---- Dark Mode Variables ---- */
[data-theme="dark"] {
  --bg:         #111110;
  --surface:    #1C1C1A;
  --text:       #F0EDE8;
  --text-muted: #8A8680;
  --border:     #2E2C28;
  --accent:     #D4714A;
  --accent-lt:  #2A1A12;
  --accent-dk:  #E88060;
}

/* ---- Dark toggle button ---- */
.dark-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.dark-toggle:hover {
  background: var(--accent-lt);
  border-color: var(--accent);
}

/* ---- Enhanced hover animations for index.html ---- */

/* Cards lift on hover */
.case-study {
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}
.case-study:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.12) !important;
}

.portfolio-card {
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}
.portfolio-card:not(.add-card):hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.13) !important;
}

/* Skill chips pop */
.skill-chip {
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
}
.skill-chip:hover {
  transform: translateY(-2px) scale(1.03);
}

/* Tool cards slide right slightly */
.tool-card {
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease !important;
}
.tool-card:hover {
  transform: translateX(4px);
  border-color: var(--accent);
}

/* Metric cards pulse accent border */
.metric-card {
  transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}
.metric-card:not(.highlight):hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(200,96,46,0.12);
  border-color: var(--accent);
}

/* Pillar cards lift */
.pillar {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}
.pillar:hover {
  transform: translateY(-3px);
}

/* Contact items slide */
.contact-item {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}
a.contact-item:hover {
  transform: translateX(4px);
}

/* Copy result items */
.copy-result-item {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}
.copy-result-item:hover {
  transform: translateX(4px);
}

/* Stat numbers scale up on hover */
.stat:hover .stat-num {
  color: var(--accent);
  transition: color 0.2s ease;
}

/* Buttons enhanced */
.btn {
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

/* Filter buttons */
.filter-btn {
  transition: all 0.2s ease !important;
}
.filter-btn:hover:not(.active) {
  transform: translateY(-1px);
}

/* ============================================================
   GRAPHICS PAGE STYLES
   ============================================================ */

/* Hero */
.graphics-hero {
  padding: 140px 0 64px;
  background: var(--bg);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color 0.2s ease, gap 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
  gap: 10px;
}

.graphics-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.graphics-hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.graphics-hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}

/* Nav pills */
.graphics-nav-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* Section */
.graphics-section {
  padding: 80px 0;
}

.graphics-section.alt-bg {
  background: var(--surface);
}

/* Section header */
.gs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.gs-brand-info h2 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 10px;
}

.gs-brand-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

.gs-drive-btn {
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 8px;
}

/* Brand badges */
.gs-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 4px;
}

.re-badge      { background: #D8F3DC; color: #2D6A4F; }
.mining-badge  { background: #FEF3C7; color: #78350F; }
.health-badge  { background: #DCFCE7; color: #166534; }
.cleaning-badge{ background: #DBEAFE; color: #1E40AF; }
.video-badge   { background: #EDE9FE; color: #5B21B6; }

/* Graphics grid */
.graphics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.graphics-grid.four-col {
  grid-template-columns: repeat(4, 1fr);
}

/* Individual graphic item */
.graphic-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--border);
}

.graphic-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.graphic-item:hover img {
  transform: scale(1.05);
}

/* Overlay */
.graphic-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  border-radius: var(--radius);
}

.graphic-item:hover .graphic-overlay {
  background: rgba(0,0,0,0.45);
}

.zoom-icon {
  font-size: 1.8rem;
  color: #fff;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.graphic-item:hover .zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* Caption */
.graphic-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
  padding: 0 2px;
}

/* ---- Videos grid ---- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.video-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.video-preview {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.video-item:hover .video-preview {
  transform: scale(1.03);
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}

.video-item:hover .video-overlay {
  background: rgba(0,0,0,0.15);
}

.play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
  padding-left: 4px;
}

.play-btn:hover {
  transform: scale(1.1);
  background: #fff;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transition: opacity 0.2s ease;
}

.lightbox-caption {
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  text-align: center;
  max-width: 560px;
  line-height: 1.5;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 1001;
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 1001;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.2); }

/* ============================================================
   DARK MODE — base site elements
   ============================================================ */
[data-theme="dark"] #navbar {
  background: rgba(17,17,16,0.92);
  border-bottom-color: var(--border);
}

[data-theme="dark"] .about-card,
[data-theme="dark"] .pillar,
[data-theme="dark"] .tool-card,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .case-study,
[data-theme="dark"] .portfolio-card,
[data-theme="dark"] .education-card,
[data-theme="dark"] .contact-item,
[data-theme="dark"] .contact-form-wrapper,
[data-theme="dark"] .copy-result-item {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #111110;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] #footer {
  background: #0A0A09;
}

[data-theme="dark"] .placeholder-thumb {
  background: #1C1C1A;
}

[data-theme="dark"] .add-card {
  border-color: var(--border);
}

[data-theme="dark"] .graphics-section.alt-bg {
  background: #161614;
}

[data-theme="dark"] .graphic-item {
  background: var(--border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .graphics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .graphics-grid.four-col {
    grid-template-columns: repeat(2, 1fr);
  }
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .graphics-hero {
    padding: 120px 0 48px;
  }

  .graphics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .graphics-grid.four-col {
    grid-template-columns: repeat(2, 1fr);
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .gs-header {
    flex-direction: column;
    gap: 16px;
  }

  .gs-drive-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .graphics-nav-pills {
    gap: 6px;
  }

  .pill {
    font-size: 0.78rem;
    padding: 6px 14px;
  }
}
