/* =====================================================
   Panjabi Samaj — Global Stylesheet
   Design System: Bootstrap 5 + Custom
   ===================================================== */

:root {
  /* Legacy admin/member palette */
  --ps-purple:  #5C2D91;
  --ps-saffron: #F47920;
  --ps-green:   #2D8C4E;
  --ps-gold:    #FFB81C;
  --ps-dark:    #1A1A2E;
  --ps-light:   #F8F4FF;

  /* Public / heritage palette */
  --ps-red:     #C8102E;
  --ps-amber:   #F5A623;
  --ps-navy:    #1A3C5E;
  --ps-cream:   #F9F5EE;
  --ps-warm:    #E0D8D0;

  /* Phulkari motif SVG (inline-able) */
  --pk-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22'%3E%3Cpolygon points='22,1.5 42.5,11 22,20.5 1.5,11' fill='none' stroke='%23C8102E' stroke-width='1.5'/%3E%3Cpolygon points='22,6.5 32,11 22,15.5 12,11' fill='%23F5A623'/%3E%3Ccircle cx='22' cy='11' r='2.5' fill='%231A3C5E'/%3E%3Ccircle cx='22' cy='1.5' r='1.5' fill='%231A3C5E'/%3E%3Ccircle cx='42.5' cy='11' r='1.5' fill='%231A3C5E'/%3E%3Ccircle cx='22' cy='20.5' r='1.5' fill='%231A3C5E'/%3E%3Ccircle cx='1.5' cy='11' r='1.5' fill='%231A3C5E'/%3E%3C/svg%3E");
}

* { font-family: 'Inter', sans-serif; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--ps-purple); border-radius: 3px; }

/* ── Utility ── */
.text-purple   { color: var(--ps-purple) !important; }
.text-saffron  { color: var(--ps-saffron) !important; }
.bg-purple     { background: var(--ps-purple) !important; }
.bg-saffron    { background: var(--ps-saffron) !important; }
.bg-ps-light   { background: var(--ps-light) !important; }

.btn-ps-primary {
  background: linear-gradient(135deg, var(--ps-purple), var(--ps-saffron));
  color: white; border: none; border-radius: 50px;
  font-weight: 700; transition: all 0.3s;
}
.btn-ps-primary:hover {
  color: white; opacity: 0.9; transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(92,45,145,0.3);
}
.btn-ps-outline {
  border: 2px solid var(--ps-purple); color: var(--ps-purple);
  background: transparent; border-radius: 50px; font-weight: 600;
  transition: all 0.2s;
}
.btn-ps-outline:hover { background: var(--ps-purple); color: white; }

/* ── Navbar (Public) ── */
.ps-navbar-public {
  background: white;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  padding: 14px 0;
}
.ps-navbar-public .navbar-brand {
  font-weight: 800; color: var(--ps-purple) !important; font-size: 1.2rem;
}
.ps-navbar-public .nav-link {
  font-weight: 500; color: #444 !important; font-size: 0.9rem;
}
.ps-navbar-public .nav-link:hover { color: var(--ps-purple) !important; }

/* ── Navbar (Member) ── */
.ps-navbar-member {
  background: var(--ps-dark); padding: 12px 0;
}
.ps-navbar-member .navbar-brand {
  font-weight: 800; color: white !important;
}
.ps-navbar-member .nav-link {
  color: rgba(255,255,255,0.65) !important; font-size: 0.88rem; font-weight: 500;
}
.ps-navbar-member .nav-link:hover,
.ps-navbar-member .nav-link.active { color: white !important; }

/* ── Member Avatar ── */
.ps-avatar {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--ps-purple), var(--ps-saffron));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Cards ── */
.ps-card {
  background: white; border-radius: 18px;
  padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: none;
}
.ps-card-sm { border-radius: 14px; padding: 16px; }

/* ── Form Controls ── */
.ps-form-control {
  border-radius: 12px; border: 1.5px solid #E8E0F0;
  padding: 12px 16px; font-size: 0.9rem; transition: all 0.2s;
}
.ps-form-control:focus {
  border-color: var(--ps-purple);
  box-shadow: 0 0 0 3px rgba(92,45,145,0.1);
  outline: none;
}

