/* =========================================================
   KERALA MUSLIM MATRIMONY — SITE STYLESHEET
   Theme: elegant green & gold, Islamic-inspired, mobile-first
   ========================================================= */

:root {
  --green-900: #0b3d2e;
  --green-800: #0f4d3a;
  --green-700: #146c50;
  --green-600: #1c8863;
  --green-100: #e6f3ec;
  --green-50:  #f2f9f5;
  --gold-600: #b8860b;
  --gold-500: #d4a520;
  --gold-100: #fbf1d6;
  --ink-900: #1b2420;
  --ink-700: #3d4b44;
  --ink-500: #647069;
  --line: #e2e8e4;
  --white: #ffffff;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --success: #1c8863;
  --success-bg: #e6f3ec;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(11, 61, 46, 0.08);
  --shadow-sm: 0 2px 8px rgba(11, 61, 46, 0.06);
  --max-width: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; color: var(--green-900); }
p { margin: 0 0 1em; color: var(--ink-700); }
ul { padding: 0; margin: 0; list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--green-900); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- HEADER / NAV ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--green-900); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(145deg, var(--green-700), var(--green-900));
  color: var(--gold-100); display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.brand-text { font-weight: 800; font-size: 1.05rem; line-height: 1.15; }
.brand-text small { font-weight: 600; color: var(--gold-600); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }

.main-nav ul { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: var(--ink-700); font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: var(--green-700); text-decoration: none; }
.btn-nav-cta {
  background: var(--gold-500); color: var(--green-900) !important; padding: 9px 18px; border-radius: 999px;
  font-weight: 700 !important;
}
.btn-nav-cta:hover { background: var(--gold-600); }
.btn-outline-nav {
  border: 1.5px solid var(--green-700); padding: 7px 16px; border-radius: 999px; color: var(--green-700) !important;
}
.nav-toggle-input { display: none; }
.nav-toggle-btn { display: none; font-size: 1.5rem; cursor: pointer; color: var(--green-900); }

@media (max-width: 860px) {
  .nav-toggle-btn { display: block; }
  .main-nav ul {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); flex-direction: column; align-items: stretch;
    border-bottom: 1px solid var(--line); padding: 10px 20px 18px; gap: 4px;
    box-shadow: var(--shadow);
  }
  .main-nav ul li { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle-input:checked ~ ul { display: flex; }
  .btn-nav-cta, .btn-outline-nav { display: inline-block; }
}

/* ---------- FLASH MESSAGES ---------- */
.flash { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.flash-success { background: var(--success-bg); color: var(--success); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash-info { background: var(--green-50); color: var(--green-800); }

/* ---------- HERO ---------- */
.hero {
  background:
    radial-gradient(circle at 15% 25%, rgba(212,165,32,0.18), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.08), transparent 45%),
    linear-gradient(160deg, var(--green-900), var(--green-700));
  color: #fff; padding: 64px 0 90px; position: relative; overflow: hidden;
}
.hero-inner { text-align: center; max-width: 780px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block; background: rgba(255,255,255,0.12); color: var(--gold-100);
  padding: 6px 16px; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  margin-bottom: 18px; text-transform: uppercase;
}
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 14px; }
.hero p.lead { color: rgba(255,255,255,0.88); font-size: 1.1rem; max-width: 620px; margin: 0 auto 30px; }

.hero-search {
  background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  max-width: 920px; margin: 0 auto; margin-top: -20px; position: relative; z-index: 5;
}
.hero-search form { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: end; }
.hero-search .field label { display: block; text-align: left; font-size: .78rem; font-weight: 700; color: var(--ink-500); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 900px) {
  .hero-search form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .hero-search form { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 70px; }
}

.hero-trust { margin-top: 20px; color: rgba(255,255,255,0.75); font-size: .85rem; }

