/**
 * STBA 前台樣式表
 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --body-bg: #ffffff;
    --header-bg: #1a1a2e;
    --footer-bg: #16213e;
}

/* Base Styles */
body {
    font-family: 'Noto Sans TC', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--body-bg);
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
.site-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark-color);
}

.site-header .navbar-brand:hover {
    color: var(--dark-color);
}

.site-header .navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

.site-header .navbar-nav .nav-item {
    margin: 0 0.1rem;
    position: relative;
}

.site-header .navbar-nav .nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.1rem;
    top: 50%;
    transform: translateY(-50%);
    height: 1rem;
    width: 1px;
    background-color: #ccc;
}

.site-header .nav-link {
    color: #212529 !important;
    font-weight: 500;
    padding: 0.75rem 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: #000 !important;
    background-color: #f0f0f0;
    border-radius: 6px;
}

.site-header .dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.site-header .dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Hero Banner */
.hero-banner {
    position: relative;
    overflow: hidden;
}

.hero-banner .swiper {
    width: 100%;
    height: 500px;
}

.hero-banner .swiper-slide {
    position: relative;
    background-size: cover;
    background-position: center;
}

.hero-banner .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26,26,46,0.7) 0%, rgba(22,33,62,0.5) 100%);
}

.hero-banner .slide-content {
    position: absolute;
    bottom: 20%;
    left: 10%;
    max-width: 600px;
    color: #fff;
    z-index: 10;
}

.hero-banner .slide-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-banner .slide-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-banner .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.hero-banner .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.section-title p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.section.bg-light {
    background-color: var(--light-color);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    font-weight: 600;
}

/* Event Card */
.event-card .event-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    z-index: 5;
}

.event-card .event-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-card .event-date .month {
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Company Card */
.company-card .company-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    position: absolute;
    top: -40px;
    left: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Company Card - Large Logo (for homepage) */
.company-card .company-logo-lg {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.company-card .card-body {
    padding-top: 50px;
}

/* Store Card */
.store-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

a.store-card {
    color: inherit;
}

/* Team Card */
.team-card {
    text-align: center;
}

.team-card .team-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 55%;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 55%;
}

.timeline-item .timeline-marker {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-item.milestone .timeline-marker {
    width: 30px;
    height: 30px;
    background: var(--warning-color);
    box-shadow: 0 0 0 3px var(--warning-color);
}

.timeline-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.timeline-year {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Member Login */
.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-box {
    max-width: 420px;
    width: 100%;
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}

.login-box .form-control {
    padding: 12px 15px;
    border-radius: 8px;
}

.login-box .btn-primary {
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 30px;
}

.site-footer h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 20px;
}

.site-footer a {
    color: rgba(255,255,255,0.7);
}

.site-footer a:hover {
    color: #fff;
}

.site-footer .footer-links {
    list-style: none;
    padding: 0;
}

.site-footer .footer-links li {
    margin-bottom: 10px;
}

.site-footer .footer-links li i {
    margin-right: 8px;
    color: var(--primary-color);
}

.site-footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-right: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.site-footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.site-footer .copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 991px) {
    .site-header .navbar-nav .nav-item::after {
        display: none;
    }

    .hero-banner .swiper {
        height: 400px;
    }

    .hero-banner .slide-content {
        left: 5%;
        right: 5%;
        max-width: none;
    }

    .hero-banner .slide-content h2 {
        font-size: 1.8rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 70px;
        margin-right: 0;
        text-align: left;
    }

    .timeline-item .timeline-marker {
        left: 30px;
    }
}

@media (max-width: 576px) {
    .hero-banner .swiper {
        height: 300px;
    }

    .section {
        padding: 50px 0;
    }

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

/* Utility */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #6610f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color), #6610f2);
    border: none;
    color: #fff;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #0b5ed7, #520dc2);
    color: #fff;
}
