/*
 * Theme Name:  Japan Maa Sathi
 * Theme URI:   https://japanmaasathi.com
 * Description: A premium community portal for Nepalese in Japan — redesigned with BizMap aesthetic.
 * Author:      Japan Maa Sathi Dev Team
 * Author URI:  https://japanmaasathi.com
 * Version:     2.0.0
 * License:     GPL-2.0-or-later
 * Text Domain: japan-maa-sathi
 */

/* ─────────────────────────────────────────────
   DESIGN SYSTEM
   ───────────────────────────────────────────── */
:root {
  /* Colors */
  --primary:        #FF6B35; /* BizMap warm orange-red accent */
  --primary-dark:   #e85a2a;
  --primary-light:  #fff0ea;
  --dark-hero:      #1A1A2E; /* Deep navy-black for hero */
  --navy:           #16213E;
  --surface:        #FFFFFF;
  --surface-alt:    #F8F9FC;
  --text:           #2D3748;
  --muted:          #718096;
  --border:         #E2E8F0;
  --success:        #48BB78;
  --gold:           #F6C90E; /* Star ratings */
  
  /* Fonts */
  --font-display:   'Shippori Mincho', serif;
  --font-body:      'DM Sans', sans-serif;
  --font-devanagari:'Noto Sans Devanagari', sans-serif;

  /* Spacing & Misc */
  --nav-h:          70px;
  --radius:         12px;
  --radius-lg:      16px;
  --shadow-sm:      0 2px 10px rgba(0,0,0,0.05);
  --shadow-md:      0 8px 32px rgba(0,0,0,0.08);
  --shadow-lg:      0 20px 60px rgba(0,0,0,0.12);
  --ease:           cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition:     all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

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

/* ─────────────────────────────────────────────
   NAVBAR — BIZMAP WHITE STICKY
   ───────────────────────────────────────────── */
.jms-nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--surface);
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  transition: var(--transition);
}
.jms-nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

.jms-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.4rem; }
.jms-logo-text { font-family: var(--font-display); color: var(--navy); }
.jms-logo-text span { color: var(--primary); }

.jms-nav-links { display: flex; align-items: center; gap: 1.5rem; }
.jms-nav-links li a {
  display: flex; flex-direction: column; align-items: center;
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  padding: 8px 12px; border-radius: 99px;
}
.jms-nav-links li a .nav-icon { font-size: 1.1rem; margin-bottom: 2px; }
.jms-nav-links li a:hover { color: var(--primary); background: var(--primary-light); }
.jms-nav-links li a.current { color: var(--primary); }

.jms-nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.6rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: var(--transition); border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 8px 20px rgba(255,107,53,0.3); }

.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-alt); border-color: var(--primary); color: var(--primary); }

.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }

/* Language Switcher */
.jms-lang-switch { display: flex; background: var(--surface-alt); border-radius: 99px; padding: 3px; border: 1px solid var(--border); }
.lang-btn {
  padding: 4px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 700;
  border: none; background: transparent; cursor: pointer; color: var(--muted);
}
.lang-btn.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }

/* ─────────────────────────────────────────────
   HERO — BIZMAP MEGA SEARCH
   ───────────────────────────────────────────── */
.jms-hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 60%, #0F3460 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 120px 1.5rem 80px;
  position: relative; overflow: hidden;
  text-align: center;
}
.jms-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 30px 30px; pointer-events: none;
}

.jms-hero-badge {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: white; padding: 6px 16px; border-radius: 99px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 2rem; display: inline-block;
}

