:root {
  --forest-deep: #123B27;
  --header-bg: rgba(243, 241, 233, 0.92);
  --hover-surface: rgba(255,255,255,0.7);
  --fx: 46, 158, 82;
  --ink: #0B2419;
  --forest: #123B27;
  --green: #1F7A43;
  --green-light: #2E9E52;
  --gold: #D9A441;
  --red: #CE2B37;
  --cream: #F3F1E9;
  --cream-alt: #EDEAE0;
  --white: #FFFFFF;
  --text: #16281E;
  --text-soft: #5B6D62;
  --text-on-dark: rgba(255,255,255,0.82);
  --border-soft: #E2DECF;
  --shadow: 0 14px 34px rgba(11, 36, 25, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  --ff-heading: 'Playfair Display', serif;
  --ff-body: 'Poppins', sans-serif;
  --ff-script: 'Caveat', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--ff-body); color: var(--text); background: var(--cream); overflow-x: hidden; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--ff-heading); line-height: 1.15; }

.heart { font-size: 0.85em; }
.arrow { display: inline-block; transition: transform 0.2s ease; }
a:hover .arrow, .btn:hover .arrow { transform: translateX(4px); }

.flag-icon {
  display: inline-block; width: 20px; height: 14px; border-radius: 3px; overflow: hidden;
  background: linear-gradient(90deg, var(--green) 0 33.3%, var(--white) 33.3% 66.6%, var(--red) 66.6% 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.flag-icon-sm { width: 16px; height: 11px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--green-light), var(--green)); color: var(--white); box-shadow: 0 10px 24px rgba(31,122,67,0.28); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31,122,67,0.38); }
.btn-sm { padding: 9px 18px; font-size: 0.82rem; }
.pin-ic { font-size: 0.9em; }

.eyebrow-ic { display: inline-block; color: var(--green); font-weight: 600; font-size: 0.8rem; letter-spacing: 1.5px; margin-bottom: 10px; text-transform: uppercase; }
.see-all { color: var(--green); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 4px; }

/* Progress bar */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--green), var(--red)); z-index: 1000; transition: width 0.1s ease-out; }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}
.header.scrolled { box-shadow: 0 6px 24px rgba(11,36,25,0.08); padding: 10px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo { display: flex; align-items: center; gap: 8px; }
.logo-img {
  display: block; height: 52px; width: auto;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), filter 0.35s ease;
  transform-origin: left center;
}
.logo:hover .logo-img { transform: scale(1.15); filter: drop-shadow(0 6px 12px rgba(0,121,101,0.3)); }
.logo:active .logo-img { transform: scale(0.92); transition-duration: 0.12s; }
.header.scrolled .logo-img { height: 44px; }
.header .logo-img { transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), filter 0.35s ease, height 0.3s ease; }
.logo-footer .logo-img { height: 58px; transform-origin: center; }
.logo-footer:hover .logo-img { filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45)); }
@media (max-width: 720px) { .logo-img { height: 42px; } .header.scrolled .logo-img { height: 38px; } }
.logo-text-group { display: flex; flex-direction: column; line-height: 1; }
.logo-text { font-family: var(--ff-heading); font-weight: 700; font-size: 1.3rem; color: var(--forest); }
.logo-sub-row { display: flex; align-items: center; gap: 5px; font-size: 0.6rem; letter-spacing: 2px; color: var(--green); font-weight: 600; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav-link { font-weight: 500; font-size: 0.92rem; color: var(--text-soft); position: relative; padding: 4px 0; transition: color 0.2s; }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--green); transition: width 0.25s ease; }
.nav-link:hover, .nav-link.active { color: var(--forest); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn-light { width: 40px; height: 40px; border-radius: 50%; background: var(--cream-alt); color: var(--forest); font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.icon-btn-light:hover { background: var(--border-soft); }

.lang-switch { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-soft); }
.lang-switch span { opacity: 0.4; }
.lang-switch button { color: var(--text-soft); font-weight: 500; }
.lang-switch .lang-active { color: var(--forest); font-weight: 700; }
.lang-switch button { cursor: pointer; }
.nav-lang { display: none; }

.burger { display: none; flex-direction: column; gap: 5px; width: 26px; z-index: 950; }
.burger span { display: block; height: 2px; background: var(--forest); border-radius: 2px; transition: 0.3s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Blob photo shape (shared organic-corner image) */
.blob-photo {
  background-size: cover; background-position: center;
  border-radius: 0 40% 0 40% / 0 55% 0 55%;
  box-shadow: var(--shadow);
}

/* Hero v4 */
.hero-v4 { padding: 150px 0 90px; background: var(--cream); }
.hero-v4-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 50px; align-items: center; }
.eyebrow-flag { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 0.8rem; letter-spacing: 1.5px; font-weight: 600; margin-bottom: 18px; }
.hero-v4-text h1 { font-size: clamp(2.1rem, 4vw, 3rem); color: var(--forest); margin-bottom: 20px; }
.hero-v4-text p { color: var(--text-soft); max-width: 460px; margin-bottom: 30px; font-size: 1rem; }

.hero-v4-visual { position: relative; }
.blob-hero { width: 100%; aspect-ratio: 480/306; }
.slide-counter {
  position: absolute; right: -34px; top: 0; bottom: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; color: var(--text-soft); font-size: 0.75rem;
}
.slide-line { position: relative; width: 2px; height: 40px; background: var(--border-soft); overflow: hidden; border-radius: 2px; }
.slide-progress { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: var(--green); }
.slide-progress.run { animation: slideProgress 10s linear forwards; }
@keyframes slideProgress { to { height: 100%; } }
#slideCurrent { color: var(--forest); font-weight: 700; }

/* Hero slider: branch photos crossfade */
.hero-slider { position: relative; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.08); transition: opacity 1.2s ease, transform 10s linear;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero-slide-cap {
  position: absolute; right: 18px; bottom: 18px; padding: 7px 14px; border-radius: 999px;
  background: rgba(11,36,25,0.72); color: #fff; font-size: 0.82rem; font-weight: 600;
  backdrop-filter: blur(4px); opacity: 0; transform: translateY(10px);
  transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}
.hero-slide.is-active .hero-slide-cap { opacity: 1; transform: none; }

/* Meaning section */
.meaning { padding: 90px 0; background: var(--cream); }
.meaning-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr) minmax(0, 0.7fr) minmax(0, 0.85fr); gap: 30px; align-items: center; }
.blob-gelato { aspect-ratio: 220/278; }
.blob-italy { aspect-ratio: 179/332; }
.meaning-text h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--forest); margin: 6px 0 16px; }
.meaning-text > p { color: var(--text-soft); font-size: 0.92rem; margin-bottom: 18px; }
.quote-divider { width: 40px; height: 2px; background: var(--green); margin-bottom: 16px; }
.quote-text { font-style: italic; color: var(--forest) !important; font-size: 1rem !important; }