/* ── Step Indicator ── */
.ps-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.ps-step  { flex: 1; height: 4px; border-radius: 2px; background: #eee; }
.ps-step.done   { background: var(--ps-saffron); }
.ps-step.active { background: var(--ps-purple); }

/* ── Plan Cards ── */
.ps-plan-card {
  border: 2px solid #E8E0F0; border-radius: 16px;
  padding: 16px; cursor: pointer; transition: all 0.2s;
}
.ps-plan-card:hover,
.ps-plan-card.selected {
  border-color: var(--ps-purple);
  background: var(--ps-light);
}

/* ── Module Button (Dashboard Quick Access) ── */
.ps-module-btn {
  background: var(--ps-light); border: none; border-radius: 14px;
  padding: 16px 12px; text-align: center; cursor: pointer;
  transition: all 0.3s; text-decoration: none; color: inherit; display: block;
}
.ps-module-btn:hover {
  background: var(--ps-purple); color: white; transform: translateY(-3px);
}
.ps-module-btn:hover .ps-module-icon { background: rgba(255,255,255,0.2); color: white; }
.ps-module-btn:hover p { color: rgba(255,255,255,0.8) !important; }
.ps-module-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin: 0 auto 8px;
  background: #EDE7F6; color: var(--ps-purple);
  transition: all 0.3s;
}

/* ── Member Card (ID Card) ── */
.ps-member-card {
  background: linear-gradient(135deg, var(--ps-purple), var(--ps-saffron));
  border-radius: 20px; padding: 24px; color: white;
  position: relative; overflow: hidden; min-height: 180px;
}
.ps-member-card::before {
  content: ''; position: absolute; right: -20px; bottom: -20px;
  width: 120px; height: 120px; background: rgba(255,255,255,0.1); border-radius: 50%;
}
.ps-member-card::after {
  content: ''; position: absolute; right: 40px; bottom: 40px;
  width: 80px; height: 80px; background: rgba(255,255,255,0.07); border-radius: 50%;
}

/* ── Welcome Banner ── */
.ps-welcome-banner {
  background: linear-gradient(135deg, var(--ps-dark) 0%, var(--ps-purple) 100%);
  border-radius: 20px; padding: 28px 32px; color: white;
  position: relative; overflow: hidden; margin-bottom: 24px;
}
.ps-welcome-banner::after {
  content: '🏛️'; position: absolute; right: 32px; top: 50%;
  transform: translateY(-50%); font-size: 80px; opacity: 0.1;
}

