/* =====================================================
   Hills Café – Premium Stylesheet
   Dark theme default | Cairo font | Bilingual
   ===================================================== */

/* ─── GOOGLE FONT (Cairo) ─────────────────────────── */
/* Loaded in HTML head */

/* ─── CSS VARIABLES ─────────────────────────────────
   [data-theme="dark"]  = default
   [data-theme="light"] = alternate
   ─────────────────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg:           #0C1310;
  --bg-card:      #141F1B;
  --bg-surface:   #1A2820;
  --bg-pill:      #1F302A;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(91,158,77,0.45);

  --text-1: #EDF5EC;
  --text-2: #7FA88A;
  --text-3: #4E6E57;

  --green:      #5BAE4A;
  --green-dim:  #3E7A30;
  --green-glow: rgba(91,174,74,0.22);
  --green-btn:  linear-gradient(135deg, #4A9C38, #2E6820);

  --gold: #C8A84B;

  --social-bg:  rgba(255,255,255,0.06);
  --ctrl-bg:    rgba(255,255,255,0.07);
  --ctrl-hover: rgba(255,255,255,0.13);
  --ctrl-text:  #C8D8C2;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.45);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.6);
  --logo-ring:   rgba(91,174,74,0.25);
  --logo-shadow: 0 0 0 6px rgba(12,19,16,0.9);
}

[data-theme="light"] {
  --bg:           #F0EDE3;
  --bg-card:      #FFFFFF;
  --bg-surface:   rgba(255,255,255,0.82);
  --bg-pill:      rgba(255,255,255,0.7);
  --border:       rgba(42,77,15,0.10);
  --border-hover: rgba(42,77,15,0.35);

  --text-1: #152210;
  --text-2: #4E7A38;
  --text-3: #8BAE72;

  --green:      #3A6B18;
  --green-dim:  #2A5010;
  --green-glow: rgba(58,107,24,0.18);
  --green-btn:  linear-gradient(135deg, #3A6B18, #2A5010);

  --gold: #B5912A;

  --social-bg:  rgba(0,0,0,0.05);
  --ctrl-bg:    rgba(0,0,0,0.06);
  --ctrl-hover: rgba(0,0,0,0.12);
  --ctrl-text:  #3D5C2A;

  --shadow-card: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:   0 12px 40px rgba(0,0,0,0.15);
  --logo-ring:   rgba(58,107,24,0.2);
  --logo-shadow: 0 0 0 6px rgba(240,237,227,0.9);
}

/* ─── RESET ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
}



/* ─── PAGE WRAPPER ───────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 14px 60px;
}

/* ─── TOP BAR ────────────────────────────────────── */
.top-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 0 0;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--ctrl-bg);
  color: var(--ctrl-text);
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}
.ctrl-btn:hover {
  background: var(--ctrl-hover);
  transform: scale(1.08);
}
.ctrl-btn:active { transform: scale(0.96); }

/* Show/hide theme icon based on current theme */
[data-theme="dark"]  .icon-light,
[data-theme="light"] .icon-dark  { display: none; }

/* Show/hide lang label based on current lang */
[data-lang="ar"] .lang-en,
[data-lang="en"] .lang-ar { display: none; }

/* ─── SITE HEADER ────────────────────────────────── */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  gap: 18px;
}

/* ─── LOGO ───────────────────────────────────────── */
.logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-ring {
  position: absolute;
  width: 175px;
  height: 175px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-glow) 0%, transparent 70%);
  animation: pulse 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.18); opacity: 1; }
}
.site-logo {
  width: 145px;
  height: 145px;
  object-fit: cover;
  border-radius: 50%;
  border: 2.5px solid rgba(91,174,74,0.3);
  box-shadow: var(--logo-shadow), var(--shadow-card);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  z-index: 1;
}
.site-logo:hover {
  transform: scale(1.04);
  box-shadow: var(--logo-shadow), var(--shadow-lg);
}

/* ─── SOCIAL ROW ─────────────────────────────────── */
.social-row {
  display: flex;
  gap: 12px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.28s ease;
  letter-spacing: 0.2px;
}
.social-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.social-btn:hover { transform: translateY(-3px) scale(1.04); }
.social-btn:active { transform: scale(0.97); }

.s-instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  box-shadow: 0 4px 16px rgba(220,39,67,0.3);
}
.s-instagram:hover { box-shadow: 0 8px 24px rgba(220,39,67,0.45); }

.s-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,211,102,0.28);
}
.s-whatsapp:hover { box-shadow: 0 8px 24px rgba(37,211,102,0.42); }

/* ─── TAB NAV ────────────────────────────────────── */
.tab-nav {
  display: flex;
  background: var(--bg-pill);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px;
  width: min(420px, 100%);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 40px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  transition: all 0.3s ease;
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--green-btn);
  color: #fff;
  box-shadow: 0 4px 16px var(--green-glow);
}
.tab-btn:not(.active):hover {
  background: rgba(91,174,74,0.1);
  color: var(--green);
}

/* ─── MAIN CONTENT ───────────────────────────────── */
.main-content { margin-top: 28px; }

/* ─── TAB PANELS ─────────────────────────────────── */
.tab-panel {
  display: none;
  animation: fadeUp 0.38s ease forwards;
}
.tab-panel.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── MENU GRID ──────────────────────────────────── */
.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Menu card */
.menu-card {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: all 0.32s ease;
  position: relative;
  background: var(--bg-card);
}
.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

/* Full-quality image */
.menu-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;    /* keep full quality, no crop */
  transition: transform 0.5s ease;
}
.menu-card:hover img { transform: scale(1.02); }