.stats-col { display: flex; flex-direction: column; gap: 22px; }
.stat-row { display: flex; align-items: flex-start; gap: 12px; }
.stat-ic { font-size: 1.2rem; margin-top: 2px; }
.stat-row strong { display: block; color: var(--forest); font-family: var(--ff-heading); font-size: 1.05rem; }
.stat-row p { color: var(--text-soft); font-size: 0.82rem; }

/* Philosophy section */
.philosophy { padding: 70px 0 90px; background: var(--cream); }
.philosophy-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 50px; align-items: center; }
.blob-balcony { aspect-ratio: 217/175; }
.philosophy-text h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--forest); margin: 6px 0 14px; }
.philosophy-text > p { color: var(--text-soft); font-size: 0.92rem; max-width: 560px; margin-bottom: 30px; }

.philosophy-icons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.phil-circle {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--green); color: var(--green);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 10px;
}
.phil-item h4 { font-size: 0.92rem; color: var(--forest); margin-bottom: 4px; }
.phil-item p { font-size: 0.78rem; color: var(--text-soft); }

/* Branches 3 */
.script-heading { font-family: var(--ff-script); font-weight: 700; font-size: 1.6rem; color: var(--green); line-height: 1.1; }

.branches3 { padding: 90px 0; background: var(--cream); }
.branches3-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr) minmax(0, 0.9fr); gap: 30px; align-items: center; margin-bottom: 44px; }
.branches3-head-text h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--forest); margin: 8px 0 14px; }
.branches3-head-text p { color: var(--text-soft); font-size: 0.92rem; max-width: 420px; }

.branches3-count { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-left: 24px; border-left: 1px solid var(--border-soft); }
.count-pin { font-size: 1.1rem; margin: 2px 0 6px; }
.branches3-count ul { font-size: 0.9rem; color: var(--forest); font-weight: 500; display: flex; flex-direction: column; gap: 4px; }

.branches3-deco {
  position: relative; height: 150px; border-radius: var(--radius-sm);
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 12px;
}
.deco-caption { font-size: 0.62rem; letter-spacing: 1.5px; color: var(--text-soft); text-align: right; font-weight: 600; }

.branches3-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.branch3-card { background: var(--white); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-soft); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.branch3-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.branch3-photo { height: 160px; background-size: cover; background-position: center; }
.branch3-body { padding: 18px 20px 20px; }
.branch3-num { display: block; font-family: var(--ff-heading); color: var(--border-soft); font-size: 0.95rem; margin-bottom: 6px; }
.branch3-body h3 { font-size: 1.1rem; color: var(--forest); margin-bottom: 6px; }
.branch3-body > p { display: flex; align-items: center; gap: 4px; color: var(--text-soft); font-size: 0.85rem; margin-bottom: 12px; }

.branches3-stats {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  padding-top: 34px; border-top: 1px solid var(--border-soft);
}
.stat-inline { display: flex; align-items: center; gap: 12px; }
.stat-inline .stat-ic { font-size: 1.3rem; }
.stat-inline strong { display: block; font-family: var(--ff-heading); color: var(--forest); font-size: 1.15rem; }
.stat-inline p { color: var(--text-soft); font-size: 0.78rem; }
.branches3-tagline { font-family: var(--ff-heading); font-style: italic; color: var(--forest); font-size: 1rem; display: flex; align-items: center; gap: 10px; text-align: right; }

