/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:    #f04e3a;
  --yellow: #f4c82b;
  --teal:   #3bb9ab;
  --blue:   #086fb6;
  --bg:     #1a1a1a;
  --bg2:    #202020;
  --surface:#2a2a2a;
  --text:   #faf9f7;
  --muted:  rgba(250,249,247,0.5);
  --font:   'Rubik', sans-serif;
  --radius: 18px;
}

.hidden { display: none !important; }

html { 
  scroll-behavior: auto !important; 
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
}
html::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
}
body::-webkit-scrollbar { display: none; }

/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(26,26,26,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 14px 32px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { height: 36px; object-fit: contain; }
.nav-back {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.nav-back:hover { color: var(--text); }

/* ===================== PHASES ===================== */
.phase {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}
.phase.active-phase { display: flex; }
.phase#phase-selection { flex-direction: column; justify-content: flex-start; height: auto; }

/* ===================== HERO SELECTION ===================== */
.selection-hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
  position: relative;
  width: 100%;
}

/* ===================== BROWSE SECTION ===================== */
.browse-section {
  width: 100%;
  background: #1a1a1a;
  padding: 40px 24px 100px;
  position: relative;
  z-index: 5;
}

.brand-line-separator {
  width: 100%;
  height: 2px;
  background: linear-gradient(to left, 
    #f04e3a 0%,   #f04e3a 25%, 
    #f4c82b 25%,  #f4c82b 50%, 
    #3bb9ab 50%,  #3bb9ab 75%, 
    #086fb6 75%,  #086fb6 100%
  );
  opacity: 0.6;
  position: relative;
  z-index: 6;
}
.browse-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.browse-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 40px;
  color: var(--text);
  text-align: right;
}

.browse-controls {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1;
  min-width: 300px;
  position: relative;
}
.search-wrap input {
  width: 100%;
  padding: 18px 50px 18px 24px;
  background: #252525;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: #fff;
  font-family: var(--font);
  font-size: 1.1rem;
  transition: all 0.3s;
}
.search-wrap input:focus {
  outline: none;
  border-color: var(--teal);
  background: #2a2a2a;
  box-shadow: 0 0 0 4px rgba(59,185,171,0.15);
}
.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  opacity: 0.6;
}

.btn-filter-toggle {
  padding: 0 32px;
  height: 64px;
  background: #252525;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--text);
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-filter-toggle:hover {
  background: #2a2a2a;
  border-color: rgba(255,255,255,0.2);
}
.btn-filter-toggle.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.filter-panel-wrap {
  position: relative;
  z-index: 100;
}

.browse-tags-wrap {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0; /* Aligned to left edge of button to prevent left-side clipping in RTL */
  background: #252525;
  padding: 12px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  min-width: 400px;
  max-width: 90vw;
  animation: panelSlideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
  backdrop-filter: blur(12px);
}
.browse-tags-wrap.hidden { display: none !important; }

@keyframes panelSlideUp {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tags-cloud.small {
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap; /* Changed to wrap for overlay panel */
  padding: 4px 0;
}
.tags-cloud.small .tag-pill {
  padding: 8px 18px;
  font-size: 0.85rem;
  white-space: nowrap;
  animation: none !important;
  transform: none !important;
  background: rgba(255,255,255,0.05);
}
.tags-cloud.small .tag-pill:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px) !important;
}

@media (max-width: 600px) {
  .browse-tags-wrap {
    min-width: calc(100vw - 32px);
    left: 50%;
    transform: translateX(-50%);
    animation: panelSlideUpMobile 0.3s cubic-bezier(0.34,1.56,0.64,1);
  }
  .tags-cloud.small {
    justify-content: center; /* Center tags inside the panel on mobile */
  }
}

@keyframes panelSlideUpMobile {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.all-projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  width: 100%;
  min-height: 800px; /* Prevents page jump when filtering results */
}

/* 4 columns on large desktop */
.all-projects-grid .project-card {
  flex: 0 1 calc(25% - 24px);
  min-width: 300px;
  max-width: 340px;
}

@media (max-width: 1400px) {
  .all-projects-grid .project-card { flex: 0 1 calc(33.333% - 22px); }
}
@media (max-width: 1050px) {
  .all-projects-grid .project-card { flex: 0 1 calc(50% - 16px); }
}
@media (max-width: 900px) {
  .browse-title { font-size: 2rem; }
  .browse-section { padding: 60px 16px; }
  .search-wrap { min-width: 100%; }
}
@media (max-width: 680px) {
  .all-projects-grid .project-card { flex: 0 1 100%; max-width: 400px; }
}
@media (max-width: 500px) {
  .browse-controls { gap: 12px; }
  .btn-filter-toggle { flex: 1; justify-content: center; }
}

