/* CSS Custom Properties */
:root {
    /* Colors - Professional Blue and White Theme */
    --primary-blue: 220 38% 47%;         /* Professional Blue */
    --secondary-blue: 220 25% 65%;       /* Light Blue */
    --accent-blue: 220 50% 35%;          /* Dark Blue */
    --blue-light: 220 20% 85%;           /* Very Light Blue */
    --white: 0 0% 100%;                  /* Pure White */
    --off-white: 0 0% 98%;               /* Soft White */
    --light-gray: 0 0% 95%;              /* Light Gray */
    --medium-gray: 0 0% 85%;             /* Medium Gray */
    --dark-gray: 0 0% 20%;               /* Dark Gray */
    --text-dark: 0 0% 15%;               /* Text Dark */
    --text-light: 0 0% 40%;              /* Text Light */

    /* Typography */
    --font-chinese: 'Noto Serif SC', serif;
    --font-primary: 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 5rem 0;
    --container-padding: 0 1rem;
    --border-radius: 0.5rem;

    /* Shadows */
    --shadow-light: 0 2px 10px hsla(0, 0%, 0%, 0.1);
    --shadow-medium: 0 4px 20px hsla(0, 0%, 0%, 0.15);
    --shadow-heavy: 0 8px 30px hsla(0, 0%, 0%, 0.2);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: hsl(var(--text-dark));
    background-color: hsl(var(--white));
    overflow-x: hidden;
    width: 100%;
}

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

.section {
    display: block;
    width: 100%;
    padding: var(--section-padding);
    position: relative;
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-chinese);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
    color: hsl(var(--text-light));
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-medium);
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background-color: hsl(var(--primary-blue));
    color: hsl(var(--white));
    border-color: hsl(var(--primary-blue));
}

.btn-primary:hover {
    background-color: hsl(var(--accent-blue));
    border-color: hsl(var(--accent-blue));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background-color: transparent;
    color: hsl(var(--primary-blue));
    border-color: hsl(var(--primary-blue));
}

.btn-secondary:hover {
    background-color: hsl(var(--primary-blue));
    color: hsl(var(--white));
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: hsla(var(--white), 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid hsl(var(--light-gray));
    transition: var(--transition-medium);
}

.navbar.scrolled {
    background-color: hsl(var(--white));
    box-shadow: var(--shadow-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.nav-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background: transparent;
    transition: var(--transition-medium);
}

.logo-text {
    font-family: var(--font-chinese);
    font-weight: 700;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: hsl(var(--primary-blue));
}

/* Language Toggle */
.language-toggle {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.lang-btn {
    background: hsl(var(--primary-blue));
    color: hsl(var(--white));
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn:hover {
    background: hsl(var(--accent-blue));
    transform: translateY(-2px);
}

.lang-text {
    font-family: var(--font-chinese);
}

/* Hero Logo Styling */
.hero-logo-img {
    width: 100px;
    height: 200px;
    object-fit: contain;
    background: transparent !important;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: var(--transition-medium);
}

.hero-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
}

/* Nav menu as horizontal list */
.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu > li {
    position: relative;
}
.has-submenu > .submenu-arrow {
    margin-left: 4px;
}
.has-submenu .submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    min-width: 140px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 0 0 8px 8px;
    z-index: 1001;
    padding: 0.5em 0;
    list-style: none;
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
    display: block;
}
.submenu-link {
    display: block;
    padding: 0.5em 1.5em;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.submenu-link:hover,
.submenu-link.active {
    background: #f0f0f0;
    color: #1a4a7a;
}
@media (max-width: 991px) {
    .nav-menu {
        flex-direction: column;
    }
    .has-submenu .submenu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
        padding-left: 1.5em;
    }
}

.nav-link {
    text-decoration: none;
    color: hsl(var(--text-dark));
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: hsl(var(--primary-blue));
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: hsl(var(--primary-blue));
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: hsl(var(--text-dark));
    margin: 2px 0;
    transition: var(--transition-fast);
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, hsl(var(--white)), hsl(var(--off-white)));
    padding-top: 80px;
    padding-bottom: 2rem;
    width: 100%;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Floating Chinese Lanterns */
.floating-lanterns {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.chinese-lantern {
    position: absolute;
    font-size: 2rem;
    opacity: 0.7;
    animation: lanternFloat 8s ease-in-out infinite;
}

.chinese-lantern.lantern-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.chinese-lantern.lantern-2 {
    top: 25%;
    right: 15%;
    animation-delay: 1.5s;
}

.chinese-lantern.lantern-3 {
    top: 45%;
    left: 5%;
    animation-delay: 3s;
}

.chinese-lantern.lantern-4 {
    top: 60%;
    right: 8%;
    animation-delay: 4.5s;
}

.chinese-lantern.lantern-5 {
    top: 75%;
    left: 20%;
    animation-delay: 6s;
}

.chinese-lantern.lantern-6 {
    top: 80%;
    right: 25%;
    animation-delay: 7.5s;
}

@keyframes lanternFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.6; 
    }
    25% { 
        transform: translateY(-15px) rotate(2deg); 
        opacity: 0.8; 
    }
    50% { 
        transform: translateY(-25px) rotate(-1deg); 
        opacity: 0.9; 
    }
    75% { 
        transform: translateY(-10px) rotate(1deg); 
        opacity: 0.7; 
    }
}

/* Hero Content - Mobile-first responsive design */
.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 1200px;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    width: 100%;
}