/* Promo 2 */
.promo2 {
  position: relative; width: 100%; height: clamp(180px, 12.2vw, 280px); overflow: hidden;
  background-color: var(--ink); background-size: cover; background-position: right center;
  display: flex; align-items: center;
}
.promo2-inner { display: flex; align-items: center; padding-left: 6%; width: 64%; }
.promo2-text {
  padding-left: 22px; border-left: 3px solid var(--gold);
  color: #fff; font-size: clamp(1rem, 1.35vw, 1.4rem); font-weight: 500; line-height: 1.65;
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
}
@media (max-width: 1200px) and (min-width: 721px) {
  .promo2 { background-position: left center; }
  .promo2-inner { width: 90%; }
}

/* Footer 2 */
.footer2 { background: var(--ink); color: var(--text-on-dark); padding: 40px 0; }
.footer2-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer2 .logo-text { color: var(--white); }
.footer2-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer2-nav a { font-size: 0.88rem; transition: color 0.2s; }
.footer2-nav a:hover { color: var(--green-light); }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 42px; height: 42px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,0.3); transition: transform 0.2s ease, filter 0.2s ease; }
.footer-social a svg { width: 21px; height: 21px; }
.footer-social a:hover { transform: translateY(-3px) scale(1.06); filter: brightness(1.12); }
.footer-social .soc-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.footer-social .soc-telegram { background: #29A9EB; }
.footer-social .soc-telegram svg { transform: translateX(-1px); }
.footer-social .soc-youtube { background: #FF0000; }
.footer2-copy { font-size: 0.8rem; opacity: 0.6; flex-basis: 100%; text-align: center; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.1); }


/* Branch detail modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(11, 36, 25, 0.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 440px; width: 100%; max-height: 85vh; overflow-y: auto;
  padding: 32px; position: relative;
  transform: translateY(16px); transition: transform 0.25s ease;
}
.modal-box-wide { max-width: 620px; }
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--cream-alt); color: var(--forest); font-size: 1rem;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.modal-close:hover { background: var(--border-soft); }
.modal-title { color: var(--forest); font-size: 1.4rem; margin-bottom: 4px; padding-right: 30px; }
.modal-desc { color: var(--text-soft); font-size: 0.9rem; margin-bottom: 18px; }

.branch-modal-map { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px; }
.branch-modal-map iframe { display: block; }

.branch-modal-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.branch-modal-gallery img { width: 100%; height: 130px; object-fit: cover; border-radius: var(--radius-sm); }
.branch-modal-gallery[hidden] { display: none; }

@media (max-width: 560px) {
  .branch-modal-gallery { grid-template-columns: minmax(0, 1fr); }
  .branch-modal-gallery img { height: auto; }
}

/* Responsive */
@media (max-width: 1080px) {
  .meaning-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .blob-italy { display: none; }
  .branches3-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .branches3-head { grid-template-columns: minmax(0, 1fr); }
  .branches3-deco { display: none; }
  .branches3-count { border-left: none; padding-left: 0; }
}

@media (max-width: 900px) {
  .hero-v4-inner { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero-v4-text p { margin-left: auto; margin-right: auto; }
  .slide-counter { display: none; }
  .philosophy-grid { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .blob-balcony { height: 220px; margin: 0 auto; }
  .philosophy-text > p { margin-left: auto; margin-right: auto; }
  .philosophy-icons { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; text-align: center; }
}

@media (max-width: 720px) {
  .nav, .header-actions { display: none; }
  .burger { display: flex; }
  .nav.mobile-open {
    display: flex; flex-direction: column; position: fixed; top: 0; right: 0;
    width: 75%; max-width: 300px; height: 100vh; background: var(--white);
    padding: 100px 32px 32px; gap: 22px; box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    z-index: 940; align-items: flex-start;
  }
  .nav.mobile-open .nav-link { color: var(--text); }
  .nav.mobile-open .nav-lang { display: flex; margin-top: 12px; font-size: 0.95rem; }
  .meaning-grid { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .blob-gelato { height: 260px; margin: 0 auto; }
  .stats-col { align-items: center; }
  .stat-row { max-width: 300px; }
  .branches3-grid { grid-template-columns: minmax(0, 1fr); }
  .branches3-stats { flex-direction: column; align-items: flex-start; }
  .branches3-tagline { text-align: left; }
  .footer2-inner { flex-direction: column; text-align: center; }
  .promo2 { height: auto; padding: 36px 0; background-position: 70% center; }
  .promo2::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,36,25,0.9) 0%, rgba(11,36,25,0.75) 60%, rgba(11,36,25,0.35) 100%); }
  .promo2-inner { position: relative; flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; padding: 0 24px; }
}

/* ---------- Live effects ---------- */

/* Photos tilt toward the cursor (JS sets --rx/--ry) */
.tilt {
  --rx: 0deg; --ry: 0deg; --s: 1;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s));
  transition: transform 0.25s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}
.tilt:hover { --s: 1.03; box-shadow: 0 26px 50px rgba(11,36,25,0.25); }

/* Headings grow and cast a soft shadow on hover */
h1, h2, .branch3-body h3, .script-heading, .branches3-tagline {
  transition: transform 0.3s ease, text-shadow 0.3s ease;
  transform-origin: left center;
}
h1:hover, h2:hover, .branch3-body h3:hover, .script-heading:hover, .branches3-tagline:hover {
  transform: scale(1.04);
  text-shadow: 0 8px 18px rgba(11,36,25,0.22);
}

