/* Custom CSS for 新竹手機維修專家 */

:root {
    --primary-color: #1E3A8A;
    --secondary-color: #D97706;
    --success-color: #059669;
    --danger-color: #DC2626;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --gray-color: #6B7280;
    --blue-dark: #1E3A8A;
    --blue-light: #3B82F6;
}

/* General Styles */
body {
    font-family: 'Microsoft JhengHei', 'Arial', sans-serif;
    line-height: 1.6;
    background-color: var(--dark-color);
    color: #E5E7EB;
}

.btn {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color)) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 1rem 0;
    z-index: 1030;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #E5E7EB !important;
}

/* Dropdown Menu */
.dropdown-menu {
    background-color: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1050;
}

.dropdown-item {
    color: #E5E7EB;
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(30, 58, 138, 0.7);
    color: #FFFFFF;
}

.dropdown-item.active {
    background-color: var(--secondary-color);
    color: #FFFFFF;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(31, 41, 55, 0.9)),
                url('../img/phone-repair-hero.webp') center/cover no-repeat;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-features {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-buttons .btn {
    margin: 5px;
    min-width: 160px;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}

/* Features Section */
.feature-card {
    background: #374151;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #4B5563;
    color: #E5E7EB;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.feature-icon i {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon i {
    transform: scale(1.1);
}

/* Services Section */
.service-card {
    background: #374151 !important;
    color: #E5E7EB !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #4B5563 !important;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important;
}

.service-icon i {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon i {
    transform: scale(1.1);
}

/* Contact Section */
.contact-info {
    background: #374151;
    color: #E5E7EB;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    border: 1px solid #4B5563;
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* Statistics */
.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color), #374151) !important;
}

footer h5 {
    color: var(--secondary-color);
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: background 0.3s ease;
}

footer .social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Mobile Navigation */
    .navbar-collapse {
        background-color: rgba(31, 41, 55, 0.95);
        border-radius: 8px;
        margin-top: 10px;
        padding: 15px;
    }
    
    /* Mobile Dropdown */
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none;
        width: auto;
        margin-top: 5px;
        background-color: rgba(31, 41, 55, 0.98) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
        transform: none !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .navbar-nav .dropdown-item {
        color: #E5E7EB !important;
        padding: 8px 16px;
        border-radius: 4px;
        margin: 2px 0;
    }
    
    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        background-color: rgba(30, 58, 138, 0.8) !important;
        color: #FFFFFF !important;
    }
    
    .hero-section {
        padding-top: 100px;
        text-align: center;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section .display-4 {
        font-size: 3rem;
    }
    
    .hero-buttons {
        margin-top: 30px;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .feature-card,
    .service-card,
    .contact-info {
        margin-bottom: 30px;
        padding: 20px 15px;
    }
    
    .navbar-brand {
        font-size: 18px;
    }
    
    .navbar-nav .nav-link {
        font-size: 16px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-buttons .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .feature-card,
    .service-card,
    .contact-info {
        padding: 15px 10px;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Call to Action Buttons */
.cta-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.cta-floating .btn {
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

@media (max-width: 768px) {
    .cta-floating {
        bottom: 20px;
        right: 15px;
        z-index: 9998;
    }
    
    .cta-floating .btn {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.3rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }
}

@media (max-width: 480px) {
    .cta-floating {
        bottom: 20px;
        right: 10px;
    }
    
    .cta-floating .btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

/* Badge Styles */
.badge {
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 20px;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

/* Dark Theme for All Sections */
section {
    background-color: var(--dark-color) !important;
    color: #E5E7EB !important;
}

section.bg-light {
    background-color: #374151 !important;
}

/* Service Detail Cards */
.service-detail-card {
    background: #374151 !important;
    color: #E5E7EB !important;
    border: 1px solid #4B5563 !important;
}

.service-detail-card h5 {
    color: #F3F4F6 !important;
}

.service-detail-card p {
    color: #D1D5DB !important;
}

/* Model Cards & Brand Cards */
.model-card, .brand-card {
    background: #374151 !important;
    color: #E5E7EB !important;
    border: 1px solid #4B5563 !important;
}

.model-card h5, .brand-card h5 {
    color: #F3F4F6 !important;
}

/* FAQ Section */
.accordion-item {
    background: #374151 !important;
    border: 1px solid #4B5563 !important;
}

.accordion-button {
    background: #4B5563 !important;
    color: #E5E7EB !important;
    border: none !important;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color) !important;
    color: white !important;
}

.accordion-body {
    background: #374151 !important;
    color: #D1D5DB !important;
}

/* First Aid Cards for Emergency Page */
.first-aid-card, .emergency-card {
    background: #374151 !important;
    color: #E5E7EB !important;
    border: 1px solid #4B5563 !important;
}

.first-aid-card h4, .emergency-card h5 {
    color: #F3F4F6 !important;
}

/* Breadcrumb */
.breadcrumb-section {
    background: #374151 !important;
}

.breadcrumb-item a {
    color: var(--secondary-color) !important;
}

.breadcrumb-item.active {
    color: #D1D5DB !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #F3F4F6 !important;
}

.display-4 {
    font-weight: 800;
}

.lead {
    font-size: 1.2rem;
    font-weight: 400;
    color: #D1D5DB !important;
}

/* Text Colors */
.text-muted {
    color: #9CA3AF !important;
}

p {
    color: #D1D5DB !important;
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }

/* Print Styles */
@media print {
    .navbar,
    .cta-floating,
    footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}