/* ===================== ANIMATED BG ORBS ===================== */
.bg-orbs { 
  position: fixed; inset: 0; pointer-events: none; z-index: 0; 
  transition: opacity 1s ease;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 { width: 420px; height: 420px; background: var(--red);    top: -80px;  right: -100px; animation-delay: 0s; }
.orb-2 { width: 360px; height: 360px; background: var(--yellow); bottom: 10%; left: -80px;  animation-delay: 3s; }
.orb-3 { width: 300px; height: 300px; background: var(--teal);   top: 40%;    right: 10%;   animation-delay: 6s; }
.orb-4 { width: 280px; height: 280px; background: var(--blue);   bottom: -60px; right: 30%;  animation-delay: 9s; }

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.06); }
}

/* ===================== DOTS ROW ===================== */
.dots-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}
.dots-row.small { margin-bottom: 20px; }

.dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  animation: dotBounce 1.4s ease-in-out infinite;
}
.dots-row.small .dot { width: 10px; height: 10px; }

.dot-1 { background: var(--red);    animation-delay: 0s; }
.dot-2 { background: var(--yellow); animation-delay: 0.2s; }
.dot-3 { background: var(--teal);   animation-delay: 0.4s; }
.dot-4 { background: var(--blue);   animation-delay: 0.6s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0) scale(1);    opacity: 1; }
  40%           { transform: translateY(-14px) scale(1.2); opacity: 0.9; }
}

/* ===================== PHASE 1 TITLE ===================== */
.main-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text) 0%, rgba(250,249,247,0.65) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.main-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  text-align: center;
  margin-bottom: 52px;
  position: relative;
  z-index: 2;
}

/* ===================== TAG PILLS ===================== */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  max-width: 720px;
  margin-bottom: 52px;
  position: relative;
  z-index: 2;
}

.tag-pill {
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid rgba(250,249,247,0.15);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  backdrop-filter: blur(8px);
  animation: pillFloat 3s ease-in-out infinite;
  user-select: none;
}

/* Stagger the float animation per pill */
.tag-pill:nth-child(1) { animation-delay: 0s; }
.tag-pill:nth-child(2) { animation-delay: 0.3s; }
.tag-pill:nth-child(3) { animation-delay: 0.6s; }
.tag-pill:nth-child(4) { animation-delay: 0.9s; }
.tag-pill:nth-child(5) { animation-delay: 1.2s; }
.tag-pill:nth-child(6) { animation-delay: 1.5s; }
.tag-pill:nth-child(7) { animation-delay: 1.8s; }
.tag-pill:nth-child(8) { animation-delay: 2.1s; }

@keyframes pillFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.tag-pill:hover {
  border-color: rgba(250,249,247,0.4);
  background: rgba(255,255,255,0.12);
  transform: translateY(-4px) scale(1.04);
}

.tag-pill.selected {
  color: #1a1a1a;
  border-color: transparent;
  font-weight: 700;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  animation: none;
}
.tag-pill.selected:nth-child(1) { background: var(--red); }
.tag-pill.selected:nth-child(2) { background: var(--yellow); }
.tag-pill.selected:nth-child(3) { background: var(--teal); }
.tag-pill.selected:nth-child(4) { background: var(--blue); color: #fff; }
.tag-pill.selected:nth-child(5) { background: var(--red); }
.tag-pill.selected:nth-child(6) { background: var(--yellow); }
.tag-pill.selected:nth-child(7) { background: var(--teal); }
.tag-pill.selected:nth-child(8) { background: var(--blue); color: #fff; }

/* ===================== CONTINUE BUTTON ===================== */
.btn-continue {
  padding: 16px 52px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--red), var(--yellow));
  color: #1a1a1a;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 20px rgba(240,78,58,0.3);
  opacity: 0.4;
  pointer-events: none;
}
.btn-continue.enabled {
  opacity: 1;
  pointer-events: all;
}
.btn-continue.enabled:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 32px rgba(240,78,58,0.45);
}

.hero-separator {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 300px;
  margin: 32px 0;
  position: relative;
  z-index: 2;
}
.hero-separator::before,
.hero-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}
.hero-separator span {
  padding: 0 15px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-hero-browse {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text);
  padding: 12px 32px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  z-index: 2;
}
.btn-hero-browse:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(2px);
}

/* ===================== PHASE 2: LOADING ===================== */
#phase-loading {
  background: var(--bg);
}

.loading-ring {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 40px;
}