/* Download overlay */
.menu-card .dl-btn {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s ease;
  z-index: 2;
  cursor: pointer;
}
.menu-card:hover .dl-btn {
  opacity: 1;
  transform: scale(1);
}
.dl-btn:hover {
  background: var(--green) !important;
  border-color: transparent !important;
  transform: scale(1.1) !important;
}

/* Skeleton */
.menu-skeleton {
  height: 320px;
  border-radius: 18px;
  background: linear-gradient(90deg,
    var(--bg-surface) 25%,
    var(--bg-pill) 50%,
    var(--bg-surface) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.8s infinite;
}
.menu-skeleton:nth-child(2) { animation-delay: 0.15s; }
.menu-skeleton:nth-child(3) { animation-delay: 0.3s; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── BRANCHES LIST ──────────────────────────────── */
.branches-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.branch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: all 0.28s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Left accent bar */
.branch-card::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--green-btn);
  border-radius: 3px 0 0 3px;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.28s ease;
}
[data-lang="en"] .branch-card::before {
  inset-inline-start: 0;
  border-radius: 0 3px 3px 0;
}
.branch-card:hover::before { transform: scaleY(1); }

.branch-card:hover {
  border-color: var(--border-hover);
  transform: translateX(-3px);
  box-shadow: var(--shadow-lg);
}
[data-lang="en"] .branch-card:hover {
  transform: translateX(3px);
}

/* Branch info */
.branch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.branch-num {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.branch-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.branch-name-en {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

/* Branch hours */
.branch-hours {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-glow);
  border: 1px solid rgba(91,174,74,0.2);
  border-radius: 50px;
  padding: 2px 8px;
  margin-top: 3px;
  width: fit-content;
  letter-spacing: 0.2px;
  transition: background 0.3s ease;
}
.hours-icon {
  font-size: 11px;
  line-height: 1;
}
.branch-card:hover .branch-hours {
  background: rgba(91,174,74,0.2);
}

/* Soon badge (replaces hours for upcoming branches) */
.branch-hours.soon-badge {
  color: var(--gold);
  background: rgba(200,168,75,0.12);
  border-color: rgba(200,168,75,0.25);
}

/* Soon card – dimmed state */
.branch-soon {
  opacity: 0.7;
  cursor: default;
}
.branch-soon:hover {
  transform: none !important;
  box-shadow: var(--shadow-card) !important;
  border-color: var(--border) !important;
}
.branch-soon:hover::before { transform: none !important; }

/* Soon order button – disabled look */
.order-btn.soon-btn {
  background: var(--bg-surface);
  color: var(--gold);
  border: 1px solid rgba(200,168,75,0.3);
  box-shadow: none;
  cursor: default;
  font-size: 11px;
  pointer-events: none;
}

/* Maps button */
.maps-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.maps-btn:hover {
  background: #e8f0fe;
  border-color: #4285F4;
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(66,133,244,0.3);
}
.maps-btn svg { width: 22px; height: 22px; }

/* Order button */
.order-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  background: var(--green-btn);
  color: #fff;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px var(--green-glow);
  white-space: nowrap;
  flex-shrink: 0;
}
.order-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(91,174,74,0.45);
}

/* Branch skeleton */
.branch-skeleton {
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(90deg,
    var(--bg-surface) 25%,
    var(--bg-pill) 50%,
    var(--bg-surface) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.8s infinite;
}
.branch-skeleton:nth-child(n+2) { animation-delay: calc((n - 1) * 0.1s); }
.branch-skeleton:nth-child(2) { animation-delay: 0.10s; }
.branch-skeleton:nth-child(3) { animation-delay: 0.20s; }
.branch-skeleton:nth-child(4) { animation-delay: 0.30s; }
.branch-skeleton:nth-child(5) { animation-delay: 0.40s; }
.branch-skeleton:nth-child(6) { animation-delay: 0.50s; }
.branch-skeleton:nth-child(7) { animation-delay: 0.60s; }

/* ─── FOOTER ─────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 40px 0 16px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
}

/* ─── OFFERS GRID ────────────────────────────────── */
.offers-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.offer-card {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: all 0.32s ease;
  position: relative;
  background: var(--bg-card);
}
.offer-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}
.offer-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.5s ease;
}
.offer-card:hover img { transform: scale(1.02); }

/* New badge */
.offer-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: var(--green-btn);
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(91,174,74,0.4);
  animation: badgePop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  z-index: 2;
}
@keyframes badgePop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Download overlay for offers */
.offer-card .dl-btn {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s ease;
  z-index: 2;
  cursor: pointer;
}
.offer-card:hover .dl-btn {
  opacity: 1;
  transform: scale(1);
}

/* ─── THEME TRANSITION ───────────────────────────── */
body,
.site-logo,
.tab-nav,
.branch-card,
.menu-card,
.offer-card,
.ctrl-btn,
.social-btn {
  transition-property: background, background-color, color, border-color, box-shadow;
  transition-duration: 0.35s;
  transition-timing-function: ease;
}

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 420px) {
  .social-btn span { display: none; }
  .social-btn { padding: 9px 13px; }
  .social-btn svg { width: 19px; height: 19px; }

  .site-logo { width: 125px; height: 125px; }
  .logo-ring { width: 150px; height: 150px; }

  .tab-btn { font-size: 12px; padding: 9px 8px; }

  .branch-name { font-size: 14px; }
  .order-btn { padding: 8px 12px; font-size: 12px; }
  .maps-btn { width: 36px; height: 36px; }
  .branch-card { padding: 12px 12px; gap: 8px; }
}

@media (min-width: 500px) {
  .site-logo { width: 160px; height: 160px; }
  .logo-ring { width: 195px; height: 195px; }
}
