/* ========================================
   MS 明山車業 - 前台形象首頁樣式
   ======================================== */

/* --- CSS Variables --- */
:root {
    --primary-dark: #0a0a0a;
    --secondary-dark: #1a1a1a;
    --tertiary-dark: #2d2d2d;
    --accent-gold: #c9a96e;
    --accent-gold-light: #d4b97a;
    --text-white: #ffffff;
    --text-light: #cccccc;
    --text-muted: #999999;
    --font-primary: 'Noto Sans TC', sans-serif;
    --font-display: 'Playfair Display', serif;
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-white);
    background-color: var(--primary-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

a {
    color: var(--accent-gold);
    transition: var(--transition-base);
}

a:hover {
    color: var(--accent-gold-light);
    text-decoration: none;
}

/* --- Section Common --- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.section-header .subtitle {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 15px;
    display: block;
}

.section-header .divider {
    width: 60px;
    height: 2px;
    background: var(--accent-gold);
    margin: 20px auto 0;
}

/* --- Navbar --- */
#mainNav {
    padding: 20px 0;
    transition: var(--transition-slow);
    background: transparent;
}

#mainNav.scrolled {
    padding: 10px 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-white) !important;
}

.brand-ms {
    color: var(--accent-gold);
    font-weight: 900;
    font-size: 1.6em;
    font-family: var(--font-display);
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin: 0 8px;
    position: relative;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--accent-gold) !important;
}

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

.navbar-toggler {
    border-color: var(--accent-gold);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(201,169,110, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/hero-storefront.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(10, 10, 10, 0.95) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content .hero-label {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--accent-gold);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInDown 1s ease 0.3s forwards;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 10px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.hero-content .hero-sub {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 3px;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
}

.hero-content .hero-phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 3px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease 1.2s forwards;
}

.hero-content .hero-phone i {
    font-size: 1.2rem;
}

.hero-cta {
    opacity: 0;
    animation: fadeInUp 1s ease 1.5s forwards;
}

.btn-gold {
    display: inline-block;
    padding: 14px 40px;
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: var(--transition-base);
    cursor: pointer;
}

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

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

.scroll-arrow {
    display: block;
    width: 30px;
    height: 30px;
    border-right: 2px solid var(--accent-gold);
    border-bottom: 2px solid var(--accent-gold);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.3; }
    50% { transform: rotate(45deg) translate(8px, 8px); opacity: 1; }
}

/* --- Services Section --- */
.services-section {
    background: var(--secondary-dark);
}

.service-card {
    text-align: center;
    padding: 50px 30px;
    background: var(--tertiary-dark);
    border: 1px solid rgba(201, 169, 110, 0.1);
    transition: var(--transition-slow);
    height: 100%;
}

.service-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card .icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    transition: var(--transition-base);
}

.service-card:hover .icon-wrapper {
    background: var(--accent-gold);
}

.service-card .icon-wrapper i {
    font-size: 2rem;
    color: var(--accent-gold);
    transition: var(--transition-base);
}

.service-card:hover .icon-wrapper i {
    color: var(--primary-dark);
}

.service-card h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* --- Brands Section --- */
.brands-section {
    background: var(--primary-dark);
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    height: 180px;
    opacity: 0.5;
    transition: var(--transition-slow);
    border: 1px solid transparent;
    cursor: default;
}

.brand-item:hover {
    opacity: 1;
    border-color: rgba(201, 169, 110, 0.3);
    background: rgba(201, 169, 110, 0.05);
    transform: translateY(-5px);
}

.brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: var(--transition-base);
}

.brand-item:hover .brand-logo {
    transform: scale(1.1);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-align: center;
    transition: var(--transition-base);
}

.brand-item:hover .brand-name {
    color: var(--accent-gold);
}

/* --- Facebook Section --- */
.facebook-section {
    background: var(--secondary-dark);
}

