/* ============================================
   AABA Gallery — Public Page Styles
   Plain CSS only (no @tailwind directives)
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #F5A442;
  --teal:   #4ABFBE;
  --teal-dark: #3aa8a7;
  --bg:     #f8f6f2;
  --card-bg: rgba(255,255,255,0.55);
  --card-border: rgba(255,255,255,0.7);
  --text:   #1e293b;
  --muted:  #64748b;
  --radius-card: 1.5rem;
  --radius-btn:  0.875rem;
  --shadow-card: 0 4px 24px 0 rgba(0,0,0,0.07);
  --shadow-hover: 0 12px 40px 0 rgba(0,0,0,0.13);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- Background Blobs ---- */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: blobFloat 10s ease-in-out infinite alternate;
}
.bg-blobs span:nth-child(1) {
  width: 500px; height: 500px;
  background: var(--orange);
  top: -100px; right: -100px;
  animation-delay: 0s;
}
.bg-blobs span:nth-child(2) {
  width: 450px; height: 450px;
  background: var(--teal);
  bottom: -80px; left: -80px;
  animation-delay: 3s;
}
.bg-blobs span:nth-child(3) {
  width: 300px; height: 300px;
  background: #b2ede9;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 6s;
}
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, -30px) scale(1.07); }
}
.bg-blobs span:nth-child(2) { animation-direction: alternate-reverse; }

/* ---- Layout ---- */
.page-wrap {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header ---- */
.site-header {
  padding: 1.75rem 1.75rem 1.25rem;
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-content: flex-start; /* right side in RTL */
}

.site-header .logo {
  height: 72px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.08));
  transition: transform 0.3s ease;
}
.site-header .logo:hover { transform: scale(1.04); }

.site-header p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 600;
}

/* ---- Masonry Grid ---- */
.masonry-grid {
  column-count: 1;
  column-gap: 1.25rem;
  padding: 2rem 1.25rem;
}
@media (min-width: 640px)  { .masonry-grid { column-count: 2; } }
@media (min-width: 1024px) { .masonry-grid { column-count: 3; } }
@media (min-width: 1400px) { .masonry-grid { column-count: 4; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  display: inline-block;
  width: 100%;
}

/* ---- Business Card ---- */
.biz-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10), 0 0 0 1px rgba(255,255,255,0.6);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s ease;
  background: #1a1a2e;
}
.biz-card:hover {
  transform: translateY(-8px) scale(1.012);
  box-shadow: 0 20px 48px rgba(0,0,0,0.18), 0 0 0 1px rgba(74,191,190,0.25);
}

/* ---- Card Image Slider ---- */
.card-slider {
  position: relative;
  overflow: hidden;
  background: #1a1a2e;
}
.card-slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.card-slide {
  min-width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.card-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: kenBurns 9s ease-in-out infinite alternate;
  transform-origin: center center;
}

/* Ken Burns slow motion */
@keyframes kenBurns {
  0%   { transform: scale(1.00) translate(0%,   0%);   }
  33%  { transform: scale(1.06) translate(-1%,  -0.5%); }
  66%  { transform: scale(1.04) translate(1%,   0.5%);  }
  100% { transform: scale(1.08) translate(-0.5%, 1%);   }
}

/* Name overlay — always visible at bottom */
.card-name-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.5rem 1.1rem 0.9rem;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  z-index: 4;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  transition: padding 0.35s ease;
}
.biz-card:hover .card-name-overlay {
  padding-bottom: 2.75rem;
}

/* Hover tap-to-open hint */
.card-tap-hint {
  position: absolute;
  bottom: 0.65rem;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(74,191,190,0.92);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  opacity: 0;
  z-index: 5;
  white-space: nowrap;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.biz-card:hover .card-tap-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Slider arrow buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s;
  z-index: 6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.biz-card:hover .slider-btn { opacity: 1; }
.slider-btn.prev { right: 10px; }
.slider-btn.next { left: 10px; }
.slider-btn:hover { background: #fff; }

/* Image counter badge */
.img-count {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---- Modal improvements ---- */
.modal-body h2 { font-size: 1.6rem; }

.modal-gallery .slider-btn { opacity: 1 !important; }

/* ---- Skeleton Loader ---- */
.skeleton { animation: pulse 1.6s ease-in-out infinite; }
.skeleton-img  { background: #e2e8f0; aspect-ratio: 4/3; }
.skeleton-text {
  background: #e2e8f0;
  height: 1.1rem;
  border-radius: 0.5rem;
  margin: 1rem auto;
  width: 60%;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--muted);
  column-span: all;
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; opacity: 0.35; }
.empty-state p { font-size: 1.2rem; font-weight: 600; }

/* ---- Modal (Business Detail) ---- */
.modal-wrap {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-wrap.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-box {
  position: relative;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 2rem;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity:0; transform: scale(0.92) translateY(20px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}

@media (min-width: 768px) {
  .modal-box { flex-direction: row; max-height: 85vh; }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  z-index: 10;
  transition: background 0.2s;
}
.modal-close:hover { background: #fff; }

/* Modal Gallery */
.modal-gallery {
  width: 100%;
  min-height: 220px;
  background: #e2e8f0;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .modal-gallery { width: 45%; min-height: auto; }
}

.modal-slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.modal-slide {
  min-width: 100%;
  height: 100%;
}
.modal-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 220px;
}
@media (min-width: 768px) {
  .modal-slide img { min-height: 400px; }
}

.modal-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
}
.modal-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.modal-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Modal Content */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-body h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1.3;
}
.modal-divider {
  width: 3rem; height: 4px;
  background: var(--orange);
  border-radius: 2px;
}
.modal-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-wrap;
}

.modal-contacts { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-btn);
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn-contact:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-wa   { background: #25D366; }
.btn-ig   { background: linear-gradient(135deg, #f09433, #dc2743, #bc1888); }
.btn-web  { background: #1e293b; }
.btn-mail { background: var(--orange); }

/* ---- Footer ---- */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.6);
  padding: 3.5rem 1.5rem 2rem;
  margin-top: 3rem;
}
.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 768px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }

.footer-section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-section h4::before {
  content: '';
  display: inline-block;
  width: 2rem; height: 3px;
  background: var(--teal);
  border-radius: 2px;
  flex-shrink: 0;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--teal); }
.footer-link-icon {
  width: 2.25rem; height: 2.25rem;
  border-radius: 0.6rem;
  background: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.footer-link:hover .footer-link-icon { background: var(--teal); color: #fff; }

.social-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.social-btn {
  width: 3rem; height: 3rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.social-btn:hover { transform: translateY(-3px); }
.social-btn.tw:hover  { background: #1DA1F2; color: #fff; }
.social-btn.ig:hover  { background: linear-gradient(135deg,#f09433,#dc2743,#bc1888); color: #fff; }
.social-btn.sc:hover  { background: #FFFC00; color: #000; }

.footer-about p { font-size: 0.95rem; color: var(--muted); line-height: 1.8; }

.footer-copy {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.07);
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both;
}