/* Small items lift up with a shadow */
.hover-pop { transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease; border-radius: 14px; }
.hover-pop:hover { transform: translateY(-5px) scale(1.04); box-shadow: 0 14px 28px rgba(11,36,25,0.12); background: var(--hover-surface); }
.stat-row, .stat-inline { padding: 8px 10px; margin: -8px -10px; }
.phil-item { padding: 10px; margin: -10px; }
.phil-circle { transition: background 0.3s ease, color 0.3s ease, transform 0.4s ease; }
.phil-item:hover .phil-circle { background: var(--green); color: #fff; transform: rotate(-10deg) scale(1.12); }
.stat-ic { display: inline-block; transition: transform 0.4s ease; }
.hover-pop:hover .stat-ic { transform: scale(1.3) rotate(-8deg); }

/* Branch card photo zooms inside its frame */
.branch3-photo { transition: transform 0.6s ease; }
.branch3-card:hover .branch3-photo { transform: scale(1.08); }
.branch3-card .branch3-body { position: relative; background: var(--white); }

/* Nav links: underline slides in */
.footer2-nav a { position: relative; transition: color 0.2s ease; }
.footer2-nav a:hover { color: #fff; }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }
.js .reveal.tilt.in-view { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s)); transition: opacity 0.8s ease, transform 0.25s ease-out, box-shadow 0.3s ease; }
.js .branch3-card.reveal.in-view { transition: opacity 0.8s ease, transform 0.3s ease, box-shadow 0.3s ease; }
.js .branch3-card.reveal.in-view:hover { transform: translateY(-6px); }

@media (prefers-reduced-motion: reduce) {
  .tilt, .hover-pop, h1, h2, .hero-slide, .branch3-photo, .js .reveal { transition: none !important; transform: none !important; }
  .js .reveal { opacity: 1; }
  .slide-progress.run { animation: none; }
}

/* Philosophy items: details pop out on hover / focus / tap */
.phil-item { position: relative; cursor: pointer; outline: none; }
.phil-item:hover, .phil-item:focus-visible, .phil-item.open { background: var(--white); z-index: 20; }
.phil-halal { font-family: 'Segoe UI', 'Noto Naskh Arabic', serif; font-size: 0.9rem; font-weight: 700; }
.phil-more {
  position: absolute; left: 0; top: calc(100% + 10px); width: 270px; z-index: 30;
  padding: 16px 18px; border-radius: 14px; background: var(--white);
  border-left: 3px solid var(--green);
  box-shadow: 0 18px 40px rgba(11,36,25,0.18);
  font-size: 0.85rem !important; line-height: 1.6; color: var(--text) !important;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.97); transform-origin: top left;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
}
.phil-item:nth-child(n+4) .phil-more { left: auto; right: 0; transform-origin: top right; }
.phil-item:hover .phil-more, .phil-item:focus-visible .phil-more, .phil-item.open .phil-more {
  opacity: 1; visibility: visible; transform: none;
}
@media (max-width: 900px) {
  .phil-more, .phil-item:nth-child(n+4) .phil-more {
    position: static; width: auto; margin-top: 0; padding: 0 4px; box-shadow: none; border-left: 0; background: none;
    max-height: 0; overflow: hidden; transform: none; text-align: center;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease, visibility 0.3s;
  }
  .phil-item:hover .phil-more, .phil-item:focus-visible .phil-more, .phil-item.open .phil-more { max-height: 320px; margin-top: 10px; }
  .phil-circle { margin-left: auto; margin-right: auto; }
  .phil-item:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 260px; }
}

