/* ════════════════════════════════════════
   ECOMMERCE SERVICES PAGE — ecommerce-services.css
   Link this AFTER your main style.css
════════════════════════════════════════ */

@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.8)} }
@keyframes panelIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

.reveal { opacity:0; transform:translateY(28px); transition:opacity 0.7s ease,transform 0.7s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }

/* ════════════════════════════════════════
   PAGE HEADING
════════════════════════════════════════ */
.ec-page-heading {
  background: linear-gradient(140deg,#e8f3fb 0%,#eef8ff 35%,#f0faeb 70%,#e4f5ef 100%);
  padding: 24px 5% 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.ec-page-heading::before {
  content:''; position:absolute; inset:0;
  background-image: radial-gradient(circle,rgba(20,88,135,0.05) 1px,transparent 1px);
  background-size: 26px 26px; pointer-events:none;
}
.ec-page-heading::after {
  content:''; position:absolute; top:-80px; right:-80px;
  width:320px; height:320px; border-radius:50%;
  background: radial-gradient(circle,rgba(137,199,101,0.10) 0%,transparent 70%);
  pointer-events:none;
}
.ec-page-heading-inner {
  max-width: var(--max); margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  gap:32px; position:relative; z-index:2;
}
.ec-page-heading-left { display:flex; flex-direction:column; gap:8px; flex-shrink:0; }
.ec-page-heading-badge {
  display:inline-flex; align-items:center; gap:7px;
  font-size:10px; font-weight:700; letter-spacing:0.14em;
  text-transform:uppercase; color:#2e7a10;
  background:rgba(137,199,101,0.12); border:1px solid rgba(137,199,101,0.30);
  padding:4px 12px; border-radius:30px; width:fit-content;
}
.ec-page-heading-badge-dot {
  width:5px; height:5px; border-radius:50%;
  background:#89C765; flex-shrink:0; animation:pulse 2.4s ease infinite;
}
.ec-page-heading-h1 {
  font-family:'Roboto',sans-serif; font-size:clamp(18px,2vw,26px);
  font-weight:900; color:var(--navy); letter-spacing:-0.02em;
  line-height:1.2; white-space:nowrap;
}

/* Stats */
.ec-page-stats { display:flex; align-items:center; flex-shrink:0; }
.ec-page-stat { text-align:center; padding:0 22px; }
.ec-page-stat-num {
  font-family:'Roboto',sans-serif; font-size:28px; font-weight:900;
  color:#89C765; line-height:1; display:flex; align-items:baseline; justify-content:center; gap:1px;
}
.ec-page-stat-num span { font-size:18px; color:#89C765; }
.ec-page-stat-lbl { font-size:10.5px; color:var(--text-3); margin-top:3px; }
.ec-page-stat-divider { width:1px; height:34px; background:var(--border); flex-shrink:0; }

/* ════════════════════════════════════════
   MAIN + TAB BAR
════════════════════════════════════════ */
.ec-main { background:var(--off); padding:28px 5% 60px; }
.ec-inner { max-width:var(--max); margin:0 auto; }

.ec-tab-bar {
  display:flex; background:#fff;
  border:1px solid var(--border); border-radius:var(--r2);
  overflow:hidden; margin-bottom:14px; box-shadow:var(--s1);
}
.ec-tab {
  flex:1; padding:12px 6px;
  display:flex; flex-direction:column; align-items:center; gap:3px;
  cursor:pointer; border-right:1px solid var(--border);
  transition:all 0.18s; user-select:none; text-align:center;
}
.ec-tab:last-child { border-right:none; }
.ec-tab-flag {
  font-size:24px; line-height:1.2;
  font-family:'Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji',sans-serif;
  display:none;
}
.ec-tab-name {
    display: block;
    font-size: 14px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    line-height: 2.5;
}
.ec-tab-code {
  font-size:9px; font-weight:700;
  color:var(--text-3); letter-spacing:0.08em;
  display:block;
}
.ec-tab:hover:not(.active) { background:var(--p-blue); }
.ec-tab.active { background:linear-gradient(135deg,var(--navy) 0%,var(--navy-2) 100%); }
.ec-tab.active .ec-tab-name { color:#fff; }
.ec-tab.active .ec-tab-code { color:rgba(255,255,255,0.55); }

/* ════════════════════════════════════════
   COUNTRY PANEL
════════════════════════════════════════ */
.ec-panel {
  background:#fff; border:1px solid var(--border);
  border-radius:var(--r2); overflow:hidden;
  box-shadow:var(--s2); animation:panelIn 0.3s ease;
}
.ec-panel-head {
  padding:18px 22px 16px;
  position:relative; overflow:hidden;
}
/* Flag in background — rendered from JS-injected data-flag attribute */
.ec-panel-head::after {
  content: attr(data-flag);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 130px;
  line-height: 1;
  font-family: 'Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji',sans-serif;
  opacity: 0.13;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  filter: saturate(1.2);
}
.ec-panel-title-row { display:flex; align-items:center; justify-content:space-between; position:relative; z-index:1; }
.ec-panel-title { display:flex; align-items:center; gap:12px; }
.ec-panel-flag { font-size:30px; line-height:1; }
.ec-panel-name { font-family:'Roboto',sans-serif; font-size:18px; font-weight:800; color:var(--navy); }
.ec-panel-count {
  font-size:11px; font-weight:700; padding:4px 14px;
  border-radius:20px; background:#89C765; color:#fff; white-space:nowrap;
}

/* Services grid */
.ec-services-grid { display:grid; gap:1px; background:var(--border); border-top:1px solid var(--border); }
.ec-svc-item {
  display:flex; align-items:center; gap:10px;
  padding:11px 18px; background:#fff;
  font-size:13px; color:var(--text-2); transition:all 0.18s;
}
.ec-svc-item:hover { background:var(--green-pale); color:var(--navy); }
.ec-svc-check {
  width:18px; height:18px; flex-shrink:0;
  background:rgba(137,199,101,0.15); border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.ec-svc-check svg { width:9px; height:9px; stroke:#2e7a10; stroke-width:3; fill:none; stroke-linecap:round; stroke-linejoin:round; }

/* Panel CTA */
.ec-panel-cta {
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:12px; padding:14px 22px;
  background:var(--off); border-top:1px solid var(--border);
}
.ec-panel-cta-txt { font-size:12.5px; color:var(--text-2); }
.ec-panel-cta-txt strong { color:var(--navy); }
.ec-cta-btns { display:flex; gap:8px; flex-wrap:wrap; }
.ecb-navy {
  display:inline-flex; align-items:center; gap:6px;
  font-size:12.5px; font-weight:600; padding:8px 18px; border-radius:8px;
  background:var(--navy); color:#fff; text-decoration:none; transition:background 0.2s;
}
.ecb-navy:hover { background:var(--navy-2); }
.ecb-border {
  display:inline-flex; align-items:center; gap:6px;
  font-size:12.5px; font-weight:600; padding:8px 18px; border-radius:8px;
  border:1.5px solid var(--border); color:var(--navy);
  text-decoration:none; transition:all 0.2s;
}
.ecb-border:hover { border-color:var(--navy); background:var(--p-blue); }

/* ════════════════════════════════════════
   CONTACT BAR
════════════════════════════════════════ */
.ec-contact-bar {
  background:var(--navy); border-radius:var(--r2);
  padding:22px 28px; margin-top:16px;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px;
}
.ec-bar-contacts { display:flex; gap:24px; flex-wrap:wrap; align-items:center; }
.ec-bar-item { display:flex; align-items:center; gap:8px; }
.ec-bar-item svg { width:15px; height:15px; stroke:rgba(255,255,255,0.55); flex-shrink:0; }
.ec-bar-item a, .ec-bar-item span { font-size:13px; color:rgba(255,255,255,0.82); text-decoration:none; }
.ec-bar-item a:hover { color:#fff; }
.ec-bar-btn {
  display:inline-flex; align-items:center; gap:7px;
  font-size:13.5px; font-weight:700; padding:11px 24px;
  border-radius:8px; background:#89C765; color:#fff;
  text-decoration:none; white-space:nowrap; transition:background 0.2s;
}
.ec-bar-btn:hover { background:#6db84a; }

/* ════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
════════════════════════════════════════ */

/* Tablet landscape ≤1024px */
@media (max-width:1024px) {
  .ec-page-stat { padding:0 16px; }
  .ec-page-stat-num { font-size:24px; }
  .ec-services-grid { grid-template-columns:repeat(2,1fr) !important; }
}

/* Tablet portrait ≤820px */
@media (max-width:820px) {
  .ec-page-heading-inner { flex-direction:column; align-items:flex-start; gap:14px; }
  .ec-page-heading-h1 { white-space:normal; font-size:clamp(18px,4vw,24px); }
  .ec-page-stats { width:100%; border-top:1px solid rgba(20,88,135,0.10); padding-top:12px; }
  .ec-page-stat:first-child { padding-left:0; }
  .ec-bar-contacts { flex-direction:column; gap:10px; align-items:flex-start; }
  .ec-contact-bar { flex-direction:column; align-items:flex-start; }
  .ec-panel-cta { flex-direction:column; align-items:flex-start; }
}

/* Mobile ≤640px */
@media (max-width:640px) {
  .ec-page-heading { padding:16px 5% 14px; }
  .ec-tab-name { display:none; }
  .ec-tab-code { display:block; }
  .ec-tab { padding:10px 4px; }
  .ec-tab-flag { font-size:22px; }
  .ec-services-grid { grid-template-columns:1fr !important; }
  .ec-page-stat-divider { display:none; }
  .ec-page-stat { padding:0 10px; }
  .ec-page-stat:first-child { padding-left:0; }
  .ec-page-stat-num { font-size:20px; }
  .ec-panel-name { font-size:15px; }
  .ec-panel-flag { font-size:24px; }
  .ec-cta-btns { flex-direction:column; width:100%; }
  .ecb-navy, .ecb-border { justify-content:center; }
  .ec-main { padding:14px 5% 36px; }
  .ec-contact-bar { padding:18px 20px; }
  .ec-bar-btn { width:100%; justify-content:center; }
  .ec-panel-head::after { font-size:72px; }
}

/* Small mobile ≤380px */
@media (max-width:380px) {
  .ec-page-stat-lbl { font-size:9px; }
  .ec-panel-head { padding:14px 14px 12px; }
  .ec-svc-item { padding:10px 14px; font-size:12px; }
  .ec-panel-cta { padding:12px 14px; }
}


/* ════════════════════════════════════════
   FAQ SECTION — matches faq.html card style
════════════════════════════════════════ */
.ec-faq-section {
  background: #f7f9fb;
  padding: 64px 5% 72px;
  border-top: 1px solid var(--border);
}
.ec-faq-inner { max-width: var(--max); margin: 0 auto; }
.ec-faq-header { text-align: center; margin-bottom: 40px; }
.ec-faq-title {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(22px, 2.8vw, 34px); font-weight: 900;
  color: var(--navy); letter-spacing: -0.02em; margin-bottom: 8px;
}
.ec-faq-subtitle { font-size: 15px; color: var(--text-2); max-width: 480px; margin: 0 auto; line-height: 1.7; }

/* Single column list */
.ec-faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; }

/* Card item */
.ec-faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.22s;
}
.ec-faq-item:hover { box-shadow: var(--s2); }
.ec-faq-item.open { box-shadow: var(--s2); border-color: rgba(20,88,135,0.25); }

/* Question row */
.ec-faq-q {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  cursor: pointer; user-select: none;
  background: none; border: none; width: 100%; text-align: left;
  font-family: 'Poppins', sans-serif;
}
.ec-faq-q-text {
  font-size: 15px; font-weight: 600; color: var(--navy);
  line-height: 1.4; flex: 1;
}
.ec-faq-item.open .ec-faq-q-text { color: var(--navy-2); }

/* Toggle circle with + SVG */
.ec-faq-toggle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--p-blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.3s;
}
.ec-faq-toggle svg { width: 14px; height: 14px; stroke: var(--navy); transition: transform 0.3s; }
.ec-faq-item.open .ec-faq-toggle { background: var(--navy); }
.ec-faq-item.open .ec-faq-toggle svg { stroke: #fff; transform: rotate(45deg); }

/* Answer */
.ec-faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.ec-faq-item.open .ec-faq-a { max-height: 500px; }
.ec-faq-a-inner {
  padding: 16px 22px 20px;
  font-size: 14.5px; color: var(--text-2); line-height: 1.85;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .ec-faq-section { padding: 40px 5% 48px; }
  .ec-faq-q-text { font-size: 13.5px; }
  .ec-faq-q { padding: 15px 16px; }
  .ec-faq-a-inner { padding: 14px 16px 18px; }
}

/* ════════════════════════════════════════
   TAB FLAG BG + SERVICE DETAIL PANEL
════════════════════════════════════════ */
/* ══════════════════════════════════════
   TAB BAR — real circular flag image bg
══════════════════════════════════════ */
.ec-tab {
  position: relative;
  overflow: hidden;
}

/* Full-tab flag background — covers entire tab area */
.ec-tab-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.22s;
}
.ec-tab.active .ec-tab-bg-img { opacity: 0.22; }
.ec-tab:hover:not(.active) .ec-tab-bg-img { opacity: 0.16; }

/* Tab layout: flag emoji + code only */
.ec-tab {
  padding: 20px 10px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ec-tab-flag { font-size: 22px; line-height: 1.2; position: relative; z-index: 1; }
.ec-tab-name { display: block; font-size: 16px; font-weight: 600; position: relative; z-index: 1; line-height: 1.2; }
.ec-tab-code { display: block; }

/* ══════════════════════════════════════
   SERVICE ITEM — with Detail expand btn
══════════════════════════════════════ */
.ec-svc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 20px;
  background: #fff;
  font-size: 13.5px;
  color: var(--text-2);
  transition: all 0.18s;
  cursor: default;
  min-height: 56px;
}
.ec-svc-item:hover {
  background: var(--green-pale);
}
.ec-svc-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.ec-svc-detail-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  background: var(--p-blue);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.18s;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}
.ec-svc-detail-btn svg { pointer-events: none; }
.ec-svc-detail-btn:hover,
.ec-svc-item.detail-open .ec-svc-detail-btn {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.ec-svc-detail-btn:hover svg,
.ec-svc-item.detail-open .ec-svc-detail-btn svg {
  stroke: #fff;
}

/* Inline detail drawer */
.ec-svc-detail-panel {
  display: none;
  background: var(--off);
  border-top: 1px solid var(--border);
  padding: 16px 18px 18px;
  animation: detailIn 0.24s ease;
}
.ec-svc-detail-panel.open {
  display: block;
}
@keyframes detailIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ec-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.ec-detail-head h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.ec-detail-close {
  background: none;
  border: none;
  font-size: 17px;
  color: var(--text-3);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.18s;
}
.ec-detail-close:hover { color: var(--navy); }
.ec-detail-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.78;
  margin-bottom: 12px;
}
.ec-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.ec-detail-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: #fff;
}
.ec-detail-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.ec-detail-cta-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--s2);
}

/* Responsive tweaks for tabs */
@media (max-width: 820px) {
  .ec-tab-bg-img { width: 42px; height: 42px; right: -4px; }
}
@media (max-width: 640px) {
  .ec-tab-name { display: none; }
  .ec-tab-bg-img { width: 36px; height: 36px; right: -2px; }
  .ec-svc-detail-btn { width: 26px; height: 26px; }
}

/* ── Ecom tab bar scroll on very small phones ── */
@media (max-width: 480px) {
  .ec-tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .ec-tab {
    scroll-snap-align: start;
    min-width: 72px;
  }
  .ec-services-grid {
    grid-template-columns: 1fr !important;
  }
  .ec-panel-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .ec-cta-btns {
    flex-direction: column;
    width: 100%;
  }
  .ecb-navy, .ecb-border {
    justify-content: center;
    width: 100%;
  }
}