.jms-hero-title {
  font-size: clamp(2.5rem, 6vw, 56px); font-weight: 700; color: white;
  line-height: 1.1; margin-bottom: 0.5rem;
}
.jms-hero-title span {
  background: linear-gradient(to right, #FFB75E, #FF6B35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.jms-hero-subtitle {
  font-family: var(--font-devanagari); font-size: 1.25rem; color: rgba(255,255,255,0.7);
  margin-bottom: 3rem;
}

/* Mega Search Bar */
.jms-hero-search {
  background: white; border-radius: 50px; padding: 8px;
  display: flex; width: 100%; max-width: 800px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  margin-bottom: 3rem;
}
.jms-hero-search .search-group {
  flex: 1; display: flex; align-items: center; padding: 0 1.5rem;
  border-right: 1px solid var(--border);
}
.jms-hero-search .search-group:last-of-type { border-right: none; }
.jms-hero-search input, .jms-hero-search select {
  border: none; width: 100%; outline: none; font-size: 0.95rem; font-family: var(--font-body);
  background: transparent; color: var(--text);
}
.jms-hero-search .search-btn {
  background: var(--primary); color: white; border-radius: 50px;
  padding: 0 2.5rem; height: 54px; font-weight: 700; border: none; cursor: pointer;
  transition: var(--transition);
}
.jms-hero-search .search-btn:hover { background: var(--primary-dark); }

/* Quick Nav Pills */
.jms-hero-categories { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.cat-pill {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: white; padding: 8px 18px; border-radius: 99px; font-size: 0.85rem; font-weight: 600;
  transition: var(--transition);
}
.cat-pill:hover { background: var(--primary); border-color: var(--primary); transform: scale(1.05); }

/* Floating Stats Strip */
.jms-hero-stats {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(10px);
  padding: 1.25rem; display: flex; justify-content: center; gap: 3rem;
  color: white; font-size: 0.9rem; font-weight: 600;
}

/* ─────────────────────────────────────────────
   POPULAR CATEGORIES
   ───────────────────────────────────────────── */
.jms-section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.section-header p { color: var(--muted); }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.category-card {
  background: white; border: 1px solid var(--border); border-radius: 16px;
  padding: 2.5rem 1.5rem; text-align: center; transition: var(--transition);
  position: relative; overflow: hidden;
}
.category-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.category-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--primary); transform: scaleX(0); transition: transform 0.3s;
}
.category-card:hover::after { transform: scaleX(1); }

.cat-icon-circle {
  width: 72px; height: 72px; border-radius: 50%; background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; margin: 0 auto 1.5rem; transition: var(--transition);
}
.category-card:hover .cat-icon-circle { background: var(--primary-light); }
.category-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.cat-count { font-size: 0.8rem; color: var(--muted); background: var(--surface-alt); padding: 2px 10px; border-radius: 99px; }

/* ─────────────────────────────────────────────
   FEATURED LISTINGS
   ───────────────────────────────────────────── */
.listings-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.listing-card-hz {
  display: flex; background: white; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: var(--transition);
}
.listing-card-hz:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.listing-card-hz.featured { border-left: 4px solid var(--primary); }

.l-img { width: 220px; height: 180px; flex-shrink: 0; position: relative; }
.l-img img { width: 100%; height: 100%; object-fit: cover; }
.l-placeholder { width: 100%; height: 100%; background: var(--surface-alt); display: flex; align-items: center; justify-content: center; font-size: 3rem; }

.l-body { flex: 1; padding: 1.5rem; display: flex; flex-direction: column; }
.l-top { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; align-items: center; }

/* Focus Ring */
input:focus, select:focus, textarea:focus, button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Shimmer Animation */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.badge { padding: 2px 10px; border-radius: 99px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.badge-cat { background: var(--primary-light); color: var(--primary); }
.badge-feat { background: #fff9e6; color: #d4a017; }

.l-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text); }
.l-title:hover { color: var(--primary); }
.l-loc { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 4px; }
.l-desc { font-size: 0.875rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.l-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid var(--border); }
.l-rating { color: var(--gold); font-size: 0.9rem; }
.l-price { font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.l-link { font-weight: 600; color: var(--primary); font-size: 0.9rem; }

/* ─────────────────────────────────────────────
   HOW IT WORKS
   ───────────────────────────────────────────── */
.how-it-works { background: var(--surface-alt); text-align: center; }
.steps-container { display: flex; justify-content: space-between; align-items: flex-start; position: relative; gap: 2rem; }
.steps-container::before {
  content: ''; position: absolute; top: 50px; left: 10%; right: 10%;
  height: 2px; border-top: 2px dashed var(--border); z-index: 1;
}
.step-item { flex: 1; position: relative; z-index: 2; }
.step-num {
  width: 60px; height: 60px; border-radius: 50%; background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700;
  margin: 0 auto 1.5rem; box-shadow: 0 8px 20px rgba(255,107,53,0.3);
}
.step-item h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.step-item p { font-size: 0.9rem; color: var(--muted); }

/* ─────────────────────────────────────────────
   TOP CITIES STRIP
   ───────────────────────────────────────────── */
.cities-section { background: var(--navy); padding: 60px 0; overflow: hidden; }
.cities-strip { display: flex; gap: 1.5rem; padding: 0 1.5rem; overflow-x: auto; scrollbar-width: none; }
.cities-strip::-webkit-scrollbar { display: none; }

.city-card {
  min-width: 240px; height: 160px; border-radius: 16px; position: relative;
  overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem;
  background: #2a3a5a; transition: var(--transition);
}
.city-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); z-index: 1;
}
.city-card:hover { transform: scale(1.05); }
.city-card h4 { position: relative; z-index: 2; color: white; font-size: 1.25rem; margin-bottom: 2px; }
.city-card span { position: relative; z-index: 2; color: rgba(255,255,255,0.7); font-size: 0.8rem; }

