/* --- START OF FILE style.css --- */

/**
 * IAICA Website - Modern Stylesheet
 * 
 * This stylesheet implements a modern, responsive design with:
 * - CSS custom properties (variables) for consistent theming
 * - Smooth animations and transitions
 * - Mobile-first responsive design
 * - Accessibility considerations (ARIA, focus states)
 * - Multi-language font support
 * 
 * @author IAICA Development Team
 * @version 2.0
 */

/* =====================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ===================================================== */

/**
 * Modern Color Variables
 * Defines the color palette using gradients and solid colors
 * Gradient pairs are used for buttons, headers, and accents
 */
:root {
    /* Modern color palette */
    --primary-gradient-start: #667eea;
    --primary-gradient-end: #764ba2;
    --secondary-gradient-start: #f093fb;
    --secondary-gradient-end: #f5576c;
    --accent-gradient-start: #4facfe;
    --accent-gradient-end: #00f2fe;
    
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --accent-color: #4facfe;
    --accent-hover: #00d4ff;
    
    --bg-light: #ffffff;
    --bg-subtle: #f8f9fa;
    --bg-card: #ffffff;
    
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #ffffff;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.2);
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-family-chinese: 'Noto Sans TC', '思源黑體', '微軟正黑體', sans-serif;
    --font-family-english: 'Inter', 'Roboto', 'Open Sans', sans-serif;
    --font-family-spanish: 'Inter', 'Roboto', 'Open Sans', sans-serif;
}

body {
    font-family: var(--font-family-chinese);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Language specific body class */
body.lang-en-US {
    font-family: var(--font-family-english);
}
body.lang-zh-TW {
    font-family: var(--font-family-chinese);
}
body.lang-es-ES {
    font-family: var(--font-family-spanish);
}


header {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    padding: 15px 0 25px 0;
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

/* Language Switcher Styles */
.language-switcher {
    text-align: right;
    padding: 8px 30px;
    font-size: 0.9em;
}
.language-switcher a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 8px;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    font-weight: 500;
    opacity: 0.8;
}
.language-switcher a:hover, .language-switcher a.active-lang {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
    font-weight: 600;
    transform: translateY(-1px);
}


main {
    position: relative;
    padding-top: 700px; /* 与 Hero 区高度一致 */
}

/* 导航栏样式调整 */
#main-nav {
    display: flex;
    justify-content: center;
    position: relative;
    margin-top: 8px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    margin: 5px 15px;
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    display: inline-block;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform var(--transition-base);
}

.nav-link:hover::before {
    transform: translateX(0);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* 导航卡片容器样式 */
#nav-cards-container {
    position: absolute;
    top: 60px; /* Adjusted based on new header layout */
    left: 0;
    width: 100%;
    z-index: 90; 
    pointer-events: none;
}

/* 导航卡片样式 */
.nav-card {
    display: none;
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    margin-top: 15px;
    text-align: center;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-30px);
    transition: all var(--transition-slow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.nav-card.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.nav-card h2 {
    font-size: 2em;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.nav-card p {
    color: var(--text-secondary);
    margin-bottom: 35px;
    line-height: 1.8;
    font-size: 1.05em;
}

.nav-card a {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition-base);
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.nav-card a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* 首页链接特殊样式 */
#home-link {
    background-color: transparent;
    border: none; 
    font-weight: bold; 
}

/* Hero 区样式 */
#hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 700px;
    overflow: hidden;
    transition: all var(--transition-slow);
}

#hero.hidden {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
}

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

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%);
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomIn 20s ease-in-out infinite alternate;
}

@keyframes zoomIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}


.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 30px;
    z-index: 2;
}

.hero-overlay h1 {
    font-size: 3.5em;
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
    letter-spacing: -0.5px;
}

.hero-overlay p {
    font-size: 1.4em;
    font-weight: 400;
    max-width: 800px;
    margin-bottom: 35px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.2s both;
    line-height: 1.6;
}

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


/* 通用区块描述段落样式 */
.section-description {
    color: var(--text-secondary);
    max-width: 800px;
    margin: 20px auto 50px auto;
    line-height: 1.8;
    text-align: center;
    font-size: 1.15em;
    font-weight: 400;
}

/* 各 Section 标题居中醒目 */
section > h2 {
    font-size: 2.8em;
    text-align: center;
    font-weight: 700;
    margin-bottom: 50px;
    position: relative;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

section > h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-gradient-start), var(--accent-gradient-end));
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.4);
}


/* 核心价值区域 */
#core-values {
    background: var(--bg-light);
    padding: 80px 20px;
}

#core-values .section-description {
    margin-bottom: 70px;
}

.values-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.value-item {
    flex: 1;
    min-width: 280px;
    padding: 50px 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: all var(--transition-base);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.value-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-gradient-start), var(--primary-gradient-end));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

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

.value-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.value-item img {
    width: 280px;
    height: 280px;
    margin-bottom: 30px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: transform var(--transition-base);
    border-radius: var(--border-radius-lg);
}