/* ---------- FORM ELEMENTS ---------- */
label { font-weight: 700; font-size: .88rem; color: var(--ink-700); display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=tel], select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font); background: #fff; color: var(--ink-900);
}
textarea { resize: vertical; min-height: 100px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(28,136,99,0.15); }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.help-text { font-size: .8rem; color: var(--ink-500); margin-top: 4px; }
.error-text { font-size: .82rem; color: var(--danger); margin-top: 4px; font-weight: 600; }
fieldset { border: none; padding: 0; margin: 0 0 24px; }
legend { font-weight: 800; color: var(--green-800); font-size: 1.05rem; padding: 0 0 10px; border-bottom: 2px solid var(--gold-100); width: 100%; margin-bottom: 16px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: none; cursor: pointer; font-family: var(--font); text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); }
.btn-gold { background: var(--gold-500); color: var(--green-900); }
.btn-gold:hover { background: var(--gold-600); }
.btn-secondary { background: var(--green-100); color: var(--green-800); }
.btn-secondary:hover { background: #d9ecdf; }
.btn-outline { background: transparent; border: 1.5px solid var(--green-700); color: var(--green-700); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .82rem; }

/* ---------- SECTIONS ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--green-50); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-eyebrow { color: var(--gold-600); font-weight: 800; text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 6px; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: -60px; position: relative; z-index: 4; }
.stat-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 16px; text-align: center; border: 1px solid var(--line); }
.stat-box .num { font-size: 1.7rem; font-weight: 800; color: var(--green-800); }
.stat-box .label { font-size: .82rem; color: var(--ink-500); font-weight: 600; }
@media (max-width: 760px) { .stats-row { grid-template-columns: 1fr 1fr; margin-top: 24px; } }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .steps-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { text-align: center; padding: 10px; }
.step-num {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green-900); color: var(--gold-100);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem;
  margin: 0 auto 14px;
}

/* ---------- PROFILE CARDS / GRID ---------- */
.profile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .profile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .profile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease;
}
.profile-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.profile-card-photo { aspect-ratio: 3/4; background: var(--green-100); position: relative; overflow: hidden; }
.profile-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-card-photo .avatar-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--green-600); background: linear-gradient(160deg, var(--green-100), #fff);
}
.profile-card-id { position: absolute; top: 8px; left: 8px; background: rgba(11,61,46,.82); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.profile-card-body { padding: 14px; }
.profile-card-body h3 { font-size: 1.02rem; margin-bottom: 2px; }
.profile-card-meta { font-size: .84rem; color: var(--ink-500); margin-bottom: 10px; }
.profile-card-meta span:not(:last-child)::after { content: '•'; margin: 0 5px; color: var(--line); }

/* ---------- BADGES ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-pending_approval { background: var(--gold-100); color: var(--gold-600); }
.badge-approved { background: var(--success-bg); color: var(--success); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }
.badge-hidden { background: #eee; color: #777; }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-suspended { background: var(--danger-bg); color: var(--danger); }
.badge-pending { background: var(--gold-100); color: var(--gold-600); }
.badge-accepted { background: var(--success-bg); color: var(--success); }
.badge-declined { background: var(--danger-bg); color: var(--danger); }

/* ---------- TESTIMONIALS ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.testimonial-card .stars { color: var(--gold-500); margin-bottom: 10px; letter-spacing: 2px; }
.testimonial-card .names { font-weight: 800; color: var(--green-800); margin-top: 12px; }

/* ---------- CTA BANNER ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--green-800), var(--green-900)); color: #fff; text-align: center;
  border-radius: var(--radius); padding: 48px 24px; margin: 0 auto;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,.85); }

/* ---------- CARDS (generic) ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }

/* ---------- AUTH PAGES ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 56px 20px; background: var(--green-50); }
.auth-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; max-width: 460px; width: 100%; }
.auth-card h1 { font-size: 1.5rem; }
.auth-switch { text-align: center; margin-top: 16px; font-size: .9rem; }

/* ---------- WIZARD (registration steps) ---------- */
.wizard-wrap { max-width: 760px; margin: 0 auto; padding: 40px 20px; }
.wizard-progress { display: flex; gap: 6px; margin-bottom: 30px; }
.wizard-progress span { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.wizard-progress span.done { background: var(--green-600); }
.wizard-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }

/* ---------- SEARCH LAYOUT ---------- */
.search-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .search-layout { grid-template-columns: 1fr; } }
.filter-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 90px; }
.filter-panel h3 { font-size: 1rem; margin-bottom: 16px; }
.filter-group { margin-bottom: 18px; }
.filter-group label { font-size: .82rem; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.results-head h1 { font-size: 1.3rem; margin: 0; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-weight: 700; font-size: .88rem; color: var(--ink-700); }
.pagination .current { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.pagination a:hover { border-color: var(--green-600); text-decoration: none; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-500); }

/* ---------- PROFILE DETAIL ---------- */
.profile-detail-head { display: grid; grid-template-columns: 260px 1fr; gap: 28px; margin-bottom: 32px; }
@media (max-width: 760px) { .profile-detail-head { grid-template-columns: 1fr; } }
.profile-photo-large { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3/4; background: var(--green-100); }
.profile-photo-large img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-large .avatar-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 4.5rem; color: var(--green-600); }
.profile-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-code { color: var(--ink-500); font-weight: 700; font-size: .85rem; }
.meta-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.meta-table td { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.meta-table td.k { color: var(--ink-500); font-weight: 600; width: 42%; }
.meta-table td.v { font-weight: 600; color: var(--ink-900); }
.action-buttons { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.info-box { background: var(--green-50); border-radius: var(--radius-sm); padding: 18px; margin-bottom: 18px; }
.info-box h3 { font-size: 1rem; margin-bottom: 8px; }
.locked-photo-notice { background: var(--gold-100); color: var(--gold-600); border-radius: var(--radius-sm); padding: 12px; font-size: .82rem; font-weight: 700; text-align: center; margin-top: 10px; }

/* ---------- DASHBOARD ---------- */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
@media (max-width: 780px) { .dashboard-layout { grid-template-columns: 1fr; } }
.dashboard-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dashboard-nav a { display: block; padding: 13px 18px; font-weight: 700; color: var(--ink-700); border-bottom: 1px solid var(--line); font-size: .9rem; }
.dashboard-nav a.active, .dashboard-nav a:hover { background: var(--green-50); color: var(--green-800); text-decoration: none; }
.dashboard-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 760px) { .dashboard-cards { grid-template-columns: 1fr 1fr; } }
.dash-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.dash-stat .num { font-size: 1.6rem; font-weight: 800; color: var(--green-800); }
.dash-stat .label { font-size: .8rem; color: var(--ink-500); font-weight: 700; }

/* ---------- TABLES (admin) ---------- */
table.data-table { width: 100%; border-collapse: collapse; background: #fff; }
table.data-table th, table.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: .88rem; }
table.data-table th { background: var(--green-50); color: var(--green-800); font-weight: 800; text-transform: uppercase; font-size: .72rem; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap table.data-table { border: none; }

/* ---------- MESSAGES / INTERESTS ---------- */
.msg-list-item { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); align-items: center; }
.msg-list-item:hover { background: var(--green-50); }
.msg-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--green-100); display: flex; align-items: center; justify-content: center; color: var(--green-700); font-weight: 800; flex-shrink: 0; overflow: hidden; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.message-bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; margin-bottom: 10px; font-size: .9rem; }
.message-bubble.mine { background: var(--green-700); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.message-bubble.theirs { background: var(--green-50); color: var(--ink-900); border-bottom-left-radius: 4px; }
.message-time { font-size: .68rem; opacity: .7; margin-top: 4px; display: block; }

/* ---------- MISC PAGE STYLES ---------- */
.page-hero { background: var(--green-900); color: #fff; padding: 46px 0; text-align: center; }
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,.8); margin: 0; }
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.4em; list-style: disc; margin-bottom: 1em; }
.prose ol { list-style: decimal; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.82); padding: 54px 0 0; margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 34px; }
@media (max-width: 780px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
.site-footer h3, .site-footer h4 { color: #fff; }
.site-footer p { color: rgba(255,255,255,.72); }
.site-footer h4 { font-size: .88rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gold-100); }
.site-footer a { color: rgba(255,255,255,.78); font-size: .88rem; }
.site-footer a:hover { color: #fff; }
.site-footer li { margin-bottom: 9px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .8rem; text-align: center; color: rgba(255,255,255,.6); }

/* ---------- UTILITIES ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small { font-size: .85rem; }
.muted { color: var(--ink-500); }
.gold { color: var(--gold-600); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