/* Footer contacts */
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.contact-link { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 0.95rem; transition: transform 0.2s ease, color 0.2s ease; }
.contact-link:hover { transform: translateX(4px); color: var(--gold); }
.contact-ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.3); flex-shrink: 0; }
.contact-phone { background: var(--green-light); }
.contact-tg { background: #29A9EB; }
@media (max-width: 720px) { .footer-contact { align-items: center; } }

/* Marquee: text rolls along its own line like a train */
.marquee {
  display: block; overflow: hidden; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee-track { display: inline-flex; will-change: transform; animation: marqueeRun var(--marquee-dur, 12s) linear infinite; }
.marquee-item { flex-shrink: 0; }
small.marquee .marquee-item { padding-right: 2.5em; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeRun { to { transform: translateX(calc(-1 * var(--marquee-shift, 50%))); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* Cashback ticker pinned to the bottom of the screen */
body { padding-bottom: 52px; }
.cashback-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 950; height: 52px;
  display: flex; align-items: center;
  background: linear-gradient(90deg, var(--forest-deep), var(--green) 50%, var(--forest-deep));
  color: #fff; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.3px;
  box-shadow: 0 -6px 20px rgba(11,36,25,0.25);
  -webkit-mask-image: none; mask-image: none;
}
.cashback-bar .marquee-item { display: inline-flex; align-items: center; gap: 10px; padding-right: 10px; }
.cb-chip {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold); color: var(--forest); font-weight: 800; font-size: 0.8rem;
}
.cb-dot { color: var(--gold); }
.cb-logo { height: 38px; width: auto; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }

/* "EST. 2021" badge next to the header logo */
.logo-est {
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  padding: 6px 10px; margin-left: 4px; border: 1.5px solid var(--green); border-radius: 10px;
  color: var(--green); font-family: var(--ff-heading); transition: transform 0.35s ease, background 0.35s ease, color 0.35s ease;
}
.logo-est span { font-size: 0.55rem; letter-spacing: 2px; font-weight: 700; font-family: var(--ff-body); }
.logo-est strong { font-size: 1rem; letter-spacing: 1px; }
.logo:hover .logo-est { background: var(--green); color: #fff; transform: translateX(30px) rotate(-4deg); }
@media (max-width: 720px) { .logo-est { padding: 4px 7px; } .logo-est strong { font-size: 0.85rem; } }

/* ---------- B2B page ---------- */
.nav-b2b { color: var(--green) !important; font-weight: 600; }
.b2b-hero { padding: 150px 0 80px; background: var(--cream); }
.b2b-hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 50px; align-items: center; }
.b2b-hero-text h1 { font-size: clamp(2rem, 4vw, 3rem); color: var(--forest); margin: 8px 0 18px; }
.b2b-hero-text p { color: var(--text-soft); max-width: 520px; margin-bottom: 28px; }
.b2b-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.b2b-btn-ghost { background: var(--white); color: var(--forest); border: 1.5px solid var(--green); }
.b2b-btn-ghost:hover { transform: translateY(-3px); background: var(--green); color: #fff; }
.b2b-hero-visual { position: relative; }
.b2b-hero-photo { aspect-ratio: 4 / 5; max-height: 460px; margin-left: auto; }
.b2b-badge {
  position: absolute; left: 0; bottom: 24px; display: flex; flex-direction: column; align-items: center;
  padding: 14px 20px; border-radius: 18px; background: var(--white); box-shadow: var(--shadow);
  animation: stickerFloat 4s ease-in-out infinite;
}
.b2b-badge strong { font-family: var(--ff-heading); font-size: 1.8rem; color: var(--green); line-height: 1; }
.b2b-badge span { font-size: 0.8rem; color: var(--text-soft); }
@keyframes stickerFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.b2b-block { padding: 80px 0; background: var(--cream); }
.b2b-block-alt { background: var(--cream-alt); }
.b2b-head { text-align: center; max-width: 700px; margin: 0 auto 40px; }
.b2b-head h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); color: var(--forest); margin-top: 6px; transform-origin: center; }

.b2b-who { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.b2b-who-item { text-align: center; padding: 26px 14px !important; margin: 0 !important; background: var(--white); border: 1px solid var(--border-soft); }
.b2b-who-item span { font-size: 2rem; display: block; margin-bottom: 10px; transition: transform 0.4s ease; }
.b2b-who-item:hover span { transform: scale(1.25) rotate(-8deg); }
.b2b-who-item h4 { font-size: 0.92rem; color: var(--forest); }

.b2b-offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.b2b-offer {
  padding: 30px 26px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--border-soft);
  box-shadow: 0 8px 20px rgba(11,36,25,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.b2b-offer:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.js .b2b-offer.reveal.in-view { transition: opacity 0.8s ease, transform 0.3s ease, box-shadow 0.3s ease; }
.js .b2b-offer.reveal.in-view:hover { transform: translateY(-8px); }
.b2b-offer-ic {
  width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; background: rgba(31,122,67,0.1); margin-bottom: 16px;
}
.b2b-offer h3 { font-size: 1.15rem; color: var(--forest); margin-bottom: 8px; }
.b2b-offer p { color: var(--text-soft); font-size: 0.9rem; }
.b2b-note { text-align: center; margin-top: 28px; color: var(--green); font-weight: 600; font-size: 0.92rem; }

.b2b-why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.b2b-why-item { text-align: center; padding: 26px 16px !important; margin: 0 !important; background: var(--white); border: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 6px; }
.b2b-why-item strong { font-family: var(--ff-heading); font-size: 2rem; color: var(--green); line-height: 1.1; }
.b2b-why-item span { color: var(--text-soft); font-size: 0.88rem; }

.b2b-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.b2b-step { position: relative; text-align: center; padding: 0 8px; }
.b2b-step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-light), var(--green)); color: #fff; font-weight: 700; font-size: 1.3rem;
  box-shadow: 0 10px 22px rgba(31,122,67,0.3); margin-bottom: 14px; transition: transform 0.4s ease;
}
.b2b-step:hover .b2b-step-num { transform: scale(1.15) rotate(-10deg); }
.b2b-step:not(:last-child)::after {
  content: ''; position: absolute; top: 27px; left: calc(50% + 40px); right: calc(-50% + 40px);
  border-top: 2px dashed rgba(31,122,67,0.35);
}
.b2b-step h4 { color: var(--forest); font-size: 1rem; margin-bottom: 6px; }
.b2b-step p { color: var(--text-soft); font-size: 0.85rem; }

.b2b-form-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 50px; align-items: start; }
.b2b-form-info h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); color: var(--forest); margin: 6px 0 12px; }
.b2b-form-info p { color: var(--text-soft); margin-bottom: 22px; }
.b2b-contact { color: var(--forest); margin-bottom: 12px; display: flex; }
.b2b-contact:hover { color: var(--green); }
.b2b-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px;
  padding: 32px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--border-soft);
}
.b2b-field { display: flex; flex-direction: column; gap: 6px; }
.b2b-field-full { grid-column: 1 / -1; }
.b2b-field label { font-size: 0.82rem; font-weight: 600; color: var(--forest); }
.b2b-field input, .b2b-field select, .b2b-field textarea {
  font: inherit; font-size: 0.92rem; color: var(--text); padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--border-soft); background: var(--cream); transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.b2b-field textarea { resize: vertical; }
