/* 自定義CSS樣式 */

/* 全局樣式 */
:root {
    --primary-color: #d2691e;
    --secondary-color: #8b7355;
    --success-color: #228b22;
    --info-color: #cd853f;
    --warning-color: #daa520;
    --danger-color: #b22222;
    --light-color: #faf5f0;
    --dark-color: #5d4e37;
    --warm-orange: #ff8c42;
    --warm-red: #e07a5f;
    --warm-yellow: #f2cc8f;
    --warm-brown: #81b29a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    background-color: #faf5f0;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #56dff1 0%, #0f2ab1 50%, #dc1fa6 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-image {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Portfolio Section */
#portfolio {
    background: linear-gradient(to bottom, #faf5f0 0%, #f5e6d3 100%);
}

.filter-btn {
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(210, 105, 30, 0.2);
}

/* Portfolio Cards */
.portfolio-item {
    transition: all 0.3s ease;
}

.portfolio-item.hide {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(210, 105, 30, 0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
    background-color: #f5e6d3;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="3" fill="%23d2691e" opacity="0.3"><animate attributeName="opacity" values="0.3;0.6;0.3" dur="2s" repeatCount="indefinite"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-title {
    font-weight: 700;
    color: var(--dark-color);
}

.card-text {
    color: var(--secondary-color);
}

/* Custom Badge Colors */
.badge.bg-purple {
    background-color: #6f42c1 !important;
}

.badge.bg-orange {
    background-color: #fd7e14 !important;
}

.badge.bg-red {
    background-color: #e74c3c !important;
}

/* Contact Section */
.contact-item {
    padding: 30px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background-color: var(--light-color);
    transform: translateY(-5px);
}

.contact-item i {
    transition: all 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.1);
    color: var(--primary-color) !important;
}

/* About Section */
#about {
    background: linear-gradient(45deg, #faf5f0 0%, #f5e6d3 100%);
}

#about h6 {
    color: var(--primary-color);
}

/* Footer */
footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .filter-btn {
        font-size: 0.9rem;
        padding: 6px 15px;
    }
    
    .contact-item {
        padding: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 10px 20px;
    }
    
    .portfolio-item {
        margin-bottom: 30px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.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); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0522d;
}

/* 額外的溫暖系樣式 */
.navbar {
    background: linear-gradient(90deg, #5d4e37 0%, #8b7355 100%) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #d2691e 0%, #ff8c42 100%);
    border: none;
    box-shadow: 0 4px 8px rgba(210, 105, 30, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b8621b 0%, #e07a38 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(210, 105, 30, 0.4);
}

.btn-outline-light:hover {
    background-color: #f2cc8f;
    border-color: #f2cc8f;
    color: #5d4e37;
}

/* 卡片的溫暖邊框 */
.card {
    border: 1px solid #f2cc8f;
    background: linear-gradient(145deg, #ffffff 0%, #faf8f5 100%);
}