.value-item:hover img {
    transform: scale(1.05) rotate(2deg);
}

.value-item h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.value-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05em;
}


/* 故事案例区域 */
#story-wall {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    padding: 90px 20px;
    position: relative;
}

#story-wall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="white" opacity="0.3"/></svg>');
    opacity: 0.5;
}

#story-wall .section-description {
    color: var(--text-primary);
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

#story-wall > h2 {
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

#story-wall > h2::after {
    background: linear-gradient(90deg, var(--accent-gradient-start), var(--accent-gradient-end));
}


.story-categories {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.category-button {
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.1em;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.category-button.active, .category-button:hover {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}


.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(48%, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.story-item {
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.story-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}


.story-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.story-item:hover img {
    transform: scale(1.1);
}

.story-item h3 {
    font-size: 1.4em;
    margin: 30px 25px;
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 600;
}

.story-item p {
    margin: 0 25px 30px 25px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05em;
}

.story-item a {
    display: block;
    padding: 18px 28px;
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    color: var(--text-light);
    text-decoration: none;
    text-align: center;
    border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
    transition: all var(--transition-base);
    font-weight: 600;
    font-size: 1.05em;
}

.story-item a:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-gradient-end));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


/*  加入我们区样式调整 (This section seems to have been removed from HTML, if needed, uncomment and adjust) */
/*
#join-us {
    padding: 100px 20px; 
    text-align: center;
    background-color: var(--primary-color-light-blue);
}

#join-us h2 {
    font-size: 3em; 
    margin-bottom: 50px; 
    color: var(--secondary-color-white); 
}

#join-us h2::after { 
    background-color: var(--secondary-color-white);
}


#join-us .section-description {
    color: var(--secondary-color-white); 
    margin-bottom: 60px; 
    font-size: 1.2em; 
}


.join-buttons {
    display: flex;
    justify-content: center;
    gap: 40px; 
    flex-wrap: wrap;
}

.join-group {
    flex: 1;
    min-width: 300px; 
    padding: 40px; 
    background-color: var(--secondary-color-white);
    border-radius: 15px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08); 
    text-align: center;
    transition: transform 0.3s ease; 
}

.join-group:hover {
    transform: translateY(-5px); 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); 
}


.join-group h3 {
    font-size: 1.7em; 
    margin-bottom: 30px; 
    color: var(--text-color-dark);
}

.join-group p {
    color: var(--text-color-gray);
    margin-bottom: 40px; 
    line-height: 1.7; 
}
*/


/* 按钮样式 */
.primary-button, .secondary-button, .outline-button {
    display: inline-block;
    padding: 16px 40px;
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.primary-button::before, .secondary-button::before, .outline-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.primary-button:hover::before, .secondary-button:hover::before, .outline-button:hover::before {
    width: 300px;
    height: 300px;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    color: var(--text-light);
    border: none;
}

.secondary-button {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.outline-button {
    border: 2px solid var(--text-light);
    color: var(--text-light);
    background-color: transparent;
}

.primary-button:hover, .secondary-button:hover, .outline-button:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}


/* 隐藏类 */
.hidden {
    display: none !important;
    opacity: 0;
    transition: all 0.3s ease;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    padding: 50px 30px;
    text-align: center;
    border-top: none;
    color: var(--text-light);
    font-size: 0.98em;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

footer p {
    line-height: 1.9;
    margin-bottom: 18px;
    opacity: 0.95;
}


footer a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
}

footer a:hover {
    border-bottom: 2px solid var(--text-light);
    opacity: 1;
}

.social-links {
    margin-top: 30px;
    text-align: center;
}

.social-links a {
    display: inline-block;
    margin: 0 18px;
    border-bottom: none;
}

.social-links img {
    width: 40px;
    height: 40px;
    opacity: 0.85;
    transition: all var(--transition-base);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
}

.social-links img:hover {
    opacity: 1;
    transform: translateY(-5px) scale(1.15);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
}


/* 响应式设计 */
@media (max-width: 768px) {
    #main-nav {
        flex-direction: column;
        text-align: center;
    }

    #main-nav a {
        margin: 8px 0;
    }
    
    .language-switcher {
        text-align: center;
        padding-bottom: 12px;
    }
    
    #nav-cards-container {
        top: 100px;
    }

    #hero {
        min-height: 500px;
    }

    .hero-overlay h1 {
        font-size: 2.2em;
    }

    .hero-overlay p {
        font-size: 1.1em;
    }

    .values-grid {
        flex-direction: column;
    }

    .story-grid {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    }
    
    section > h2 {
        font-size: 2.2em;
    }
    
    .nav-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero-overlay h1 {
        font-size: 1.8em;
    }
    
    .hero-overlay p {
        font-size: 1em;
    }
    
    section > h2 {
        font-size: 1.8em;
    }
    
    .story-categories {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}
/* --- END OF FILE style.css --- */