/* CircuiTek Limited 自定義樣式 */

:root {
    --primary-color: #072e57;
    --hints-color: #0c65c4;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;

    /* Dark Theme Background Colors */
    --dark-bg: #0d1117;
    --dark-bg-secondary: #161b22;
    --dark-bg-tertiary: #21262d;
    --dark-surface: #30363d;
    --dark-border: #373e47;
    
    /* Dark Theme Text Colors */
    --dark-text-primary: #f0f6fc;
    --dark-text-secondary: #7d8590;
    --dark-text-muted: #656d76;
    
    /* Legacy colors for compatibility */
    --dark-color: var(--dark-bg-secondary);
    --light-color: var(--dark-surface);

}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* 導航欄樣式 */
.bg-dark {
    background-color: var(--dark-bg) !important;
    border-bottom: 1px solid var(--dark-border);
}

.navbar-brand img {
    transition: transform 0.3s ease;
    padding: 5px;
}

.navbar-nav .nav-link {
    color: var(--dark-text-primary) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--hints-color) !important;
}

.navbar-toggler {
    border-color: var(--dark-border);
}

.hints-color {
    color: var(--hints-color) !important;
}

.primary-color {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.bg-primary:hover {
    background-color: var(--hints-color) !important;
    color: white !important;
}

/* 卡片效果 */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* 覆寫精選改裝案例卡片的懸停效果 */
.featured-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15) !important;
}

/* 品牌Logo樣式 */
.brand-logo {
    max-height: 100px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

/* 車輛卡片樣式 */
.vehicle-card {
    border-radius: 10px;
    overflow: hidden;
}

.vehicle-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* 文字陰影效果 */
.text-shadow {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.vehicle-card:hover .text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* 精選改裝案例卡片樣式 */
.featured-card {
    height: 300px !important;
    min-height: 300px !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #6c757d;
    position: relative;
    border: none !important;
    overflow: hidden;
    display: block !important;
    visibility: visible !important;
}

.index-featured-vehicles {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    z-index: 1;
    background-color: #000;
}

.index-featured-vehicles:before {
    content: '';
    z-index:-1;
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background-image: url('../../images/mod_bg.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    filter: blur(5px);
}

.index-featured-vehicles .mb-5 {
    color: white;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.2);
}

/* 沒有圖片時的預設背景 */
.featured-card:not([style*="background-image"]) {
    background: linear-gradient(135deg, #001e3f, #17a2b8) !important;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg, 
        rgba(0, 0, 0, 0.3) 0%, 
        rgba(0, 0, 0, 0.6) 70%, 
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex !important;
    align-items: flex-end;
    padding: 1.5rem;
    transition: all 0.3s ease;
    z-index: 1;
}

.card-content {
    width: 100%;
    z-index: 2;
    position: relative;
}

.price-tag {
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    margin: 0;
}

/* 可點擊卡片樣式 */
.clickable-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.clickable-card:hover .card-overlay {
    background: linear-gradient(
        180deg, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.5) 70%, 
        rgba(0, 0, 0, 0.7) 100%
    );
}

a .clickable-card:hover {
    text-decoration: none;
}

/* 改裝品展示 */
.modification-item {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.modification-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

/* YouTube影片響應式 */
.youtube-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 5px;
    margin: 15px 0;
}

.youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 按鈕樣式 */
.btn-facebook {
    background-color: #3b5998;
    border-color: #3b5998;
    color: white;
}

.btn-facebook:hover {
    background-color: #2d4373;
    border-color: #2d4373;
    color: white;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--hints-color) !important;
    border-color: var(--hints-color) !important;
    color: white !important;
}


/* 管理介面樣式 */
.admin-sidebar {
    min-height: calc(100vh - 120px);
    background-color: var(--light-color);
    border-right: 1px solid #dee2e6;
}

.admin-content {
    padding: 2rem;
}

/* 拖拽排序樣式 */
.sortable {
    cursor: move;
}

.sortable:hover {
    background-color: var(--light-color);
}

/* 圖片上傳預覽 */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    margin: 10px 0;
}

/* Loading 動畫 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .brand-logo {
        max-height: 80px;
    }
    
    .vehicle-card .card-img-top {
        height: 150px;
    }
    
    .admin-sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
}

/* 公司簡介區塊 */
.company-intro {
    background-image: url('../../images/banner.png');
    background-color: #151515;
    background-position: left top;
    background-size: auto 100%;
    background-repeat: no-repeat;
    color: white;
    padding: 4rem 0;
    min-height: 40vh;
    display: flex;
    align-items: center;
}

/* 服務特色 */
.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 動畫效果 */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 聯絡資訊樣式 */
.contact-info {
    padding: 1.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 聯絡我們頁面佈局 */
.contact-details {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-item {
    transition: transform 0.2s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item h6 {
    color: var(--dark-color);
    font-weight: 600;
}

.map-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.map-container iframe {
    border-radius: 10px;
}

/* 浮動Facebook Messenger按鈕 */
.fb-messenger-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #0084ff, #44bdf3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 132, 255, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    animation: pulse 2s infinite;
}

.fb-messenger-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 132, 255, 0.6);
    color: white;
    text-decoration: none;
}

.fb-messenger-float i {
    font-size: 24px;
}

/* 脈動動畫 */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 132, 255, 0.4), 0 0 0 0 rgba(0, 132, 255, 0.4);
    }
    70% {
        box-shadow: 0 4px 12px rgba(0, 132, 255, 0.4), 0 0 0 10px rgba(0, 132, 255, 0);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 132, 255, 0.4), 0 0 0 0 rgba(0, 132, 255, 0);
    }
}

/* 響應式調整 */
@media (max-width: 768px) {
    .fb-messenger-float {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }
    
    .fb-messenger-float i {
        font-size: 22px;
    }
}