/* ── Stat Mini ── */
.ps-stat-mini {
  background: white; border-radius: 16px;
  padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ps-stat-mini .val { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.ps-stat-mini .lbl { font-size: 0.75rem; color: #999; margin-top: 4px; }

/* ── Family Avatar ── */
.ps-fam-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: white;
  border: 3px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ── Announcement Item ── */
.ps-announcement {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; background: var(--ps-light); border-radius: 12px;
  margin-bottom: 8px;
}

/* ── Auth Layout ── */
.ps-auth-layout { min-height: 100vh; display: flex; }
.ps-auth-left {
  width: 45%;
  background: linear-gradient(160deg, var(--ps-dark) 0%, var(--ps-purple) 60%, #8B1A8A 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px; color: white; position: relative; overflow: hidden;
}
.ps-auth-left::after {
  content: ''; position: absolute; width: 300px; height: 300px;
  background: rgba(244,121,32,0.15); border-radius: 50%; bottom: -80px; right: -80px;
}
.ps-auth-right {
  flex: 1; display: flex; align-items: center;
  justify-content: center; padding: 40px;
}
.ps-auth-card {
  background: white; border-radius: 24px; padding: 48px;
  width: 100%; max-width: 500px;
  box-shadow: 0 8px 40px rgba(92,45,145,0.12);
}
.ps-tab-switcher {
  display: flex; background: var(--ps-light); border-radius: 14px;
  padding: 4px; margin-bottom: 28px;
}
.ps-tab-btn {
  flex: 1; text-align: center; padding: 10px;
  border-radius: 10px; border: none; background: transparent;
  font-weight: 600; font-size: 0.9rem; color: #999; cursor: pointer; transition: all 0.2s;
}
.ps-tab-btn.active {
  background: white; color: var(--ps-purple);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ── Notification Badge ── */
.ps-notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--ps-saffron); border-radius: 50%;
  width: 16px; height: 16px; font-size: 0.6rem;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700;
}

/* ── Alert Messages ── */
.ps-alert-error   { background:#FEE2E2; color:#991B1B; border:1px solid #FECACA; border-radius:12px; padding:12px 16px; font-size:0.88rem; }
.ps-alert-success { background:#D1FAE5; color:#065F46; border:1px solid #A7F3D0; border-radius:12px; padding:12px 16px; font-size:0.88rem; }
.ps-alert-info    { background:#EDE7F6; color:#5C2D91; border:1px solid #D1C4E9; border-radius:12px; padding:12px 16px; font-size:0.88rem; }

/* ── Loading Spinner ── */
.ps-spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%; border-top-color: white;
  animation: ps-spin 0.8s linear infinite;
}
@keyframes ps-spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .ps-auth-left { display: none; }
  .ps-auth-right { padding: 20px; }
  .ps-auth-card  { padding: 28px; }
  .ps-welcome-banner { padding: 20px; }
  .ps-welcome-banner::after { display: none; }
}

/* ==========================================================
   PUBLIC HERITAGE DESIGN SYSTEM
   ========================================================== */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Montserrat:wght@400;500;600;700&family=Noto+Sans+Gurmukhi:wght@400;600&display=swap');

/* ── Phulkari bar ── */
.pk-bar {
  height: 22px;
  background-image: var(--pk-svg);
  background-repeat: repeat-x;
  background-size: 44px 22px;
}
.pk-bar-thick {
  height: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='34'%3E%3Cpolygon points='22,2 42.5,17 22,32 1.5,17' fill='none' stroke='%23C8102E' stroke-width='2'/%3E%3Cpolygon points='22,8 34,17 22,26 10,17' fill='%23F5A623'/%3E%3Ccircle cx='22' cy='17' r='3.5' fill='%231A3C5E'/%3E%3Ccircle cx='22' cy='2' r='2' fill='%231A3C5E'/%3E%3Ccircle cx='42.5' cy='17' r='2' fill='%231A3C5E'/%3E%3Ccircle cx='22' cy='32' r='2' fill='%231A3C5E'/%3E%3Ccircle cx='1.5' cy='17' r='2' fill='%231A3C5E'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 44px 34px;
}

/* ── Public navbar ── */
.ps-pub-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(249,245,238,0.97); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(200,16,46,0.1);
  transition: box-shadow 0.3s;
}
.ps-pub-nav.scrolled { box-shadow: 0 4px 24px rgba(26,60,94,0.12); }
.ps-nav-link {
  font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 500;
  color: #2D2D2D; padding: 8px 14px; border-radius: 6px;
  background: none; border: none; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
  transition: color 0.2s, background 0.2s; white-space: nowrap;
}
.ps-nav-link:hover { color: var(--ps-red); background: rgba(200,16,46,0.06); }
.ps-nav-dropdown { position: relative; }
.ps-nav-dropdown:hover .ps-dropdown-menu { display: block; }
.ps-dropdown-menu {
  display: none; position: absolute; top: 100%; left: -16px; z-index: 300;
  min-width: 240px; padding-top: 6px;
}
.ps-dropdown-inner {
  background: white; border-radius: 12px;
  box-shadow: 0 8px 40px rgba(26,60,94,0.14);
  padding: 8px; border-top: 3px solid var(--ps-red);
}
.ps-dropdown-item {
  display: block; padding: 10px 14px; border-radius: 6px; text-decoration: none;
  transition: background 0.15s;
}
.ps-dropdown-item:hover { background: rgba(200,16,46,0.05); }
.ps-dropdown-item .title { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 13px; color: #2D2D2D; }
.ps-dropdown-item .sub   { font-size: 12px; color: #999; margin-top: 2px; }
.ps-dropdown-item.accent .title { color: var(--ps-red); }

/* ── CTA buttons ── */
.ps-gold-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ps-amber); color: #1A1A1A;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px;
  letter-spacing: 0.4px; padding: 10px 24px; border-radius: 6px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.3s; white-space: nowrap;
}
.ps-gold-btn:hover {
  color: #1A1A1A; transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245,166,35,0.45);
}
.ps-outline-white {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: white;
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px;
  padding: 10px 24px; border-radius: 6px; border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer; text-decoration: none; transition: all 0.3s;
}
.ps-outline-white:hover { background: rgba(255,255,255,0.12); border-color: white; color: white; transform: translateY(-2px); }
.ps-outline-red {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--ps-red);
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px;
  padding: 10px 24px; border-radius: 6px; border: 2px solid var(--ps-red);
  cursor: pointer; text-decoration: none; transition: all 0.3s;
}
.ps-outline-red:hover { background: rgba(200,16,46,0.05); transform: translateY(-2px); }
.ps-login-btn {
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px;
  color: var(--ps-navy); text-decoration: none; padding: 8px 20px; border-radius: 6px;
  border: 1.5px solid var(--ps-navy); transition: all 0.2s;
}
.ps-login-btn:hover { background: rgba(26,60,94,0.06); color: var(--ps-navy); }

/* ── Section headings ── */
.ps-eyebrow {
  font-family: 'Montserrat', sans-serif; font-style: italic; font-size: 12px;
  font-weight: 500; color: var(--ps-red); letter-spacing: 2.5px;
  text-transform: uppercase; display: block; margin-bottom: 10px;
}
.ps-section-title {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: 40px; color: var(--ps-navy);
}

/* ── Tile cards ── */
.ps-tile {
  background: white; border-radius: 12px; padding: 32px 20px;
  box-shadow: 0 2px 16px rgba(200,16,46,0.06); transition: transform 0.35s, box-shadow 0.35s;
  cursor: pointer; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.ps-tile:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 24px 56px rgba(200,16,46,0.18); color: inherit; }

/* ── Event card ── */
.ps-ev-card {
  background: white; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  width: 288px; box-shadow: 0 2px 16px rgba(26,60,94,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}
.ps-ev-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(26,60,94,0.16); }

/* ── News card ── */
.ps-news-card {
  background: white; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(200,16,46,0.06); display: flex;
  transition: transform 0.3s, box-shadow 0.3s;
}
.ps-news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(200,16,46,0.12); }

/* ── Announcement item ── */
.ps-ann-item {
  background: white; border-radius: 10px; padding: 20px 20px 20px 24px;
  border-left: 4px solid var(--ps-red); box-shadow: 0 1px 8px rgba(200,16,46,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.ps-ann-item:hover { transform: translateX(4px); box-shadow: 0 4px 20px rgba(200,16,46,0.1); }

/* ── Matrimonial card ── */
.ps-matri-card {
  background: white; border-radius: 12px; overflow: hidden;
  border-top: 3px solid var(--ps-red); box-shadow: 0 2px 16px rgba(200,16,46,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}
.ps-matri-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(200,16,46,0.15); }

/* ── Gallery item ── */
.ps-gal-item {
  border-radius: 10px; overflow: hidden; position: relative; cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}
.ps-gal-item:hover { transform: scale(1.02); box-shadow: 0 12px 36px rgba(0,0,0,0.25); }
.ps-gal-item .ps-gal-ov {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; opacity: 0; transition: opacity 0.3s;
}
.ps-gal-item:hover .ps-gal-ov { opacity: 1; }

/* ── Heritage auth layout ── */
.ps-heritage-auth { min-height: 100vh; display: flex; }
.ps-heritage-left {
  flex: 0 0 42%; position: sticky; top: 0; height: 100vh;
  overflow: hidden; display: flex; flex-direction: column;
}
.ps-heritage-right {
  flex: 1; overflow-y: auto; background: #FDFAF7;
  display: flex; justify-content: center;
  padding: 40px 40px 80px;
}

/* ── Scroll-reveal ── */
.ps-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.ps-reveal.ps-visible { opacity: 1; transform: translateY(0); }

/* ── Animations ── */
@keyframes ps-fadeup { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ps-shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ── Mobile overrides for public nav ── */
@media (max-width: 1024px) {
  .ps-desktop-nav, .ps-desktop-auth { display: none !important; }
  .ps-mob-toggle { display: flex !important; }
}
@media (min-width: 1025px) {
  .ps-mob-toggle { display: none !important; }
  .ps-mob-menu   { display: none !important; }
}

/* ── Heritage form floats (login/register) ── */
.ps-fl { position: relative; margin-bottom: 18px; }
.ps-fl input, .ps-fl select {
  width: 100%; padding: 20px 16px 8px; border: 1.5px solid var(--ps-warm); border-radius: 8px;
  font-size: 14px; font-family: 'Inter', sans-serif; color: #2D2D2D;
  background: white; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none; -webkit-appearance: none;
}
.ps-fl input:focus, .ps-fl select:focus {
  border-color: var(--ps-red); box-shadow: 0 0 0 3px rgba(200,16,46,0.08);
}
.ps-fl label {
  position: absolute; left: 16px; top: 15px; font-size: 14px; color: #aaa;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1); pointer-events: none;
  background: white; padding: 0 3px;
}
.ps-fl input:focus ~ label,
.ps-fl input:not(:placeholder-shown) ~ label,
.ps-fl select:focus ~ label {
  top: -8px; left: 12px; font-size: 10px; color: var(--ps-red);
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.ps-submit-btn {
  width: 100%; background: var(--ps-amber); color: #1A1A1A;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px;
  letter-spacing: 0.4px; padding: 16px; border-radius: 8px; border: none;
  cursor: pointer; transition: all 0.3s;
}
.ps-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(245,166,35,0.4); }
