/* Main Styles */

/* CSS Variables */
:root {
    --primary-color: #2C5F2D;
    --secondary-color: #8B4513;
    --bg-color: #F5F5DC;
    --text-color: #333;
    --text-light: #666;
    --white: #fff;
    --black: #000;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --overlay: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #2C5F2D 0%, #1a3a1b 100%);
    --gradient-secondary: linear-gradient(135deg, #8B4513 0%, #6B3410 100%);
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.tea-cup {
    position: relative;
    width: 80px;
    height: 60px;
    background: var(--bg-color);
    border-radius: 0 0 40px 40px;
    margin-bottom: 20px;
}

.steam {
    position: absolute;
    width: 8px;
    height: 30px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: steam 2s ease-in-out infinite;
}

.steam:nth-child(1) {
    left: 20px;
    animation-delay: 0s;
}

.steam:nth-child(2) {
    left: 36px;
    animation-delay: 0.5s;
}

.steam:nth-child(3) {
    left: 52px;
    animation-delay: 1s;
}

.loading p {
    color: var(--white);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(245, 245, 220, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow);
}

.nav.hidden {
    transform: translateY(-100%);
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 3px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-color);
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

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

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

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

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-secondary);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Main */
.main {
    margin-top: 70px;
}

/* Section */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    overflow: hidden;
}

.section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
}

.section-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 245, 220, 0.9);
}

.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 3px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-secondary);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    animation: zoomIn 20s ease-in-out infinite alternate;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 5px;
    text-shadow: 2px 2px 4px var(--shadow-dark);
}

.hero-divider {
    width: 100px;
    height: 2px;
    background: var(--white);
    margin: 2rem auto;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 3px;
}

.hero-desc {
    font-size: 1.3rem;
    line-height: 2;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-guide {
    font-size: 1.1rem;
    line-height: 2;
    opacity: 0.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 32px;
    height: 32px;
    display: block;
}

/* History Section */
.history-section {
    background: var(--bg-color);
}

.history-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.history-text {
    font-size: 1.2rem;
    line-height: 2.2;
    color: var(--text-color);
}

.history-main {
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
    padding: 0 5px;
}

.poem {
    color: var(--secondary-color);
    font-style: italic;
    font-weight: 500;
}

.history-timeline {
    position: relative;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 10px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-content p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Skills Section */
.skills-section {
    background: linear-gradient(135deg, #f5f5dc 0%, #e8e8d0 100%);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-item {
    background: var(--white);
    padding: 2rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.skill-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-dark);
}

.skill-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-name {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.skill-desc {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.skills-highlight {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.skills-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.highlight-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.skills-highlight p {
    font-size: 1.3rem;
    line-height: 2;
    position: relative;
    z-index: 1;
}

.emphasis {
    font-weight: 700;
    color: #FFD700;
    padding: 0 5px;
}

/* Heritage Section */
.heritage-section {
    background: var(--bg-color);
}

.heritage-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.heritage-image {
    text-align: center;
}

.image-frame {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-dark);
    margin-bottom: 1rem;
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

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

.image-caption {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
}

.heritage-text {
    font-size: 1.2rem;
    line-height: 2.2;
    color: var(--text-color);
}

.heritage-main {
    margin-bottom: 1.5rem;
}

.number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    padding: 0 5px;
}

/* Modern Section */
.modern-section {
    background: linear-gradient(135deg, #e8e8d0 0%, #f5f5dc 100%);
}

.modern-intro {
    font-size: 1.3rem;
    line-height: 2;
    text-align: center;
    color: var(--text-color);
    margin-bottom: 3rem;
}

.modern-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow-dark);
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: var(--white);
    padding: 3rem 2rem 2rem;
}

.carousel-caption h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.carousel-caption p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.carousel-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--primary-color);
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
    padding: 0;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.3);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.carousel-dots {
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

.modern-summary {
    font-size: 1.2rem;
    line-height: 2;
    text-align: center;
    color: var(--text-color);
}

/* Interact Section */
.interact-section {
    background: var(--gradient-primary);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6rem 0 0;
}

.interact-section .section-title {
    color: var(--white);
}

.interact-section .section-title::after {
    background: var(--white);
}

.interact-content {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}

.interact-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.interact-btn {
    background: var(--white);
    color: var(--primary-color);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-dark);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-height: 200px;
    justify-content: center;
}

.interact-btn:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-dark);
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
}

