/**
 * KISNA Branches Page – Modern UI/UX
 * Responsive: mobile, tablet, desktop
 */

/* ========== Hero ========== */
.branches-hero {
  position: relative;
  padding: 5rem 0 4.5rem;
  overflow: hidden;
  background: linear-gradient(160deg, #0a6b1a 0%, var(--kisna-primary) 35%, var(--kisna-dark) 100%);
  color: #fff;
}

.branches-hero .container {
  position: relative;
  z-index: 2;
}

/* Decorative background layer */
.branches-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.branches-hero-bg .hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
  animation: heroBlobFloat 18s ease-in-out infinite;
}

.branches-hero-bg .hero-blob-1 {
  width: 320px;
  height: 320px;
  background: rgba(255,255,255,0.15);
  top: -80px;
  right: -60px;
  animation-delay: 0s;
}

.branches-hero-bg .hero-blob-2 {
  width: 260px;
  height: 260px;
  background: rgba(255,255,255,0.1);
  bottom: -60px;
  left: -40px;
  animation-delay: -6s;
}

.branches-hero-bg .hero-blob-3 {
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.08);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -12s;
}

.branches-hero-bg .hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
}

@keyframes heroBlobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -15px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.98); }
}

/* Hero content block */
.branches-hero-inner {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.branches-hero .hero-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0;
  transform: scale(0.8) translateY(10px);
  animation: heroIconIn 0.7s ease 0.1s forwards;
}

.branches-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  padding: 0.5rem 1.1rem;
  margin-bottom: 1.25rem;
  background: rgba(255,255,255,0.15);
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.3);
  opacity: 0;
  animation: heroBadgeIn 0.6s ease 0.2s forwards;
}

.branches-hero .hero-title {
  margin-bottom: 1rem;
  line-height: 1.15;
}

.branches-hero .hero-title-line1 {
  display: block;
  font-size: clamp(1.6rem, 4.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(24px);
  animation: heroTitleIn 0.7s ease 0.3s forwards;
}

.branches-hero .hero-title-line2 {
  display: block;
  font-size: clamp(1.35rem, 3.8vw, 1.95rem);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
  opacity: 0;
  transform: translateY(24px);
  animation: heroTitleIn 0.7s ease 0.4s forwards;
}

.branches-hero .hero-subtitle {
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
  color: rgba(255,255,255,0.88);
  line-height: 1.55;
  max-width: 38ch;
  margin: 0 auto 1.75rem;
  opacity: 0;
  animation: heroSubIn 0.6s ease 0.5s forwards;
}

.branches-hero .hero-branch-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  opacity: 0;
  animation: heroPillsIn 0.6s ease 0.6s forwards;
}

.branches-hero .hero-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.branches-hero .hero-pill:hover {
  background: rgba(255,255,255,0.28);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

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

@keyframes heroBadgeIn {
  to { opacity: 1; }
}

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

@keyframes heroSubIn {
  to { opacity: 1; }
}

@keyframes heroPillsIn {
  to { opacity: 1; }
}

/* Breadcrumbs over hero (dark style on green) */
.branches-page .page-title .breadcrumbs {
  background: rgba(0,0,0,0.15);
  padding: 0.75rem 0;
}

.branches-page .page-title .breadcrumbs a {
  color: rgba(255,255,255,0.9);
}

.branches-page .page-title .breadcrumbs a:hover {
  color: #fff;
}

.branches-page .page-title .breadcrumbs .current {
  color: rgba(255,255,255,0.8);
}

.branches-page .page-title .breadcrumbs ol li+li::before {
  color: rgba(255,255,255,0.6);
}

/* Branch location page (single branch) – same breadcrumb style on green */
.branch-location-page .page-title .breadcrumbs {
  background: rgba(0,0,0,0.15);
  padding: 0.75rem 0;
}

.branch-location-page .page-title .breadcrumbs a {
  color: rgba(255,255,255,0.9);
}

.branch-location-page .page-title .breadcrumbs a:hover {
  color: #fff;
}

.branch-location-page .page-title .breadcrumbs .current {
  color: rgba(255,255,255,0.8);
}

.branch-location-page .page-title .breadcrumbs ol li+li::before {
  color: rgba(255,255,255,0.6);
}

/* ========== Intro strip ========== */
.branches-intro {
  padding: 2.5rem 0;
  text-align: center;
  background: var(--background-color);
}

.branches-intro p {
  font-size: 1.05rem;
  color: var(--default-color);
  max-width: 52ch;
  margin: 0 auto;
}

/* ========== Branch cards section ========== */
.branches-cards-section {
  padding: 3rem 0 5rem;
  background: var(--kisna-light);
}

.branches-cards-section .row {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}

.branch-card {
  height: 100%;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
}

.branch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--kisna-primary), var(--kisna-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.branch-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(11, 122, 30, 0.12);
}

