/* ===== CSS Variables & Reset ===== */
:root {
    /* Colors - Warm traditional palette */
    --primary: #8B4513;
    --primary-dark: #5D2F0B;
    --primary-light: #CD853F;
    --secondary: #DAA520;
    --accent: #B8860B;

    /* Background colors */
    --bg-light: #FDF5E6;
    --bg-cream: #FAEBD7;
    --bg-dark: #2C1810;
    --bg-card: #FFFAF0;

    /* Text colors */
    --text-dark: #2C1810;
    --text-medium: #5D4037;
    --text-light: #FAEBD7;
    --text-muted: #8D6E63;

    /* Generation colors */
    --gen1: #8B0000;
    --gen2: #CD5C5C;
    --gen3: #FF6347;
    --gen4: #FF7F50;
    --gen5: #FFA07A;

    /* Branch colors */
    --branch1: #2E7D32;
    --branch2: #1976D2;
    --branch3: #7B1FA2;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(44, 24, 16, 0.1);
    --shadow-md: 0 4px 12px rgba(44, 24, 16, 0.15);
    --shadow-lg: 0 8px 24px rgba(44, 24, 16, 0.2);

    /* Transitions */
    --transition: all 0.3s ease;

    /* Spacing */
    --container-max: 1400px;
    --section-padding: 80px;
}

