/* ============================================================
   IslamicMarriage.co.uk — Main Stylesheet
   ============================================================ */

/* ---- Custom properties ------------------------------------ */
:root {
    --green-900: #0d3320;
    --green-800: #145232;
    --green-700: #1b6b41;
    --green-600: #22854f;
    --green-500: #2a9e5e;
    --green-400: #4dbb7d;
    --green-200: #b6e8cc;
    --green-100: #e6f7ee;
    --gold-700:  #8a6a00;
    --gold-600:  #b08900;
    --gold-500:  #d4a800;
    --gold-400:  #e6bf2a;
    --gold-200:  #f5e5a3;
    --gold-100:  #fdf8e8;
    --neutral-900: #111827;
    --neutral-800: #1f2937;
    --neutral-700: #374151;
    --neutral-600: #4b5563;
    --neutral-400: #9ca3af;
    --neutral-300: #d1d5db;
    --neutral-200: #e5e7eb;
    --neutral-100: #f3f4f6;
    --neutral-50:  #f9fafb;
    --white:       #ffffff;
    --red-500:     #ef4444;
    --red-100:     #fee2e2;

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans:  'Inter', system-ui, sans-serif;

    --radius-sm:  0.375rem;
    --radius-md:  0.625rem;
    --radius-lg:  1rem;
    --radius-xl:  1.5rem;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:  0 4px 12px rgba(0,0,0,.1);
    --shadow-lg:  0 10px 30px rgba(0,0,0,.12);

    --header-h:   70px;
    --transition: 0.22s ease;
}

/* ---- Reset & base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-sans);
    color: var(--neutral-800);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-500); }

img { max-width: 100%; display: block; }

ul { list-style: none; }

h1,h2,h3,h4,h5 {
    font-family: var(--font-serif);
    line-height: 1.25;
    color: var(--neutral-900);
}

/* ---- Layout ----------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-main { min-height: calc(100vh - var(--header-h)); }

/* ---- Buttons ---------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.1s;
    text-decoration: none;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--green-700);
    color: var(--white);
    border-color: var(--green-700);
}
.btn-primary:hover { background: var(--green-800); border-color: var(--green-800); color: var(--white); }

.btn-gold {
    background: var(--gold-500);
    color: var(--neutral-900);
    border-color: var(--gold-500);
}
.btn-gold:hover { background: var(--gold-600); border-color: var(--gold-600); }

.btn-outline {
    background: transparent;
    color: var(--green-700);
    border-color: var(--green-700);
}
.btn-outline:hover { background: var(--green-700); color: var(--white); }

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.7);
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); border-color: var(--white); }

.btn-danger { background: var(--red-500); color: var(--white); border-color: var(--red-500); }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: var(--white); }

.btn-ghost { background: transparent; color: var(--neutral-700); border-color: var(--neutral-300); }
.btn-ghost:hover { background: var(--neutral-100); color: var(--neutral-900); }

.btn-sm  { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-lg  { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Alerts ----------------------------------------------- */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 1rem auto;
    max-width: 1200px;
}
.alert-success { background: var(--green-100); color: var(--green-800); border: 1px solid var(--green-200); }
.alert-error   { background: var(--red-100);   color: #991b1b;          border: 1px solid #fca5a5; }
.alert-warning { background: var(--gold-100);  color: var(--gold-700);  border: 1px solid var(--gold-200); }

/* ---- Forms ------------------------------------------------ */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--neutral-700); }
.form-label .required { color: var(--red-500); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--neutral-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.925rem;
    color: var(--neutral-800);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}
.form-control:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(42,158,94,.15);
}
.form-control::placeholder { color: var(--neutral-400); }

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234b5563' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

textarea.form-control { resize: vertical; min-height: 110px; }

.form-hint { font-size: 0.8rem; color: var(--neutral-400); margin-top: 0.3rem; }
.form-error { font-size: 0.8rem; color: var(--red-500); margin-top: 0.3rem; }