.ring-dot {
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  animation: ringOrbit 1.8s linear infinite;
  transform-origin: 31px 31px;
}
.ring-dot-1 { background: var(--red);    animation-delay: 0s; }
.ring-dot-2 { background: var(--yellow); animation-delay: -0.45s; }
.ring-dot-3 { background: var(--teal);   animation-delay: -0.9s; }
.ring-dot-4 { background: var(--blue);   animation-delay: -1.35s; }

@keyframes ringOrbit {
  0%   { transform: rotate(0deg)   translateX(31px); }
  100% { transform: rotate(360deg) translateX(31px); }
}

.loading-text-wrap { text-align: center; min-height: 48px; }
.loading-text {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.loading-text.visible { opacity: 1; }

/* ===================== PHASE 3: RESULTS ===================== */
#phase-results {
  padding-top: 110px;
  padding-bottom: 20px;
  gap: 0;
}

.results-header {
  text-align: center;
  margin-bottom: 52px;
}
.results-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 8px;
  transition: opacity 0.3s ease;
}
.results-sub { color: var(--muted); font-size: 1rem; }

/* ===================== CARDS GRID ===================== */
.cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  max-width: 1100px;
  width: 100%;
  margin-bottom: 48px;
  position: relative;
  z-index: 2;
}

/* cards flex sizing */
.project-card {
  flex: 0 0 calc(33.333% - 20px);
  max-width: 340px;
  min-width: 260px;
}
@media (max-width: 860px) { .project-card { flex: 0 0 calc(50% - 14px); } }
@media (max-width: 560px) { .project-card { flex: 0 0 100%; max-width: 100%; } }

/* ===================== PROJECT CARD ===================== */
.project-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.3s ease,
              border-color 0.2s;
  position: relative;
}
.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.18);
}
.project-card.card-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(59,185,171,0.35), 0 16px 40px rgba(0,0,0,0.4);
}
.project-card.card-selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 30px;
  text-align: center;
  z-index: 4;
}

.card-banner-wrap {
  width: 100%;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: #111;
}
.card-banner {
  width: 100%;
  height: auto;
  display: block;
}

.card-body {
  padding: 14px 18px 18px;
}
.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  letter-spacing: 0.02em;
}

.card-tag.tag-انيميشن { background: rgba(240, 78, 58, 0.2);  color: var(--red);    border: 1px solid rgba(240, 78, 58, 0.3); }
.card-tag.tag-موشن     { background: rgba(244, 200, 43, 0.2); color: var(--yellow); border: 1px solid rgba(244, 200, 43, 0.3); }
.card-tag.tag-مونتاج   { background: rgba(59, 185, 171, 0.2); color: var(--teal);   border: 1px solid rgba(59, 185, 171, 0.3); }
.card-tag.tag-تصوير    { background: rgba(8, 111, 182, 0.2);  color: var(--blue);   border: 1px solid rgba(8, 111, 182, 0.3); }
.card-tag.tag-رسم      { background: rgba(240, 78, 58, 0.2);  color: var(--red);    border: 1px solid rgba(240, 78, 58, 0.3); }
.card-tag.tag-هوية      { background: rgba(244, 200, 43, 0.2); color: var(--yellow); border: 1px solid rgba(244, 200, 43, 0.3); }
.card-tag.tag-تقرير    { background: rgba(8, 111, 182, 0.2);  color: var(--blue);   border: 1px solid rgba(8, 111, 182, 0.3); }
.card-tag.tag-تصميم    { background: rgba(8, 111, 182, 0.2);  color: var(--blue);   border: 1px solid rgba(8, 111, 182, 0.3); }

.btn-watch {
  width: 100%;
  padding: 10px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: #1a1a1a;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.2s, background 0.2s;
}
.btn-watch:hover {
  background: #fff;
  box-shadow: 0 0 18px rgba(255,255,255,0.55), 0 0 40px rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

/* ===================== RESULTS ACTIONS ===================== */
.results-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  max-width: 1100px;
  width: 100%;
  position: relative;
  z-index: 2;
  margin-top: 24px;
}

.actions-group {
  grid-area: 1 / 1;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.4s;
}

.actions-group.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
}

.selection-btns-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-want-same {
  padding: 16px 44px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #fff;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 20px rgba(59,185,171,0.3);
}
.btn-want-same:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 32px rgba(59,185,171,0.45);
}

.btn-restart {
  padding: 14px 32px;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-restart:hover {
  border-color: rgba(255,255,255,0.35);
  color: var(--text);
}

.select-hint {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 12px;
  width: 100%;
}

.btn-confirm-select {
  padding: 16px 40px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--red), var(--yellow));
  color: #1a1a1a;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  opacity: 0.4;
  pointer-events: none;
}
.btn-confirm-select.active {
  opacity: 1;
  pointer-events: all;
  box-shadow: 0 8px 24px rgba(240,78,58,0.3);
}
.btn-confirm-select.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(240,78,58,0.45);
}