/* ===== Construction Banner ===== */
.construction-banner {
    background: linear-gradient(90deg, #ff6b35, #f7931e, #ff6b35);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.construction-banner strong {
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Adjust header position for banner */
.header {
    top: 44px !important;
}

/* Adjust hero section for banner */
.hero {
    margin-top: 44px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 250, 240, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 24px;
    font-weight: bold;
    box-shadow: var(--shadow-md);
}

.logo-icon.small {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: -2px;
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23DAA520' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 40px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 4rem;
    color: var(--secondary);
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 30px;
}

.hero-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    margin: 0 auto 30px;
}

.hero-desc {
    font-size: 1.1rem;
    color: rgba(250, 235, 215, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===== Stats Section ===== */
.stats {
    background: var(--primary);
    padding: 40px 0;
    margin-top: -1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary);
    font-family: 'Playfair Display', serif;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* ===== Section Styles ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header.light .section-title,
.section-header.light .section-tag {
    color: var(--text-light);
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--text-dark);
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.section-header.light .section-tag {
    background: rgba(218, 165, 32, 0.2);
    color: var(--secondary);
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Family Tree Section ===== */
.family-tree {
    padding: var(--section-padding) 0;
    background: var(--bg-cream);
}

.generation {
    margin-bottom: 50px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.gen-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.gen-badge {
    background: linear-gradient(135deg, var(--gen1), #A52A2A);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.generation[data-gen="2"] .gen-badge {
    background: linear-gradient(135deg, var(--gen2), #BC8F8F);
}

.generation[data-gen="3"] .gen-badge {
    background: linear-gradient(135deg, var(--gen3), #FF6347);
}

.generation[data-gen="4"] .gen-badge {
    background: linear-gradient(135deg, var(--gen4), #FF8C69);
}

.generation[data-gen="5"] .gen-badge {
    background: linear-gradient(135deg, var(--gen5), #FFDAB9);
    color: var(--text-dark);
}

.gen-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--gen1), transparent);
}

.generation[data-gen="2"] .gen-line {
    background: linear-gradient(90deg, var(--gen2), transparent);
}

.generation[data-gen="3"] .gen-line {
    background: linear-gradient(90deg, var(--gen3), transparent);
}

.generation[data-gen="4"] .gen-line {
    background: linear-gradient(90deg, var(--gen4), transparent);
}

.generation[data-gen="5"] .gen-line {
    background: linear-gradient(90deg, var(--gen5), transparent);
}

.gen-content {
    display: flex;
    justify-content: center;
}

.members-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* ===== Member Cards ===== */
.member-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(139, 69, 19, 0.1);
    min-width: 200px;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.member-card.founder {
    background: linear-gradient(135deg, var(--bg-card), #FFF8DC);
    border: 2px solid var(--secondary);
    padding: 30px 40px;
}

.member-card.founder .member-avatar {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
}

.member-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 1.5rem;
    margin: 0 auto 15px;
}

.member-info {
    text-align: center;
}

.member-name {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
    font-weight: 600;
}

.member-spouse {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.member-role {
    display: inline-block;
    background: var(--secondary);
    color: var(--text-dark);
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 10px;
}

.member-card.small {
    padding: 15px;
    min-width: 180px;
}

.member-card.small .member-name {
    font-size: 0.9rem;
}

.member-card.small .member-spouse {
    font-size: 0.8rem;
}

/* ===== Branch Container ===== */
.branch-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.branch-container.gen5 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.family-branch {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--branch1);
}

.family-branch:nth-child(2) {
    border-top-color: var(--branch2);
}

.family-branch:nth-child(3) {
    border-top-color: var(--branch3);
}

.family-branch:nth-child(4) {
    border-top-color: var(--gen3);
}

.family-branch:nth-child(5) {
    border-top-color: var(--gen4);
}

.family-branch:nth-child(6) {
    border-top-color: var(--primary);
}

.branch-header {
    text-align: center;
    margin-bottom: 20px;
}

.branch-header span {
    display: inline-block;
    background: rgba(139, 69, 19, 0.1);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.branch-header.small span {
    font-size: 0.8rem;
    padding: 5px 15px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.family-branch.compact {
    padding: 20px;
}

.members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.member-mini {
    background: rgba(139, 69, 19, 0.1);
    color: var(--text-medium);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.member-mini:hover {
    background: var(--primary);
    color: white;
}

/* ===== History Section ===== */
.history {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, var(--bg-dark), var(--primary-dark));
}

.history-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.history-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(218, 165, 32, 0.2);
}

.history-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

.history-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.history-card h3 {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.history-card p {
    color: rgba(250, 235, 215, 0.8);
    line-height: 1.8;
}

/* ===== Gallery Section ===== */
.gallery {
    padding: var(--section-padding) 0;
    background: var(--bg-cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.gallery-placeholder span {
    font-size: 3rem;
    margin-bottom: 10px;
}

.gallery-placeholder p {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===== Contact Section ===== */
.contact {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3,
.contact-form h3 {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--secondary);
}

.contact-item p {
    color: rgba(250, 235, 215, 0.8);
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(218, 165, 32, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(250, 235, 215, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.15);
}

.contact-form .btn-primary {
    width: 100%;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

.footer-quote {
    color: var(--secondary);
    font-style: italic;
    font-size: 1.1rem;
}

.footer-copyright {
    color: rgba(250, 235, 215, 0.5);
    font-size: 0.9rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    .branch-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    :root {
        --section-padding: 60px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .branch-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: var(--transition);
    }

    .nav.active {
        transform: translateY(0);
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .members-row {
        flex-direction: column;
        align-items: center;
    }

    .member-card {
        width: 100%;
        max-width: 300px;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo-text h1 {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .member-card.founder {
        padding: 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .btn-primary {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
}

/* ===== Deceased Member Styles ===== */
.member-card.deceased,
.couple-card.deceased {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    border: 1px solid #bdbdbd;
}

.member-card.deceased .name,
.couple-card.deceased .name {
    color: #666;
}

.member-avatar.grayscale {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* ===== Auto Deceased for Đời 1, 2, 3 ===== */
/* All members in Generation 1, 2, 3 are deceased - apply grayscale automatically */
.member-card:has(.gen-tag:is([class*="Đời 1"], [class*="Đời 2"], [class*="Đời 3"])),
.couple-card:has(.gen-tag:is([class*="Đời 1"], [class*="Đời 2"], [class*="Đời 3"])) {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8) !important;
    border: 1px solid #bdbdbd !important;
}

/* ===== Đời 3 Deceased Styling ONLY ===== */
/* Only Generation 3 members are deceased - not Đời 4, 5, 6, 7 */
.overlay-tree>li>.member-card,
.overlay-tree>li>.couple-card {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    border: 1px solid #bdbdbd;
}

.overlay-tree>li>.member-card .member-avatar,
.overlay-tree>li>.couple-card .member-avatar {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* Auto-add life dates for Đời 3 members only */
.overlay-tree>li>.member-card .person::after,
.overlay-tree>li>.couple-card .person::after {
    content: "🎂 ~18XX  ✝ ~19XX";
    display: block;
    font-size: 0.65rem;
    color: #888;
    margin-top: 4px;
}

/* Auto-add grave location link for Đời 3 single member cards only */
.overlay-tree>li>.member-card::after {
    content: "📍 Vị trí mộ";
    display: block;
    margin-top: 6px;
    padding: 3px 10px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 12px;
    font-size: 0.65rem;
    color: var(--primary);
    text-align: center;
    cursor: pointer;
}

.overlay-tree>li>.member-card::after:hover {
    background: var(--primary);
    color: white;
}

/* ===== Life Dates ===== */
.birth-year,
.life-dates {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.life-dates {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.life-dates .birth {
    color: var(--text-muted);
}

.life-dates .death {
    color: #888;
}

/* ===== Grave Location Link ===== */
.grave-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 3px 10px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 12px;
    font-size: 0.65rem;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.grave-location:hover {
    background: var(--primary);
    color: white;
}

/* ===== Honor Badge & First Graduate ===== */
.honor-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--text-dark);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 8px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }
}

.member-card.first-graduate {
    background: linear-gradient(135deg, #FFFAF0, #FFF8DC);
    border: 2px solid #FFD700;
}

/* ===== Education Badge ===== */
.education-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #1976D2, #2196F3);
    color: white;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 500;
}

.education-badge.postgrad {
    background: linear-gradient(135deg, #7B1FA2, #9C27B0);
}

/* ===== Extended Stats Section ===== */
.stats-grid.secondary,
.stats-grid.religion {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-icon {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.stat-item.deceased .stat-number {
    color: #ccc;
}

.stat-item.education .stat-number {
    color: #4FC3F7;
}

/* ===== Honor Section ===== */
.honor-section {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, #FFF8DC, #FAEBD7);
}

.honor-card {
    max-width: 500px;
    margin: 0 auto;
    background: linear-gradient(135deg, #fff, #FFFAF0);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(218, 165, 32, 0.3);
    border: 2px solid #FFD700;
    position: relative;
    overflow: hidden;
}

.honor-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.honor-avatar {
    font-size: 4rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.honor-card h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.honor-details {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.honor-quote {
    font-style: italic;
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ===== Religion Badge ===== */
.religion-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 500;
}

.religion-badge.buddhist {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    color: white;
}

.religion-badge.catholic {
    background: linear-gradient(135deg, #5C6BC0, #7986CB);
    color: white;
}

.religion-badge.caodai {
    background: linear-gradient(135deg, #26A69A, #4DB6AC);
    color: white;
}

/* ===== Print Styles ===== */
@media print {

    .header,
    .hero,
    .stats,
    .gallery,
    .contact,
    .footer {
        display: none;
    }

    .family-tree {
        padding: 20px 0;
    }

    .member-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}