/* Main layout area - responsive behavior */
.hero-main-layout-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    margin-bottom: 1rem;
}

/* Decorative text - hidden on mobile, shown on larger screens */
.hero-decorative-text-left,
.hero-decorative-text-right {
    display: none;
}

.vertical-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: var(--font-chinese);
}

.vertical-text span {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: hsl(var(--text-dark));
    font-weight: 500;
    text-align: center;
}

/* Title group */
.hero-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

/* Hero Logo */
.hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.logo-circle {
    width: clamp(150px, 30vw, 220px);
    height: clamp(150px, 30vw, 220px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow-heavy);
    animation: logoGlow 3s ease-in-out infinite;
    overflow: hidden;
    border: 4px solid hsl(var(--primary-blue));
    transition: transform 0.3s ease;
}

.logo-circle:hover {
    transform: scale(1.05);
}

.hero-logo-img {
    width: 35%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@keyframes logoGlow {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    50% { 
        box-shadow: 0 12px 35px hsla(var(--primary-blue), 0.5), 
                    0 0 20px hsla(var(--primary-blue), 0.3);
    }
}

.hero-text-section {
    text-align: center;
    width: 100%;
}

.hero-chinese-title {
    font-family: var(--font-chinese);
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    color: hsl(var(--text-dark));
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    word-wrap: break-word;
    hyphens: auto;
}

.hero-english-subtitle {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    color: hsl(var(--text-light));
    font-weight: 500;
    letter-spacing: 1px;
    margin: 0;
    text-transform: uppercase;
    word-wrap: break-word;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    align-items: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid hsl(var(--primary-blue));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
          }
  }

/* Hero Intro Text */
.hero-intro-text {
    width: 100%;
    padding: 2rem;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: linear-gradient(135deg, hsla(var(--white), 0.95), hsla(var(--off-white), 0.95));
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    animation: fadeInUp 0.8s ease forwards;
}

.intro-line {
    font-family: var(--font-chinese);
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 2;
    color: hsl(var(--text-dark));
    text-align: justify;
    padding: 0.5rem 1rem;
    border-left: 3px solid hsl(var(--primary-blue));
    background: hsla(var(--white), 0.7);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: var(--transition-medium);
}

.intro-line:hover {
    transform: translateX(5px);
    background: hsla(var(--white), 0.9);
    border-left-width: 5px;
}

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