.form-row { display: grid; gap: 1rem; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-check { display: flex; align-items: center; gap: 0.6rem; }
.form-check input[type=checkbox], .form-check input[type=radio] { width: 1.1rem; height: 1.1rem; accent-color: var(--green-600); cursor: pointer; }
.form-check label { font-size: 0.925rem; cursor: pointer; }

/* ---- Header ----------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-h);
    background: var(--white);
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--green-800);
    text-decoration: none;
    flex-shrink: 0;
}
.logo:hover { color: var(--green-700); }
.logo-icon { color: var(--gold-500); font-size: 1.1rem; }
.logo-tld  { color: var(--gold-600); }
.logo-light .logo-text { color: var(--white); }
.logo-light .logo-tld  { color: var(--gold-400); }

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}
.nav-links a {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--neutral-700);
}
.nav-links a:hover,
.nav-links a.active { color: var(--green-700); background: var(--green-100); }

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

.nav-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: var(--radius-sm);
    color: var(--neutral-700);
}
.nav-icon-link svg { width: 1.25rem; height: 1.25rem; }
.nav-icon-link:hover { background: var(--neutral-100); color: var(--green-700); }
.nav-icon-link .badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--red-500);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 1.1rem;
    height: 1.1rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.badge-inline {
    background: var(--red-500);
    color: var(--white);
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 9999px;
    margin-left: 4px;
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem 0.3rem 0.3rem;
    border: 1.5px solid var(--neutral-200);
    border-radius: 9999px;
    background: var(--white);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-700);
    transition: border-color var(--transition);
}
.nav-avatar-btn:hover { border-color: var(--green-500); color: var(--green-700); }
.nav-avatar { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--neutral-700);
}
.dropdown-menu li a:hover { background: var(--neutral-50); color: var(--green-700); }
.dropdown-menu .divider { border-top: 1px solid var(--neutral-200); margin: 4px 0; }
.dropdown-menu .text-danger { color: var(--red-500) !important; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--neutral-700); border-radius: 2px; transition: var(--transition); }

/* ---- Hero ------------------------------------------------- */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 60%, var(--green-800) 100%);
    color: var(--white);
    overflow: hidden;
    padding: 5rem 0 6rem;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(212,168,0,.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.05) 0%, transparent 40%);
}

/* Geometric pattern overlay */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0l8.66 5v10L30 20l-8.66-5V5zM0 17.32l8.66 5v10L0 37.32l-8.66-5v-10zM60 17.32l8.66 5v10L60 37.32l-8.66-5v-10zM30 34.64l8.66 5v10L30 54.64l-8.66-5v-10z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-title .highlight { color: var(--gold-400); }

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.hero-ayah {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--gold-300, #f0d070);
    border-left: 3px solid var(--gold-400);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.2);
}
.stat-item { text-align: center; }
.stat-num { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; color: var(--gold-400); display: block; }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,.7); }

/* Search box inside hero */
.hero-search-box {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-xl);
    padding: 2rem;
}
.hero-search-box h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 1.25rem; }
.hero-search-box .form-control {
    background: rgba(255,255,255,.9);
}
.hero-search-box .btn-block { margin-top: 1rem; }

/* ---- Section headings ------------------------------------- */
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: 0.75rem; }
.section-head p { color: var(--neutral-600); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}
.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: var(--gold-400);
}
.section-divider span { color: var(--gold-500); font-size: 1.2rem; }

/* ---- Feature cards ---------------------------------------- */
section.features { padding: 5rem 0; background: var(--neutral-50); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--green-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.feature-card p { color: var(--neutral-600); font-size: 0.9rem; }

/* ---- Profile cards ---------------------------------------- */
section.profiles-preview { padding: 5rem 0; }
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }

.profile-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.profile-card-photo {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--neutral-100);
}
.profile-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.profile-card:hover .profile-card-photo img { transform: scale(1.05); }

.profile-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--green-700);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
}
.profile-card-online {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border: 2px solid var(--white);
    border-radius: 50%;
}

.profile-card-body { padding: 1.25rem; }
.profile-card-name { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.25rem; }
.profile-card-meta { font-size: 0.85rem; color: var(--neutral-600); margin-bottom: 0.75rem; }
.profile-card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tag {
    background: var(--green-100);
    color: var(--green-800);
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 9999px;
    font-weight: 500;
}
.tag-gold { background: var(--gold-100); color: var(--gold-700); }

.profile-card-actions { display: flex; gap: 0.5rem; }
.profile-card-actions .btn { flex: 1; }

/* ---- How it works ----------------------------------------- */
section.how-it-works { padding: 5rem 0; background: var(--green-900); color: var(--white); }
section.how-it-works .section-head h2 { color: var(--white); }
section.how-it-works .section-head p { color: rgba(255,255,255,.75); }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; }
.steps-grid::before {
    content: '';
    position: absolute;
    top: 2.25rem;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(to right, var(--gold-500), var(--gold-400));
    z-index: 0;
}

.step-item { text-align: center; position: relative; z-index: 1; }
.step-num {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: var(--gold-500);
    color: var(--neutral-900);
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 0 0 4px rgba(212,168,0,.25);
}
.step-item h3 { color: var(--white); font-size: 1rem; margin-bottom: 0.5rem; }
.step-item p { color: rgba(255,255,255,.7); font-size: 0.875rem; }

/* ---- Testimonials ----------------------------------------- */
section.testimonials { padding: 5rem 0; background: var(--gold-100); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gold-200);
}
.testimonial-stars { color: var(--gold-500); font-size: 1.1rem; margin-bottom: 1rem; letter-spacing: 2px; }
.testimonial-text { font-style: italic; color: var(--neutral-700); margin-bottom: 1.25rem; font-size: 0.95rem; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }
.testimonial-avatar { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; background: var(--green-100); }
.testimonial-name { font-weight: 600; font-size: 0.9rem; }
.testimonial-loc  { font-size: 0.8rem; color: var(--neutral-500); }