.interact-btn i {
    font-size: 3.5rem;
    transition: transform 0.3s ease;
}

.interact-btn:hover i {
    transform: scale(1.1);
}

.interact-btn span {
    font-size: 1.5rem;
    font-weight: 600;
}

.btn-desc {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.interact-seal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.seal-stamp {
    width: 140px;
    height: 140px;
    background: #CC0000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(5deg);
    box-shadow: 0 5px 20px rgba(204, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.seal-stamp:hover {
    transform: rotate(0deg) scale(1.05);
}

.seal-text {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 5px;
    writing-mode: vertical-rl;
}

.seal-caption {
    font-size: 1.3rem;
    line-height: 2.2;
    opacity: 0.95;
    text-align: center;
}

/* Footer */
.footer {
    width: 100%;
    padding: 3rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: var(--white);
    background: rgba(0, 0, 0, 0.1);
}

.footer p {
    margin-bottom: 0.8rem;
    opacity: 0.85;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    transition: opacity 0.3s ease;
    padding: 0.3rem 0.5rem;
}

.footer-links a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.footer-links span {
    opacity: 0.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 50px var(--shadow-dark);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-content textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid var(--bg-color);
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-family: inherit;
}

.modal-content textarea:focus {
    border-color: var(--primary-color);
}

.modal-submit {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 1.2rem;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.modal-submit:hover {
    transform: scale(1.05);
}

/* Lazy Image */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .history-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .interact-section {
        padding: 5rem 0 0;
    }

    .interact-buttons {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .interact-btn {
        padding: 2.5rem 2rem;
        min-height: 180px;
    }

    .seal-stamp {
        width: 120px;
        height: 120px;
    }

    .seal-text {
        font-size: 2rem;
    }

    .seal-caption {
        font-size: 1.2rem;
    }

    .footer {
        padding: 2.5rem 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(245, 245, 220, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 0;
        margin: 0;
        gap: 0;
        list-style: none;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 5px 15px var(--shadow);
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 1.2rem 5%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        text-align: left;
    }

    .nav-link::after {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-desc,
    .hero-guide {
        font-size: 1rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .carousel-container {
        height: 400px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .interact-section {
        padding: 4rem 0 0;
    }

    .interact-buttons {
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .interact-btn {
        padding: 2rem 1.5rem;
        min-height: 160px;
    }

    .interact-btn i {
        font-size: 3rem;
    }

    .interact-btn span {
        font-size: 1.3rem;
    }

    .btn-desc {
        font-size: 0.95rem;
    }

    .seal-stamp {
        width: 110px;
        height: 110px;
    }

    .seal-text {
        font-size: 1.8rem;
    }

    .seal-caption {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .footer {
        padding: 2rem 0 1.5rem;
    }

    .footer p {
        font-size: 0.95rem;
    }

    .footer-links {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .carousel-container {
        height: 300px;
    }

    .modal-content {
        padding: 2rem;
    }

    .interact-section {
        padding: 3rem 0 0;
    }

    .interact-section .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .interact-buttons {
        gap: 1.2rem;
        margin-bottom: 2rem;
    }

    .interact-btn {
        padding: 1.8rem 1.2rem;
        min-height: 140px;
        border-radius: 15px;
    }

    .interact-btn i {
        font-size: 2.5rem;
    }

    .interact-btn span {
        font-size: 1.2rem;
    }

    .btn-desc {
        font-size: 0.9rem;
    }

    .interact-seal {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .seal-stamp {
        width: 100px;
        height: 100px;
    }

    .seal-text {
        font-size: 1.6rem;
        letter-spacing: 3px;
    }

    .seal-caption {
        font-size: 1rem;
        line-height: 2;
    }

    .footer {
        padding: 1.5rem 0 1rem;
    }

    .footer p {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }

    .footer-links {
        font-size: 0.85rem;
        gap: 0.8rem;
    }
}

