/* ==========================================
   EXON Industrial Website - Custom Styles
   ========================================== */

:root {
    --primary-color: #E67E22;
    --secondary-color: #2C3E50;
    --accent-color: #F39C12;
    --dark-gray: #34495E;
    --light-gray: #95A5A6;
    --text-gray: #7F8C8D;
    --bg-light: #ECF0F1;
    --bg-dark: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Noto Sans TC', sans-serif;
    color: var(--secondary-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================
   Navigation Bar
   ========================================== */
#mainNav {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-gray));
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#mainNav.scrolled {
    padding: 0.5rem 0;
    background: rgba(44, 62, 80, 0.98);
}

.navbar-brand img {
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 500;
    padding: 0.5rem 1.2rem !important;
    position: relative;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* ==========================================
   Hero Slider
   ========================================== */
.hero-slider {
    margin-top: 76px;
}

.carousel-item {
    height: 90vh;
    min-height: 500px;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    animation: zoomInSlow 8s ease-out forwards;
}

@keyframes zoomInSlow {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}
.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    text-align: center;
}

.carousel-caption h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.carousel-caption p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(230, 126, 34, 0.8);
    border-radius: 50%;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* ==========================================
   Page Header
   ========================================== */
.page-header {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-gray));
    color: #fff;
    padding: 8rem 0 4rem;
    margin-top: 76px;
    text-align: center;
    position: relative;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.page-header .breadcrumb {
    background: transparent;
    padding: 0;
}

.page-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.page-header .breadcrumb-item a:hover {
    color: var(--primary-color);
}

.page-header .breadcrumb-item.active {
    color: var(--primary-color);
}

.curtain-item {
    text-decoration: none;
}

@media (max-width: 576px) {
    .curtain-item {
        text-decoration: none;
        display: block;
    }
}

/* 平板以下響應式調整 */
@media (max-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem;
        margin-top: 68px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}

/* ==========================================
   Section Styles
   ========================================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    position: relative;
}

.title-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 1rem 0 2rem 0;
}

.lead {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* ==========================================
   About Section
   ========================================== */
.about-section {
    background: #fff;
}

.about-section img {
    border: 5px solid var(--bg-light);
    position: relative;
}

.about-section img::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid var(--primary-color);
    z-index: -1;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.feature-list li i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.2rem;
}

/* ==========================================
   Product Categories
   ========================================== */
.product-categories {
    background: var(--bg-light);
}

.category-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.category-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(230, 126, 34, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-content {
    text-align: center;
    color: #fff;
    padding: 2rem;
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.category-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.category-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==========================================
   Features Section
   ========================================== */
.feature-box {
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.feature-box:hover .feature-icon {
    transform: rotateY(360deg);
}

.feature-icon i {
    font-size: 2.5rem;
    color: #fff;
}

.feature-box h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* ==========================================
   Stats Section
   ========================================== */
.stats-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-gray));
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.05) 35px, rgba(255,255,255,.05) 70px);
}

.stat-box {
    position: relative;
    z-index: 1;
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-box h3 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.stat-box p {
    font-size: 1.1rem;
    color: var(--bg-light);
}

/* ==========================================
   News Section
   ========================================== */
.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.news-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-date {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.news-content {
    padding: 1.5rem;
}

.news-content h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.news-content p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--accent-color);
    padding-left: 10px;
}

/* ==========================================
   Contact Info Section
   ========================================== */
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 1.5rem;
    margin-top: 0.5rem;
}

.contact-item h5 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.contact-item p {
    color: var(--text-gray);
    margin: 0;
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    height: 100%;
}

.map-container iframe {
    min-height: 400px;
}

/* ==========================================
   Footer
   ========================================== */
.footer-section {
    background: linear-gradient(135deg, #1a1a1a, var(--secondary-color));
    color: var(--bg-light);
    padding: 4rem 0 2rem;
    position: relative;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer-title {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-text {
    color: var(--light-gray);
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--light-gray);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    color: var(--light-gray);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    color: var(--primary-color);
    margin-right: 10px;
    margin-top: 3px;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 2rem 0;
}

.copyright {
    color: var(--light-gray);
    margin: 0;
    font-size: 0.9rem;
}

/* ==========================================
   Back to Top Button
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

/* ==========================================
   Buttons
   ========================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    padding: 0.8rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.4);
}

/* ==========================================
   Responsive Design
   ========================================== */
/* Stats Section Mobile */
@media (max-width: 576px) {
    .stats-section .row {
        margin-right: -8px;
        margin-left: -8px;
    }   
    
    .stats-section .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
        padding-right: 8px;
        padding-left: 8px;
        margin-bottom: 0.5rem;
    }
    
    .stat-box {
        padding: 1rem 0.5rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .counter {
        font-size: 1.5rem;
        margin: 0.3rem 0;
    }
    
    .stat-box p {
        font-size: 0.75rem;
    }
}

   @media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(44, 62, 80, 0.98);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 10px;
    }
    
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        margin-top: 68px;
    }
    
    .carousel-item {
        height: 70vh;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .category-image {
        height: 250px;
    }
    
    .feature-box {
        margin-bottom: 1rem;
    }
    
    .stat-box h3 {
        font-size: 2.5rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}


/* News Section Mobile Carousel */
/* News Section Mobile Carousel */
@media (max-width: 768px) {
    .news-section .container {
        padding: 0;
    }
    
    .news-section .row {
        display: flex !important;
        overflow-x: auto !important;
        scroll-behavior: smooth;
        gap: 1rem;
        padding: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        margin-left: 0 !important;
        margin-right: 0 !important;
        flex-wrap: nowrap !important;
    }
    
    .news-section .col-lg-4,
    .news-section .col-md-6 {
        flex: 0 0 calc(100vw - 2rem) !important;
        min-width: calc(100vw - 2rem) !important;
        scroll-snap-align: start;
        margin-bottom: 0 !important;
    }
    
    /* 隱藏滾動條 */
    .news-section .row::-webkit-scrollbar {
        display: none;
    }
    
    .news-section .row {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

@media (max-width: 991px) and (min-width: 769px) {
    .news-section .col-md-6 {
        flex: 0 0 48% !important;
    }
}