:root {
    --primary: #4a9ab5;
    --primary-dark: #2d7a8a;
    --text: #1a5a6a;
    --text-light: #2d7a8a;
    --darker: #1a5a6a;
    --secondary: #f0f8ff;
    --light: #dce8f5;
    --font: 'Noto Sans TC', sans-serif;
    
    /* Bootstrap 5 Overrides */
    --bs-primary: #4a9ab5;
    --bs-primary-rgb: 74, 154, 181;
    --bs-secondary: #f0f8ff;
    --bs-secondary-rgb: 240, 248, 255;
    --bs-light: #dce8f5;
    --bs-light-rgb: 220, 232, 245;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--darker);
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

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

/* Fix RWD issues for injected WordPress content */
.card-body *, main * {
    max-width: 100%;
}
.card-body, .card-text, main {
    word-break: break-word;
    overflow-wrap: break-word;
}
table {
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    display: block;
}
iframe {
    max-width: 100%;
}

::selection {
    background: var(--primary);
    color: #fff;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    padding: 0.625rem 1.75rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 154, 181, 0.4);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 50px;
    padding: 0.625rem 1.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 154, 181, 0.4);
}


.navbar {
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary) !important;
    letter-spacing: 1px;
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
}

.navbar-nav .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 60%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 90, 106, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--light) 50%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(74, 154, 181, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section .hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

@media (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
}

.section {
    padding: 100px 0;
}

@media (max-width: 767.98px) {
    .section {
        padding: 60px 0;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--darker);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(74, 154, 181, 0.15);
}

.card-body {
    padding: 1.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--darker);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-light);
    line-height: 1.7;
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.service-card {
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(74, 154, 181, 0.15);
}

.service-card .icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.service-card:hover .icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.service-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--darker);
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.testimonial-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(74, 154, 181, 0.15);
}

.testimonial-card .quote-icon {
    font-size: 2.5rem;
    color: var(--light);
    margin-bottom: 1rem;
}

.testimonial-card .stars {
    color: #ffc107;
    margin-bottom: 1rem;
}

.testimonial-card p {
    color: var(--text-light);
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.testimonial-card .client-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-card .client-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-card .client-info .name {
    font-weight: 600;
    color: var(--darker);
}

.testimonial-card .client-info .role {
    font-size: 0.85rem;
    color: var(--text-light);
}

.faq-item {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.faq-item .faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--darker);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-item .faq-question:hover {
    background: var(--secondary);
}

.faq-item .faq-question .bi {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-item .faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-light);
    line-height: 1.8;
}

footer {
    background-color: var(--darker);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
}

footer h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

footer p,
footer li {
    color: rgba(255, 255, 255, 0.7);
    line-height: 2;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary);
}

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

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

footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li a {
    display: inline-block;
    padding: 0.15rem 0;
}

form .form-control,
form .form-select {
    border: 1px solid var(--light);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

form .form-control:focus,
form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(74, 154, 181, 0.15);
}

form label {
    font-weight: 500;
    color: var(--darker);
    margin-bottom: 0.4rem;
}

form textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

.page-header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--light) 100%);
    padding: 120px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--darker);
    margin-bottom: 0.75rem;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.breadcrumb-item a {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-light);
}

.blog-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    background: #fff;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(74, 154, 181, 0.15);
}

.blog-card .blog-img {
    height: 200px;
    overflow: hidden;
}

.blog-card .blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-img img {
    transform: scale(1.05);
}

.blog-card .blog-body {
    padding: 1.5rem;
}

.blog-card .blog-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.blog-card .blog-meta span {
    margin-right: 1rem;
}

.blog-card .blog-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--darker);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card .blog-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.process-step {
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}

.process-step .step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.25rem;
    position: relative;
    z-index: 1;
}

.process-step h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--darker);
    margin-bottom: 0.5rem;
}

.process-step p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 767.98px) {
    .section-title h2 {
        font-size: 1.75rem;
    }

    .page-header {
        padding: 100px 0 40px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    footer {
        text-align: center;
    }

    footer .social-icons {
        margin-top: 1rem;
    }
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav .nav-link {
        padding: 0.5rem 0.85rem !important;
    }
}
