
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    /* CSS Variables - Color Palette (Original) */
    :root {
      /* Color Palette - Giữ nguyên bảng màu ban đầu */
      --color-bg-primary: #FAEBD7;      /* Antique white - background chính */
      --color-bg-card: #FFF8DC;         /* Cream - cards và containers */
      --color-primary: #8B0000;         /* Dark red - primary color */
      --color-accent: #DAA520;          /* Gold - accent color */
      --color-gold: #FFD700;            /* Gold yellow - highlights */
      --color-text: #333333;            /* Dark gray - text chính */
      --color-text-muted: #666666;      /* Medium gray - text phụ */
      --color-border: rgba(139, 0, 0, 0.15); /* Border color */
      --color-shadow: rgba(0, 0, 0, 0.1);   /* Shadow color */
      
      /* Typography */
      --font-size-base: 16px;
      --font-size-sm: 14px;
      --font-size-lg: 18px;
      --font-size-xl: 20px;
      --font-size-2xl: 24px;
      --font-size-3xl: 28px;
      --font-size-4xl: 32px;
      
      /* Spacing */
      --space-1: 4px;
      --space-2: 8px;
      --space-3: 12px;
      --space-4: 16px;
      --space-5: 20px;
      --space-6: 24px;
      --space-8: 32px;
      --space-10: 40px;
      --space-12: 48px;
      --space-16: 64px;
      
      /* Layout */
      --navbar-height: 70px;
      --sidebar-width: 280px;
      --content-max-width: 1400px;
      --section-padding: 80px;
    }

    /* Mobile overrides */
    @media (max-width: 768px) {
      :root {
        --font-size-base: 14px;
        --font-size-sm: 12px;
        --font-size-lg: 16px;
        --font-size-xl: 18px;
        --font-size-2xl: 20px;
        --font-size-3xl: 24px;
        --font-size-4xl: 28px;
        
        --space-1: 3px;
        --space-2: 6px;
        --space-3: 10px;
        --space-4: 12px;
        --space-5: 16px;
        --space-6: 20px;
        --space-8: 24px;
        --space-10: 32px;
        
        --navbar-height: 60px;
        --sidebar-width: 0;
      }
    }

    /* Tablet overrides */
    @media (min-width: 769px) and (max-width: 1024px) {
      :root {
        --font-size-base: 15px;
        --space-4: 14px;
        --space-6: 22px;
      }
      
      .navbar-menu {
        gap: 10px;
      }
      
      .navbar-menu a {
        font-size: 14px;
        padding: 5px 6px;
      }
      
      .navbar-logo {
        max-width: 150px;
      }
    }

    /* Medium screens - điều chỉnh navbar */
    @media (min-width: 1025px) and (max-width: 1200px) {
      .navbar-menu {
        gap: 12px;
      }
      
      .navbar-menu a {
        font-size: 15px;
        padding: 5px 7px;
      }
      
      .navbar-logo {
        max-width: 160px;
      }
    }

    body {
      font-family: 'Noto Serif TC', 'Playfair Display', serif;
      background: var(--color-bg-primary);
      background-attachment: fixed;
      position: relative;
      padding-top: var(--navbar-height);
      padding-left: 0; /* No sidebar - content only */
      min-width: 100vw;
      box-sizing: border-box;
      overflow-x: hidden;
      color: var(--color-text);
      line-height: 1.7;
    }


    /* ============================================
       NAVBAR
       ============================================ */
    .navbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: var(--navbar-height);
      background: #111827;
      color: white;
      padding: 0 var(--space-4);
      display: flex;
      justify-content: flex-end;
      align-items: center;
      z-index: 1000;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      gap: 10px;
      min-width: 0;
    }

    @media (max-width: 768px) {
      .navbar {
        justify-content: space-between;
      }
    }

    .navbar-logo {
      font-size: clamp(14px, 4vw, 18px);
      font-weight: 700;
      color: #FFD700;
      text-decoration: none;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 180px;
      flex-shrink: 0;
    }

    .navbar-menu {
      display: flex;
      gap: 15px;
      list-style: none;
      align-items: center;
      flex-wrap: nowrap;
      overflow: visible;
    }

    .navbar-menu li {
      flex-shrink: 0;
    }

    .navbar-menu a {
      color: white;
      text-decoration: none;
      font-size: clamp(14px, 1.5vw, 16px);
      font-weight: 500;
      transition: color 0.3s;
      padding: 5px 8px;
      border-radius: 4px;
      white-space: nowrap;
    }

    .navbar-menu a:hover,
    .navbar-menu a.active {
      color: #FFD700;
      background: rgba(255, 215, 0, 0.1);
    }

    .navbar-toggle {
      display: none;
      background: none;
      border: none;
      color: white;
      font-size: 24px;
      cursor: pointer;
      padding: var(--space-2);
      min-width: 44px;
      min-height: 44px;
    }

    @media (max-width: 768px) {
      .navbar {
        padding: 0 var(--space-2);
      }

      .navbar-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: #111827;
        flex-direction: column;
        padding: var(--space-4);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        max-height: calc(100vh - var(--navbar-height));
        overflow-y: auto;
        display: none;
        gap: 0;
      }

      .navbar-menu.active {
        display: flex;
      }

      .navbar-menu li {
        width: 100%;
        margin: var(--space-2) 0;
      }

      .navbar-menu a {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-base);
        display: block;
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
      }

      .navbar-toggle {
        display: block;
      }
    }

    /* ============================================
       MAIN CONTENT WRAPPER - Centered Content Area
       ============================================ */
    main {
      max-width: var(--content-max-width);
      margin: 0 auto;
      padding: 0 var(--space-8);
      width: 100%;
      box-sizing: border-box;
    }

    @media (max-width: 1024px) {
      main {
        max-width: 100%;
        padding: 0 var(--space-6);
      }
    }

    @media (max-width: 768px) {
      main {
        padding: 0 var(--space-4);
      }
    }

    /* ============================================
       SECTIONS - Centered in Content Area
       ============================================ */
    section {
      min-height: auto;
      padding: var(--section-padding) 0;
      position: relative;
      width: 100%;
      box-sizing: border-box;
      background: var(--color-bg-primary);
    }
    
    /* First section (home) has its own background */
    section:first-child {
      background: transparent;
    }
    
    @media (max-width: 1024px) {
      section {
        padding: 60px 0;
      }
    }
    
    @media (max-width: 768px) {
      section {
        padding: 40px 0;
      }
    }
    
    @media (max-width: 480px) {
      section {
        padding: 40px 0;
      }
    }

    .section-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 var(--space-8);
      width: 100%;
      box-sizing: border-box;
    }
    
    @media (max-width: 1024px) {
      .section-container {
        padding: 0 var(--space-6);
      }
    }

    @media (max-width: 768px) {
      .section-container {
        padding: 0 var(--space-4);
      }
    }
    
    @media (max-width: 480px) {
      .section-container {
        padding: 0 var(--space-4);
      }
    }
    
    /* Subtle section separators */
    section:not(:first-child)::before {
      content: '';
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 100px;
      height: 4px;
      background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.15) 50%, transparent);
      border-radius: 0 0 2px 2px;
    }
    
    /* Remove separator from home section */
    #home::before {
      display: none !important;
    }

    /* Section activities-tree đã di chuyển sang /genealogy */
    /* #activities-tree .section-container {
      max-width: 100%;
      padding: 40px 20px;
    }

    /* ============================================
       HOME SECTION (#home) - Base styles
       ============================================ */
    /* Note: Enhanced styles are defined later in ENHANCED HERO SECTION */

    .hero-content {
      max-width: 900px;
      margin: 0 auto;
    }

    .hero-content h1 {
      font-size: clamp(20px, 5vw, 38px);
      margin-bottom: clamp(16px, 3vw, 24px);
      text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.6), 0 0 20px rgba(255, 255, 255, 0.4), 3px 3px 10px rgba(0, 0, 0, 0.2);
      color: #8B0000;
      line-height: 1.4;
      font-weight: bold;
      letter-spacing: -0.3px;
      text-align: center;
      width: 100%;
      white-space: normal;
      overflow: visible;
      word-break: keep-all;
    }
    
    @media (max-width: 1400px) {
      .hero-content h1 {
        font-size: clamp(18px, 4.5vw, 36px);
      }
    }
    
    @media (max-width: 1200px) {
      .hero-content h1 {
        font-size: clamp(18px, 4vw, 32px);
      }
    }
    
    @media (max-width: 900px) {
      .hero-content h1 {
        font-size: clamp(16px, 3.5vw, 28px);
      }
    }

    .hero-content p {
      font-size: clamp(10px, 2vw, 14px);
      margin-bottom: clamp(16px, 3vw, 24px);
      line-height: 1.75;
      color: #8B0000;
      text-shadow: 0.5px 0.5px 3px rgba(255, 255, 255, 0.5), 0 0 7.5px rgba(255, 255, 255, 0.3), 1px 1px 4px rgba(0, 0, 0, 0.2);
      font-weight: bold;
      max-width: 400px;
      margin-left: auto;
      margin-right: auto;
      text-align: center;
    }

    .cta-button {
      display: block;
      width: fit-content;
      margin: 0 auto;
      padding: clamp(6px, 1.5vw, 7.5px) clamp(16px, 4vw, 20px);
      background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%);
      color: #8B0000;
      text-decoration: none;
      border-radius: 25px;
      font-size: clamp(8px, 2vw, 9px);
      font-weight: 700;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
      position: relative;
      overflow: hidden;
      text-align: center;
    }

    .cta-button::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
      transition: left 0.5s;
    }

    .cta-button:hover::before {
      left: 100%;
    }

    .cta-button:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
      background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%);
    }

    /* ============================================
       ABOUT SECTION (#about)
       ============================================ */
    #about {
      background: #FAEBD7;
      padding: 60px 24px;
    }
    
    /* When inside post-main-column (shared with temple), reduce section padding */
    .post-main-column #about {
      padding: 0 0 var(--space-8) 0;
    }
    
    @media (max-width: 768px) {
      #about {
        padding: 40px 16px;
      }
      .post-main-column #about {
        padding: 0 0 var(--space-6) 0;
      }
    }

    .about-content {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0;
      max-width: 900px;
      margin: 0 auto;
    }

    .about-text {
      font-size: var(--font-size-base);
      line-height: 1.8;
      color: #333;
    }

    .about-text p {
      margin-bottom: 24px;
      text-align: justify;
      line-height: 1.85;
      color: var(--color-text);
    }
    
    .about-text p:last-child {
      margin-bottom: 0;
    }

    .about-text h3 {
      color: #8B0000;
      font-size: clamp(22px, 4vw, 28px);
      font-weight: 700;
      margin-top: 48px;
      margin-bottom: 24px;
      padding-bottom: 16px;
      border-bottom: 3px solid #DAA520;
      line-height: 1.3;
      letter-spacing: -0.3px;
    }

    .about-text h3:first-child {
      margin-top: 0;
    }

    .about-image {
      text-align: center;
      margin: 40px 0;
    }
    
    @media (max-width: 768px) {
      .about-image {
        margin: 32px 0;
      }
    }

    .about-image img {
      max-width: 100%;
      height: auto;
      border-radius: 8px;
      box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }

    blockquote {
      background: linear-gradient(135deg, #FFF8DC 0%, #FFFEF9 100%);
      border-left: 5px solid #DAA520;
      padding: 28px 32px;
      margin: 32px 0;
      border-radius: 8px;
      font-style: italic;
      color: var(--color-text);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      line-height: 1.7;
      font-size: clamp(15px, 2vw, 17px);
    }
    
    @media (max-width: 768px) {
      blockquote {
        padding: 20px 24px;
        margin: 24px 0;
      }
    }
    
    /* Đồng bộ màu nền cho các phần tử */
    .section-container {
      background: transparent;
    }

    #temple-interior {
      background: #FAEBD7;
      border-top: 1px solid rgba(139, 0, 0, 0.12);
      padding: 60px 24px;
    }
    
    /* Temple interior inside post-main-column: same bg, no extra horizontal padding from section */
    .post-main-column #temple-interior {
      padding: var(--space-8) 0 var(--space-10) 0;
      margin: 0;
    }

    #news-feed {
      background: #FAEBD7;
      padding: 60px 0;
      border-top: 1px solid rgba(139, 0, 0, 0.12);
    }

    /* External Posts Section */
    #external-posts {
      background: #FAEBD7;
      border-top: 1px solid rgba(139, 0, 0, 0.12);
      padding: 60px 24px;
    }

    .external-posts-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 32px;
      box-sizing: border-box;
    }
    
    @media (max-width: 1024px) {
      .external-posts-container {
        padding: 0 24px;
      }
    }

    @media (max-width: 768px) {
      .external-posts-container {
        padding: 0 20px;
      }
    }
    
    @media (max-width: 480px) {
      .external-posts-container {
        padding: 0 16px;
      }
    }

    .external-post-item {
      background: #FFF8DC;
      border-radius: 8px;
      padding: 0;
      margin-bottom: 20px;
      border-left: 4px solid #DAA520;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      overflow: hidden;
      display: flex;
      flex-direction: row;
      align-items: stretch;
      border: 1px solid rgba(139, 0, 0, 0.15);
    }

    .external-post-item:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .external-post-thumbnail {
      flex-shrink: 0;
      width: 200px;
      min-height: 150px;
      background: #FAEBD7;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .external-post-thumbnail img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .external-post-thumbnail-placeholder {
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, #8B0000 0%, #DAA520 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 48px;
      opacity: 0.3;
    }

    .external-post-content {
      flex: 1;
      padding: 20px;
      display: flex;
      flex-direction: column;
    }

    .external-post-title {
      margin: 0 0 12px 0;
      font-size: 18px;
      color: #8B0000;
      line-height: 1.4;
    }

    .external-post-title a {
      color: #8B0000;
      text-decoration: none;
      transition: color 0.3s ease;
    }

    .external-post-title a:hover {
      color: #7a0000;
      text-decoration: underline;
    }

    .external-post-meta {
      font-size: 12px;
      color: #666;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .external-post-description {
      font-size: 14px;
      color: var(--color-text-muted);
      line-height: 1.6;
      margin: 0 0 12px 0;
      flex: 1;
    }

    .external-post-source {
      margin-top: auto;
      padding-top: 12px;
      border-top: 1px solid #e0e0e0;
      font-size: 11px;
      color: var(--color-text-muted);
      font-style: italic;
    }

    @media (max-width: 768px) {
      .external-post-item {
        flex-direction: column;
        padding: 0;
      }

      .external-post-thumbnail {
        width: 100%;
        height: 180px;
      }

      .external-post-content {
        padding: 16px;
      }

      .external-post-title {
        font-size: 16px;
      }
    }

    .documents-section,
    #documents {
      border-top: 1px solid rgba(139, 0, 0, 0.12);
    }

    .news-feed-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 32px;
      box-sizing: border-box;
    }
    
    @media (max-width: 1024px) {
      .news-feed-container {
        padding: 0 24px;
      }
    }

    @media (max-width: 768px) {
      .news-feed-container {
        padding: 0 20px;
      }
    }
    
    @media (max-width: 480px) {
      .news-feed-container {
        padding: 0 16px;
      }
    }

    /* Featured Posts */
    .featured-posts-section {
      margin-bottom: 40px;
    }

    .featured-posts {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 20px;
      margin-top: 20px;
    }

    .featured-post-card {
      background: #FFF8DC;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      display: flex;
      flex-direction: column;
      border: 1px solid rgba(139, 0, 0, 0.15);
    }

    .featured-post-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    }

    .featured-post-thumbnail {
      width: 100%;
      height: 200px;
      object-fit: cover;
      background: #FAEBD7;
    }

    .featured-post-content {
      padding: 20px;
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .featured-post-title {
      font-size: 18px;
      font-weight: 700;
      color: #8B0000;
      margin-bottom: 10px;
      line-height: 1.4;
    }

    .featured-post-summary {
      color: #6b7280;
      font-size: 14px;
      line-height: 1.6;
      margin-bottom: 15px;
      flex: 1;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .featured-post-link {
      color: #DAA520;
      text-decoration: none;
      font-weight: 600;
      font-size: 14px;
      transition: color 0.2s;
      align-self: flex-end;
    }

    .featured-post-link:hover {
      color: #8B0000;
      text-decoration: underline;
    }

    /* Hot News Section */
    .hot-news-section {
      margin-bottom: 40px;
      background: #FFF8DC;
      padding: 30px;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      border: 1px solid rgba(139, 0, 0, 0.15);
      transition: all 0.3s ease;
    }

    .hot-news-section:hover {
      box-shadow: 0 4px 16px rgba(139, 0, 0, 0.2);
      transform: translateY(-2px);
    }

    .hot-news-title {
      position: relative;
      animation: pulse-glow 2s ease-in-out infinite;
    }

    @keyframes pulse-glow {
      0%, 100% {
        text-shadow: 0 0 5px rgba(139, 0, 0, 0.3);
      }
      50% {
        text-shadow: 0 0 15px rgba(218, 165, 32, 0.6), 0 0 25px rgba(139, 0, 0, 0.4);
      }
    }

    /* Hot News Grid Layout */
    .hot-news-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 25px;
      margin-top: 20px;
    }

    .hot-news-card {
      background: white;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      transition: all 0.3s ease;
      border: 1px solid rgba(139, 0, 0, 0.1);
      display: flex;
      flex-direction: column;
    }

    .hot-news-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 6px 20px rgba(139, 0, 0, 0.2);
      border-color: rgba(139, 0, 0, 0.3);
    }

    .hot-news-thumbnail-wrapper {
      width: 100%;
      height: 200px;
      overflow: hidden;
      background: #f5f5f5;
      position: relative;
    }

    .hot-news-thumbnail {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }

    .hot-news-card:hover .hot-news-thumbnail {
      transform: scale(1.05);
    }

    .hot-news-thumbnail-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 48px;
      background: linear-gradient(135deg, #FFF8DC 0%, #f5f5f5 100%);
      color: #8B0000;
    }

    .hot-news-content {
      padding: 20px;
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .hot-news-card-title {
      margin: 0 0 12px 0;
      font-size: 18px;
      font-weight: 700;
      line-height: 1.4;
    }

    .hot-news-card-title a {
      color: #8B0000;
      text-decoration: none;
      transition: color 0.2s;
    }

    .hot-news-card-title a:hover {
      color: #DAA520;
      text-decoration: underline;
    }

    .hot-news-summary {
      color: #555;
      font-size: 14px;
      line-height: 1.6;
      margin: 0 0 15px 0;
      flex: 1;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .hot-news-read-more {
      color: #8B0000;
      text-decoration: none;
      font-weight: 600;
      font-size: 14px;
      transition: all 0.2s;
      display: inline-block;
      align-self: flex-start;
    }

    .hot-news-read-more:hover {
      color: #DAA520;
      transform: translateX(4px);
    }

    /* Responsive */
    @media (max-width: 768px) {
      .hot-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
      }

      .hot-news-thumbnail-wrapper {
        height: 180px;
      }
    }

    /* Category Sections - Two Column Grid */
    .category-sections {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
    }

    .category-section {
      background: #FFF8DC;
      padding: 25px;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      border: 1px solid rgba(139, 0, 0, 0.15);
    }

    .category-title {
      color: #8B0000;
      font-size: 18px;
      font-weight: 700;
      text-transform: uppercase;
      margin-bottom: 20px;
      padding-bottom: 10px;
      border-bottom: 2px solid #8B0000;
      letter-spacing: 0.5px;
    }

    .category-main-post {
      display: flex;
      gap: 15px;
      margin-bottom: 20px;
      padding-bottom: 20px;
      border-bottom: 1px solid #e5e7eb;
    }

    .category-main-post-image {
      width: 120px;
      height: 120px;
      min-width: 120px;
      object-fit: cover;
      border-radius: 4px;
      background: #FAEBD7;
      border: 1px solid rgba(139, 0, 0, 0.15);
    }

    .category-main-post-content {
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .category-main-post-content h4 {
      color: #111827;
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 8px;
      line-height: 1.4;
    }

    .category-main-post-content p {
      color: #6b7280;
      font-size: 14px;
      line-height: 1.6;
      margin-bottom: 12px;
      flex: 1;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .category-main-post-link {
      color: #DAA520;
      text-decoration: none;
      font-weight: 600;
      font-size: 14px;
      transition: color 0.2s;
      align-self: flex-end;
    }

    .category-main-post-link:hover {
      color: #8B0000;
      text-decoration: underline;
    }

    .category-related-posts {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .category-related-posts li {
      padding: 8px 0;
      border-bottom: 1px solid #e5e7eb;
    }

    .category-related-posts li:last-child {
      border-bottom: none;
    }

    .category-related-posts a {
      color: #111827;
      text-decoration: none;
      font-size: 15px;
      transition: color 0.2s;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .category-related-posts a::before {
      content: "•";
      color: #DAA520;
      font-size: 18px;
      font-weight: bold;
    }

    .category-related-posts a:hover {
      color: #8B0000;
      text-decoration: underline;
    }

    /* Documents Section */
    .documents-section {
      background: #FAEBD7;
      padding: 60px 24px;
      border-top: 1px solid rgba(139, 0, 0, 0.12);
    }

    .documents-section .page-header {
      text-align: center;
      margin-bottom: 40px;
    }

    .documents-section .page-subtitle {
      font-size: var(--font-size-lg);
      color: #6b7280;
      margin-top: 12px;
      line-height: 1.6;
    }

    .documents-section .section-container {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 24px;
    }

    @media (max-width: 768px) {
      .documents-section .section-container {
        padding: 0 16px;
      }
    }

    .documents-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 24px;
      margin-top: 30px;
    }

    .document-card {
      background: #FFF8DC;
      border-radius: 12px;
      padding: 24px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      transition: all 0.3s ease;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      border: 1px solid rgba(139, 0, 0, 0.15);
      height: 100%;
    }

    .document-card:hover {
      background: #FFF8DC;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
      transform: translateY(-2px);
      border-color: rgba(139, 0, 0, 0.3);
    }

    .document-icon {
      font-size: 48px;
      color: #8B0000;
      margin-bottom: 16px;
      text-align: center;
      width: 100%;
    }

    .document-title {
      font-size: 18px;
      font-weight: 600;
      color: #8B0000;
      margin: 0 0 12px 0;
      text-align: left;
      line-height: 1.4;
    }

    .document-description {
      font-size: 14px;
      color: #6b7280;
      line-height: 1.6;
      margin: 0 0 20px 0;
      text-align: left;
      flex: 1;
    }

    .document-actions {
      display: flex;
      gap: 10px;
      justify-content: flex-start;
      flex-shrink: 0;
      width: 100%;
      margin-top: auto;
    }

    .btn-view {
      background: #8B0000;
      color: white;
      padding: 8px 16px;
      border-radius: 6px;
      text-decoration: none;
      font-weight: 600;
      font-size: 13px;
      transition: background 0.3s ease;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      white-space: nowrap;
    }

    .btn-view:hover {
      background: #7a0000;
    }

    .btn-download {
      background: #DAA520;
      color: #8B0000;
      padding: 8px 16px;
      border-radius: 6px;
      text-decoration: none;
      font-weight: 600;
      font-size: 13px;
      transition: background 0.3s ease;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      white-space: nowrap;
    }

    .btn-download:hover {
      background: #c4951f;
    }

    .source-reference:hover {
      color: #7a0000 !important;
      border-bottom-color: #8B0000 !important;
    }

    /* Responsive */
    @media (max-width: 1024px) {
      .category-sections {
        grid-template-columns: 1fr;
      }

      .documents-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
      }

      .document-card {
        padding: 20px;
      }

      .document-icon {
        font-size: 40px;
        margin-bottom: 12px;
      }

      .document-title {
        font-size: 17px;
        margin-bottom: 10px;
      }

      .document-description {
        font-size: 13px;
        margin-bottom: 16px;
      }

      .document-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
      }

      .btn-view,
      .btn-download {
        font-size: 12px;
        padding: 8px 14px;
      }
    }

    @media (max-width: 768px) {
      .featured-posts {
        grid-template-columns: 1fr;
      }

      .category-main-post {
        flex-direction: column;
      }

      .category-main-post-image {
        width: 100%;
        height: 180px;
      }

      .news-feed-container {
        padding: 0 15px;
      }

      #news-feed {
        padding: 24px 0;
      }

      .documents-section {
        padding: 24px 0;
      }

      .document-card {
        padding: 20px;
      }

      .document-icon {
        font-size: 40px;
        margin-bottom: 12px;
      }

      .document-title {
        font-size: 17px;
        margin-bottom: 10px;
      }

      .document-description {
        font-size: 13px;
        margin-bottom: 16px;
      }

      .document-actions {
        flex-direction: column;
        width: 100%;
      }

      .btn-view,
      .btn-download {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
      }
    }

    /* Typography - Responsive */
    h1 {
      font-size: clamp(28px, 6vw, 42px);
      line-height: 1.25;
      font-weight: 700;
      letter-spacing: -0.5px;
      margin-bottom: 1em;
    }

    h2 {
      font-size: clamp(24px, 5vw, 32px);
      line-height: 1.3;
      font-weight: 700;
      letter-spacing: -0.3px;
      margin-bottom: 0.8em;
    }

    h3 {
      font-size: clamp(20px, 4vw, 26px);
      line-height: 1.35;
      font-weight: 600;
      margin-bottom: 0.7em;
    }
    
    h4 {
      font-size: clamp(18px, 3.5vw, 22px);
      line-height: 1.4;
      font-weight: 600;
      margin-bottom: 0.6em;
    }

    p, li {
      font-size: var(--font-size-base);
      line-height: 1.75;
      color: var(--color-text);
      margin-bottom: 1em;
    }
    
    p:last-child {
      margin-bottom: 0;
    }

    @media (max-width: 768px) {
      p, li {
        line-height: 1.65;
      }
    }

    .section-title {
      font-size: clamp(28px, 5.5vw, 42px);
      color: #8B0000;
      margin-bottom: clamp(24px, 5vw, 40px);
      margin-top: 0;
      text-align: center;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
      scroll-margin-top: calc(var(--navbar-height) + 20px);
      font-weight: 700;
      letter-spacing: -0.5px;
      line-height: 1.2;
      position: relative;
      padding-bottom: 20px;
    }
    
    .section-title::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 80px;
      height: 4px;
      background: linear-gradient(90deg, #8B0000, #DAA520);
      border-radius: 2px;
    }

    /* ============================================
       POST LAYOUT - Blog-style reading layout
       ============================================ */
    .post-layout {
      display: grid;
      grid-template-columns: 1fr 320px;
      gap: var(--space-8);
      max-width: var(--content-max-width);
      margin: 0 auto;
      padding: var(--space-6) var(--space-5);
      align-items: start;
      background: var(--color-bg-primary);
    }
    
    .post-main-column {
      min-width: 0; /* Prevent grid overflow */
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    
    .post-content {
      min-width: 0; /* Prevent overflow */
    }
    
    .post-sidebar {
      position: sticky;
      top: calc(var(--navbar-height) + 20px);
      height: fit-content;
      max-height: calc(100vh - var(--navbar-height) - 40px);
      overflow-y: auto;
    }
    
    /* Post Header */
    .post-header {
      margin-bottom: var(--space-8);
      padding-bottom: var(--space-6);
      border-bottom: 2px solid var(--color-border);
    }
    
    .post-header h1 {
      font-size: var(--font-size-4xl);
      color: var(--color-primary);
      margin-bottom: var(--space-4);
      line-height: 1.3;
      font-weight: 700;
    }
    
    .post-meta {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-4);
      color: var(--color-text-muted);
      font-size: var(--font-size-sm);
      margin-bottom: var(--space-4);
    }
    
    .post-lead {
      font-size: var(--font-size-lg);
      line-height: 1.8;
      color: var(--color-text);
      font-weight: 400;
      margin-top: var(--space-4);
    }
    
    /* Article Typography for Reading */
    .post-content article,
    .post-content .section-container {
      max-width: 100%;
      margin: 0;
      padding: 0;
    }
    
    /* Override section-container padding khi trong post-content */
    .post-content .section-container {
      padding: 0;
    }
    
    /* Ensure images are visible in post content */
    .post-content .about-image,
    .post-content .about-image img {
      display: block !important;
      visibility: visible !important;
      opacity: 1 !important;
      max-width: 100% !important;
      height: auto !important;
    }
    
    .post-content .about-image {
      text-align: center;
      margin: var(--space-6) 0;
      width: 100%;
    }
    
    .post-content img {
      display: block !important;
      visibility: visible !important;
      opacity: 1 !important;
      max-width: 100% !important;
      height: auto !important;
    }
    
    .post-content p {
      margin-bottom: var(--space-5);
      line-height: 1.8;
      font-size: var(--font-size-base);
      color: var(--color-text);
    }
    
    .post-content h2 {
      margin-top: var(--space-10);
      margin-bottom: var(--space-5);
      scroll-margin-top: calc(var(--navbar-height) + 20px);
    }
    
    .post-content h3 {
      margin-top: var(--space-8);
      margin-bottom: var(--space-4);
      scroll-margin-top: calc(var(--navbar-height) + 20px);
    }
    
    .post-content h4 {
      margin-top: var(--space-6);
      margin-bottom: var(--space-3);
      scroll-margin-top: calc(var(--navbar-height) + 20px);
    }
    
    /* Sidebar Cards */
    .sidebar-card {
      background: var(--color-bg-card);
      border: 1px solid var(--color-border);
      border-radius: 12px;
      padding: var(--space-5);
      margin-bottom: var(--space-5);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .sidebar-card h3 {
      font-size: var(--font-size-xl);
      color: var(--color-primary);
      margin-bottom: var(--space-4);
      padding-bottom: var(--space-3);
      border-bottom: 2px solid var(--color-accent);
      font-weight: 700;
    }
    
    /* TOC Sidebar - Enabled */
    .toc-sidebar {
      display: block;
    }
    
    /* Ensure TOC sidebar scrollbar styling */
    .post-sidebar::-webkit-scrollbar {
      width: 6px;
    }
    
    .post-sidebar::-webkit-scrollbar-track {
      background: rgba(218, 165, 32, 0.05);
      border-radius: 3px;
    }
    
    .post-sidebar::-webkit-scrollbar-thumb {
      background: rgba(139, 0, 0, 0.2);
      border-radius: 3px;
    }
    
    .post-sidebar::-webkit-scrollbar-thumb:hover {
      background: rgba(139, 0, 0, 0.4);
    }

    .toc-sidebar::-webkit-scrollbar {
      width: 8px;
    }

    .toc-sidebar::-webkit-scrollbar-track {
      background: rgba(218, 165, 32, 0.1);
    }

    .toc-sidebar::-webkit-scrollbar-thumb {
      background: #DAA520;
      border-radius: 4px;
    }

    .toc-sidebar::-webkit-scrollbar-thumb:hover {
      background: #8B0000;
    }

    .toc-sidebar h3 {
      color: var(--color-primary);
      font-size: var(--font-size-xl);
      margin-bottom: var(--space-4);
      border-bottom: 2px solid var(--color-accent);
      padding-bottom: var(--space-3);
      text-align: left;
      font-weight: 700;
      text-transform: none;
      letter-spacing: normal;
    }
    
    /* Hide TOC toggle button title on desktop */
    @media (min-width: 769px) {
      .toc-toggle-mobile {
        display: none !important;
      }
    }

    .toc-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .toc-list li {
      margin-bottom: 8px;
      position: relative;
    }

    .toc-list li::before {
      content: "▸";
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      color: var(--color-primary);
      font-weight: bold;
      font-size: 12px;
      opacity: 0.6;
      transition: all 0.3s ease;
    }

    .toc-list li:hover::before {
      opacity: 1;
      color: var(--color-accent);
      transform: translateY(-50%) translateX(3px);
    }

    .toc-list a {
      color: #555;
      text-decoration: none;
      font-size: 14px;
      font-weight: bold;
      transition: all 0.3s ease;
      display: block;
      line-height: 1.6;
      padding: 10px 12px 10px 20px;
      border-radius: 6px;
      word-wrap: break-word;
      position: relative;
      background: transparent;
    }

    .toc-list a:hover {
      color: var(--color-primary);
      background: rgba(218, 165, 32, 0.1);
      transform: translateX(4px);
      padding-left: 24px;
    }

    .toc-list a.active {
      color: var(--color-primary);
      background: rgba(218, 165, 32, 0.2);
      font-weight: bold;
      border-left: 3px solid var(--color-accent);
      padding-left: 17px;
    }

    .toc-list a.active::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: var(--color-accent);
      border-radius: 0 3px 3px 0;
    }
    
    /* TOC Sublist (H3/H4) */
    .toc-sublist {
      list-style: none;
      padding: 0;
      margin: var(--space-2) 0 0 var(--space-4);
    }
    
    .toc-sublist li {
      margin-bottom: var(--space-2);
    }
    
    .toc-link-h3,
    .toc-link-h4 {
      font-size: 13px;
      padding: 8px 12px 8px 16px;
      color: var(--color-text-muted);
      font-weight: 400;
    }
    
    .toc-link-h4 {
      padding-left: 24px;
      font-size: 12px;
    }
    
    .toc-link-h3:hover,
    .toc-link-h4:hover {
      color: var(--color-primary);
      background: rgba(218, 165, 32, 0.08);
    }
    
    .toc-link-h3.active,
    .toc-link-h4.active {
      color: var(--color-primary);
      background: rgba(139, 0, 0, 0.1);
      border-left-color: var(--color-primary);
      font-weight: 500;
    }

    /* TOC Toggle Button - Mobile only */
    .toc-toggle-mobile {
      display: none;
      width: 100%;
      padding: var(--space-4);
      background: var(--color-primary);
      color: white;
      border: none;
      border-radius: 8px;
      font-size: var(--font-size-base);
      font-weight: 600;
      cursor: pointer;
      margin-bottom: var(--space-4);
      transition: background 0.2s ease;
    }
    
    .toc-toggle-mobile:hover {
      background: #A52A2A;
    }
    
    .toc-toggle-mobile.active {
      background: var(--color-accent);
      color: var(--color-primary);
    }

    /* TOC Overlay - Mobile only */
    .toc-overlay-mobile {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(3px);
      z-index: 9998;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }
    
    .toc-overlay-mobile.active {
      opacity: 1;
      pointer-events: auto;
    }

    /* Scroll offset for anchor links */
    h2[id], h3[id], h4[id] {
      scroll-margin-top: calc(var(--navbar-height) + 20px);
    }
    
    /* Responsive Post Layout */
    @media (max-width: 1024px) {
      .post-layout {
        grid-template-columns: 1fr 280px;
        gap: var(--space-6);
      }
    }
    
    @media (max-width: 768px) {
      .post-layout {
        grid-template-columns: 1fr;
        gap: var(--space-5);
        padding: var(--space-4);
      }
      
      .post-sidebar {
        position: static;
        max-height: none;
        order: -1; /* TOC appears before content on mobile */
      }
      
      .toc-toggle-mobile {
        display: block;
      }
      
      .toc-sidebar {
        display: none;
        margin-top: var(--space-4);
      }
      
      .toc-sidebar.active {
        display: block;
      }
      
      .sidebar-card {
        margin-bottom: var(--space-4);
      }
      
      .post-header h1 {
        font-size: var(--font-size-3xl);
      }
    }
    
    /* Related Posts & Most Viewed & Activity Info & NPT Council */
    .related-posts-list,
    .most-viewed-list,
    .activity-info-list,
    .npt-council-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    
    .related-posts-list li,
    .most-viewed-list li,
    .activity-info-list li,
    .npt-council-list li {
      margin-bottom: var(--space-4);
      padding-bottom: var(--space-4);
      border-bottom: 1px solid var(--color-border);
    }
    
    .related-posts-list li:last-child,
    .most-viewed-list li:last-child,
    .activity-info-list li:last-child,
    .npt-council-list li:last-child {
      border-bottom: none;
      margin-bottom: 0;
      padding-bottom: 0;
    }
    
    .related-posts-list a,
    .most-viewed-list a,
    .activity-info-list a,
    .npt-council-list a {
      color: var(--color-text);
      text-decoration: none;
      font-size: var(--font-size-sm);
      line-height: 1.6;
      display: block;
      transition: color 0.2s ease;
    }
    
    .related-posts-list a:hover,
    .most-viewed-list a:hover,
    .activity-info-list a:hover,
    .npt-council-list a:hover {
      color: var(--color-primary);
    }
    
    /* New info badge - blinking red with yellow contrast */
    .new-info-badge {
      display: inline-block;
      color: #b91c1c;
      font-size: 0.85em;
      font-weight: 700;
      margin-left: 6px;
      padding: 2px 6px;
      border-radius: 3px;
      animation: blink-contrast 1.2s ease-in-out infinite;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    @keyframes blink-contrast {
      0%, 100% {
        color: #b91c1c;
        background-color: transparent;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
      }
      50% {
        color: #b91c1c;
        background-color: #FFD700;
        text-shadow: 0 1px 3px rgba(185, 28, 28, 0.3);
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
      }
    }
    
    /* External link indicator */
    .npt-council-list a[target="_blank"] {
      position: relative;
    }
    
    /* Note/Tip/Warning Boxes */
    .note,
    .tip,
    .warning {
      padding: var(--space-4);
      border-radius: 8px;
      margin: var(--space-5) 0;
      border-left: 4px solid;
    }
    
    .note {
      background: rgba(139, 0, 0, 0.05);
      border-left-color: var(--color-primary);
    }
    
    .tip {
      background: rgba(218, 165, 32, 0.1);
      border-left-color: var(--color-accent);
    }
    
    .warning {
      background: rgba(220, 20, 60, 0.1);
      border-left-color: #DC143C;
    }

    /* Responsive Images */
    img {
      max-width: 100%;
      height: auto;
      display: block;
    }

    @media (max-width: 768px) {
      img {
        border-radius: 6px;
      }
    }

    /* Touch-friendly Buttons and Links */
    button, .btn, a.btn {
      min-height: 44px;
      min-width: 44px;
      padding: var(--space-3) var(--space-4);
      font-size: var(--font-size-base);
      cursor: pointer;
      transition: all 0.3s ease;
    }

    @media (max-width: 768px) {
      button, .btn, a.btn {
        min-height: 44px;
        padding: var(--space-3) var(--space-4);
      }
    }

    /* Responsive Forms */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
      width: 100%;
      font-size: var(--font-size-base);
      padding: var(--space-3);
      border-radius: 6px;
      border: 1px solid #ddd;
    }

    @media (max-width: 768px) {
      input[type="text"],
      input[type="email"],
      input[type="password"],
      input[type="search"],
      input[type="tel"],
      input[type="number"],
      textarea,
      select {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 44px;
      }
    }

    /* Responsive Cards */
    .card, .lineage-card, .document-card, .external-post-item {
      padding: var(--space-4);
      margin-bottom: var(--space-4);
    }

    @media (max-width: 768px) {
      .card, .lineage-card, .document-card, .external-post-item {
        padding: var(--space-3);
        margin-bottom: var(--space-3);
        border-radius: 8px;
      }
    }


    /* ============================================
       GENEALOGY TREE SECTION - Đã di chuyển sang /genealogy
       ============================================ */



    /* Family Tree CSS - Đã di chuyển sang /genealogy */

    /* ============================================
       GENEALOGY SECTION (#genealogy)
       ============================================ */
    #genealogy {
      background: #FAEBD7;
      padding: 80px 30px;
    }

    .genealogy-container {
      background: #FFF8DC;
      border-radius: 12px;
      padding: 30px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
      border: 1px solid rgba(139, 0, 0, 0.15);
    }

    /* Lineage section styles */
    .lineage-section {
      margin-top: 30px;
      padding: 30px;
      background: #FAEBD7;
      border-top: 5px solid #DAA520;
      border-radius: 0 0 20px 20px;
    }

    .lineage-header {
      text-align: center;
      margin-bottom: 30px;
      padding-bottom: 20px;
      border-bottom: 3px solid #DAA520;
    }

    .lineage-header h2 {
      color: #8B0000;
      font-size: 28px;
      margin-bottom: 10px;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }

    .lineage-header p {
      color: var(--color-text-muted);
      font-size: 16px;
      font-style: italic;
    }

    .lineage-controls {
      display: flex;
      gap: 15px;
      align-items: flex-end;
      flex-wrap: wrap;
      margin-bottom: 30px;
      padding: 20px;
      background: #FFF8DC;
      border-radius: 12px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .lineage-input-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1;
      position: relative;
    }

    .lineage-input-group label {
      font-weight: 600;
      color: #8B0000;
      font-size: 14px;
    }

    .lineage-input-group input {
      padding: 12px 18px;
      border: 2px solid #DAA520;
      border-radius: 8px;
      font-size: 16px;
      background: #FFF8DC;
      font-family: 'Noto Serif TC', serif;
      min-width: 200px;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .lineage-input-group input:focus {
      outline: none;
      border-color: #8B0000;
      box-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
    }

    .lineage-controls button {
      padding: 12px 30px;
      border: 2px solid #8B0000;
      border-radius: 8px;
      font-size: 16px;
      background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
      color: #FFD700;
      cursor: pointer;
      transition: all 0.3s;
      font-weight: 600;
      font-family: 'Noto Serif TC', serif;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
      height: fit-content;
    }

    .lineage-controls button:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
      background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
    }

    .lineage-result {
      margin-top: 20px;
      padding: 25px;
      background: #FFF8DC;
      border-radius: 12px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
      border: 3px solid #DAA520;
    }

    .lineage-result-header h3 {
      color: #8B0000;
      font-size: 22px;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 2px solid #DAA520;
    }

    .lineage-result-content {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .lineage-item {
      padding: 15px 20px;
      margin: 4px 0;
      background: #FFF8DC;
      border-left: 5px solid #DAA520;
      border-radius: 8px;
      transition: all 0.3s;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      cursor: pointer;
      border: 1px solid rgba(139, 0, 0, 0.1);
    }

    .lineage-item:hover {
      transform: translateX(5px);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
      border-left-color: #8B0000;
    }

    .lineage-item.current {
      background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
      border-left-color: #fbc02d;
      border-left-width: 6px;
      font-weight: bold;
      box-shadow: 0 4px 15px rgba(251, 192, 45, 0.3);
    }

    .lineage-item .generation {
      display: inline-block;
      min-width: 100px;
      padding: 8px 15px;
      background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
      color: #FFD700;
      border-radius: 20px;
      font-weight: 700;
      font-size: 14px;
      text-align: center;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
      margin-right: 20px;
    }

    .lineage-item.current .generation {
      background: linear-gradient(135deg, #fbc02d 0%, #f9a825 100%);
      color: #8B0000;
    }

    .lineage-item .name {
      color: #8B0000;
      font-size: 16px;
      font-weight: 600;
    }

    .lineage-item.current .name {
      font-size: 18px;
    }

    .lineage-parents {
      margin-top: 10px;
      font-size: 16px;
      color: #8B0000;
      font-style: italic;
      font-weight: 500;
      padding-left: 10px;
    }

    .lineage-parents strong {
      color: #8B0000;
      font-style: normal;
      font-weight: 700;
      font-size: 17px;
    }

    .lineage-error {
      padding: 20px;
      background: #ffebee;
      color: #c62828;
      border-radius: 8px;
      border-left: 5px solid #c62828;
      text-align: center;
      font-weight: 600;
    }

    .lineage-loading {
      padding: 20px;
      text-align: center;
      color: #8B0000;
      font-size: 16px;
    }

    .suggestions-dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: #FFF8DC;
      border: 2px solid #DAA520;
      border-radius: 8px;
      max-height: 300px;
      overflow-y: auto;
      z-index: 1000;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      margin-top: 5px;
    }

    .suggestion-item {
      padding: 12px 15px;
      cursor: pointer;
      border-bottom: 1px solid #f0f0f0;
      transition: background 0.2s;
    }

    .suggestion-item:hover {
      background: rgba(250, 235, 215, 0.5);
    }

    .suggestion-item:last-child {
      border-bottom: none;
    }

    .suggestion-item .suggestion-name {
      font-weight: 600;
      color: #8B0000;
      font-size: 15px;
    }

    .suggestion-item .suggestion-details {
      font-size: 13px;
      color: #666;
      margin-top: 4px;
      font-weight: 400;
    }
    
    .suggestion-item {
      display: flex;
      flex-direction: column;
      padding: 12px;
      cursor: pointer;
      border-bottom: 1px solid #f0f0f0;
    }
    
    .suggestion-item:last-child {
      border-bottom: none;
    }
    
    .suggestion-item:hover {
      background: #f9f9f9;
    }

    .lineage-detail-panel {
      margin-top: 20px;
      padding: 25px;
      background: #FFF8DC;
      border-radius: 12px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
      border: 3px solid #DAA520;
    }

    .detail-panel-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 2px solid #DAA520;
    }

    .detail-panel-header h3 {
      color: #8B0000;
      font-size: 22px;
      margin: 0;
    }

    .close-btn {
      background: #DC143C;
      color: white;
      border: none;
      border-radius: 50%;
      width: 35px;
      height: 35px;
      font-size: 24px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s;
    }

    .close-btn:hover {
      background: #8B0000;
      transform: scale(1.1);
    }

    .detail-form {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 15px 20px;
    }
    
    @media (max-width: 768px) {
      .detail-form {
        grid-template-columns: 1fr;
      }
    }

    .detail-form .form-group {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .detail-form .form-group label {
      font-weight: 600;
      color: #8B0000;
      font-size: 14px;
    }

    .detail-form .form-group input,
    .detail-form .form-group select,
    .detail-form .form-group textarea {
      padding: 10px;
      border: 2px solid #DAA520;
      border-radius: 6px;
      font-size: 14px;
      font-family: 'Noto Serif TC', serif;
    }

    .detail-value {
      padding: 10px;
      background: #f9f9f9;
      border: 1px solid #e0e0e0;
      border-radius: 6px;
      font-size: 14px;
      color: #333;
      min-height: 20px;
      line-height: 1.6;
      white-space: pre-line; /* Cho phép xuống dòng */
    }

    .btn-edit {
      background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
      color: white;
      padding: 12px 24px;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
    }

    .btn-edit:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 10px rgba(33, 150, 243, 0.4);
    }

    .detail-form .form-group input:focus,
    .detail-form .form-group select:focus,
    .detail-form .form-group textarea:focus {
      outline: none;
      border-color: #8B0000;
      box-shadow: 0 0 8px rgba(218, 165, 32, 0.3);
    }

    .form-actions {
      margin-top: 20px;
      display: flex;
      gap: 10px;
      justify-content: flex-end;
    }

    .form-actions button {
      padding: 12px 24px;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
    }

    .btn-save {
      background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
      color: white;
    }

    .btn-save:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    }

    .btn-cancel {
      background: #FFF8DC;
      color: #333;
      border: 1px solid rgba(139, 0, 0, 0.2);
    }

    .btn-cancel:hover {
      background: #e0e0e0;
    }

    .btn-delete {
      background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
      color: white;
      padding: 12px 24px;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
    }

    .btn-delete:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 10px rgba(220, 20, 60, 0.4);
      background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    }

    /* ============================================
       RESPONSIVE
       ============================================ */
    
    /* Tree section responsive */
    @media (max-width: 900px) {
      #treeControls > div {
        flex-direction: column;
        align-items: stretch;
      }
      
      #treeControls > div > div {
        min-width: 100%;
      }
      
      /* section#activities-tree đã di chuyển sang /genealogy */
      /* section#activities-tree > div > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
      }
      
      #infoPanel {
        max-height: 400px;
        margin-top: 20px;
      }
    }
    
    @media (max-width: 768px) {
      .navbar-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: #111827;
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s;
      }

      .navbar-menu.active {
        left: 0;
      }

      .navbar-toggle {
        display: block;
      }

      .hero-content h1 {
        font-size: clamp(18px, 4.5vw, 36px);
      }
      
      .hero-content p {
        font-size: clamp(10px, 2vw, 13px);
      }
      
      .hero-content {
        padding: 0 16px;
      }

      .about-content {
        grid-template-columns: 1fr;
      }

      section {
        padding: 60px 20px;
      }
    }

    /* Photo Carousel Styles */
    .photo-carousel-section {
      margin-top: var(--space-10);
      padding: var(--space-8) 0;
      border-top: 2px solid rgba(139, 0, 0, 0.15);
      background: #FAEBD7;
    }
    
    .carousel-header {
      text-align: center;
      margin-bottom: var(--space-6);
      padding: 0 var(--space-4);
    }
    
    .carousel-header h2 {
      font-size: var(--font-size-3xl);
      margin-bottom: var(--space-2);
      color: var(--color-primary);
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .carousel-header p {
      color: var(--color-text-muted);
      font-size: var(--font-size-lg);
      margin-bottom: var(--space-4);
    }
    
    .btn-view-all {
      display: inline-block;
      padding: var(--space-3) var(--space-6);
      background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
      color: white;
      border-radius: var(--radius-md);
      font-size: var(--font-size-base);
      font-weight: 600;
      text-decoration: none;
      transition: all 0.3s ease;
      box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
    }
    
    .btn-view-all:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
    }
    
    /* Photo Gallery Grid Styles */
    .photo-gallery {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: var(--space-4);
    }
    
    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: var(--space-4);
      margin-top: var(--space-4);
    }
    
    .gallery-item {
      position: relative;
      aspect-ratio: 1;
      overflow: hidden;
      border-radius: var(--radius-md);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      cursor: pointer;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      background: var(--color-bg-card);
    }
    
    .gallery-item:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    
    .gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform 0.3s ease;
    }
    
    .gallery-item:hover img {
      transform: scale(1.05);
    }
    
    .gallery-loading {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 300px;
      color: var(--color-text-muted);
      font-size: var(--font-size-lg);
      background: #FAEBD7;
      flex-direction: column;
      gap: var(--space-4);
      border-radius: var(--radius-md);
    }
    
    .gallery-loading::after {
      content: '';
      width: 40px;
      height: 40px;
      border: 4px solid rgba(139, 0, 0, 0.1);
      border-top-color: #8B0000;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    
    @media (max-width: 1024px) {
      .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--space-3);
      }
    }
    
    @media (max-width: 767px) {
      .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-2);
      }
      
      .carousel-header h2 {
        font-size: var(--font-size-2xl);
      }
        height: 40px;
        font-size: var(--font-size-lg);
      }
      
      .carousel-nav.prev {
        left: var(--space-2);
      }
      
      .carousel-nav.next {
        right: var(--space-2);
      }
      
      .carousel-indicators {
        bottom: var(--space-4);
        gap: var(--space-2);
        padding: var(--space-1) var(--space-3);
      }
      
      .carousel-indicator {
        width: 10px;
        height: 10px;
      }
    }
    
    /* Albums Grid Container */
    .albums-grid-container {
      margin-top: var(--space-8);
      background: #FFF8DC;
      padding: var(--space-6);
      border-radius: var(--radius-lg);
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
      border: 1px solid rgba(139, 0, 0, 0.15);
    }
    
    .albums-grid-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: var(--space-6);
      padding-bottom: var(--space-5);
      border-bottom: 2px solid #e8e8e8;
      flex-wrap: wrap;
      gap: var(--space-4);
    }
    
    .albums-grid-title h3 {
      margin: 0;
      font-size: var(--font-size-2xl);
      color: var(--color-primary);
      font-weight: 700;
    }
    
    .albums-grid-title p {
      margin: var(--space-2) 0 0 0;
      color: var(--color-text-muted);
      font-size: var(--font-size-base);
    }
    
    .btn-create-album {
      display: inline-flex;
      align-items: center;
      gap: var(--space-2);
      padding: var(--space-3) var(--space-6);
      background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
      color: white;
      border: none;
      border-radius: var(--radius-md);
      font-size: var(--font-size-base);
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 4px 12px rgba(139, 0, 0, 0.25);
      text-decoration: none;
    }
    
    .btn-create-album:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(139, 0, 0, 0.35);
    }
    
    .btn-create-album:active {
      transform: translateY(0);
    }
    
    .btn-create-album .btn-icon {
      font-size: var(--font-size-xl);
      font-weight: bold;
      line-height: 1;
    }
    
    /* Albums Grid */
    .albums-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: var(--space-6);
      margin-top: var(--space-6);
    }
    
    /* Gallery View */
    .gallery-view {
      margin-top: var(--space-8);
      background: #FFF8DC;
      padding: var(--space-6);
      border-radius: var(--radius-lg);
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
      animation: fadeIn 0.4s ease;
      border: 1px solid rgba(139, 0, 0, 0.15);
    }
    
    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .gallery-view-header {
      display: flex;
      align-items: flex-start;
      gap: var(--space-4);
      margin-bottom: var(--space-6);
      padding-bottom: var(--space-5);
      border-bottom: 2px solid #e8e8e8;
      flex-wrap: wrap;
    }
    
    .btn-back {
      display: inline-flex;
      align-items: center;
      gap: var(--space-2);
      padding: var(--space-3) var(--space-5);
      background: #FFF8DC;
      color: var(--color-text);
      border: 2px solid rgba(139, 0, 0, 0.2);
      border-radius: var(--radius-md);
      font-size: var(--font-size-base);
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      text-decoration: none;
    }
    
    .btn-back:hover {
      background: var(--color-primary);
      color: white;
      border-color: var(--color-primary);
      transform: translateX(-4px);
    }
    
    .btn-back span {
      font-size: var(--font-size-xl);
      line-height: 1;
    }
    
    .gallery-view-info {
      flex: 1;
    }
    
    .gallery-view-info h3 {
      margin: 0;
      font-size: var(--font-size-2xl);
      color: var(--color-primary);
      font-weight: 700;
    }
    
    .gallery-view-info p {
      margin: var(--space-2) 0 0 0;
      color: #666;
      font-size: var(--font-size-base);
    }
    
    .gallery-container {
      min-height: 300px;
    }
    
    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: var(--space-4);
      margin-top: var(--space-6);
    }
    
    .gallery-item {
      position: relative;
      overflow: hidden;
      border-radius: 12px;
      background: #FAEBD7;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      aspect-ratio: 1;
      border: 1px solid rgba(139, 0, 0, 0.1);
    }
    
    .gallery-item:hover {
      transform: translateY(-6px) scale(1.02);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
      z-index: 1;
    }
    
    .gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform 0.3s ease;
    }
    
    .gallery-item:hover img {
      transform: scale(1.1);
    }
    
    .gallery-item-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, transparent 50%);
      opacity: 0;
      transition: opacity 0.3s ease;
      display: flex;
      align-items: flex-start;
      justify-content: flex-end;
      padding: var(--space-2);
    }
    
    .gallery-item:hover .gallery-item-overlay {
      opacity: 1;
    }
    
    .gallery-item-number {
      background: rgba(255, 255, 255, 0.9);
      color: var(--color-primary);
      padding: var(--space-1) var(--space-2);
      border-radius: 12px;
      font-size: var(--font-size-xs);
      font-weight: 600;
    }
    
    .gallery-loading {
      text-align: center;
      padding: var(--space-8);
      color: var(--color-text-muted);
    }
    
    .gallery-error {
      text-align: center;
      padding: var(--space-8);
      color: var(--color-error);
    }
    
    /* Album Card Styles - Redesigned */
    .album-card {
      background: #FFF8DC;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      border: 2px solid rgba(139, 0, 0, 0.15);
      position: relative;
      height: 100%;
    }
    
    .album-card:hover {
      transform: translateY(-12px) scale(1.02);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
      border-color: var(--color-primary);
    }
    
    .album-card.selected {
      border-color: var(--color-primary);
      border-width: 3px;
      box-shadow: 0 12px 32px rgba(139, 0, 0, 0.25);
    }
    
    .album-card-thumbnail {
      width: 100%;
      height: 240px;
      background: linear-gradient(135deg, #FAEBD7 0%, #FFF8DC 100%);
      position: relative;
      overflow: hidden;
    }
    
    .album-card-thumbnail img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .album-card:hover .album-card-thumbnail img {
      transform: scale(1.1);
    }
    
    .album-card-thumbnail-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 64px;
      color: rgba(139, 0, 0, 0.3);
      background: linear-gradient(135deg, #FAEBD7 0%, #FFF8DC 100%);
    }
    
    .album-card-thumbnail-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(to bottom, rgba(139, 0, 0, 0.7) 0%, rgba(139, 0, 0, 0.5) 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: 700;
      font-size: var(--font-size-xl);
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .album-card:hover .album-card-thumbnail-overlay {
      opacity: 1;
    }
    
    .album-card-content {
      padding: var(--space-5);
      display: flex;
      flex-direction: column;
      gap: var(--space-4);
      flex: 1;
      min-height: 140px;
    }
    
    .album-card-header {
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
    }
    
    .album-name {
      font-weight: 700;
      font-size: var(--font-size-lg);
      color: #1a1a1a;
      line-height: 1.4;
      margin: 0;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      transition: color 0.3s ease;
    }
    
    .album-card:hover .album-name {
      color: var(--color-primary);
    }
    
    .album-theme {
      color: #666;
      font-size: var(--font-size-sm);
      line-height: 1.5;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    
    .album-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: var(--space-4);
      border-top: 2px solid #f5f5f5;
      margin-top: auto;
    }
    
    .album-meta {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: var(--space-3);
      font-size: var(--font-size-xs);
      color: #888;
    }
    
    .album-meta-item {
      display: flex;
      align-items: center;
      gap: var(--space-1);
      white-space: nowrap;
    }
    
    .album-image-count {
      display: inline-flex;
      align-items: center;
      gap: var(--space-1);
      padding: var(--space-2) var(--space-3);
      background: linear-gradient(135deg, rgba(139, 0, 0, 0.1) 0%, rgba(220, 20, 60, 0.1) 100%);
      color: var(--color-primary);
      border-radius: 20px;
      font-weight: 700;
      font-size: var(--font-size-xs);
      border: 1px solid rgba(139, 0, 0, 0.2);
    }
    
    .album-card-actions {
      display: flex;
      gap: var(--space-2);
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    
    .album-card:hover .album-card-actions {
      opacity: 1;
    }
    
    .album-card-action-btn {
      width: 32px;
      height: 32px;
      padding: 0;
      background: #FFF8DC;
      border: 1px solid rgba(139, 0, 0, 0.2);
      border-radius: 8px;
      font-size: var(--font-size-base);
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .album-card-action-btn:hover {
      background: var(--color-primary);
      color: white;
      border-color: var(--color-primary);
      transform: scale(1.1);
    }
    
    @media (max-width: 1200px) {
      .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: var(--space-5);
      }
    }
    
    @media (max-width: 1024px) {
      .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--space-4);
      }
      
      .albums-grid-container {
        padding: var(--space-4);
      }
    }
    
    @media (max-width: 767px) {
      .albums-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
      }
      
      .albums-grid-header {
        flex-direction: column;
        align-items: flex-start;
      }
      
      .albums-grid-container {
        padding: var(--space-3);
      }
      
      .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-3);
      }
      
      .album-card-thumbnail {
        height: 200px;
      }
      
      .gallery-view {
        padding: var(--space-4);
      }
    }
    
    .album-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
    }
    
    .album-name {
      font-weight: var(--font-weight-semibold);
      font-size: var(--font-size-xl);
      color: var(--color-primary);
      flex: 1;
      line-height: 1.4;
      margin-bottom: var(--space-1);
    }
    
    .album-theme {
      color: var(--color-text-muted);
      font-size: var(--font-size-base);
      margin-top: var(--space-2);
      line-height: 1.5;
    }
    
    .album-meta {
      font-size: var(--font-size-sm);
      color: var(--color-text-muted);
      margin-top: var(--space-3);
      padding-top: var(--space-3);
      border-top: 1px solid var(--color-border);
      display: flex;
      align-items: center;
      gap: var(--space-2);
    }
    
    .album-actions {
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
      margin-top: var(--space-2);
    }
    
    .album-actions-primary {
      width: 100%;
    }
    
    .album-actions-secondary {
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
      width: 100%;
    }
    
    .album-actions-tertiary {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-2);
      width: 100%;
    }
    
    .album-actions button {
      padding: var(--space-3) var(--space-4);
      font-size: var(--font-size-base);
      font-weight: var(--font-weight-medium);
      border-radius: var(--radius-md);
      transition: all 0.2s ease;
      white-space: nowrap;
      width: 100%;
    }
    
    .album-actions button:hover {
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    .album-actions-primary button {
      padding: var(--space-4) var(--space-5);
      font-size: var(--font-size-lg);
      font-weight: var(--font-weight-semibold);
    }
    
    @media (max-width: 767px) {
      .album-actions-tertiary {
        grid-template-columns: 1fr;
        gap: var(--space-2);
      }
    }
    
    /* Modal Styles */
    .modal {
      display: none;
      position: fixed;
      z-index: 10000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      overflow: auto;
    }
    
    .modal.active {
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .modal-content {
      background-color: #FFF8DC;
      margin: auto;
      padding: var(--space-6);
      border-radius: var(--radius-lg);
      width: 90%;
      max-width: 500px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      position: relative;
      border: 1px solid rgba(139, 0, 0, 0.2);
    }
    
    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: var(--space-4);
    }
    
    .modal-header h3 {
      margin: 0;
      color: var(--color-primary);
    }
    
    .modal-close {
      font-size: 28px;
      font-weight: bold;
      color: var(--color-text-muted);
      cursor: pointer;
      line-height: 1;
    }
    
    .modal-close:hover {
      color: var(--color-text);
    }
    
    .modal-body {
      margin-bottom: var(--space-4);
    }
    
    .modal-footer {
      display: flex;
      gap: var(--space-3);
      justify-content: flex-end;
    }
    
    .form-group {
      margin-bottom: var(--space-4);
    }
    
    .form-group label {
      display: block;
      margin-bottom: var(--space-2);
      font-weight: var(--font-weight-semibold);
      color: var(--color-text);
    }
    
    .form-group input,
    .form-group textarea {
      width: 100%;
      padding: var(--space-3);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      font-size: var(--font-size-base);
      font-family: inherit;
    }
    
    .form-group input:focus,
    .form-group textarea:focus {
      outline: 2px solid rgba(139, 0, 0, 0.25);
      border-color: var(--color-primary);
    }
    
    /* Lightbox Modal */
    .lightbox-modal {
      display: none;
      position: fixed;
      z-index: 9999;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.9);
      cursor: pointer;
    }
    
    .lightbox-modal.active {
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .lightbox-content {
      max-width: 90%;
      max-height: 90%;
      object-fit: contain;
      cursor: default;
    }
    
    .lightbox-close {
      position: absolute;
      top: 20px;
      right: 40px;
      color: #fff;
      font-size: 40px;
      font-weight: bold;
      cursor: pointer;
      z-index: 10000;
    }
    
    .lightbox-close:hover {
      opacity: 0.7;
    }
    
    .lightbox-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      color: #fff;
      font-size: 30px;
      font-weight: bold;
      cursor: pointer;
      padding: 10px 20px;
      background: rgba(0, 0, 0, 0.5);
      border-radius: 4px;
      z-index: 10000;
    }
    
    .lightbox-nav:hover {
      background: rgba(0, 0, 0, 0.7);
    }
    
    .lightbox-prev {
      left: 20px;
    }
    
    .lightbox-next {
      right: 20px;
    }
    
    @media (max-width: 767px) {
      .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
      }
      
      .lightbox-nav {
        font-size: 24px;
        padding: 8px 16px;
      }
      
      .lightbox-prev {
        left: 10px;
      }
      
      .lightbox-next {
        right: 10px;
      }
    }

    /* ============================================
       SCROLL TO TOP BUTTON
       ============================================ */
    .scroll-to-top {
      position: fixed;
      bottom: 30px;
      right: 30px;
      width: 50px;
      height: 50px;
      background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
      color: white;
      border: 2px solid #DAA520;
      border-radius: 50%;
      display: none;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 999;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      font-size: 24px;
      font-weight: bold;
      line-height: 1;
      padding: 0;
    }

    .scroll-to-top:hover {
      background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
      color: #8B0000;
      transform: translateY(-5px) scale(1.1);
      box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
    }

    .scroll-to-top:active {
      transform: translateY(-3px) scale(1.05);
    }

    .scroll-to-top.visible {
      display: flex;
      animation: fadeInUp 0.5s ease-out;
    }

    @media (max-width: 768px) {
      .scroll-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
      }
    }

    /* ============================================
       READING PROGRESS INDICATOR
       ============================================ */
    .reading-progress {
      position: fixed;
      top: var(--navbar-height);
      left: 0;
      right: 0;
      width: auto;
      height: 3px;
      background: rgba(139, 0, 0, 0.1);
      z-index: 998;
      box-shadow: 0 2px 4px rgba(139, 0, 0, 0.3);
    }
    
    /* Reading progress - full width (no sidebar) */
    .reading-progress {
      left: 0;
      right: 0;
    }
    
    .reading-progress-fill {
      position: absolute;
      top: 0;
      left: 0;
      width: var(--progress-width, 0%);
      height: 100%;
      background: linear-gradient(90deg, #8B0000, #DAA520, #FFD700);
      transition: width 0.1s ease;
    }

    /* ============================================
       INLINE CLEANUP HELPERS
       ============================================ */
    .nav-item-hidden {
      display: none;
    }

    .about-map {
      text-align: center;
      margin: var(--space-6) 0;
    }

    .about-map iframe {
      border: 0;
      border-radius: var(--radius-md, 8px);
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
      max-width: 100%;
      width: 100%;
    }

    .about-note {
      margin-top: 16px;
      font-style: italic;
      color: #666;
      border-top: 1px solid #ddd;
      padding-top: 12px;
    }

    .external-link-icon {
      font-size: 12px;
      color: var(--color-text-muted, #6b7280);
    }

    .temple-heading {
      font-size: clamp(18px, 5vw, 24px);
    }

    .temple-card {
      background: #f8f5f0;
      padding: clamp(16px, 4vw, 20px);
      border-radius: 8px;
      margin: clamp(16px, 4vw, 20px) 0;
      border-left: 4px solid #d8b45c;
    }

    .temple-card-title-lg {
      font-size: clamp(20px, 6vw, 32px);
      font-weight: bold;
      text-align: center;
      margin-bottom: clamp(12px, 3vw, 15px);
      color: #8B4513;
    }

    .temple-card-title-md {
      font-size: clamp(18px, 5vw, 28px);
      font-weight: bold;
      text-align: center;
      margin-bottom: clamp(12px, 3vw, 15px);
      color: #8B4513;
    }

    .temple-text {
      font-size: clamp(14px, 4vw, 16px);
    }

    .temple-list {
      margin-left: clamp(16px, 4vw, 20px);
      line-height: 1.8;
      font-size: clamp(13px, 3.5vw, 15px);
    }

    .temple-note {
      margin-top: clamp(12px, 3vw, 15px);
      padding: clamp(12px, 3vw, 15px);
      background: #FFF8DC;
      border-radius: 5px;
      border: 1px solid #d8b45c;
      font-size: clamp(13px, 3.5vw, 15px);
    }

    .temple-summary {
      background: #fff5e6;
      padding: clamp(16px, 4vw, 20px);
      border-radius: 8px;
      margin: clamp(16px, 4vw, 20px) 0;
      border: 2px solid #d8b45c;
    }

    .news-section-title {
      color: #8B0000;
      font-size: clamp(20px, 4vw, 24px);
      margin-bottom: var(--space-4);
      border-bottom: 2px solid #DAA520;
      padding-bottom: var(--space-2);
    }

    .placeholder {
      text-align: center;
      padding: var(--space-8);
    }

    .placeholder--compact {
      padding: var(--space-4);
    }

    .placeholder--lg {
      padding: 40px;
    }

    .placeholder--muted {
      color: var(--color-text-muted, #6b7280);
    }

    .placeholder--error {
      color: #ef4444;
    }

    .section-intro {
      text-align: center;
      margin-bottom: 30px;
    }

    .section-intro-note {
      font-size: 14px;
      color: #666;
      margin-top: 8px;
      font-style: italic;
    }

    .link-underline {
      color: #8B0000;
      text-decoration: underline;
    }

    .doc-section {
      margin-bottom: 40px;
    }

    .doc-section-title {
      font-size: 24px;
      color: #8B0000;
      margin-bottom: 10px;
    }

    .doc-section-subtitle {
      color: #6b7280;
      font-size: 14px;
    }

    .doc-source-note {
      font-size: 14px;
      color: #6b7280;
      margin-top: 15px;
      margin-bottom: 20px;
      text-align: center;
    }

    .doc-source-link {
      color: #8B0000;
      text-decoration: none;
      font-weight: 600;
    }

    .doc-subsection-title {
      font-size: 20px;
      color: #8B0000;
      margin-bottom: 20px;
      text-align: center;
      padding-top: 20px;
      border-top: 2px solid #e0e0e0;
    }

    .doc-subsection-note {
      text-align: center;
      color: #6b7280;
      margin-bottom: 15px;
      font-size: 14px;
      font-style: italic;
    }

    .doc-subsection-note--spacious {
      margin-bottom: 25px;
    }

    .doc-center-block {
      text-align: center;
      margin-bottom: 25px;
    }

    .doc-drive-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #8B0000;
      color: white;
      padding: 12px 24px;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 600;
      transition: background 0.3s ease;
      font-size: 16px;
    }

    .doc-subsection-block {
      margin-bottom: 30px;
    }

    .doc-subsection-heading {
      font-size: 18px;
      color: #8B0000;
      margin-bottom: 20px;
      text-align: center;
      font-weight: 600;
    }

    .source-reference-block {
      margin-top: 40px;
      padding: 30px;
      background: #FFF8DC;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
      text-align: center;
    }

    .source-reference-note {
      font-size: 14px;
      color: #6b7280;
      margin-bottom: 10px;
    }

    .source-reference-text {
      font-size: 16px;
      margin: 0;
    }

    .source-reference-link {
      color: #8B0000;
      text-decoration: none;
      font-weight: 600;
      transition: color 0.3s ease;
      border-bottom: 1px solid transparent;
    }

    .source-reference-link:hover {
      border-bottom-color: #8B0000;
    }

    .source-reference-url {
      color: #6b7280;
    }

    .footer-login {
      margin-top: 20px;
    }

    .btn-footer-login {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #DAA520;
      color: #8B0000;
      padding: 10px 20px;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 600;
      transition: all 0.3s ease;
      font-size: 14px;
    }

    .reading-progress {
      --progress-width: 0%;
    }

    .suggestion-item--empty {
      color: #999;
      font-style: italic;
      cursor: default;
    }

    .suggestion-fm {
      color: #999;
      font-size: 12px;
    }

    .lineage-empty {
      padding: 20px;
      color: #666;
      text-align: center;
    }

    .lineage-timeline-row {
      display: flex;
      flex-direction: row;
      gap: 16px;
      width: 100%;
      margin-bottom: 16px;
    }

    .lineage-timeline-container {
      display: flex;
      flex-direction: column;
      width: 100%;
    }

    .lineage-timeline-wrapper {
      padding: 20px;
    }

    .lineage-timeline-title {
      color: #8B0000;
      margin-bottom: 20px;
    }

    .lineage-timeline-card {
      background: #FFF8DC;
      border-radius: 8px;
      padding: 16px 20px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      border: 1px solid #DAA520;
      position: relative;
    }

    .lineage-timeline-card--full {
      width: 100%;
      margin: 0 0 16px 0;
    }

    .lineage-timeline-card--half {
      width: calc(50% - 8px);
      margin: 0;
    }

    .lineage-card-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 10px;
    }

    .generation-badge {
      color: white;
      font-weight: 700;
      font-size: 13px;
      padding: 6px 16px;
      border-radius: 20px;
      white-space: nowrap;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
      display: inline-block;
      min-width: 70px;
      text-align: center;
    }

    .generation-badge--gen0 {
      background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    }

    .generation-badge--gen1 {
      background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    }

    .generation-badge--gen2 {
      background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    }

    .generation-badge--gen3 {
      background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%);
    }

    .generation-badge--gen4 {
      background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    }

    .generation-badge--gen5 {
      background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    }

    .generation-badge--gen6 {
      background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    }

    .generation-badge--gen-default {
      background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    }

    .lineage-card-title {
      color: #8B0000;
      font-weight: 700;
      font-size: 18px;
      margin: 0;
      flex: 1;
      line-height: 1.4;
    }

    .lineage-parent-info {
      color: #333;
      font-size: 14px;
      line-height: 1.6;
      margin-top: 6px;
    }

    .lineage-chain-name {
      color: #666;
      font-weight: 400;
    }

    .lineage-chain-name--current {
      color: #8B0000;
      font-weight: 600;
    }

    .tree-error {
      padding: 20px;
      color: #d32f2f;
      text-align: center;
    }

    .tree-error-note {
      margin-top: 10px;
      font-size: 14px;
      color: #666;
    }

    .search-status {
      padding: 10px;
    }

    .search-status--muted {
      color: #666;
    }

    .search-status--error {
      color: #d32f2f;
    }

    .search-result {
      padding: 10px;
      margin: 5px 0;
      background: #FFF8DC;
      border-radius: 6px;
      cursor: pointer;
      border-left: 3px solid #DAA520;
      border: 1px solid rgba(139, 0, 0, 0.1);
      transition: background 0.2s ease;
    }

    .search-result:hover {
      background: #FFE4B5;
    }

    .info-status {
      padding: 10px;
    }

    .info-status--muted {
      color: #666;
    }

    .info-status--error {
      color: #d32f2f;
    }

    .person-info-header {
      margin-bottom: 20px;
    }

    .person-info-name {
      color: #8B0000;
      margin-bottom: 10px;
      font-size: 20px;
    }

    .person-info-line {
      color: #666;
      margin-bottom: 5px;
    }

    .person-info-section {
      margin-bottom: 20px;
      padding: 15px;
      background: #f9f9f9;
      border-radius: 8px;
    }

    .person-info-section-title {
      color: #8B0000;
      margin-bottom: 10px;
      font-size: 16px;
    }

    .person-info-section-body {
      font-size: 14px;
      line-height: 1.8;
    }

    .person-info-depth {
      margin-bottom: 10px;
    }

    .person-info-depth-label {
      color: #666;
      font-size: 14px;
    }

    .person-info-depth-list {
      margin-left: 15px;
      font-size: 14px;
      line-height: 1.6;
    }

    .featured-post-thumbnail-placeholder {
      width: 100%;
      height: 200px;
      background: linear-gradient(135deg, #8B0000 0%, #DAA520 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 48px;
    }

    .category-main-post-image-placeholder {
      width: 120px;
      height: 120px;
      min-width: 120px;
      border-radius: 4px;
      background: linear-gradient(135deg, #8B0000 0%, #DAA520 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 48px;
      border: 1px solid rgba(139, 0, 0, 0.15);
    }

    .album-card-action-btn--danger {
      color: var(--color-error, #dc2626);
    }

    .album-empty {
      text-align: center;
      padding: var(--space-10);
      color: var(--color-text-muted);
    }

    .album-empty-icon {
      font-size: 64px;
      margin-bottom: var(--space-4);
    }

    .album-empty-title {
      font-size: var(--font-size-lg);
      margin-bottom: var(--space-2);
    }

    .album-empty-text {
      font-size: var(--font-size-base);
    }

    .toc-empty {
      padding: 10px;
      color: var(--color-text-muted);
      font-size: 14px;
    }

    .countdown-expired {
      color: #94A3B8;
    }

    .modal-content--sm {
      max-width: 400px;
      margin: 15% auto;
    }

    .modal-content--md {
      max-width: 450px;
      margin: 15% auto;
    }

    .modal-content--lg {
      max-width: 600px;
      margin: 5% auto;
    }

    .modal-title {
      margin: 0;
      color: var(--color-primary);
    }

    .modal-title--danger {
      color: #DC143C;
    }

    .form-label-primary {
      color: #8B0000;
      font-weight: 600;
    }

    .form-label-danger {
      color: #DC143C;
      font-weight: 600;
    }

    .input-accent {
      border: 2px solid #DAA520;
    }

    .input-danger {
      border: 2px solid #DC143C;
    }

    .input-textarea {
      resize: vertical;
    }

    .btn-flex {
      flex: 1;
    }

    .btn-sync {
      background: #28a745;
      color: white;
      margin-left: 10px;
    }

    .btn-cancel--dark {
      background: #757575;
      color: white;
    }

    .btn-save--primary {
      background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
      color: #FFD700;
    }

    .form-actions--spacious {
      margin-top: 30px;
    }

    .request-form-group {
      margin-bottom: 20px;
    }

    .request-person-summary {
      padding: 12px;
      background: #FFF8DC;
      border-radius: 6px;
      border: 1px solid rgba(139, 0, 0, 0.15);
    }

    .request-person-name {
      color: #8B0000;
    }

    .request-person-meta {
      color: #666;
    }

    .touch-target {
      min-height: 44px;
      min-width: 44px;
    }

    .touch-target--flex {
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .is-hidden {
      display: none !important;
    }

    /* Reading progress always full width */

    /* ============================================
       ENHANCED ANIMATIONS
       ============================================ */
    @keyframes fadeIn {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes slideInLeft {
      from {
        opacity: 0;
        transform: translateX(-30px);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    @keyframes pulse {
      0%, 100% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.05);
      }
    }

    /* Apply animations to sections - but don't override layout */
    section {
      animation: fadeInUp 0.6s ease-out;
    }

    section:nth-child(even) {
      animation: slideInLeft 0.6s ease-out;
    }
    
    /* Ensure section layout styles take precedence */
    section {
      /* Layout styles are defined above, this is just for animation */
    }

    /* Reduce animations on mobile for performance */
    @media (max-width: 768px) {
      * {
        animation-duration: 0.3s !important;
      }
    }

    /* ============================================
       ENHANCED HERO SECTION (#home)
       ============================================ */
    #home {
      min-height: 43vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #FFE4B5 0%, #FFF8DC 50%, #FFE4B5 100%);
      background-attachment: scroll;
      position: relative;
      color: #8B0000;
      text-align: center;
      padding: calc(var(--section-padding) / 2) 0;
      width: 100%;
      box-sizing: border-box;
      border: 4px solid #8B0000;
      border-radius: 8px;
      margin: var(--space-4) auto;
      max-width: calc(100% - var(--space-4) * 2);
      box-shadow: 
        0 0 0 2px rgba(139, 0, 0, 0.1),
        0 4px 12px rgba(139, 0, 0, 0.2),
        0 0 20px rgba(139, 0, 0, 0.15),
        inset 0 0 30px rgba(255, 215, 0, 0.1);
      animation: borderGlow 3s ease-in-out infinite;
    }
    
    @keyframes borderGlow {
      0%, 100% {
        box-shadow: 
          0 0 0 2px rgba(139, 0, 0, 0.1),
          0 4px 12px rgba(139, 0, 0, 0.2),
          0 0 20px rgba(139, 0, 0, 0.15),
          inset 0 0 30px rgba(139, 0, 0, 0.05);
      }
      50% {
        box-shadow: 
          0 0 0 2px rgba(139, 0, 0, 0.2),
          0 4px 16px rgba(139, 0, 0, 0.3),
          0 0 30px rgba(139, 0, 0, 0.25),
          inset 0 0 40px rgba(139, 0, 0, 0.1);
      }
    }
    
    @media (min-width: 1025px) {
      #home {
        min-height: 45vh;
      }
    }
    
    @media (max-width: 1024px) {
      #home {
        padding: 30px 0;
        margin: var(--space-3) auto;
        max-width: calc(100% - var(--space-3) * 2);
        border-width: 3px;
      }
    }
    
    @media (max-width: 768px) {
      #home {
        padding: 20px 0;
        min-height: 38vh;
        margin: var(--space-2) auto;
        max-width: calc(100% - var(--space-2) * 2);
        border-width: 3px;
      }
    }
    
    @media (max-width: 480px) {
      #home {
        padding: 20px 0;
        min-height: 35vh;
        margin: var(--space-2) auto;
        max-width: calc(100% - var(--space-2) * 2);
        border-width: 2px;
      }
    }

    /* Overlay removed for cleaner dark red background */
    
    /* Remove section separator from home */
    #home::before {
      display: none !important;
    }

    .hero-content {
      position: relative;
      z-index: 1;
      max-width: 95%;
      margin: 0 auto;
      animation: fadeInUp 1s ease-out;
      /* Ensure content is visible even if animation fails */
      opacity: 1;
      transform: translateY(0);
      padding: 0 var(--space-4);
      box-sizing: border-box;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-6);
      align-items: center;
      justify-content: center;
    }
    
    .hero-text-content {
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: var(--space-4);
    }
    
    .hero-image-container {
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      position: relative;
    }
    
    .hero-image {
      width: 100%;
      max-width: 100%;
      height: auto;
      object-fit: contain;
      border-radius: 12px;
      box-shadow: 
        0 8px 24px rgba(139, 0, 0, 0.25),
        0 4px 12px rgba(139, 0, 0, 0.15),
        0 0 40px rgba(218, 165, 32, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
      border: 3px solid rgba(139, 0, 0, 0.3);
      position: relative;
      z-index: 1;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .hero-image:hover {
      transform: translateY(-4px);
      box-shadow: 
        0 12px 32px rgba(139, 0, 0, 0.3),
        0 6px 16px rgba(139, 0, 0, 0.2),
        0 0 50px rgba(218, 165, 32, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    
    /* Decorative element below image */
    .hero-image-container::after {
      content: '';
      position: absolute;
      bottom: -20px;
      left: 50%;
      transform: translateX(-50%);
      width: 60%;
      height: 4px;
      background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(139, 0, 0, 0.3) 20%, 
        rgba(218, 165, 32, 0.6) 50%, 
        rgba(139, 0, 0, 0.3) 80%, 
        transparent 100%);
      border-radius: 2px;
      z-index: 0;
      animation: decorativeGlow 3s ease-in-out infinite;
    }
    
    @keyframes decorativeGlow {
      0%, 100% {
        opacity: 0.6;
        width: 60%;
      }
      50% {
        opacity: 1;
        width: 70%;
      }
    }
    
    /* Additional decorative lines */
    .hero-image-container::before {
      content: '';
      position: absolute;
      bottom: -30px;
      left: 50%;
      transform: translateX(-50%);
      width: 40%;
      height: 2px;
      background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(139, 0, 0, 0.2) 50%, 
        transparent 100%);
      border-radius: 1px;
      z-index: 0;
    }
    
    @media (max-width: 1024px) {
      .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-5);
      }
      
      .hero-image-container {
        order: -1;
      }
    }
    
    @media (max-width: 768px) {
      .hero-image {
        border-radius: 6px;
      }
    }
    
    @media (min-width: 1400px) {
      .hero-content {
        max-width: 1400px;
      }
    }
    
    @media (max-width: 1024px) {
      .hero-content {
        padding: 0 var(--space-3);
      }
    }
    
    @media (max-width: 768px) {
      .hero-content {
        padding: 0 var(--space-2);
      }
    }

    /* ============================================
       ENHANCED SECTION TITLES
       ============================================ */
    /* Note: .section-title styles are already defined earlier in the file */

    /* ============================================
       ENHANCED IMAGE STYLING
       ============================================ */
    .about-image img,
    section img {
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      max-width: 100%;
      height: auto;
    }

    .about-image img:hover,
    section img:hover {
      transform: scale(1.02);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    }

    /* Lazy loading image styles */
    img[loading="lazy"] {
      opacity: 1;
      transition: opacity 0.3s;
    }
    
    img[loading="lazy"].loaded {
      opacity: 1;
    }
    
    /* Ensure images in post content are always visible */
    .post-content img[loading="lazy"] {
      opacity: 1 !important;
    }

    /* TOC Sidebar enhancements removed - sidebar is hidden */

    /* ============================================
       ACCESSIBILITY IMPROVEMENTS
       ============================================ */
    /* Skip link */
    .skip-link {
      position: absolute;
      top: -40px;
      left: 16px;
      background: #111827;
      color: #fff;
      padding: 8px 12px;
      border-radius: 6px;
      text-decoration: none;
      z-index: 2000;
      transition: top 0.2s ease;
    }

    .skip-link:focus {
      top: 12px;
    }

    /* Enhanced focus states */
    *:focus {
      outline: 3px solid #DAA520;
      outline-offset: 2px;
    }

    button:focus,
    a:focus {
      outline: 3px solid #DAA520;
      outline-offset: 2px;
    }

    /* ============================================
       FOOTER - Modern Redesign
       ============================================ */

    footer.footer {
      background: linear-gradient(180deg, #8B0000 0%, #6E0000 100%) !important;
      color: #FFFFFF !important;
      padding: 64px 0 24px !important;
      margin-top: 80px !important;
      position: relative !important;
      overflow: hidden !important;
      width: 100% !important;
      clear: both !important;
      display: block !important;
      box-sizing: border-box !important;
    }
    
    /* Ensure footer is not affected by section or body background */
    body > footer.footer,
    main + footer.footer,
    section + footer.footer {
      background: linear-gradient(180deg, #8B0000 0%, #6E0000 100%) !important;
    }

    footer.footer::before {
      content: '' !important;
      position: absolute !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      height: 3px !important;
      background: linear-gradient(90deg, transparent, #FFD700, transparent) !important;
    }

    footer.footer .container {
      max-width: 1400px !important;
      margin: 0 auto !important;
      padding: 0 20px !important;
      position: relative !important;
      z-index: 1 !important;
    }

    footer.footer .footer-content {
      display: grid !important;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
      gap: 40px !important;
      margin-bottom: 40px !important;
    }

    footer.footer .footer-section {
      position: relative !important;
    }

    footer.footer .footer-section h3 {
      color: #FFD700 !important;
      font-size: 20px !important;
      font-weight: 700 !important;
      margin-bottom: 20px !important;
      padding-bottom: 12px !important;
      border-bottom: 2px solid rgba(255, 215, 0, 0.3) !important;
      position: relative !important;
      text-transform: uppercase !important;
      letter-spacing: 1px !important;
    }

    footer.footer .footer-section h3::after {
      content: '' !important;
      position: absolute !important;
      bottom: -2px !important;
      left: 0 !important;
      width: 50px !important;
      height: 2px !important;
      background: #FFD700 !important;
    }

    footer.footer .footer-section p {
      font-size: 16px !important;
      line-height: 1.8 !important;
      color: rgba(255, 255, 255, 0.9) !important;
      margin-bottom: 12px !important;
    }

    footer.footer .footer-section ul {
      list-style: none !important;
      padding: 0 !important;
      margin: 0 !important;
    }

    footer.footer .footer-section ul li {
      margin-bottom: 12px !important;
      position: relative !important;
      padding-left: 20px !important;
      transition: transform 0.2s ease !important;
    }

    footer.footer .footer-section ul li::before {
      content: '→' !important;
      position: absolute !important;
      left: 0 !important;
      color: #FFD700 !important;
      font-weight: bold !important;
      transition: transform 0.2s ease !important;
    }

    footer.footer .footer-section ul li:hover {
      transform: translateX(4px) !important;
    }

    footer.footer .footer-section ul li:hover::before {
      transform: translateX(4px) !important;
    }

    footer.footer .footer-section a {
      color: rgba(255, 255, 255, 0.85) !important;
      text-decoration: none !important;
      transition: all 0.3s ease !important;
      font-size: 16px !important;
      line-height: 1.8 !important;
      display: inline-block !important;
    }

    footer.footer .footer-section a:hover {
      color: #FFD700 !important;
      text-shadow: 0 0 8px rgba(255, 215, 0, 0.5) !important;
    }

    footer.footer .footer-login {
      margin-top: 20px !important;
    }

    footer.footer .btn-footer-login {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 8px !important;
      background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
      color: #8B0000 !important;
      padding: 12px 24px !important;
      border-radius: 8px !important;
      text-decoration: none !important;
      font-weight: 700 !important;
      font-size: 16px !important;
      transition: all 0.3s ease !important;
      box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
      border: 2px solid rgba(139, 0, 0, 0.1) !important;
    }

    footer.footer .btn-footer-login:hover {
      background: linear-gradient(135deg, #FFE55C 0%, #FFD700 100%) !important;
      transform: translateY(-2px) !important;
      box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5) !important;
      color: #8B0000 !important;
    }

    footer.footer .btn-footer-login:active {
      transform: translateY(0) !important;
    }

    footer.footer .countdown-section {
      display: grid !important;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
      gap: 24px !important;
      margin: 40px 0 !important;
      padding: 24px !important;
      background: rgba(0, 0, 0, 0.2) !important;
      border-radius: 12px !important;
      backdrop-filter: blur(10px) !important;
      border: 1px solid rgba(255, 215, 0, 0.2) !important;
    }

    footer.footer .countdown-item {
      text-align: center !important;
      padding: 24px !important;
      background: rgba(255, 255, 255, 0.05) !important;
      border-radius: 10px !important;
      border: 1px solid rgba(255, 215, 0, 0.15) !important;
      transition: all 0.3s ease !important;
      position: relative !important;
      overflow: hidden !important;
    }

    footer.footer .countdown-item::before {
      content: '' !important;
      position: absolute !important;
      top: 0 !important;
      left: -100% !important;
      width: 100% !important;
      height: 100% !important;
      background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent) !important;
      transition: left 0.5s ease !important;
    }

    footer.footer .countdown-item:hover {
      background: rgba(255, 255, 255, 0.08) !important;
      border-color: rgba(255, 215, 0, 0.3) !important;
      transform: translateY(-4px) !important;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
    }

    footer.footer .countdown-item:hover::before {
      left: 100% !important;
    }

    footer.footer .countdown-label {
      color: #FFD700 !important;
      font-size: 20px !important;
      font-weight: 700 !important;
      margin-bottom: 12px !important;
      text-transform: uppercase !important;
      letter-spacing: 0.5px !important;
    }

    footer.footer .countdown-date {
      color: rgba(255, 255, 255, 0.8) !important;
      font-size: 16px !important;
      margin-bottom: 20px !important;
      font-style: italic !important;
    }

    footer.footer .countdown-timer {
      display: flex !important;
      justify-content: center !important;
      align-items: center !important;
      gap: 8px !important;
      flex-wrap: wrap !important;
      font-size: 18px !important;
      color: #FFFFFF !important;
      font-weight: 600 !important;
    }

    footer.footer .countdown-value {
      display: inline-block !important;
      min-width: 50px !important;
      padding: 8px 12px !important;
      background: rgba(255, 215, 0, 0.15) !important;
      border-radius: 6px !important;
      color: #FFD700 !important;
      font-weight: 700 !important;
      font-size: 20px !important;
      border: 1px solid rgba(255, 215, 0, 0.2) !important;
      text-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
    }

    footer.footer .footer-bottom {
      padding-top: 24px !important;
      border-top: 2px solid rgba(255, 215, 0, 0.2) !important;
      text-align: center !important;
      font-size: 14px !important;
      color: rgba(255, 255, 255, 0.8) !important;
      margin-top: 24px !important;
    }

    footer.footer .footer-bottom p {
      margin: 0 !important;
      color: rgba(255, 255, 255, 0.9) !important;
      font-weight: 500 !important;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }

    @media (max-width: 1024px) {
      footer.footer .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
      }
      
      footer.footer .countdown-section {
        grid-template-columns: 1fr !important;
        padding: 20px !important;
      }
    }

    @media (max-width: 767px) {
      footer.footer {
        padding: 40px 0 20px !important;
      }
      
      footer.footer .footer-content {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
      }
      
      footer.footer .footer-section h3 {
        font-size: 18px !important;
        padding-bottom: 8px !important;
      }
      
      footer.footer .footer-section h3::after {
        width: 40px !important;
      }
      
      footer.footer .countdown-section {
        gap: 16px !important;
        padding: 16px !important;
      }
      
      footer.footer .countdown-item {
        padding: 20px !important;
      }
      
      footer.footer .countdown-label {
        font-size: 18px !important;
      }
      
      footer.footer .countdown-timer {
        font-size: 16px !important;
        gap: 4px !important;
      }
      
      footer.footer .countdown-value {
        min-width: 40px !important;
        padding: 4px 8px !important;
        font-size: 18px !important;
      }
      
      footer.footer .btn-footer-login {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 20px !important;
      }
      
      footer.footer .footer-bottom {
        padding-top: 16px !important;
        margin-top: 16px !important;
      }
    }

  