.fb-intro {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.fb-embed-wrapper {
    display: flex;
    justify-content: center;
    min-height: 600px;
}

.fb-embed-wrapper .fb-page {
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

/* --- About Section --- */
.about-section {
    background: var(--secondary-dark);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/hero-storefront.jpg') center/cover no-repeat fixed;
    opacity: 0.05;
}

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

.about-text {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 2;
    margin-bottom: 20px;
}

.about-highlight {
    display: inline-block;
    padding: 3px 0;
    border-bottom: 2px solid var(--accent-gold);
    color: var(--accent-gold);
}

.about-stats {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

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

.stat-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
    letter-spacing: 1px;
}

/* --- Contact Section --- */
.contact-section {
    background: var(--primary-dark);
}

.contact-info-card {
    padding: 40px;
    background: var(--tertiary-dark);
    border: 1px solid rgba(201, 169, 110, 0.15);
    height: 100%;
}

.contact-info-card h4 {
    color: var(--accent-gold);
    font-size: 1.1rem;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    color: var(--accent-gold);
    font-size: 1.1rem;
    margin-top: 3px;
    width: 20px;
    text-align: center;
}

.contact-item p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-item a {
    color: var(--text-light);
}

.contact-item a:hover {
    color: var(--accent-gold);
}

.map-wrapper {
    border: 1px solid rgba(201, 169, 110, 0.15);
    overflow: hidden;
    height: 100%;
    min-height: 350px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border: none;
    filter: grayscale(80%) contrast(1.1);
    transition: var(--transition-base);
}

.map-wrapper:hover iframe {
    filter: grayscale(0%) contrast(1);
}

/* --- Footer --- */
.site-footer {
    background: var(--secondary-dark);
    padding: 60px 0 20px;
    border-top: 1px solid rgba(201, 169, 110, 0.1);
}

.footer-info {
    margin-bottom: 30px;
}

.footer-info h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.footer-info h5 {
    font-size: 1rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-info p i {
    color: var(--accent-gold);
    width: 20px;
    margin-right: 8px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-gold);
    border-radius: 50%;
    color: var(--accent-gold);
    margin-right: 10px;
    transition: var(--transition-base);
}

.footer-social a:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

/* Scroll-triggered animations */
[data-animate] {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate="fadeInUp"] {
    transform: translateY(50px);
}

[data-animate="fadeInLeft"] {
    transform: translateX(-50px);
}

[data-animate="fadeInRight"] {
    transform: translateX(50px);
}

[data-animate="fadeIn"] {
    transform: none;
}

[data-animate="scaleIn"] {
    transform: scale(0.9);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Stagger children delay */
[data-stagger] > [data-animate]:nth-child(1) { transition-delay: 0.1s; }
[data-stagger] > [data-animate]:nth-child(2) { transition-delay: 0.2s; }
[data-stagger] > [data-animate]:nth-child(3) { transition-delay: 0.3s; }
[data-stagger] > [data-animate]:nth-child(4) { transition-delay: 0.4s; }
[data-stagger] > [data-animate]:nth-child(5) { transition-delay: 0.5s; }
[data-stagger] > [data-animate]:nth-child(6) { transition-delay: 0.6s; }

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 991px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .hero-sub {
        font-size: 1.1rem;
    }

    .section {
        padding: 70px 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .about-stats {
        gap: 30px;
    }

    .navbar-collapse {
        background: rgba(10, 10, 10, 0.98);
        padding: 20px;
        margin-top: 10px;
        border: 1px solid rgba(201, 169, 110, 0.1);
    }

    .nav-link {
        padding: 10px 0 !important;
        margin: 0;
    }
}

@media (max-width: 767px) {
    .hero-content h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .hero-content .hero-label {
        font-size: 0.85rem;
        letter-spacing: 4px;
    }

    .hero-content .hero-phone {
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 50px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .service-card {
        padding: 35px 25px;
    }

    .about-stats {
        justify-content: center;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .brand-item {
        height: 150px;
        padding: 20px 10px;
    }

    .brand-logo {
        width: 60px;
        height: 60px;
    }

    .brand-name {
        font-size: 0.8rem;
    }

    .fb-embed-wrapper {
        min-height: 400px;
    }

    .contact-info-card {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .btn-gold {
        padding: 12px 30px;
        font-size: 0.85rem;
    }
}