.branch-card:hover::before {
  transform: scaleX(1);
}

.branch-card .card-body {
  padding: 1.75rem 1.5rem;
}

.branch-card .branch-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--kisna-primary), var(--kisna-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  transition: transform 0.3s ease;
}

.branch-card:hover .branch-icon-wrap {
  transform: scale(1.08);
}

.branch-card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 0.35rem;
}

.branch-card .branch-tagline {
  font-size: 0.8rem;
  color: var(--kisna-text-secondary);
  margin-bottom: 1rem;
}

.branch-card .branch-address {
  font-size: 0.875rem;
  color: var(--default-color);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

.branch-card .branch-address i {
  color: var(--accent-color);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.branch-card .branch-phone {
  margin-bottom: 1.25rem;
}

.branch-card .branch-phone a {
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease;
}

.branch-card .branch-phone a:hover {
  color: var(--kisna-dark);
}

.branch-card .btn-view-branch {
  width: 100%;
  padding: 0.65rem 1rem;
  font-weight: 600;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.branch-card .btn-view-branch:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 122, 30, 0.25);
}

/* Quick actions: Call + WhatsApp on card */
.branch-card .branch-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.branch-card .branch-actions a {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.branch-card .branch-actions a:hover {
  transform: scale(1.02);
  opacity: 0.95;
}

.branch-card .branch-actions .btn-call {
  background: var(--kisna-light);
  color: var(--kisna-dark);
  border: 1px solid rgba(11, 122, 30, 0.2);
}

.branch-card .branch-actions .btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
}

/* ========== Responsive ========== */
@media (max-width: 991px) {
  .branches-hero {
    padding: 5rem 0 3.5rem;
  }

  .branches-cards-section {
    padding: 2.5rem 0 4rem;
  }

  .branch-card .card-body {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 767px) {
  .branches-hero {
    padding: 4rem 0 3rem;
  }

  .branches-hero .hero-icon-wrap {
    width: 60px;
    height: 60px;
    font-size: 1.65rem;
    margin-bottom: 1rem;
  }

  .branches-hero .hero-badge {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    padding: 0.45rem 0.9rem;
  }

  .branches-hero .hero-title-line1 {
    font-size: 1.5rem;
  }

  .branches-hero .hero-title-line2 {
    font-size: 1.25rem;
  }

  .branches-hero .hero-branch-pills {
    gap: 0.5rem;
  }

  .branches-hero .hero-pill {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }

  .branches-intro {
    padding: 2rem 1rem;
  }

  .branches-intro p {
    font-size: 1rem;
  }

  .branches-cards-section {
    padding: 2rem 0 3.5rem;
  }

  .branches-cards-section .row {
    --bs-gutter-y: 1.25rem;
  }

  .branch-card .card-body {
    padding: 1.35rem 1.25rem;
  }

  .branch-card .branch-icon-wrap {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .branch-card .branch-actions {
    margin-top: 0.85rem;
  }

  .branch-card .branch-actions a {
    flex: 1 1 100%;
  }
}

@media (max-width: 575px) {
  .branch-card .branch-actions a {
    flex: 1 1 calc(50% - 0.25rem);
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .branch-card,
  .branch-card::before,
  .branch-card .branch-icon-wrap,
  .branch-card .btn-view-branch,
  .branch-card .branch-actions a {
    transition: none;
  }

  .branch-card:hover {
    transform: none;
  }

  .branches-hero-bg .hero-blob {
    animation: none;
  }

  .branches-hero .hero-icon-wrap,
  .branches-hero .hero-badge,
  .branches-hero .hero-title-line1,
  .branches-hero .hero-title-line2,
  .branches-hero .hero-subtitle,
  .branches-hero .hero-branch-pills {
    animation: heroSubIn 0.4s ease forwards;
  }

  .branches-hero .hero-icon-wrap {
    transform: none;
  }

  .branches-hero .hero-title-line1,
  .branches-hero .hero-title-line2 {
    transform: none;
  }
}
