/* ============================================
   CSS Variables & Root Styling
   ============================================ */
:root {
    --primary-dark: #00000f;
    --secondary-dark: #0a0a0a;
    --accent-gold: #D4A574;
    --accent-light-gold: #E6B800;
    --text-light: #D4A574;
    --text-muted: #a0826d;
    --border-color: rgba(212, 165, 116, 0.25);
    --transition-smooth: all 0.3s ease;
    --glow-shadow: 0 0 20px rgba(212, 165, 116, 0.35);
}

/* ============================================
   Global Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ============================================
   Navigation Bar
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-gold);
}

.logo-image {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(230, 194, 0, 0.3));
}

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

.nav-links a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--accent-light-gold);
}

.language-toggle {
    margin-left: 1rem;
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}

.lang-btn {
    background: none;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.lang-btn:hover {
    background-color: var(--accent-gold);
    color: #000000;
}

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

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) contrast(1.2);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.hero-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.2));
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

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

.hero-logo-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon-svg {
    width: 100%;
    height: 100%;
}

.hero-icon-glow {
    animation: glow-pulse 3s ease-in-out infinite;
}

.glowing-circle {
    display: none;
}

.hero-logo {
    display: none;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), inset 0 0 30px rgba(212, 175, 55, 0.2);
    }
    50% {
        box-shadow: 0 0 50px rgba(212, 175, 55, 0.8), inset 0 0 50px rgba(212, 175, 55, 0.4);
    }
}

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

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

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

@keyframes flash {
    0% {
        opacity: 0;
        filter: brightness(1.5);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.2);
    }
    100% {
        opacity: 1;
        filter: brightness(1);
    }
}

/* Animation trigger class */
.animate-in {
    animation: fadeInUp 0.6s ease-out forwards !important;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Button Styles
   ============================================ */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-light-gold);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
}

.btn-secondary:hover {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
}

/* ============================================
   Section Common Styles
   ============================================ */
section {
    padding: 5rem 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 2rem;
    text-align: center;
    color: var(--accent-gold);
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.section-title.light {
    color: var(--text-light);
}

.section-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    color: var(--text-muted);
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

/* ============================================
   About Section
   ============================================ */
.about {
    background-color: var(--primary-dark);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-image {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.2);
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: var(--transition-smooth);
}

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

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

.value-card {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-smooth);
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.value-card:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
}

.value-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

.value-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
}

.value-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================================
   Pillars Section
   ============================================ */
.pillars {
    background-color: var(--primary-dark);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.pillar-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(26, 40, 71, 0.5) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.pillar-image {
    margin: -2.5rem -2.5rem 1.5rem -2.5rem;
    width: calc(100% + 5rem);
    height: 250px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

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

.pillar-card:hover .pillar-image img {
    transform: scale(1.08);
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 10;
}

.pillar-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.15);
    transform: translateY(-8px);
}

.pillar-card:hover::before {
    transform: scaleX(1);
}

.pillar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

/* SVG icons inherit color via currentColor */
.value-icon svg,
.pillar-icon svg {
    width: 48px;
    height: 48px;
    display: block;
}

.pillar-card h3 {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.pillar-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 400;
}

.pillar-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.pillar-list {
    list-style: none;
}

.pillar-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pillar-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: bold;
}

/* ============================================
   Why Nanyang Section
   ============================================ */
.why-nanyang {
    background-color: var(--primary-dark);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.why-image {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.2);
    animation: fadeInLeft 0.8s ease-out;
}

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

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

.why-text {
    text-align: left;
    animation: fadeInRight 0.8s ease-out;
}

.why-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 6vw, 2.8rem);
    margin-bottom: 2.5rem;
    color: var(--accent-gold);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    background-color: var(--primary-dark);
    border-top: 1px solid var(--border-color);
}

.contact-intro {
    font-size: 1.05rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* Google表单容器样式 */
.contact iframe {
    width: 100%;
    max-width: 640px;
    height: 542px;
    border: none;
    margin: 0 auto;
    display: block;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.2);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: #0a0a0a;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
}

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

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-logo-image {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(230, 194, 0, 0.3));
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.footer-nav a:hover {
    color: var(--accent-gold);
}

.footer-legal {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-legal a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-legal a:hover {
    text-decoration: underline;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        max-height: 400px;
    }

    .language-toggle {
        margin-left: 0;
        border-left: none;
        padding-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    section {
        padding: 3rem 0;
    }

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

    .pillars-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .values-grid {
        grid-template-columns: 1fr;
    }

    .logo-text,
    .footer-logo .logo-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }

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

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

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

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-logo-wrapper {
        width: 130px;
        height: 130px;
    }

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

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --primary-dark: #000000;
        --secondary-dark: #0a0a0a;
        --accent-gold: #D4A574;
        --text-light: #D4A574;
        --text-muted: #a0826d;
        --border-color: rgba(212, 165, 116, 0.25);
    }

    body {
        background-color: var(--primary-dark);
        color: var(--text-light);
    }

    .navbar {
        background-color: rgba(0, 0, 0, 0.95);
    }

    .value-card,
    .pillar-card {
        background: rgba(212, 175, 55, 0.08);
    }
}