/* ---- CTA banner ------------------------------------------- */
.cta-banner {
    background: linear-gradient(135deg, var(--green-800), var(--green-600));
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}
.cta-banner h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,.8); margin-bottom: 2rem; font-size: 1.05rem; }
.cta-banner .cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- Page header ------------------------------------------ */
.page-header {
    background: linear-gradient(135deg, var(--green-900), var(--green-700));
    color: var(--white);
    padding: 3.5rem 0 3rem;
    margin-bottom: 3rem;
}
.page-header h1 { color: var(--white); font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 0.5rem; }
.page-header p { color: rgba(255,255,255,.8); font-size: 1rem; }
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; font-size: 0.85rem; }
.breadcrumb a { color: var(--gold-300, #f0d070); }
.breadcrumb span { color: rgba(255,255,255,.5); }

/* ---- Auth pages ------------------------------------------- */
.auth-wrapper {
    min-height: calc(100vh - var(--header-h));
    background: var(--neutral-50);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}
.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    padding: 2.5rem;
    border: 1px solid var(--neutral-200);
}
.auth-card-header { text-align: center; margin-bottom: 2rem; }
.auth-card-header .logo { justify-content: center; margin-bottom: 1.25rem; }
.auth-card-header h1 { font-size: 1.6rem; margin-bottom: 0.35rem; }
.auth-card-header p { color: var(--neutral-600); font-size: 0.9rem; }
.auth-divider { text-align: center; color: var(--neutral-400); font-size: 0.85rem; margin: 1.25rem 0; position: relative; }
.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 2rem);
    height: 1px;
    background: var(--neutral-200);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--neutral-600); }

/* ---- Dashboard -------------------------------------------- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.sidebar {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: fit-content;
    box-shadow: var(--shadow-sm);
}
.sidebar-avatar { text-align: center; margin-bottom: 1.5rem; }
.sidebar-avatar img {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--green-200);
    margin: 0 auto 0.75rem;
}
.sidebar-avatar .name { font-weight: 600; font-size: 1rem; }
.sidebar-avatar .meta { font-size: 0.8rem; color: var(--neutral-500); }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--neutral-700);
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.sidebar-nav a:hover,
.sidebar-nav a.active { background: var(--green-100); color: var(--green-800); }
.sidebar-nav a svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.sidebar-nav .divider { border-top: 1px solid var(--neutral-200); margin: 0.5rem 0; }

.dashboard-content { min-width: 0; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.stat-card .label { font-size: 0.8rem; color: var(--neutral-500); margin-bottom: 0.35rem; }
.stat-card .value { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; color: var(--green-800); }
.stat-card .change { font-size: 0.78rem; color: var(--green-600); margin-top: 0.25rem; }

/* Dashboard cards */
.dash-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--neutral-200);
}
.dash-card-header h3 { font-size: 1rem; }

/* Profile completeness */
.progress-bar {
    height: 8px;
    background: var(--neutral-200);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}
.progress-bar-fill { height: 100%; background: linear-gradient(to right, var(--green-600), var(--green-400)); border-radius: 9999px; transition: width 0.5s ease; }

/* ---- Profile view page ------------------------------------ */
.profile-view-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.profile-sidebar {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}
.profile-main-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--neutral-100);
}
.profile-sidebar-body { padding: 1.5rem; }
.profile-big-name { font-size: 1.4rem; margin-bottom: 0.25rem; }
.profile-big-meta { color: var(--neutral-600); font-size: 0.9rem; margin-bottom: 1rem; }
.profile-action-btns { display: flex; flex-direction: column; gap: 0.65rem; }

.profile-main-content { min-width: 0; }

.profile-section {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.profile-section h3 { font-size: 1rem; color: var(--green-800); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--green-100); }