/* ─────────────────────────────────────────────
   HOROSCOPE UPGRADE
   ───────────────────────────────────────────── */
.horoscope-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.rashi-card-new {
  background: white; border: 1px solid var(--border); border-radius: 16px;
  padding: 1.5rem; text-align: center; transition: var(--transition);
}
.rashi-card-new:hover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246,201,14,0.15); transform: translateY(-4px); }

.rashi-icon-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, #FFFDE4 0%, #FFF5C3 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; margin: 0 auto 1rem;
}
.rashi-card-new.hover .rashi-icon-wrap { animation: shimmer 2s infinite linear; }
.rashi-name-ne { font-family: var(--font-devanagari); font-size: 1.1rem; font-weight: 700; display: block; margin-bottom: 2px; }
.rashi-name-en { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* ─────────────────────────────────────────────
   EMERGENCY CONTACTS
   ───────────────────────────────────────────── */
.emergency-section { background: #FFF5F5; }
.emergency-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.emg-card {
  background: white; border-radius: 12px; border-left: 4px solid #E53E3E;
  padding: 1.5rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.emg-icon { width: 50px; height: 50px; border-radius: 50%; background: #FFF5F5; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1rem; }
.emg-card h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.emg-phone { font-size: 1.5rem; font-weight: 700; color: #E53E3E; margin-bottom: 0.5rem; font-family: var(--font-display); }
.emg-desc { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.25rem; flex: 1; }
.btn-emg { border: 1.5px solid #E53E3E; color: #E53E3E; padding: 0.5rem; text-align: center; border-radius: 6px; font-weight: 600; font-size: 0.85rem; }
.btn-emg:hover { background: #E53E3E; color: white; }

/* ─────────────────────────────────────────────
   NEWSLETTER / CTA
   ───────────────────────────────────────────── */
.newsletter-section {
  background: linear-gradient(135deg, #1A1A2E 0%, #FF6B35 100%);
  padding: 80px 0; color: white; text-align: center;
}
.newsletter-section h2 { color: white; font-size: 2.5rem; margin-bottom: 1rem; }
.newsletter-form {
  display: flex; max-width: 500px; margin: 2rem auto; background: white;
  padding: 6px; border-radius: 50px;
}
.newsletter-form input {
  flex: 1; border: none; padding: 0 1.5rem; outline: none; border-radius: 50px;
}
.newsletter-form button {
  background: var(--primary); color: white; border: none; padding: 0.8rem 2rem;
  border-radius: 50px; font-weight: 700; cursor: pointer;
}

/* ─────────────────────────────────────────────
   FOOTER — BIZMAP DARK
   ───────────────────────────────────────────── */
.jms-footer { background: #1A1A2E; color: rgba(255,255,255,0.7); padding: 80px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 3rem; margin-bottom: 4rem; }
.footer-col h4 { color: white; margin-bottom: 1.5rem; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a:hover { color: var(--primary); padding-left: 5px; }

.social-links { display: flex; gap: 10px; margin-top: 1.5rem; }
.social-links a {
  width: 40px; height: 40px; border-radius: 8px; background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.social-links a:hover { background: var(--primary); color: white; }

.footer-bottom {
  padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem;
}

/* ─────────────────────────────────────────────
   MOBILE & UTILS
   ───────────────────────────────────────────── */
.jms-hamburger { display: none; cursor: pointer; font-size: 1.5rem; }
@media (max-width: 992px) {
  .jms-nav-links { display: none; }
  .jms-hamburger { display: block; }
  .category-grid, .emergency-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .jms-hero-search { flex-direction: column; border-radius: 20px; }
  .jms-hero-search .search-group { border-right: none; border-bottom: 1px solid var(--border); padding: 1rem; }
  .jms-hero-search .search-btn { width: 100%; border-radius: 20px; }
  .category-grid, .emergency-grid, .footer-grid { grid-template-columns: 1fr; }
  .listing-card-hz { flex-direction: column; }
  .l-img { width: 100%; }
}

/* Back to Top */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px;
  background: var(--primary); color: white; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 15px rgba(255,107,53,0.4); z-index: 999;
}

/* Animations */
[data-aos="fade-up"] { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-aos="fade-up"].visible { opacity: 1; transform: translateY(0); }

@keyframes shimmer {
  0% { box-shadow: 0 0 0 0 rgba(246,201,14,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(246,201,14,0); }
  100% { box-shadow: 0 0 0 0 rgba(246,201,14,0); }
}
