/* 全域重置與基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'Arial', sans-serif;
    line-height: 1.6;
    color: #4a4a4a;
    background: linear-gradient(135deg, #f8faf8 0%, #e8f5e8 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導航列樣式 */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #6b8e6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #6b8e6b;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6b8e6b;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 主要內容區域 */
main {
    margin-top: 80px;
}

/* 首頁英雄區域 */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edd4 100%);
    color: #4a4a4a;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="100">🌾</text></svg>');
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    flex: 1;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 1s ease-out;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideInLeft 1s ease-out 0.2s backwards;
}

.cta-button {
    background: linear-gradient(135deg, #6b8e6b 0%, #8fa58f 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.3);
    animation: slideInLeft 1s ease-out 0.4s backwards;
}

.cta-button:hover {
    background: linear-gradient(135deg, #5a7d5a 0%, #7e947e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.4);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-banner {
    width: 100%;
    height: 350px;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInRight 1s ease-out;
    background: rgba(255, 255, 255, 0.1);
}

.rice-field-animation {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, #8bc34a, #4caf50);
    border-radius: 50%;
    position: relative;
    animation: pulse 3s ease-in-out infinite;
}

.rice-field-animation::before,
.rice-field-animation::after {
    content: '🌾';
    position: absolute;
    font-size: 3rem;
    animation: rotate 4s linear infinite;
}

.rice-field-animation::before {
    top: 20px;
    left: 20px;
}

.rice-field-animation::after {
    bottom: 20px;
    right: 20px;
    animation-delay: 2s;
}

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

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@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);
    }
}

/* 關於稻米區域 */
.about {
    padding: 5rem 0;
    background: linear-gradient(135deg, #fafafa 0%, #f0f8f0 100%);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #6b8e6b;
}

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

.about-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #6b8e6b;
}

.about-card p {
    color: #666;
    line-height: 1.8;
}

/* 可點擊卡片樣式 */
.about-card.clickable {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.about-card.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
}

.about-card.clickable::after {
    content: '→';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #6b8e6b;
    opacity: 0;
    transition: all 0.3s ease;
}

.about-card.clickable:hover::after {
    opacity: 1;
    right: 15px;
}

.click-hint {
    font-size: 0.8rem;
    color: #6b8e6b;
    background: rgba(107, 142, 107, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

/* 台灣特別品種區域 */
.taiwan-varieties {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    display: none;
    animation: slideDown 0.5s ease;
}

.taiwan-varieties.show {
    display: block;
}

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

.taiwan-varieties h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #6b8e6b;
}

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

.variety-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.variety-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #6b8e6b;
}

.variety-header {
    background: linear-gradient(135deg, #6b8e6b 0%, #8fa58f 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.variety-header h3 {
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
}

.origin {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.variety-content {
    padding: 1.5rem;
}

.variety-content p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.variety-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #6b8e6b;
    border: 1px solid rgba(107, 142, 107, 0.2);
    transition: all 0.3s ease;
}

.feature:hover {
    background: linear-gradient(135deg, #6b8e6b 0%, #8fa58f 100%);
    color: white;
    transform: scale(1.05);
}

/* 農民工作階段區域 */
.farmer-work {
    padding: 5rem 0;
    background: linear-gradient(135deg, #fef9f0 0%, #fef3e0 100%);
    display: none;
    animation: slideDown 0.5s ease;
}

.farmer-work.show {
    display: block;
}

.farmer-work h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #a67c52;
}

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

.stage-item {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.stage-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #a67c52;
    background: linear-gradient(135deg, #fffef9 0%, #fef9f0 100%);
}

.stage-icon {
    font-size: 3rem;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #a67c52 0%, #c4916f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(166, 124, 82, 0.3);
}

.stage-content {
    flex: 1;
}

.stage-content h3 {
    color: #a67c52;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.stage-content p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.stage-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #a67c52;
    border: 1px solid rgba(166, 124, 82, 0.2);
    transition: all 0.3s ease;
}

.detail:hover {
    background: linear-gradient(135deg, #a67c52 0%, #c4916f 100%);
    color: white;
    transform: scale(1.05);
}

/* 稻米品種區域 */
.varieties {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8faf8 0%, #e8f5e8 100%);
}

.varieties h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #6b8e6b;
}

.variety-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: white;
    border: 2px solid #6b8e6b;
    color: #6b8e6b;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.tab-btn:hover,
.tab-btn.active {
    background: linear-gradient(135deg, #6b8e6b 0%, #8fa58f 100%);
    color: white;
}

.variety-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.variety-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.variety-panel.active {
    display: block;
}

.variety-panel h3 {
    color: #6b8e6b;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.variety-panel p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.variety-panel ul {
    list-style: none;
}

.variety-panel li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #555;
}

.variety-panel li::before {
    content: '🌾';
    margin-right: 0.5rem;
}

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

/* 稻米文化區域 */
.culture {
    padding: 5rem 0;
    background: linear-gradient(135deg, #fafafa 0%, #f0f8f0 100%);
    position: relative;
    overflow: hidden;
}

.culture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="20" fill="%232c7a2c" opacity="0.05">🌾</text></svg>');
    background-size: 100px 100px;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.culture h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #6b8e6b;
    position: relative;
    z-index: 1;
}

.culture-timeline {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

.culture-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #6b8e6b 0%, #8fa58f 50%, #6b8e6b 100%);
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(107, 142, 107, 0.3);
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }
.timeline-item:nth-child(9) { animation-delay: 0.9s; }

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

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    background: #6b8e6b;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(107, 142, 107, 0.3);
    z-index: 2;
}

.timeline-year {
    background: linear-gradient(135deg, #6b8e6b 0%, #8fa58f 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-year:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.4);
}

.timeline-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 15px;
    flex: 1;
    margin: 0 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(44, 122, 44, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(107, 142, 107, 0.2);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #ffffff;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent #ffffff transparent transparent;
}

.timeline-content h3 {
    color: #6b8e6b;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.timeline-content p {
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* 聯絡我們區域 */
.contact {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8faf8 0%, #e8f5e8 100%);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #6b8e6b;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6b8e6b;
}

.submit-btn {
    background: linear-gradient(135deg, #6b8e6b 0%, #8fa58f 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #5a7d5a 0%, #7e947e 100%);
    transform: translateY(-2px);
}

/* 頁尾 */
footer {
    background: linear-gradient(135deg, #6b8e6b 0%, #8fa58f 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .variety-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .culture-timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        margin-bottom: 2rem;
    }
    
    .timeline-item::before {
        left: 20px;
    }
    
    .timeline-year {
        margin-bottom: 1rem;
        margin-left: 3rem;
        min-width: 100px;
    }
    
    .timeline-content {
        margin: 0 0 0 3rem;
        padding: 1.5rem;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .varieties-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .variety-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .variety-header h3 {
        font-size: 1.1rem;
    }
    
    .origin {
        font-size: 0.8rem;
    }
    
    .variety-content {
        padding: 1rem;
    }
    
    .variety-features {
        justify-content: center;
    }
    
    .feature {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .work-stages {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stage-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .stage-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin: 0 auto 1rem;
    }
    
    .stage-content h3 {
        font-size: 1.1rem;
    }
    
    .stage-details {
        justify-content: center;
    }
    
    .detail {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}