/* Media Queries for Hero Intro Text */
@media (max-width: 768px) {
    .hero-intro-text {
        padding: 1.5rem;
        margin-top: 1.5rem;
        gap: 1rem;
    }
    
    .intro-line {
        line-height: 1.8;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-intro-text {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .intro-line {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* Section Header Styles */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-chinese);
    color: hsl(var(--text-dark));
    margin-bottom: 1rem;
    position: relative;
}

.chinese-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.knot-design {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, hsl(var(--primary-blue)), hsl(var(--secondary-blue)), hsl(var(--primary-blue)));
    border-radius: 2px;
    position: relative;
}

.knot-design::before,
.knot-design::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid hsl(var(--primary-blue));
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.knot-design::before {
    left: -10px;
}

.knot-design::after {
    right: -10px;
}

/* About Section */
.section .container {
    max-width: 100%;
    padding: 0 2rem;
}

.about {
    background-color: hsl(var(--off-white));
    width: 100%;
}

.about-content {
    width: 100%;
    max-width: 100%;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.about-card {
    background: hsl(var(--white));
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
    opacity: 0;
    transform: translateY(30px);
    width: 100%;
    margin: 0 auto;
}

.about-card-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
}

.about-image {
    flex: 0 0 400px;
    height: 300px;
    overflow: hidden;
}

.about-text-content {
    flex: 1;
}

.about-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.about-card h3 {
    color: hsl(var(--primary-blue));
    margin-bottom: 1rem;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

@media (max-width: 768px) {
    .about-card-content {
        flex-direction: column;
    }
    
    .about-image {
        flex: 0 0 auto;
        width: 100%;
        height: 250px;
        margin: 0 auto 2rem;
    }
}

/* Vision & Mission Section */
.vision-mission {
    background-color: hsl(var(--white));
}

.vm-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.vm-card {
    background: linear-gradient(135deg, hsl(var(--off-white)), hsl(var(--white)));
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border-left: 4px solid hsl(var(--primary-blue));
    transition: var(--transition-medium);
    opacity: 0;
    transform: translateY(30px);
}

.vm-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.vm-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.vm-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, hsl(var(--primary-blue)), hsl(var(--secondary-blue)));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: hsl(var(--white));
    font-size: 1.5rem;
}

.vm-card h3 {
    color: hsl(var(--text-dark));
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.vision-intro, .mission-intro {
    font-size: 1.1rem;
    color: hsl(var(--text-light));
    line-height: 1.8;
    padding: 1rem;
    background: hsla(var(--primary-blue), 0.05);
    border-radius: 8px;
    border-left: 3px solid hsl(var(--primary-blue));
    margin-bottom: 1rem;
}

.vision-content, .mission-content {
    text-align: left;
}

.vision-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-left: 0.5rem;
}

.vision-item strong {
    color: hsl(var(--primary-blue));
    font-size: 1rem;
    font-weight: 600;
}

.vision-item span {
    color: hsl(var(--text-light));
    font-size: 0.9rem;
    line-height: 1.4;
}

.vm-list {
    list-style: none;
    margin-bottom: 2rem;
}

.vm-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
}

.vm-list li i {
    color: hsl(var(--primary-blue));
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.vm-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: hsl(var(--text-light));
}

.vm-list i {
    color: hsl(var(--primary-red));
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.vm-goals,
.mission-purpose {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(var(--light-gray));
}

.vm-goals h4,
.mission-purpose h4 {
    color: hsl(var(--primary-red));
    margin-bottom: 1rem;
}

.goal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.goal-tag {
    background: hsl(var(--primary-red));
    color: hsl(var(--white));
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Organization Structure - Modern Hierarchical Design */
.organization {
    background-color: hsl(var(--off-white));
    padding: 5rem 0;
}

.org-chart-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.org-chart {
    background-color: hsl(var(--white));
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
}

.org-chart-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--border-radius);
}

.org-note {
    background-color: #000;
    color: hsl(var(--white));
    padding: 1rem 2rem;
    text-align: center;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
}

