/* 首頁專屬樣式 - 紅黑主題 */

/* 確保header和hero區塊之間無間距 */
body {
    margin: 0;
    padding: 0;
}

main {
    padding: 0;
    margin: 0;
}

/* 首頁特定：確保main元素無padding */
.main {
    padding: 0 !important;
}

:root {
    --primary-red: #e74c3c;
    --dark-red: #c0392b;
    --primary-black: #1a1a1a;
    --secondary-black: #2c2c2c;
    --text-light: #f0f0f0;
    --text-gray: #999;
    --accent-gold: #f39c12;
}

/* 英雄區塊 */
.hero {
    position: relative;
    min-height: 75vh;
    display: flex;
    align-items: center;
    background: var(--primary-black);
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.9) 0%, 
        rgba(231, 76, 60, 0.3) 50%,
        rgba(26, 26, 26, 0.95) 100%);
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--text-light);
    padding: 1.5rem;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-main {
    display: block;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--primary-red), var(--accent-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.title-sub {
    display: block;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    color: var(--text-light);
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.8;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn-hero {
    position: relative;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hero.btn-primary {
    background: var(--primary-red);
    color: white;
}

.btn-hero.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-red);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
}

.btn-hero:hover .btn-icon {
    transform: translateX(5px);
}

.btn-icon {
    transition: transform 0.3s ease;
}

/* 統計數據 */
.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

/* 滾動指示器 */
.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
}

.scroll-mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-red);
    border-radius: 25px;
    margin: 0 auto 1rem;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 10px;
    background: var(--primary-red);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-text {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 通用區塊樣式 */
section {
    padding: 4rem 0;
    position: relative;
}

/* 第一個section緊貼header */
section:first-of-type {
    margin-top: 0;
    padding-top: 0;
}

section:nth-child(even) {
    background: var(--secondary-black);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.title-decorator {
    color: var(--primary-red);
    font-size: 1.5rem;
    margin: 0 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* 精選攝影師輪播 */
.photographers-carousel {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.6s ease;
}

.photographer-card {
    flex-shrink: 0;
    width: 300px;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.card-front {
    background: var(--secondary-black);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.photographer-image {
    width: 100%;
    height: 60%;
    object-fit: cover;
}

.card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    color: white;
}

.photographer-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.photographer-era {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.card-back {
    background: linear-gradient(135deg, var(--dark-red), var(--primary-black));
    transform: rotateY(180deg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.photographer-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.photographer-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.style-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.card-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.card-link:hover {
    gap: 1rem;
}

/* 輪播控制按鈕 */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.carousel-btn:hover {
    background: var(--dark-red);
    transform: scale(1.1);
}

/* 攝影風格展示 */
.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.style-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: var(--secondary-black);
    transition: transform 0.3s ease;
}

.style-card:hover {
    transform: translateY(-10px);
}

.style-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.style-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.style-card:hover .style-image img {
    transform: scale(1.1);
}

.style-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.style-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.style-count {
    color: var(--primary-red);
    font-weight: 600;
}

.style-info {
    padding: 1.5rem;
    color: var(--text-light);
}

.style-info p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.style-link {
    color: var(--primary-red);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.style-link:hover {
    gap: 1rem;
}

/* 時間軸 */
.photography-timeline {
    background: var(--primary-black);
}

.timeline-container {
    position: relative;
    padding: 3rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0;
    background: var(--primary-red);
    transform: translateX(-50%);
}

.timeline-items {
    position: relative;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
}

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

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--primary-red);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px var(--primary-black), 0 0 0 6px var(--primary-red);
}

.timeline-content {
    flex: 0 0 45%;
    padding: 2rem;
    background: var(--secondary-black);
    border-radius: 10px;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.timeline-item:nth-child(even) .timeline-content {
    text-align: right;
}

.timeline-content h3 {
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-gray);
}

.timeline-item::after {
    content: attr(data-year);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-black);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    border: 2px solid var(--primary-red);
}

/* 作品畫廊 */
.works-gallery {
    background: var(--secondary-black);
}

.gallery-wrapper {
    position: relative;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(231, 76, 60, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.work-year {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* 濾鏡按鈕 */
.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-red);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-red);
    color: white;
    transform: translateY(-2px);
}

/* 學習路徑 */
.learning-path {
    background: var(--primary-black);
}

.path-container {
    position: relative;
    padding: 4rem 0;
}

.path-line {
    height: 200px;
    margin-bottom: -100px;
}

.path-svg {
    width: 100%;
    height: 100%;
}

.path-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.path-step {
    text-align: center;
    padding: 2rem;
    background: var(--secondary-black);
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.path-step:hover {
    border-color: var(--primary-red);
    transform: translateY(-10px);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-red);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.path-step h3 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.path-step p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.step-link {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
}

/* CTA區塊 */
.cta-section {
    background: linear-gradient(135deg, var(--dark-red), var(--primary-black));
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.btn-cta {
    background: white;
    color: var(--primary-red);
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.3);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-cta:hover .btn-arrow {
    transform: translateX(5px);
}

/* 裝飾元素 */
.cta-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -100px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -50px;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 10%;
}

/* 動畫按鈕 */
.btn-animated {
    position: relative;
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    padding: 1rem 2rem;
    font-weight: 600;
    overflow: hidden;
    transition: color 0.3s ease;
}

.btn-animated .btn-bg {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-red);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-animated:hover {
    color: white;
}

.btn-animated:hover .btn-bg {
    left: 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
        padding-top: 0;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .title-main {
        font-size: 3rem;
    }
    
    .title-sub {
        font-size: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .styles-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: column;
    }
    
    .timeline-content {
        text-align: center !important;
    }
    
    .path-steps {
        grid-template-columns: 1fr;
    }
    
    .cta-title {
        font-size: 2rem;
    }
}

/* 載入動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}