/* Salama Productions — Premium Creative Agency Portfolio */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #1a1a1a;
  --bg-elevated: #242424;
  --surface: #ffffff;
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --accent: #e85d04;
  --accent-hover: #f48c42;
  --accent-glow: rgba(232, 93, 4, 0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(232, 93, 4, 0.2);
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  animation: fadeIn 0.7s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ----- Listing: hero + grid ----- */

.salama-hero {
  text-align: center;
  padding: 2rem 1rem 2rem;
  padding-top: max(2rem, env(safe-area-inset-top));
}

.salama-hero .brand-main {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.1;
  position: relative;
  padding-bottom: 1rem;
}

.salama-hero .brand-main::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 4rem;
  height: 2px;
  background: var(--accent);
}

.salama-hero .page-heading {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.82;
}

.afh-page {
  padding: 2.5rem 1.25rem 5rem;
  max-width: 1320px;
  margin: 0 auto;
}

.afh-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .afh-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .afh-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.afh-card {
  display: block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, var(--bg-elevated) 100%);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.afh-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.afh-card-image-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
  min-height: 200px;
}

.afh-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.afh-card:hover .afh-card-image {
  transform: scale(1.03);
}

.afh-card-body {
  padding: 1.5rem;
  text-align: center;
}

.afh-card-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin: 0;
}

/* ----- Detail: cinematic header ----- */

.afh-detail {
  min-height: 100vh;
  padding-bottom: 0;
}

.detail-header {
  text-align: center;
  padding: 3rem 1.5rem 3rem;
  padding-top: max(3rem, env(safe-area-inset-top) + 1rem);
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
}

.afh-detail .back {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
  min-height: 44px;
  line-height: 1.4;
}

.afh-detail .back:hover {
  color: var(--accent);
}

.detail-header h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.35rem;
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 1rem;
}

.detail-header h1::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 4rem;
  height: 2px;
  background: var(--accent);
}

.detail-header .subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.82;
}

.detail-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 5rem;
}

/* ----- Detail: single grid (no stacking) ----- */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

.portfolio-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 248, 248, 0.98) 100%);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.portfolio-card:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
}

.portfolio-card a {
  display: block;
}

.portfolio-card img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.portfolio-card:hover img {
  transform: scale(1.03);
}

/* ----- Website card (button inside card) ----- */

.portfolio-card.website-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3/2;
  min-height: 180px;
  padding: 1.5rem;
}

.website-btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.website-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* ----- Footer: Salama Productions ----- */

.salama-footer {
  background: var(--bg-elevated);
  border-top: 2px solid var(--accent);
  padding: 2.5rem 1.5rem;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
}

.salama-footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.salama-footer .brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.salama-footer .services {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  opacity: 0.78;
}

.salama-footer .contact {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.salama-footer .contact:last-child {
  margin-bottom: 0;
}

.salama-footer .contact a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  opacity: 1;
}

.salama-footer .contact a:hover {
  text-decoration: underline;
}

/* ----- Lightbox (GLightbox overrides) ----- */

.gslide-title { color: var(--text); }
.gdesc-inner { background: rgba(26, 26, 26, 0.97); }
.gnext, .gprev { background: var(--accent); color: #fff; }
.gclose { color: var(--text); }

/* ----- Scroll reveal (optional) ----- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Loading / empty / error ----- */

.afh-loading, .afh-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.afh-error {
  text-align: center;
  padding: 2rem 1rem;
  color: #e74c3c;
}

.afh-error a {
  color: var(--accent);
}

/* ----- Image Protection ----- */

img {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

.protected-image-wrap {
  position: relative;
  display: inline-block;
}

.image-protection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  cursor: default;
  pointer-events: auto;
  background: transparent;
}

a img,
.glightbox img,
.portfolio-card img,
.afh-card-image {
  pointer-events: auto;
}