/* Modern Organizational Cards */
.org-card-modern {
    background: hsl(var(--white));
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 15px hsla(var(--primary-blue), 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid hsl(var(--blue-light));
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.org-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: hsl(var(--primary-blue));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.org-card-modern:hover::before {
    transform: scaleY(1);
}

.org-card-modern.visible {
    opacity: 1;
    transform: translateY(0);
}

.org-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px hsla(var(--primary-blue), 0.3);
    border-color: hsl(var(--primary-blue));
}

/* Blue Icon Styling */
.org-icon-blue {
    width: 50px;
    height: 50px;
    background: hsl(var(--primary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: hsl(var(--white));
    font-size: 1.2rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.org-card-modern:hover .org-icon-blue {
    transform: scale(1.1);
    background: hsl(var(--white));
    color: hsl(var(--primary-blue));
}

.org-card-modern h4 {
    color: hsl(var(--text-dark));
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    position: relative;
    z-index: 2;
    transition: color 0.4s ease;
}

.org-card-modern:hover h4 {
    color: hsl(var(--white));
}

/* Organizational Levels Layout */
.org-level-1,
.org-level-2,
.org-level-3,
.org-level-4,
.org-level-5 {
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease forwards;
}

.org-level-1 {
    display: flex;
    justify-content: center;
    animation-delay: 0.1s;
}

.org-level-1 .org-card-modern {
    max-width: 200px;
}

.org-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.org-level-2 {
    animation-delay: 0.2s;
}

.org-level-2 .org-card-modern {
    max-width: 180px;
}

.org-level-3 {
    animation-delay: 0.3s;
}

.org-level-3 .org-card-modern {
    max-width: 160px;
}

.org-level-4,
.org-level-5 {
    animation-delay: 0.4s;
}

.org-level-4 .org-card-modern,
.org-level-5 .org-card-modern {
    max-width: 140px;
}

/* Staggered Animation for Cards */
.org-card-modern[data-level="1"] {
    animation-delay: 0.1s;
}

.org-card-modern[data-level="2"]:nth-child(1) {
    animation-delay: 0.2s;
}

.org-card-modern[data-level="2"]:nth-child(2) {
    animation-delay: 0.25s;
}

.org-card-modern[data-level="3"]:nth-child(1) {
    animation-delay: 0.3s;
}

.org-card-modern[data-level="3"]:nth-child(2) {
    animation-delay: 0.35s;
}

.org-card-modern[data-level="3"]:nth-child(3) {
    animation-delay: 0.4s;
}

.org-card-modern[data-level="4"]:nth-child(1) {
    animation-delay: 0.45s;
}

.org-card-modern[data-level="4"]:nth-child(2) {
    animation-delay: 0.5s;
}

.org-card-modern[data-level="4"]:nth-child(3) {
    animation-delay: 0.55s;
}

.org-card-modern[data-level="4"]:nth-child(4) {
    animation-delay: 0.6s;
}

.org-card-modern[data-level="5"]:nth-child(1) {
    animation-delay: 0.65s;
}

.org-card-modern[data-level="5"]:nth-child(2) {
    animation-delay: 0.7s;
}

.org-card-modern[data-level="5"]:nth-child(3) {
    animation-delay: 0.75s;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* President Section */
.president {
    background-color: hsl(var(--white));
}

.president-content {
    display: flex;
    justify-content: center;
}

.president-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    background-color: hsl(var(--off-white));
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.president-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.president-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, hsl(var(--primary-blue)), hsl(var(--secondary-blue)));
}

.president-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.president-image {
    position: relative;
}

.president-photo {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 4px solid hsl(var(--primary-blue));
    box-shadow: var(--shadow-medium);
    transition: var(--transition-medium);
    display: block;
}

.president-photo:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.president-photo-placeholder {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, hsl(var(--light-gray)), hsl(var(--off-white)));
    border-radius: var(--border-radius);
    border: 4px solid hsl(var(--primary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: hsl(var(--text-light));
}

.president-name {
    color: hsl(var(--primary-blue));
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.president-title {
    color: hsl(var(--text-light));
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.president-description p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    text-align: left;
}

.president-achievements {
    background-color: hsl(var(--white));
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.president-achievements h4 {
    color: hsl(var(--primary-blue));
    margin-bottom: 1rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: hsl(var(--text-light));
    padding: 0.5rem 0;
}

.achievement-item i {
    color: hsl(var(--primary-blue));
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Section Subtitle */
.section-subtitle {
    text-align: center;
    color: hsl(var(--text-light));
    font-size: 1.1rem;
    margin-top: 1rem;
    font-style: italic;
}

/* Activities Section */
.activities {
    background-color: hsl(var(--off-white));
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.activity-card {
    background: hsl(var(--white));
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
    opacity: 0;
    transform: translateY(30px);
    overflow: hidden;
}

.activity-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.activity-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-medium);
}

.activity-image:hover img {
    transform: scale(1.05);
}

.activity-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, hsl(var(--light-gray)), hsl(var(--off-white)));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: hsl(var(--text-light));
}

.activity-content {
    padding: 2rem;
}

.activity-content h3 {
    color: hsl(var(--text-dark));
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.activity-content p {
    color: hsl(var(--text-light));
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.activity-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.activity-tag {
    background: hsl(var(--primary-red));
    color: hsl(var(--white));
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Cultural Committees Section - Clean Professional Design */
.committees {
    background-color: hsl(var(--white));
    padding: 5rem 0;
}

.committees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.committee-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: hsl(var(--off-white));
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid hsl(var(--light-gray));
    opacity: 0;
    transform: translateY(20px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.committee-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: hsl(var(--primary-blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.committee-item:hover::before {
    transform: scaleX(1);
}

.committee-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.committee-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px hsla(var(--primary-blue), 0.25);
    border-color: hsl(var(--primary-blue));
}

.committee-icon {
    width: 45px;
    height: 45px;
    background: hsl(var(--primary-blue));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--white));
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.committee-item:hover .committee-icon {
    transform: scale(1.1);
    background: hsl(var(--white));
    color: hsl(var(--primary-blue));
}

.committee-name {
    color: hsl(var(--text-dark));
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.3;
    position: relative;
    z-index: 2;
    transition: color 0.4s ease;
}

.committee-item:hover .committee-name {
    color: hsl(var(--white));
}

.activity-list {
    list-style: none;
    text-align: left;
}

.activity-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid hsl(var(--light-gray));
    color: hsl(var(--text-light));
    position: relative;
    padding-left: 1.5rem;
}

.activity-list li:before {
    content: '•';
    color: hsl(var(--primary-red));
    position: absolute;
    left: 0;
    font-weight: bold;
}

.activity-list li:last-child {
    border-bottom: none;
}

/* Contact Section */
.contact {
    background-color: hsl(var(--white));
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

.contact-card {
    background: hsl(var(--off-white));
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
    opacity: 0;
    transform: translateY(30px);
}

.contact-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, hsl(var(--primary-red)), hsl(var(--gold-accent)));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: hsl(var(--white));
    font-size: 1.5rem;
}

.contact-card h3 {
    color: hsl(var(--text-dark));
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-form {
    background: hsl(var(--off-white));
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: hsl(var(--text-dark));
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid hsl(var(--light-gray));
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition-fast);
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: hsl(var(--primary-red));
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Social Links */
.social-links {
    text-align: center;
}

.social-links h3 {
    color: hsl(var(--text-dark));
    margin-bottom: 1.5rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, hsl(var(--primary-red)), hsl(var(--gold-accent)));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--white));
    text-decoration: none;
    transition: var(--transition-medium);
    font-size: 1.2rem;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-medium);
}

/* Footer */
.footer {
    background-color: hsl(var(--dark-gray));
    color: hsl(var(--white));
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: hsl(var(--white));
    margin-bottom: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo .logo-placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
}

.footer-logo-img {
    width: 60%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background: transparent;
    mix-blend-mode: normal !important;
    transition: var(--transition-medium);
}

.footer-logo .logo-placeholder:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.footer-logo-text {
    font-family: var(--font-chinese);
    font-weight: 700;
    font-size: 1.5rem;
    color: hsl(var(--white));
}

.footer-description {
    color: hsl(var(--light-gray));
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: hsl(var(--light-gray));
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: hsl(var(--white));
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: hsl(var(--light-gray));
}

.footer-contact i {
    color: hsl(var(--primary-red));
    width: 20px;
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--text-light));
    color: hsl(var(--light-gray));
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

.scale-in {
    animation: scaleIn 0.6s ease forwards;
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, hsl(var(--primary-red)), hsl(var(--gold-accent)));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Responsive Media Queries */

/* Mobile First - Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .hero-buttons {
        flex-direction: row;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    :root {
        --container-padding: 0 2rem;
        --section-padding: 6rem 0;
    }
    
    .nav-container {
        height: 100px;
        padding: 0 2rem;
    }
    
    .nav-logo-img {
        width: 80px;
        height: 80px;
    }
    
    .hero {
        padding-top: 100px;
    }
    
    .hero-main-layout-area {
        flex-direction: row;
        gap: 3rem;
    }
    
    .hero-decorative-text-left,
    .hero-decorative-text-right {
        display: flex;
        gap: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .vm-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .president-details {
        grid-template-columns: 1fr 1fr;
    }

    .footer-logo .logo-placeholder {
        width: 80px;
        height: 80px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex !important;
    }
    
    .hero-decorative-text-left,
    .hero-decorative-text-right {
        gap: 2rem;
    }
    
    .activities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .activities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .committees-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile responsiveness for new sections */
@media (max-width: 768px) {
    .hero-buttons {
        justify-content: center !important;
        align-items: center !important;
        flex-direction: column;
        width: 100%;
        margin: 0 auto;
    }
    
    .btn {
        min-width: 200px;
        text-align: center;
    }
    
    .president-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    
    .president-photo,
    .president-photo-placeholder {
        height: 280px;
    }
    
    .president-name {
        font-size: 2rem;
        text-align: center;
    }
    
    .president-title {
        text-align: center;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .committees-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .committee-item {
        padding: 1rem;
    }
    
    .committee-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .committee-name {
        font-size: 1rem;
    }
    
    .org-row {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .org-card-modern {
        max-width: 250px !important;
        width: 100%;
    }

    .footer-logo-img {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile Navigation */
@media (max-width: 991px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: hsl(var(--white));
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu a {
        padding: 1rem;
        display: block;
        border-bottom: 1px solid hsl(var(--light-gray));
    }
    
    .nav-menu a:last-child {
        border-bottom: none;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }

    .footer-logo .logo-placeholder {
        width: 80px;
        height: 80px;
    }
}

/* Fix for very small screens */
@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-content {
        padding: 0 0.5rem;
    }
    
    .about-card,
    .vm-card,
    .contact-form {
        padding: 1.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-buttons,
    .scroll-indicator,
    .social-links,
    .floating-lanterns {
        display: none;
    }
    
    .hero {
        padding-top: 0;
        min-height: auto;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-red: 0 0% 0%;
        --text-light: 0 0% 20%;
        --light-gray: 0 0% 80%;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-behavior {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
.nav-link:focus,
.btn:focus,
input:focus,
textarea:focus,
.social-link:focus {
    outline: 2px solid hsl(var(--primary-red));
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero-text {
    font-family: var(--font-chinese);
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 2;
    color: hsl(var(--text-dark));
    text-align: justify;
    margin: 2rem auto 0;
    padding: 0 2rem;
    max-width: 1200px;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .hero-text {
        padding: 0 1.5rem;
        line-height: 1.8;
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-text {
        padding: 0 1rem;
        font-size: 0.9rem;
        line-height: 1.6;
        margin-top: 1rem;
    }
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.about-list li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.about-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: hsl(var(--primary-blue));
    font-size: 1.5em;
    line-height: 1;
}

.about-list li strong {
    display: block;
    color: hsl(var(--text-dark));
    font-size: 1.1em;
    margin-bottom: 0.5rem;
}

.about-list li p {
    margin: 0.5rem 0;
    color: hsl(var(--text-light));
    line-height: 1.6;
}

.departments {
    background-color: hsl(var(--white));
    padding: 4rem 0;
}

.departments-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2rem;
}

.departments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.department-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.1rem;
    color: hsl(var(--text-dark));
}

.department-number {
    flex-shrink: 0;
    color: hsl(var(--primary-blue));
    font-weight: 600;
}

.department-text {
    line-height: 1.6;
}

@media (max-width: 768px) {
    .departments-grid {
        flex-direction: column;
        gap: 2rem;
    }
    
    .departments-list {
        width: 100%;
    }
    
    .department-item {
        font-size: 1rem;
    }
}

.mermaid {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem;
    background-color: white;
}

.mermaid svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Ensure text is readable in diagram nodes */
.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node polygon,
.mermaid .node path {
    fill: #ffffff;
    stroke: #1a73e8;
    stroke-width: 2px;
}

.mermaid .node text {
    font-family: "Noto Serif SC", serif;
    font-size: 14px;
    fill: #000000;
}

.mermaid .edgePath .path {
    stroke: #1a73e8;
    stroke-width: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mermaid {
        padding: 0.5rem;
    }
    
    .mermaid .node text {
        font-size: 12px;
    }
}

.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.timeline-scroll {
    max-height: 800px;
    overflow-y: auto;
    padding-right: 1.5rem;
    margin-right: -0.5rem;
}

.timeline-year {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-year h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding-top: 1rem;
}

.timeline-items {
    padding-left: 1.5rem;
}

.timeline-item {
    position: relative;
    padding: 1.5rem 0 1.5rem 2rem;
    border-left: 2px solid #e0e0e0;
    margin-left: 1rem;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background-color: #f8f9fa;
    border-left-color: var(--primary-color);
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 2rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-item:hover:before {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.2);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.timeline-content {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1rem;
}

/* Custom scrollbar for timeline */
.timeline-scroll::-webkit-scrollbar {
    width: 8px;
}

.timeline-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.timeline-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.timeline-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline-container {
        padding: 1rem;
    }

    .timeline-scroll {
        max-height: 600px;
        padding-right: 1rem;
    }

    .timeline-year h3 {
        font-size: 1.5rem;
    }

    .timeline-item {
        padding: 1rem 0 1rem 1.5rem;
    }

    .timeline-date {
        font-size: 1rem;
    }

    .timeline-content {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* Animation for timeline items */
.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

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

/* OVERRIDES: Make all section headings black after hero section */
.section-title,
.about-card h3,
.vm-card h3,
.president-achievements h4,
.activity-content h3,
.committee-name,
.contact-card h3,
.social-links h3,
.timeline-year h3,
.timeline-date {
  color: hsl(var(--text-dark)) !important;
}

/* If any heading (h2, h3, h4) is inside .section but not inside .hero, force black */
.section h2,
.section h3,
.section h4 {
  color: hsl(var(--text-dark)) !important;
}

/* Timeline year and date (fix for custom var usage) */
.timeline-year h3,
.timeline-date {
  color: hsl(var(--text-dark)) !important;
  border-bottom: 2px solid hsl(var(--text-dark)) !important;
}

/* Gallery submenu styles */
.nav-link.has-submenu {
  position: relative;
}
.submenu-arrow {
  font-size: 0.7em;
  margin-left: 4px;
}
.submenu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  min-width: 140px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-radius: 0 0 8px 8px;
  z-index: 1001;
  padding: 0.5em 0;
  list-style: none;
}
.nav-link.has-submenu:hover .submenu,
.nav-link.has-submenu:focus-within .submenu {
  display: block;
}
.submenu-link {
  display: block;
  padding: 0.5em 1.5em;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.submenu-link:hover,
.submenu-link.active {
  background: #f0f0f0;
  color: #1a4a7a;
}
/* Responsive: stack submenu for mobile if needed */
@media (max-width: 991px) {
  .submenu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    min-width: 0;
    padding-left: 1.5em;
  }
}