.profile-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 2rem; }
.detail-item .label { font-size: 0.78rem; color: var(--neutral-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.detail-item .value { font-size: 0.9rem; font-weight: 500; color: var(--neutral-800); }

/* ---- Profiles browse page --------------------------------- */
.profiles-browse-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.filter-sidebar {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: fit-content;
    box-shadow: var(--shadow-sm);
}
.filter-sidebar h3 { font-size: 1rem; margin-bottom: 1.25rem; color: var(--green-800); }

.browse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.browse-header h2 { font-size: 1.25rem; }
.browse-header .count { font-size: 0.85rem; color: var(--neutral-500); }

/* ---- Inbox ------------------------------------------------ */
.inbox-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 2rem 0;
    min-height: 70vh;
}

.inbox-list {
    border-right: 1px solid var(--neutral-200);
    background: var(--white);
    overflow-y: auto;
}
.inbox-list-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--neutral-200);
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--neutral-50);
}
.inbox-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--neutral-100);
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    color: inherit;
}
.inbox-item:hover, .inbox-item.active { background: var(--green-100); }
.inbox-item img { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.inbox-item-name { font-weight: 600; font-size: 0.875rem; }
.inbox-item-preview { font-size: 0.8rem; color: var(--neutral-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.inbox-item-time { font-size: 0.75rem; color: var(--neutral-400); margin-left: auto; flex-shrink: 0; }

.inbox-chat { display: flex; flex-direction: column; background: var(--neutral-50); }
.inbox-chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--neutral-200);
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 0.875rem;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.55;
}
.message-bubble.sent   { background: var(--green-700); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; }
.message-bubble.recv   { background: var(--white); border: 1px solid var(--neutral-200); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-input {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--neutral-200);
    background: var(--white);
    display: flex;
    gap: 0.75rem;
}
.chat-input .form-control { flex: 1; }

/* ---- Footer ----------------------------------------------- */
.site-footer {
    background: var(--green-900);
    color: rgba(255,255,255,.75);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-brand p {
    font-size: 0.875rem;
    margin-top: 1rem;
    line-height: 1.7;
    max-width: 300px;
}
.hadith {
    font-style: italic;
    font-size: 0.825rem;
    color: var(--gold-300, #f0d070);
    margin-top: 1rem;
    line-height: 1.65;
}

.footer-links h4 { color: var(--white); font-size: 0.9rem; margin-bottom: 1rem; }
.footer-links ul li { margin-bottom: 0.5rem; }
.footer-links ul li a { color: rgba(255,255,255,.65); font-size: 0.875rem; }
.footer-links ul li a:hover { color: var(--gold-400); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255,255,255,.45);
}

/* ---- Utility classes -------------------------------------- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--neutral-500); }
.text-success { color: var(--green-700); }
.text-danger  { color: var(--red-500); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

/* ---- About / info pages ----------------------------------- */
.content-page { padding: 3rem 0 5rem; }
.content-page .prose { max-width: 780px; }
.content-page .prose h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; color: var(--green-800); }
.content-page .prose p  { margin-bottom: 1rem; color: var(--neutral-700); line-height: 1.75; }
.content-page .prose ul { margin-bottom: 1rem; padding-left: 1.5rem; list-style: disc; }
.content-page .prose ul li { margin-bottom: 0.5rem; color: var(--neutral-700); }

.value-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin: 2rem 0; }
.value-card {
    background: var(--green-100);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border-left: 4px solid var(--green-600);
}
.value-card h4 { color: var(--green-800); margin-bottom: 0.5rem; }
.value-card p { font-size: 0.9rem; color: var(--neutral-700); }

/* ---- Modals ----------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform var(--transition);
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-header h3 { font-size: 1.2rem; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--neutral-400); font-size: 1.5rem; line-height: 1; padding: 0; }
.modal-close:hover { color: var(--neutral-700); }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .steps-grid   { grid-template-columns: repeat(2, 1fr); }
    .steps-grid::before { display: none; }
    .profiles-browse-layout { grid-template-columns: 220px 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed;
        inset: var(--header-h) 0 0 0;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 0;
        transform: translateX(100%);
        transition: transform var(--transition);
        box-shadow: var(--shadow-lg);
        margin-left: 0;
        z-index: 999;
        overflow-y: auto;
    }
    .main-nav.open { transform: translateX(0); }
    .nav-links { flex-direction: column; width: 100%; gap: 0; }
    .nav-links a { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 1rem; }
    .nav-auth { width: 100%; flex-direction: column; align-items: stretch; margin-top: 1rem; }
    .nav-auth .btn { justify-content: center; }
    .nav-dropdown { width: 100%; }
    .nav-avatar-btn { width: 100%; justify-content: flex-start; border-radius: var(--radius-sm); }
    .dropdown-menu { position: static; box-shadow: none; border: none; background: var(--neutral-50); border-radius: var(--radius-sm); }

    .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-search-box { display: none; }
    .hero { padding: 3.5rem 0 4rem; }
    .hero-stats { gap: 1.25rem; }

    .features-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .profile-view-layout { grid-template-columns: 1fr; }
    .profiles-browse-layout { grid-template-columns: 1fr; }
    .filter-sidebar { order: -1; }
    .inbox-layout { grid-template-columns: 1fr; }
    .inbox-list { border-right: none; border-bottom: 1px solid var(--neutral-200); max-height: 300px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    .profile-details-grid { grid-template-columns: 1fr; }
    .value-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.75rem; }
    .auth-card { padding: 1.75rem 1.25rem; }
    .stats-row { grid-template-columns: 1fr 1fr; }
}
