/* =========================================
   Base Variables & Resets
   ========================================= */
:root {
    --color-primary-green: #182f25; 
    --color-btn-green: #182f25;
    --color-beige-bg: #f4ebd9;
    --color-beige-hero: #f4ebd9; 
    --color-gold: #c09271;
    --color-gold-light: #dbba85;
    --color-text-dark: #c09271;
    --color-text-light: #666666;
    --color-white: #ffffff;
    --color-border: #e2d5bd;
    --color-widget: #ebdcc5;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body); background-color: var(--color-beige-bg);
    color: var(--color-text-dark); -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; transition: all 0.3s ease; }
.container { max-width: 1350px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   Typography & Buttons & Utilities
   ========================================= */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-primary-green); font-weight: 600; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px;
    border-radius: 6px; font-size: 0.9rem; font-weight: 600; border: none; cursor: pointer;
}
.btn-dark { background-color: var(--color-btn-green); color: var(--color-white); }
.btn-dark:hover { background-color: #12251a; }
.btn-pill { border-radius: 30px; padding: 12px 28px; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-outline { background: transparent; border: 1px solid #182f25; color: #182f25; }
.btn-outline-light { background: var(--color-beige-hero); border: 1px solid var(--color-gold); color: var(--color-primary-green); }

.ornate-divider { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--color-gold); }
.ornate-divider .line { height: 1px; width: 45px; background-color: var(--color-gold); }
.ornate-divider i { font-size: 0.9rem; }
.ornate-divider.light { opacity: 0.6; }
.ornate-divider.gold-light .line { background-color: var(--color-gold-light); }
.ornate-divider.gold-light i { color: var(--color-gold-light); }
.ornate-divider.sm .line { width: 25px; }

/* =========================================
   Header
   ========================================= */
.header { background-color: #ffffff; border-bottom: 1px solid rgba(0,0,0,0.05); position: relative; z-index: 100; }
.header-container { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; }
.logo img { height: 50px; }
.main-nav ul { list-style: none; display: flex; gap: 25px; }
.main-nav a { font-size: 0.95rem; font-weight: 600; color: #000; position: relative; padding-bottom: 4px; }
.main-nav a.active, .main-nav a:hover { color: var(--color-gold) }
.main-nav a.active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background: var(--color-primary-green); }
.menu-toggle { display: none; font-size: 1.5rem; color: var(--color-primary-green); cursor: pointer; }
.mobile-only { display: none; }

/* =========================================
   Banner (Hero) Section
   ========================================= */
.banner {
    position: relative; width: 100%; background: linear-gradient(to right, #e1cfb7 55%, var(--color-primary-green) 55%);
    padding: 80px 0 140px 0; overflow: hidden;
}
.banner-bg-leaves {
    position: absolute; width: 350px; height: 350px; opacity: 0.04;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50 0 C70 30 100 50 100 50 C100 50 70 70 50 100 C30 70 0 50 0 50 C0 50 30 30 50 0 Z" fill="black"/></svg>');
    background-repeat: no-repeat; background-size: contain; pointer-events: none;
}
.left-leaves { top: -20px; left: -50px; }
.right-leaves { bottom: 0; right: -50px; filter: invert(1); opacity: 0.03; }
.banner-content { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 10; }
.banner-left { width: 33%; padding-right: 20px; }
.banner-left h1 { font-size: 3.8rem; line-height: 1.1; margin-bottom: 15px; }
.banner-left p { font-size: 1.05rem; line-height: 1.5; margin-bottom: 30px; color: var(--color-text-dark); }
.banner-center { width: 34%; display: flex; justify-content: center; position: relative; z-index: 20; }
.photo-stack { position: relative; width: 440px; height: 320px; }
.photo-frame { position: absolute; width: 100%; height: 100%; border: 10px solid #fff; box-shadow: 0 15px 35px rgba(0,0,0,0.25); }
.background-frame { top: -15px; left: 15px; background: #d8cbae; transform: rotate(5deg); z-index: 1; }
.foreground-frame { top: 0; left: 0; background: var(--color-white); transform: rotate(-1deg); z-index: 2; overflow: hidden; }
.foreground-frame img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.4) contrast(1.1); }
.banner-right { width: 33%; padding-left: 60px; text-align: center; color: var(--color-gold); }
.quote-mark { font-family: var(--font-heading); font-size: 5rem; line-height: 0.5; margin-bottom: 15px; }
.quote-text { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 600; font-style: italic; line-height: 1.5; margin-bottom: 20px; }
.banner-right .ornate-divider { justify-content: center; }

/* =========================================
   Quick Links Cards
   ========================================= */
.quick-links { position: relative; margin-top: -75px; z-index: 30; }
.quick-links-container {
    background: var(--color-white); border-radius: 10px; display: grid; grid-template-columns: repeat(6, 1fr);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}
.quick-links .card { padding: 30px 15px; text-align: center; border-right: 1px dashed var(--color-border); }
.quick-links .card:last-child { border-right: none; }
.card .icon { font-size: 1.8rem; color: var(--color-gold); margin-bottom: 15px; }
.card h3 { font-size: 1rem; margin-bottom: 10px; }
.card p { font-size: 0.8rem; color: var(--color-text-light); margin-bottom: 15px; line-height: 1.4; }
.card a { font-size: 0.85rem; font-weight: 700; color: var(--color-primary-green); }
.card a:hover { color: var(--color-gold); }

/* =========================================
   Main Layout 
   ========================================= */
.main-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 13px; padding: 50px 0px; }
.family-tree-section {
    background-color: var(--color-primary-green); border-radius: 12px;
    padding: 35px 20px 40px 20px; position: relative; overflow-x: auto;
}
.tree-header { display: flex; justify-content: center; align-items: center; flex-direction: column; }
.tree-header h2 { color: var(--color-white); font-size: 1.8rem; margin-bottom: 5px; }
.tree-header .ornate-divider { justify-content: flex-start; }

/* =========================================
   [FIXED] Staggered Family Tree Logic
   ========================================= */
.org-tree {
    display: block; 
    width: 100%;
    overflow-x: auto; 
    padding-bottom: 30px; 
}
.org-tree::-webkit-scrollbar { height: 8px; }
.org-tree::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
.org-tree::-webkit-scrollbar-thumb { background: var(--color-gold-light); border-radius: 4px; }

.org-tree ul {
    padding-top: 35px; /* Spacing from root to horizontal line */
    position: relative;
    display: flex;
    justify-content: center;
    list-style: none;
    width: max-content; 
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.org-tree li {
    text-align: center;
    position: relative;
    margin: 0 -39px;
}

/* Remove negative margin for root */
.org-tree > ul > li {
    margin: 0;
    padding-top: 0;
}

/* Base Top Drop Spacing (Odd Children) */
.org-tree > ul > li > ul > li {
    padding-top: 30px; 
}

/* Staggered Top Drop Spacing (Even Children) */
.org-tree > ul > li > ul > li:nth-child(even) {
    padding-top: 135px; /* Pushed significantly further down */
}

/* Connecting Horizontal Lines for all children */
.org-tree li::before, .org-tree li::after {
    content: '';
    position: absolute;
    top: 0; right: 38%;
    border-top: 1px solid var(--color-gold-light);
    width: 50%;
}

/* Connecting Vertical Drops for children */
.org-tree li::after {
    right: auto; left: 50%;
    border-left: 1px solid var(--color-gold-light);
}

/* Set vertical drop heights based on staggered position */
.org-tree > ul > li > ul > li::before,
.org-tree > ul > li > ul > li::after {
    height: 30px; /* Matches odd padding */
}
.org-tree > ul > li > ul > li:nth-child(even)::before,
.org-tree > ul > li > ul > li:nth-child(even)::after {
    height: 135px; /* Matches even padding */
}

/* Clean up edge lines */
.org-tree li:only-child::after, .org-tree li:only-child::before { display: none; }
.org-tree li:only-child { padding-top: 0; }
.org-tree li:first-child::before, .org-tree li:last-child::after { border: 0 none; }
.org-tree li:last-child::before { border-right: 1px solid var(--color-gold-light); border-radius: 0 4px 0 0; }
.org-tree li:first-child::after { border-radius: 4px 0 0 0; }

/* The Vertical Line Dropping Down From Root */
.org-tree ul ul::before {
    content: '';
    position: absolute; top: 0; left: 50%;
    border-left: 1px solid var(--color-gold-light);
    width: 0; height: 35px; /* Must match child ul padding-top */
}

/* =========================================
   Tree Card Styling 
   ========================================= */
.person-card {
    background: var(--color-white);
    border-radius: 8px;
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    position: relative;
    z-index: 5;
    white-space: nowrap;
}
.person-card img {
    width: 42px; height: 42px;
    border-radius: 4px; /* Image not fully round */
    object-fit: cover;
}
.person-card .info h4 {
    font-family: var(--font-body);
    font-size: 12px;
    margin-bottom: 2px;
    color: #111;
	text-transform: uppercase;
    font-weight: 700;
}
.person-card .info span {
    font-size: 0.75rem;
    color: #666;
}

/* Root nodes are styled larger per design */
.org-tree > ul > li > .parents-node > .person-card {
    padding: 8px 15px;
    gap: 15px;
}
.org-tree > ul > li > .parents-node > .person-card img {
    width: 60px; height: 60px;
    border-radius: 6px;
}
.org-tree > ul > li > .parents-node > .person-card .info h4 {
    font-size: 1rem;
}
.org-tree > ul > li > .parents-node > .person-card .info span {
    font-size: 0.9rem;
}

/* Root Parents Connector (Horizontal Line Between Husband & Wife) */
.parents-node {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.parents-node::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 45px; 
    height: 1px;
    background-color: var(--color-gold-light);
    z-index: 1; 
}

.tree-action { text-align: center; margin-top: 50px; }

/* =========================================
   Sidebar
   ========================================= */
.sidebar { display: flex; flex-direction: column; gap: 30px; }
.widget { background-color: var(--color-widget); border-radius: 10px; padding: 25px 10px; }
.featured-widget h3 { text-align: center; font-size: 1.1rem; margin-bottom: 20px; color: #182f25; }
.featured-profile-grid { display: grid; grid-template-columns: 1fr 3fr; align-items: center; }
.featured-profile img {
    width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--color-widget);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 12px;
}
.profile-text { margin-left: 20px; }
.profile-text h4 { font-size: 1.3rem; margin-bottom: 2px; }
.profile-text .dates { font-size: 0.85rem; color: var(--color-text-light); display: block; margin-bottom: 10px; }
.profile-text p { font-size: 0.85rem; line-height: 1.5; margin: 0 0 15px 0; color: #000; }
.profile-text .ornate-divider { justify-content: center; }
.featured-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 25px; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 20px; }
.featured-links p { font-size: 0.75rem; color: var(--color-text-light); display: flex; align-items: center; gap: 5px; }
.featured-links p:hover { color: var(--color-primary-green); }

.event-widget { background-color: #e5d2b4; display: flex; align-items: center; justify-content: space-between; padding: 25px; }
.event-details { display: flex; align-items: center; gap: 15px; }
.event-details .icon { font-size: 2.2rem; color: #182f25; }
.event-details .label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--color-text-light); }
.event-details h4 { font-size: 1rem; margin: 3px 0; }
.event-details .meta { font-size: 0.75rem; color: var(--color-text-light); }
.event-widget .btn { text-align: center; }

/* =========================================
   Footer Features
   ========================================= */
.footer-features { padding: 40px 0; border-top: 1px solid var(--color-border); background-color: #e5d2b4; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { display: flex; align-items: flex-start; gap: 15px; }
.feature i { font-size: 1.8rem; color: #182f25; margin-top: 5px; }
.feature h4 { font-family: var(--font-body); font-size: 0.95rem; margin-bottom: 5px; }
.feature p { font-size: 0.8rem; color: var(--color-text-light); line-height: 1.4; }

/* =========================================
   Footer Base
   ========================================= */
.footer { background-color: var(--color-primary-green); color: var(--color-white); padding: 25px 0; font-size: 0.85rem; }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer .links a { color: rgba(255,255,255,0.7); }
.footer .links a:hover { color: var(--color-white); }


/* =========================================
   Responsive Design & Mobile Styles
   ========================================= */

@media (max-width: 1024px) {
    .main-layout { grid-template-columns: 1fr; padding: 50px 20px; }
    .banner { background: var(--color-beige-hero); padding: 50px 0 100px 0; }
    .banner-content { flex-direction: column; gap: 40px; }
    .banner-left, .banner-center, .banner-right { width: 100%; padding: 0; text-align: center; }
    .banner-right { background: var(--color-primary-green); padding: 40px 20px; border-radius: 12px; color: var(--color-beige-bg); }
    .banner-left .ornate-divider, .banner-right .ornate-divider { justify-content: center; }
    .quick-links-container { grid-template-columns: repeat(3, 1fr); }
    .quick-links .card:nth-child(3) { border-right: none; }
    .quick-links .card:nth-child(1), .quick-links .card:nth-child(2), .quick-links .card:nth-child(3) { border-bottom: 1px dashed var(--color-border); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .header-action { display: none; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--color-beige-bg); box-shadow: 0 10px 15px rgba(0,0,0,0.1); padding: 20px; z-index: 99; }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; align-items: center; gap: 15px; }
    .main-nav a.active::after { display: none; }
    .mobile-only { display: block; margin-top: 10px; }
    
    .banner-left h1 { font-size: 2.8rem; }
    .photo-stack { width: 100%; max-width: 320px; height: 240px; }
    
    .quick-links { margin-top: -50px; }
    .quick-links-container { grid-template-columns: repeat(1, 1fr); }
    .quick-links .card { border-right: none; border-bottom: 1px dashed var(--color-border); }
    .quick-links .card:last-child { border-bottom: none; }
    
    .featured-profile-grid { grid-template-columns: 1fr; text-align: center; }
    .profile-text { margin-left: 0; margin-top: 15px; }
    .event-widget { flex-direction: column; text-align: center; gap: 20px; }
    .event-details { flex-direction: column; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 15px; text-align: center; }
}

/* .org-tree > ul > li > ul > .except-div::before {
    height: 90px;
}

.org-tree > ul > li > ul > .except-div::before, .org-tree > ul > li > ul > .except-div::after {
    height: 90px;
} */
/* =========================================
   Inner Pages — Rawalwasia Brothers
   ========================================= */
.inner-page { background: #f8f1e5; color: #443f38; }
.inner-page .header { position: sticky; top: 0; }
.inner-page .logo { display: inline-flex; align-items: center; }
.inner-page .logo img { width: 112px; height: 58px; object-fit: contain; }
.menu-toggle { border: 0; background: transparent; }

.inner-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(110deg, #dfccb0 0%, #efe1cb 62%, #182f25 62%, #182f25 100%);
    min-height: 330px;
    display: flex;
    align-items: center;
}
.inner-hero::before,
.inner-hero::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(192,146,113,.18);
    border-radius: 50%;
}
.inner-hero::before { left: -100px; top: -110px; }
.inner-hero::after { right: 22%; bottom: -170px; width: 360px; height: 360px; }
.inner-hero-pattern {
    position: absolute; inset: 0;
    opacity: .055;
    background-image: radial-gradient(circle at 1px 1px, #182f25 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}
.inner-hero-content { min-height: 330px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.inner-hero-copy { width: 62%; padding: 55px 0; }
.inner-hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #725f50; font-size: .78rem; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; margin-bottom: 12px; }
.inner-hero-copy h1 { font-size: clamp(2.75rem, 5vw, 4.8rem); line-height: .98; margin-bottom: 15px; letter-spacing: -.02em; }
.inner-hero-copy p { max-width: 650px; font-size: 1.05rem; line-height: 1.7; color: #655c52; }
.inner-hero-emblem { width: 30%; height: 220px; display: flex; align-items: center; justify-content: center; filter: grayscale(1) sepia(.35) brightness(1.9); opacity: .45; }
.inner-hero-emblem img { width: min(230px, 80%); max-height: 170px; object-fit: contain; }

.section-pad { padding: 90px 0; }
.section-pad.compact-top { padding-top: 70px; }
.section-kicker { display: block; color: #a87959; font-size: .76rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 700; margin-bottom: 10px; }
.section-heading { margin-bottom: 42px; }
.section-heading h2,
.section-copy h2,
.documents-header h2,
.gallery-intro h2,
.tree-toolbar h2,
.contact-copy h2 { font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.15; margin-bottom: 14px; }
.section-heading p, .section-copy p, .documents-header p, .tree-toolbar p, .contact-copy > p { color: #706960; line-height: 1.75; }
.section-heading.centered { text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }
.section-heading.split-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-top: 70px; }
.section-heading.split-heading p { max-width: 420px; }

.story-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 76px; align-items: center; }
.heritage-frame { position: relative; padding: 18px; background: #fff; box-shadow: 0 25px 60px rgba(39,35,29,.12); transform: rotate(-1deg); }
.heritage-frame::before { content: ''; position: absolute; inset: -11px 13px 16px -12px; border: 1px solid #c09271; z-index: -1; }
.heritage-frame img { width: 100%; aspect-ratio: 1.25/1; object-fit: cover; display: block; filter: saturate(.75) sepia(.12); }
.photo-label { position: absolute; left: 34px; bottom: 34px; background: rgba(24,47,37,.94); color: #fff; padding: 12px 18px; font-size: .76rem; text-transform: uppercase; letter-spacing: .13em; border-radius: 4px; }
.section-copy p { margin: 18px 0; }
.section-copy .btn { margin-top: 12px; }

.history-band { background: #182f25; padding: 92px 0; position: relative; overflow: hidden; }
.history-band::before { content: ''; position: absolute; inset: 0; opacity: .04; background-image: radial-gradient(circle at center, #fff 1px, transparent 1.5px); background-size: 27px 27px; }
.history-band .section-heading { position: relative; }
.history-band .section-heading h2 { color: #fff; }
.history-band .section-heading p { color: rgba(255,255,255,.62); }
.timeline { position: relative; max-width: 980px; margin: 55px auto 0; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(219,186,133,.45); }
.timeline-item { position: relative; width: 50%; padding: 0 58px 55px 0; }
.timeline-item:nth-child(even) { margin-left: 50%; padding: 0 0 55px 58px; }
.timeline-marker { position: absolute; right: -22px; top: 10px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #dbba85; color: #182f25; font-weight: 700; font-size: .76rem; box-shadow: 0 0 0 8px #182f25; }
.timeline-item:nth-child(even) .timeline-marker { left: -22px; right: auto; }
.timeline-card { border: 1px solid rgba(219,186,133,.28); background: rgba(255,255,255,.045); padding: 28px; border-radius: 10px; }
.timeline-era { color: #dbba85; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }
.timeline-card h3 { color: #fff; font-size: 1.45rem; margin: 7px 0 10px; }
.timeline-card p { color: rgba(255,255,255,.68); line-height: 1.65; font-size: .92rem; }
.value-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.value-card { background: #fff; border: 1px solid #eadfcd; padding: 34px 28px; border-radius: 10px; min-height: 220px; transition: .25s ease; }
.value-card:hover { transform: translateY(-5px); box-shadow: 0 16px 35px rgba(39,35,29,.08); }
.value-card i { font-size: 1.8rem; color: #b48262; margin-bottom: 28px; }
.value-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.value-card p { color: #766e66; font-size: .9rem; line-height: 1.65; }

/* Full tree page */
.tree-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 32px; }
.tree-toolbar > div:first-child { max-width: 720px; }
.tree-actions { display: inline-flex; align-items: center; gap: 10px; background: #efe3d0; padding: 7px; border-radius: 8px; }
.tree-actions .btn { width: 38px; height: 38px; padding: 0; justify-content: center; }
#zoom-label { width: 48px; text-align: center; color: #182f25; font-size: .82rem; font-weight: 700; }
.full-tree-shell { overflow: auto; border-radius: 15px; background: #182f25; box-shadow: 0 24px 50px rgba(24,47,37,.15); }
.full-tree { min-width: 1140px; padding: 58px 45px 70px; transform-origin: top center; transition: transform .25s ease; }
.root-generation { display: flex; justify-content: center; }
.root-person { background: #f7eedf; min-width: 220px; text-align: center; padding: 18px 26px; border-radius: 9px; box-shadow: 0 8px 20px rgba(0,0,0,.2); position: relative; z-index: 3; }
.root-person h3 { font-family: var(--font-body); font-size: 1rem; margin-top: 5px; }
.generation-label { color: #a87959; text-transform: uppercase; letter-spacing: .12em; font-size: .62rem; font-weight: 700; }
.tree-trunk { width: 1px; height: 52px; background: #dbba85; margin: 0 auto; }
.branch-grid { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; 
/*padding-top: 28px; */
}
.branch-grid::before { content: ''; position: absolute; top: 0; left: 7%; right: 7%; height: 1px; background: #dbba85; }
.branch-card { position: relative; padding-top: 28px; text-align: center; }
.branch-line { position: absolute; width: 1px; height: 28px; background: #dbba85; top: 0; left: 50%; }
.couple-chip { background: #fff; border-radius: 8px; padding: 13px 9px; min-height: 92px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; box-shadow: 0 7px 18px rgba(0,0,0,.16); }
.couple-chip span { font-size: .7rem; color: #1b2a23; font-weight: 700; }
.couple-chip i { color: #c09271; font-size: .64rem; }
.branch-placeholder { display: inline-flex; align-items: center; gap: 5px; margin-top: 25px; color: rgba(255,255,255,.55); border: 1px dashed rgba(219,186,133,.38); border-radius: 18px; padding: 7px 10px; font-size: .67rem; }
.tree-note { margin-top: 28px; border: 1px solid #e6d7c1; background: #efe3d0; border-radius: 10px; padding: 22px 25px; display: flex; gap: 16px; align-items: flex-start; color: #544c43; }
.tree-note > i { color: #b17c5a; margin-top: 3px; }
.tree-note p { margin-top: 4px; color: #6f665d; font-size: .9rem; }

/* Members */
.member-controls { display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-bottom: 38px; }
.search-box { background: #fff; border: 1px solid #e3d7c6; border-radius: 8px; display: flex; align-items: center; padding: 0 15px; min-width: 340px; box-shadow: 0 7px 20px rgba(39,35,29,.035); }
.search-box i { color: #ac866b; }
.search-box input { width: 100%; border: 0; outline: none; padding: 14px 12px; background: transparent; font-family: var(--font-body); color: #2f302c; }
.filter-pills { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-pill { border: 1px solid #d7c5aa; background: transparent; color: #675e55; padding: 9px 15px; border-radius: 22px; cursor: pointer; font-family: var(--font-body); font-size: .78rem; font-weight: 700; }
.filter-pill:hover, .filter-pill.active { background: #182f25; border-color: #182f25; color: #fff; }
.members-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.member-card { background: #fff; border: 1px solid #eadfce; border-radius: 11px; padding: 24px; display: flex; gap: 18px; align-items: flex-start; transition: .25s ease; }
.member-card:hover { transform: translateY(-4px); box-shadow: 0 15px 34px rgba(39,35,29,.08); }
.member-avatar { flex: 0 0 80px; height: 80px;border-radius: 50%; display: grid; place-items: center; background: #e2d0b7; color: #182f25; font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; border: 5px solid #f6efe4; }
.member-avatar img {
	width: 100%;
	border-radius: 50%;
}
.member-gen { display: block; color: #ad7b5a; text-transform: uppercase; letter-spacing: .1em; font-size: .62rem; font-weight: 700; margin-bottom: 4px; }
.member-info h3 { font-size: 1.25rem; margin-bottom: 6px; }
.member-info p {
    color: #797168;
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 2px;
}
.member-link { color: #182f25; font-size: .78rem; font-weight: 700; }
.member-link i { font-size: .65rem; margin-left: 4px; }
.empty-state { display: none; text-align: center; padding: 55px; color: #83786d; }
.empty-state i { font-size: 2rem; margin-bottom: 12px; }

/* Gallery */
.gallery-intro { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 35px; gap: 30px; }
.gallery-masonry { display: grid; grid-template-columns: repeat(12,1fr); grid-auto-rows: 200px; gap: 15px; }
.gallery-card { overflow: hidden; border-radius: 10px; position: relative; margin: 0; background: #ddd; }
.gallery-1 { grid-column: span 7; grid-row: span 2; }
.gallery-2 { grid-column: span 5; grid-row: span 1; }
.gallery-3 { grid-column: span 5; grid-row: span 1; }
.gallery-4 { grid-column: span 4; grid-row: span 1; }
.gallery-5 { grid-column: span 4; grid-row: span 1; }
.gallery-6 { grid-column: span 4; grid-row: span 1; }
.gallery-open { width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: pointer; position: relative; overflow: hidden; }
.gallery-open img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease, filter .4s ease; }
.gallery-card:nth-child(2) img, .gallery-card:nth-child(3) img { object-position: center 35%; }
.gallery-overlay { position: absolute; inset: auto 0 0 0; padding: 42px 24px 20px; text-align: left; background: linear-gradient(transparent, rgba(14,31,24,.86)); color: #fff; transform: translateY(10px); transition: .3s ease; }
.gallery-overlay span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .13em; color: #dfc092; }
.gallery-overlay strong { font-family: var(--font-heading); font-size: 1.15rem; }
.gallery-overlay i { float: right; margin-top: 3px; }
.gallery-open:hover img { transform: scale(1.04); filter: saturate(.8); }
.gallery-open:hover .gallery-overlay { transform: translateY(0); }
.lightbox { position: fixed; inset: 0; background: rgba(10,20,16,.94); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 40px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 88vw); max-height: 78vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.lightbox-close { position: absolute; top: 22px; right: 26px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); color: #fff; background: transparent; cursor: pointer; font-size: 1.25rem; }
.lightbox-caption { position: absolute; bottom: 22px; color: #e5d2b4; font-family: var(--font-heading); font-size: 1.1rem; }

/* Documents */
.documents-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.documents-header > div:first-child { max-width: 680px; }
.doc-search { min-width: 310px; }
.documents-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.document-card { background: #fff; border: 1px solid #e8ddcc; border-radius: 10px; padding: 26px; display: flex; gap: 19px; transition: .25s ease; }
.document-card:hover { border-color: #c8a184; box-shadow: 0 14px 30px rgba(39,35,29,.06); }
.doc-icon { flex: 0 0 54px; height: 54px; border-radius: 9px; display: grid; place-items: center; background: #efe2cf; color: #182f25; font-size: 1.35rem; }
.doc-main { flex: 1; }
.doc-tag { color: #a87959; font-size: .65rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; }
.doc-main h3 { font-size: 1.3rem; margin: 5px 0 7px; }
.doc-main p { color: #797168; line-height: 1.55; font-size: .86rem; }
.doc-meta { display: flex; justify-content: space-between; border-top: 1px solid #eee5d8; padding-top: 14px; margin-top: 17px; }
.doc-meta span { color: #8a8178; font-size: .72rem; }
.doc-meta a { color: #182f25; font-size: .76rem; font-weight: 700; }
.archive-callout { margin-top: 40px; background: #e4d3ba; border-radius: 12px; padding: 35px 38px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
.archive-icon { width: 70px; height: 70px; border-radius: 50%; background: #182f25; color: #e5c99c; display: grid; place-items: center; font-size: 1.6rem; }
.archive-callout h3 { font-size: 1.4rem; margin-bottom: 6px; }
.archive-callout p { color: #6b6259; line-height: 1.55; font-size: .88rem; }

/* News & Events */
.news-featured { display: grid; grid-template-columns: 1.1fr .9fr; background: #fff; border-radius: 13px; overflow: hidden; box-shadow: 0 20px 45px rgba(39,35,29,.08); }
.news-featured-media { min-height: 430px; position: relative; overflow: hidden; }
.news-featured-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.event-badge { position: absolute; top: 22px; left: 22px; background: #182f25; color: #fff; padding: 10px 14px; border-radius: 20px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.news-featured-copy { padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.news-featured-copy h2 { font-size: clamp(2rem,3vw,3rem); line-height: 1.08; margin-bottom: 16px; }
.news-featured-copy > p { color: #716960; line-height: 1.7; margin-bottom: 24px; }
.event-facts { display: grid; gap: 9px; margin-bottom: 27px; }
.event-facts span { color: #6c635a; font-size: .84rem; }
.event-facts i { width: 22px; color: #b27f5e; }
.news-featured-copy .btn { align-self: flex-start; }
.news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.news-card { background: #fff; border: 1px solid #e9decd; padding: 30px; border-radius: 10px; }
.news-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: #efe1cf; color: #182f25; margin-bottom: 24px; }
.news-type { color: #a87959; text-transform: uppercase; letter-spacing: .12em; font-size: .63rem; font-weight: 700; }
.news-card h3 { font-size: 1.35rem; margin: 7px 0 10px; }
.news-card p { color: #786f66; line-height: 1.6; font-size: .86rem; margin-bottom: 18px; }
.news-card a { color: #182f25; font-weight: 700; font-size: .8rem; }
.newsletter-band { background: #182f25; padding: 58px 0; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 45px; }
.newsletter-inner h2 { color: #fff; font-size: 2rem; margin-bottom: 6px; }
.newsletter-inner p { color: rgba(255,255,255,.6); }
.light-kicker { color: #ddbf91; }
.inline-form { min-width: 430px; display: flex; gap: 9px; }
.inline-form input { flex: 1; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; border-radius: 6px; padding: 0 16px; outline: none; }
.inline-form input::placeholder { color: rgba(255,255,255,.46); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: start; }
.contact-copy .ornate-divider { margin: 16px 0 20px; }
.contact-reasons { display: grid; gap: 12px; margin: 32px 0; }
.contact-reasons > div { display: flex; gap: 15px; align-items: center; background: #efe3d1; border-radius: 9px; padding: 15px 17px; }
.contact-reasons i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #182f25; color: #dfc092; }
.contact-reasons span { display: grid; gap: 2px; }
.contact-reasons strong { color: #182f25; font-size: .88rem; }
.contact-reasons small { color: #7b7167; font-size: .76rem; }
.contact-note { display: flex; gap: 12px; padding-top: 22px; border-top: 1px solid #dfd0bd; color: #766d64; font-size: .82rem; line-height: 1.55; }
.contact-note i { color: #a87959; margin-top: 2px; }
.contact-form-card { background: #fff; border: 1px solid #e8ddcb; border-radius: 13px; padding: 38px; box-shadow: 0 18px 42px rgba(39,35,29,.07); }
.contact-form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.contact-form label { display: grid; gap: 7px; color: #403c36; font-size: .76rem; font-weight: 700; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; border: 1px solid #ded2c0; border-radius: 7px; padding: 12px 13px; background: #fbf8f3; color: #312f2b; font-family: var(--font-body); outline: none; transition: border .2s ease, box-shadow .2s ease; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: #aa7c5e; box-shadow: 0 0 0 3px rgba(170,124,94,.09); }
.checkbox-label { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 400 !important; color: #766e65 !important; line-height: 1.5; }
.checkbox-label input { width: 16px; margin-top: 2px; }
.contact-form .btn { justify-self: start; }
.form-status { min-height: 20px; color: #60765f; font-size: .82rem; }

/* Existing footer improvements on inner pages */
.inner-page .footer-features { background: #e5d2b4; }
.inner-page .feature p { line-height: 1.55; }
.inner-page .footer { background: #14291f; }

@media (max-width: 1180px) {
    .main-nav ul { gap: 15px; }
    .main-nav a { font-size: .84rem; }
    .members-grid { grid-template-columns: repeat(2,1fr); }
    .branch-grid { gap: 10px; }
}
@media (max-width: 1024px) {
    .inner-hero { background: linear-gradient(110deg, #dfccb0 0%, #efe1cb 70%, #182f25 70%); }
    .inner-hero-copy { width: 68%; }
    .story-grid, .contact-grid { grid-template-columns: 1fr; gap: 50px; }
    .value-grid { grid-template-columns: repeat(2,1fr); }
    .documents-grid { grid-template-columns: 1fr; }
    .news-featured { grid-template-columns: 1fr; }
    .news-featured-media { min-height: 380px; }
    .news-grid { grid-template-columns: 1fr; }
    .newsletter-inner { flex-direction: column; align-items: flex-start; }
    .inline-form { width: 100%; min-width: 0; }
}
@media (max-width: 768px) {
    .inner-page .header { position: relative; }
    .inner-page .logo img { width: 95px; height: 48px; }
    .inner-hero { min-height: 285px; background: #e4d2b8; }
    .inner-hero-content { min-height: 285px; }
    .inner-hero-copy { width: 100%; padding: 44px 0; }
    .inner-hero-copy h1 { font-size: 2.7rem; }
    .inner-hero-emblem { display: none; }
    .section-pad { padding: 65px 0; }
    .section-pad.compact-top { padding-top: 55px; }
    .story-grid { gap: 40px; }
    .history-band { padding: 65px 0; }
    .timeline::before { left: 21px; }
    .timeline-item, .timeline-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 30px 65px; }
    .timeline-marker, .timeline-item:nth-child(even) .timeline-marker { left: 0; right: auto; }
    .value-grid { grid-template-columns: 1fr; }
    .tree-toolbar, .member-controls, .gallery-intro, .documents-header, .section-heading.split-heading { flex-direction: column; align-items: flex-start; }
    .search-box, .doc-search { width: 100%; min-width: 0; }
    .members-grid { grid-template-columns: 1fr; }
    .gallery-masonry { grid-template-columns: 1fr; grid-auto-rows: 280px; }
    .gallery-card:nth-child(n) { grid-column: auto; grid-row: auto; }
    .archive-callout { grid-template-columns: 1fr; }
    .news-featured-copy { padding: 35px 28px; }
    .newsletter-band { padding: 45px 0; }
    .inline-form { flex-direction: column; }
    .inline-form input { min-height: 47px; }
    .form-row { grid-template-columns: 1fr; }
    .contact-form-card { padding: 28px 20px; }
}
@media (max-width: 480px) {
    .inner-hero-copy p { font-size: .94rem; }
    .heritage-frame { padding: 10px; }
    .photo-label { left: 20px; bottom: 20px; }
    .member-card { padding: 20px; gap: 14px; }
    .member-avatar { flex-basis: 54px; height: 54px; }
    .document-card { padding: 21px; }
    .doc-icon { flex-basis: 46px; height: 46px; }
    .lightbox { padding: 15px; }
    .lightbox img { max-width: 94vw; }
}




/* =========================================
   Dynamic Family Tree Branches
   ========================================= */

.branch-grid {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    width: 100%;
}

/* Remove old full-width horizontal line */
.branch-grid::before {
    content: none;
}

.branch-card {
    position: relative;

    /* Automatically responds to child count */
    flex: 1 1 150px;
    min-width: 135px;
    max-width: 180px;

    padding: 28px 5px 0;
    text-align: center;
}


/* -----------------------------------------
   Horizontal connector system
   ----------------------------------------- */

.branch-card::before,
.branch-card::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 1px;
    background: #dbba85;
}

.branch-card::before {
    left: 0;
}

.branch-card::after {
    right: 0;
}


/* Don't draw outside the family */
.branch-card:first-child::before,
.branch-card:last-child::after {
    content: none;
}


/* IMPORTANT:
   If there is only one child,
   don't show any horizontal line.
*/
.branch-card:only-child::before,
.branch-card:only-child::after {
    content: none;
}


/* Vertical line from horizontal connector to card */
.branch-line {
    position: absolute;
    width: 1px;
    height: 28px;
    background: #dbba85;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}


/* Child card */
.couple-chip {
    background: #fff;
    border-radius: 8px;
    padding: 13px 9px;
    min-height: 92px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 5px;

    box-shadow: 0 7px 18px rgba(0,0,0,.16);
}

@media (max-width: 768px) {

    .full-tree-shell {
        overflow-x: auto;
        overflow-y: hidden;

        -webkit-overflow-scrolling: touch;

        overscroll-behavior-inline: contain;
        scroll-behavior: smooth;
    }

    .full-tree {
        padding-left: 35px;
        padding-right: 35px;
    }

    .branch-card {
        min-width: 135px;
    }

}

.news-single-facts {
    display: flex;
    gap: 40px;
    margin: 27px 0px;
}

.news-single-content {
    margin-bottom: 26px;
    line-height: 30px;
    color: #000;
}

.news-single-media {
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.member-read-more {
    color: var(--color-primary-green);
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
}


/* ==========================================================
   RAWALWASIA BROTHERS
   SINGLE FAMILY MEMBER PROFILE
   Matches existing inner-hero and container design
========================================================== */

.family-member-detail-page {
    --fm-maroon: #182f25;
    --fm-maroon-dark: #182f25;
    --fm-gold: #b8955b;
    --fm-cream: #faf7f1;
    --fm-white: #ffffff;
    --fm-text: #39332f;
    --fm-muted: #786f69;
    --fm-border: #182f25;

    background: var(--fm-cream);
    color: var(--fm-text);
    font-family: inherit;
}

.family-member-detail-page *,
.family-member-detail-page *::before,
.family-member-detail-page *::after {
    box-sizing: border-box;
}

/* ==========================================================
   MAIN LAYOUT
========================================================== */

.family-member-detail-page .section-pad {
    padding: 55px 0 75px;
}

.family-member-detail-page .container {
    width: min(1120px, calc(100% - 40px));
    margin-right: auto;
    margin-left: auto;
}

/* ==========================================================
   PROFILE CARD
   Two columns: photo left, details right
========================================================== */

.family-member-detail {
    display: grid;
    grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
    align-items: start;
    gap: 36px;
    padding: 34px;
    background: var(--fm-white);
    border: 1px solid var(--fm-border);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(57, 30, 29, 0.045);
}

/* Photo column */

.family-member-detail-photo {
    width: 100%;
    min-width: 0;
    padding: 9px;
    background: #f8f2e8;
    border: 1px solid #e6d7bd;
    border-radius: 7px;
}

.family-member-detail-photo > img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 430px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    border-radius: 4px;
}

/* Fallback when a member has no photo */

.member-initials-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 280px;
    aspect-ratio: 4 / 5;
    color: var(--fm-maroon);
    background: linear-gradient(145deg, #f7efe1, #e9d6b5);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(54px, 7vw, 84px);
    font-weight: 600;
    letter-spacing: 2px;
}

/* Details column */

.family-member-detail-content {
    min-width: 0;
}

.family-member-detail-content > h2 {
    position: relative;
    margin: 0 0 25px;
    padding: 0 0 17px;
    color: var(--fm-maroon);
    border-bottom: 1px solid var(--fm-border);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.family-member-detail-content > h2::after {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 65px;
    height: 3px;
    background: var(--fm-gold);
    content: "";
}

/* ==========================================================
   PERSONAL DETAILS GRID
========================================================== */

.family-member-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.family-member-facts > p {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 14px 15px;
    color: var(--fm-text);
    background: #fcfaf6;
    border: 1px solid var(--fm-border);
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    transition: border-color 0.2s ease;
}

.family-member-facts > p:hover {
    border-color: #d5c09e;
}

.family-member-facts > p > strong {
    display: block;
    margin-bottom: 5px;
    color: var(--fm-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.9px;
    line-height: 1.5;
    text-transform: uppercase;
}

.family-member-facts > p > br {
    display: none;
}

/* Email and telephone links */

.family-member-detail-page .family-member-facts a {
    color: var(--fm-maroon);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.family-member-detail-page .family-member-facts a:hover {
    color: #a27a3e;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ==========================================================
   BIOGRAPHY, VIDEO, CHILDREN & GRANDCHILDREN
========================================================== */

.family-member-detail-section {
    margin-top: 28px;
    padding: 27px 30px;
    background: var(--fm-white);
    border: 1px solid var(--fm-border);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(57, 30, 29, 0.025);
}

/* Section headings */

.family-member-detail-section > h2 {
    position: relative;
    margin: 0 0 21px;
    padding: 0 0 14px;
    color: var(--fm-maroon);
    border-bottom: 1px solid var(--fm-border);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 25px;
    font-weight: 600;
    line-height: 1.4;
}

.family-member-detail-section > h2::after {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 55px;
    height: 3px;
    background: var(--fm-gold);
    content: "";
}

/* Text inside sections */

.family-member-detail-section > div {
    min-width: 0;
    color: var(--fm-muted);
    font-size: 14px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.family-member-detail-section > div p {
    margin: 0 0 14px;
    color: inherit;
    line-height: inherit;
}

.family-member-detail-section > div p:last-child {
    margin-bottom: 0;
}

/* Video */

.family-member-detail-section video {
    display: block;
    width: 100%;
    max-width: 850px;
    height: auto;
    max-height: 520px;
    margin: 0 auto;
    background: #211a1a;
    border-radius: 5px;
}

/* Children and grandchildren text */

.family-member-detail-section > div {
    white-space: normal;
}

.family-member-detail-section > div br {
    line-height: 2;
}

/* ==========================================================
   BACK TO FAMILY MEMBERS
========================================================== */

.family-member-back-link {
    display: flex;
    justify-content: flex-start;
    margin: 28px 0 0;
}

.family-member-back-link > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    color: #fff !important;
    background: var(--fm-maroon);
    border: 1px solid var(--fm-maroon);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.family-member-back-link > a:hover {
    color: #fff !important;
    background: var(--fm-maroon-dark);
    border-color: var(--fm-maroon-dark);
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 900px) {
    .family-member-detail-page .section-pad {
        padding: 40px 0 60px;
    }

    .family-member-detail {
        grid-template-columns: minmax(200px, 270px) minmax(0, 1fr);
        gap: 24px;
        padding: 25px;
    }

    .family-member-facts {
        gap: 10px;
    }

    .family-member-facts > p {
        padding: 12px;
    }

    .family-member-detail-section {
        padding: 24px;
    }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 640px) {
    .family-member-detail-page .container {
        width: calc(100% - 30px);
    }

    .family-member-detail-page .section-pad {
        padding: 28px 0 45px;
    }

    .family-member-detail {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 18px;
    }

    .family-member-detail-photo {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .family-member-detail-photo > img {
        max-height: 360px;
    }

    .member-initials-large {
        min-height: 240px;
    }

    .family-member-detail-content > h2 {
        margin-bottom: 20px;
        font-size: 29px;
    }

    .family-member-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .family-member-facts > p {
        padding: 11px;
        font-size: 12px;
    }

    .family-member-facts > p > strong {
        font-size: 9px;
        letter-spacing: 0.6px;
    }

    .family-member-detail-section {
        margin-top: 18px;
        padding: 20px 18px;
    }

    .family-member-detail-section > h2 {
        margin-bottom: 17px;
        font-size: 23px;
    }

    .family-member-detail-section > div {
        font-size: 13px;
    }

    .family-member-back-link {
        margin-top: 22px;
    }
}

/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 380px) {
    .family-member-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .family-member-detail {
        padding: 15px;
    }

    .family-member-detail-section {
        padding: 18px 15px;
    }

    .family-member-detail-content > h2 {
        font-size: 26px;
    }
}

/* ==========================================================
   ACCESSIBILITY
========================================================== */

@media (prefers-reduced-motion: reduce) {
    .family-member-detail-page *,
    .family-member-detail-page *::before,
    .family-member-detail-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}