.b2b-field input:focus, .b2b-field select:focus, .b2b-field textarea:focus {
  outline: none; border-color: var(--green); background: var(--white); box-shadow: 0 0 0 4px rgba(46,158,82,0.15);
}
.b2b-field.invalid input { border-color: var(--red); }
.b2b-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.b2b-submit { grid-column: 1 / -1; justify-self: start; border: 0; cursor: pointer; }
.b2b-submit[disabled] { opacity: 0.6; cursor: wait; }
.b2b-status { grid-column: 1 / -1; font-size: 0.9rem; font-weight: 600; min-height: 1.2em; }
.b2b-status.ok { color: var(--green); }
.b2b-status.err { color: var(--red); }

@media (max-width: 900px) {
  .b2b-hero-inner, .b2b-form-wrap { grid-template-columns: minmax(0, 1fr); }
  .b2b-hero-photo { margin: 0 auto; max-height: 380px; }
  .b2b-who { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b2b-offers { grid-template-columns: minmax(0, 1fr); }
  .b2b-why, .b2b-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .b2b-step::after { display: none; }
}
@media (max-width: 560px) {
  .b2b-hero { padding-top: 120px; }
  .b2b-who { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b2b-form { grid-template-columns: minmax(0, 1fr); padding: 22px; }
}

.b2b-who.b2b-who-2 { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; }
@media (max-width: 560px) { .b2b-who.b2b-who-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* B2B offers are links now */
a.b2b-offer { display: block; color: inherit; }
.b2b-offer-link { display: inline-block; margin-top: 14px; color: var(--green); font-weight: 600; font-size: 0.88rem; transition: transform 0.3s ease; }
.b2b-offer:hover .b2b-offer-link { transform: translateX(6px); }

/* Category picker */
.b2b-cats { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.b2b-cats legend { font-size: 0.82rem; font-weight: 600; color: var(--forest); margin-bottom: 8px; padding: 0; }
.b2b-cat input { position: absolute; opacity: 0; pointer-events: none; }
.b2b-cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--border-soft); background: var(--cream); font-weight: 600; color: var(--forest); font-size: 0.9rem;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.b2b-cat-ic { font-size: 1.7rem; transition: transform 0.35s ease; }
.b2b-cat-card:hover { transform: translateY(-3px); border-color: var(--green-light); }
.b2b-cat input:checked + .b2b-cat-card { border-color: var(--green); background: rgba(46,158,82,0.1); box-shadow: 0 0 0 3px rgba(46,158,82,0.15); }
.b2b-cat input:checked + .b2b-cat-card .b2b-cat-ic { transform: scale(1.2) rotate(-8deg); }
.b2b-cat input:focus-visible + .b2b-cat-card { outline: 2px solid var(--green); outline-offset: 2px; }
.b2b-cats.invalid .b2b-cat-card { border-color: var(--red); }

/* Location check */
.b2b-geo-label { font-size: 0.82rem; font-weight: 600; color: var(--forest); }
.b2b-geo-btn {
  align-self: flex-start; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  padding: 11px 18px; border-radius: 12px; border: 1.5px dashed var(--green); background: rgba(46,158,82,0.06); color: var(--green);
  transition: background 0.2s ease, transform 0.2s ease;
}
.b2b-geo-btn:hover { background: rgba(46,158,82,0.14); transform: translateY(-2px); }
.b2b-geo.ok .b2b-geo-btn { border-style: solid; background: var(--green); color: #fff; }
.b2b-geo.invalid .b2b-geo-btn { border-color: var(--red); color: var(--red); }
.b2b-geo-status { font-size: 0.8rem; color: var(--text-soft); }
.b2b-geo.ok .b2b-geo-status { color: var(--green); font-weight: 600; }
.b2b-geo.invalid .b2b-geo-status { color: var(--red); }
@media (max-width: 560px) { .b2b-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .b2b-cat-card { padding: 12px 4px; font-size: 0.8rem; } }

/* Company location map */
.b2b-map {
  height: 280px; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--border-soft);
  z-index: 0; cursor: crosshair; transition: border-color 0.2s ease;
}
.b2b-geo.ok .b2b-map { border-color: var(--green); }
.b2b-geo.invalid .b2b-map { border-color: var(--red); }
.b2b-geo .b2b-geo-btn { margin-top: 4px; }
.b2b-geo.ok .b2b-geo-btn { border-style: dashed; background: rgba(46,158,82,0.06); color: var(--green); }
.b2b-pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--green); border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center; animation: pinDrop 0.4s cubic-bezier(.34,1.56,.64,1);
}
.b2b-pin span { transform: rotate(45deg); font-size: 15px; }
@keyframes pinDrop { from { transform: translateY(-24px) rotate(-45deg); opacity: 0; } to { transform: rotate(-45deg); opacity: 1; } }
@media (max-width: 560px) { .b2b-map { height: 240px; } }

/* ---------- Welcome screen (5 s, once per visit) ---------- */
.splash {
  position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--ink); cursor: pointer;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.no-splash .splash { display: none; }
.splash.hide { opacity: 0; visibility: hidden; }
html.splash-lock, html.splash-lock body { overflow: hidden; }
.splash-bg {
  position: absolute; inset: -4%; background-size: cover; background-position: center;
  animation: splashZoom 6s ease-out forwards;
}
.splash-shade {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(11,36,25,0.35) 0%, rgba(11,36,25,0.7) 60%, rgba(11,36,25,0.88) 100%);
}
.splash-content { position: relative; text-align: center; padding: 0 24px; color: #fff; }
.splash-logo {
  width: min(560px, 82vw); height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.45));
  animation: splashLogo 1.2s cubic-bezier(.34,1.56,.64,1) both;
}
.splash-title {
  margin-top: 26px; font-family: var(--ff-heading); font-weight: 700; font-style: italic;
  font-size: clamp(1.8rem, 5vw, 3.2rem); text-shadow: 0 4px 18px rgba(0,0,0,0.5);
  animation: splashUp 0.9s ease 0.7s both;
}
.splash-sub {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.85rem; letter-spacing: 3px; font-weight: 600; color: rgba(255,255,255,0.85);
  animation: splashUp 0.9s ease 1.1s both;
}
.splash-progress {
  display: block; width: 180px; height: 3px; margin: 30px auto 0; border-radius: 3px;
  background: rgba(255,255,255,0.2); overflow: hidden; animation: splashUp 0.9s ease 1.3s both;
}
.splash-progress span { display: block; height: 100%; width: 0; background: var(--gold); animation: splashBar 5s linear forwards; }
@keyframes splashZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes splashLogo { from { opacity: 0; transform: scale(0.6) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes splashUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes splashBar { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .splash-bg, .splash-logo, .splash-title, .splash-sub, .splash-progress { animation: none; }
  .splash-progress span { animation-duration: 5s; }
}

/* ---------- Chat assistant ---------- */
.bot { position: fixed; right: 20px; bottom: 70px; z-index: 960; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px; }
.bot-fab {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--green-light), var(--green));
  box-shadow: 0 12px 28px rgba(31,122,67,0.4); transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: botPulse 2.6s ease-in-out infinite;
}
.bot-fab:hover { transform: translateY(-3px) scale(1.04); }
.bot-fab-ic { font-size: 1.25rem; line-height: 1; }
.bot.open .bot-fab { animation: none; }
@keyframes botPulse { 0%, 100% { box-shadow: 0 12px 28px rgba(31,122,67,0.4), 0 0 0 0 rgba(46,158,82,0.45); } 50% { box-shadow: 0 12px 28px rgba(31,122,67,0.4), 0 0 0 12px rgba(46,158,82,0); } }
.bot-panel {
  width: min(370px, calc(100vw - 32px)); height: min(540px, calc(100vh - 190px)); display: flex; flex-direction: column;
  background: var(--white); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(11,36,25,0.28);
  border: 1px solid var(--border-soft); transform-origin: bottom right; animation: botIn 0.3s cubic-bezier(.34,1.56,.64,1);
}
.bot-panel[hidden] { display: none; }
@keyframes botIn { from { opacity: 0; transform: translateY(16px) scale(0.92); } to { opacity: 1; transform: none; } }
.bot-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, var(--forest-deep), var(--green)); color: #fff; }
.bot-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.bot-head-text { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.bot-head-text strong { font-size: 0.98rem; }
.bot-head-text span { font-size: 0.75rem; opacity: 0.8; }
.bot-close { border: 0; background: rgba(255,255,255,0.12); color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 0.9rem; }
.bot-close:hover { background: rgba(255,255,255,0.25); }
.bot-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--cream); }
.bot-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 0.88rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; animation: botMsg 0.25s ease; }
@keyframes botMsg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bot-msg.from-bot { align-self: flex-start; background: var(--white); color: var(--text); border: 1px solid var(--border-soft); border-bottom-left-radius: 4px; }
.bot-msg.from-user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.bot-msg a { color: var(--green); font-weight: 600; text-decoration: underline; }
.bot-msg.from-user a { color: #fff; }
.bot-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bot-actions a { text-decoration: none; padding: 6px 12px; border-radius: 999px; background: rgba(31,122,67,0.1); font-size: 0.8rem; }
.bot-typing { display: inline-flex; gap: 4px; }
.bot-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-soft); animation: botDot 1s infinite ease-in-out; }
.bot-typing i:nth-child(2) { animation-delay: 0.15s; } .bot-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes botDot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.bot-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; border-top: 1px solid var(--border-soft); background: var(--white); scrollbar-width: none; }
.bot-chips::-webkit-scrollbar { display: none; }
.bot-chip { flex-shrink: 0; border: 1.5px solid var(--green); background: var(--white); color: var(--green); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
.bot-chip:hover { background: var(--green); color: #fff; }
.bot-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--white); }
.bot-form input { flex: 1; min-width: 0; font: inherit; font-size: 0.9rem; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--border-soft); background: var(--cream); }
.bot-form input:focus { outline: none; border-color: var(--green); background: var(--white); }
.bot-send { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--green); color: #fff; cursor: pointer; font-size: 1rem; transition: transform 0.2s ease; }
.bot-send:hover { transform: scale(1.08); }
.bot-send[disabled] { opacity: 0.5; cursor: wait; }
@media (max-width: 560px) {
  .bot { right: 12px; bottom: 64px; }
  .bot-fab-label { display: none; }
  .bot-fab { padding: 14px; }
  .bot-panel { height: min(520px, calc(100vh - 150px)); }
}
@media (prefers-reduced-motion: reduce) { .bot-fab, .bot-panel, .bot-msg, .bot-typing i { animation: none; } }