.btn-cancel-select {
  padding: 14px 28px;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel-select:hover { color: var(--text); border-color: rgba(255,255,255,0.35); }

/* ===================== FADE TRANSITIONS ===================== */
.phase {
  animation: none;
}
.phase.fade-in {
  animation: fadeInUp 0.7s ease forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================== CARD ENTRANCE ===================== */
.project-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardIn 0.5s ease forwards;
}
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== SELECTION MODE ===================== */
.cards-grid.selection-mode .project-card {
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(59,185,171,0.5);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.2s ease,
              border-color 0.2s;
}
.cards-grid.selection-mode .project-card:not(.card-selected):hover {
  box-shadow: 0 0 0 4px rgba(59,185,171,1);
  transform: translateY(-6px);
}
.cards-grid.selection-mode .card-banner-wrap {
  position: relative;
}

/* ===================== CONTACT MODAL ===================== */
.contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.3s ease;
}
.contact-modal.hidden { display: none; opacity: 0; pointer-events: none; }

.contact-modal-content {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 40px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  animation: modalIn 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.contact-modal-content h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}
.contact-modal-content p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 32px;
}

.contact-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-contact-option {
  padding: 18px;
  border-radius: 18px;
  border: none;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-contact-option.whatsapp {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 15px rgba(37,211,102,0.3);
}
.btn-contact-option.whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37,211,102,0.45);
}

.btn-contact-option.email {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 15px rgba(250,249,247,0.2);
}
.btn-contact-option.email:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(250,249,247,0.35);
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s;
}
.btn-modal-close:hover { color: var(--text); }

/* Overlay orbit animation (JS-injected dots) */
@keyframes ovOrbit {
  from { transform: rotate(0deg)   translateX(36px); }
  to   { transform: rotate(360deg) translateX(36px); }
}
/* ================= CONTACT SECTION (Cleaned) ================= */
.contact-section {
  padding: 40px 0;
  text-align: center;
  background-color: var(--bg); /* Blends with section above */
  position: relative;
  overflow: hidden;
}

.contact-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.contact-card {
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, rgba(59, 185, 171, 0.1), rgba(8, 111, 182, 0.1));
  border: 1px solid rgba(59, 185, 171, 0.2);
  padding: 40px;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.contact-card h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.contact-card p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font);
  transition: all 0.3s ease;
  text-align: right;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 15px rgba(59, 185, 171, 0.2);
}

.btn.big {
  padding: 18px 45px;
  font-size: 1.2rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary.big {
  background: #fff;
  color: #000;
}
.btn-primary.big:hover {
  transform: translateY(-2px);
  background: #f0f0f0;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

.or-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 5px 0;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 10px;
}

.contact-actions-row {
  display: flex;
  gap: 15px;
  width: 100%;
}

.btn-whatsapp {
  background-color: #25D366;
  color: #fff;
  font-weight: bold;
}
.btn-whatsapp:hover {
  background-color: #1ebc57;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.btn-copy {
  background-color: #333;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-copy:hover {
  background-color: #444;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(165, 165, 165, 0.2);
}

/* Success Toast */
.copy-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background-color: #25D366;
  color: white;
  padding: 12px 30px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  font-size: 1rem;
  z-index: 9999;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.copy-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ================= FOOTER (Ported) ================= */
.footer {
  background-color: var(--bg);
  padding: 80px 0 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.footer-logo-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.footer-logo {
  width: 300px;
  max-width: 80vw;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 1;
  pointer-events: none;
  user-select: none;
}

.social-links {
  display: flex;
  gap: 10px;
  z-index: 10;
}

.social-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.social-btn svg {
  width: 26px;
  height: 26px;
  display: block;
}

.social-btn:hover {
  transform: translateY(-5px) scale(1.1);
  background: #fff;
  color: #000;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.social-btn.youtube:hover { color: #ff0000; }
.social-btn.linkedin:hover { color: #0077b5; }
.social-btn.instagram:hover { color: #e4405f; }
.social-btn.tiktok:hover { color: #000; }
.social-btn.behance:hover { color: #1769ff; }
.social-btn.discord:hover { color: #5865F2; }

.footer-bottom {
  padding: 20px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.3);
  z-index: 10;
  position: relative;
}

@media (max-width: 768px) {
  .contact-section { padding: 80px 0; }
  .contact-card h2 { font-size: 1.8rem; }
  .contact-actions-row { flex-direction: column; gap: 10px; }
  .footer-logo { width: 220px; }
  .social-btn { width: 50px; height: 50px; }
}