/* Language buttons inside the chat header */
.bot-lang { gap: 2px; margin-right: 4px; }
.bot-lang button {
  color: rgba(255,255,255,0.75) !important; font-size: 0.68rem; font-weight: 700; padding: 4px 6px; border-radius: 6px;
  background: transparent; border: 0; cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
}
.bot-lang button:hover { background: rgba(255,255,255,0.15); color: #fff !important; }
.bot-lang .lang-active { background: #fff !important; color: var(--forest-deep) !important; }
@media (max-width: 380px) { .bot-head-text span { display: none; } }

/* Branch opening hours + live open/closed badge */
.branch3-body > p.branch3-hours { margin-top: -6px; flex-wrap: wrap; }
.open-badge { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.open-badge:empty { display: none; }
.open-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.open-badge.is-open { background: rgba(46,158,82,0.12); color: var(--green); }
.open-badge.is-open::before { animation: openBlink 1.6s ease-in-out infinite; }
.open-badge.is-closed { background: rgba(206,43,55,0.1); color: var(--red); }
@keyframes openBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- Night mode ---------- */
:root[data-theme="dark"] {
  --cream: #0E1712;
  --cream-alt: #12201A;
  --white: #18271F;
  --text: #E6EEE8;
  --text-soft: #A3B5A9;
  --forest: #EEF5F0;
  --green: #34B062;
  --green-light: #45C774;
  --border-soft: #26382D;
  --shadow: 0 14px 34px rgba(0,0,0,0.45);
  --header-bg: rgba(14, 23, 18, 0.9);
  --hover-surface: rgba(255,255,255,0.05);
  --fx: 255, 255, 255;
  color-scheme: dark;
}
html { transition: background-color 0.3s ease; }
body { transition: background-color 0.4s ease, color 0.4s ease; }
.logo-img-dark { display: none; }
:root[data-theme="dark"] .header .logo-img:not(.logo-img-dark) { display: none; }
:root[data-theme="dark"] .header .logo-img-dark { display: block; }
:root[data-theme="dark"] .icon-btn-light { background: rgba(255,255,255,0.08); }
:root[data-theme="dark"] .blob-photo, :root[data-theme="dark"] .branch3-photo { filter: brightness(0.92); }

/* Theme toggle */
.theme-toggle { font-size: 1.05rem; }
.theme-toggle .theme-ic-night { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-ic-day { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-ic-night { display: inline-block; }
.theme-toggle span { display: inline-block; transition: transform 0.5s ease; }
.theme-toggle:hover span { transform: rotate(-25deg) scale(1.15); }

/* On phones keep the search + theme buttons next to the menu */
@media (max-width: 720px) {
  .header-actions { display: flex; gap: 8px; margin-left: auto; }
  .header-actions .btn, .header-actions .lang-switch { display: none; }
}

/* ---------- Card spotlight: soft glow where the mouse / finger is (green by day, white by night) ---------- */
.spot { position: relative; isolation: isolate; }
.spot::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--fx), 0.22), rgba(var(--fx), 0.08) 40%, transparent 70%);
  opacity: 0; transition: opacity 0.35s ease;
}
.spot:hover::after, .spot.spot-on::after { opacity: 1; }
:root[data-theme="dark"] .spot::after {
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--fx), 0.14), rgba(var(--fx), 0.05) 40%, transparent 70%);
}
@media (prefers-reduced-motion: reduce) { .spot::after { transition: none; } }

/* Small phones: keep logo, EST badge, search, theme and menu on one line */
@media (max-width: 430px) {
  .header-inner { gap: 8px; }
  .logo { gap: 5px; }
  .logo-img, .header.scrolled .logo-img { height: 32px; }
  .logo-est { padding: 3px 5px; border-radius: 7px; margin-left: 0; }
  .logo-est span { font-size: 0.42rem; letter-spacing: 1px; }
  .logo-est strong { font-size: 0.7rem; }
  .header-actions { gap: 6px; }
  .header-actions .icon-btn { width: 36px; height: 36px; font-size: 0.95rem; }
}

/* Branch window map (Leaflet) */
.branch-modal-leaflet { height: 280px; width: 100%; z-index: 0; }
.leaflet-container { font-family: var(--ff-body); }
.leaflet-control-zoom a { width: 34px !important; height: 34px !important; line-height: 34px !important; font-size: 20px !important; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: brightness(0.75) contrast(1.1) saturate(0.85); }

/* Page-wide glow following the mouse / finger */
.glow-layer {
  position: fixed; inset: 0; z-index: 3500; pointer-events: none; opacity: 0; transition: opacity 0.5s ease;
  background: radial-gradient(300px circle at var(--gx, -500px) var(--gy, -500px), rgba(var(--fx), 0.16), rgba(var(--fx), 0.06) 40%, transparent 70%);
}
.glow-layer.glow-on { opacity: 1; }
:root[data-theme="dark"] .glow-layer {
  background: radial-gradient(300px circle at var(--gx, -500px) var(--gy, -500px), rgba(var(--fx), 0.09), rgba(var(--fx), 0.035) 40%, transparent 70%);
}
@media (prefers-reduced-motion: reduce) { .glow-layer { display: none; } }
