/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.logo .tagline {
    color: var(--text-light);
    font-size: 0.875rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Introduction Section */
.intro-section {
    padding: 4rem 0;
    text-align: center;
}

.intro-section h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.intro-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.intro-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.intro-card h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.intro-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Content Sections */
.content-section {
    background: var(--bg-white);
    margin: 2rem 0;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    scroll-margin-top: 80px;
}

.content-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.content-section h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
}

.content-section h4 {
    color: var(--text-dark);
    font-size: 1.25rem;
    margin: 1.5rem 0 1rem 0;
}

.content-text {
    color: var(--text-dark);
    line-height: 1.8;
}

.content-text p {
    margin-bottom: 1rem;
}

/* Lists */
.step-list {
    list-style: none;
    counter-reset: step-counter;
    margin: 1.5rem 0;
}

.step-list li {
    counter-increment: step-counter;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 3rem;
}

.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step-list strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.info-list {
    list-style: none;
    margin: 1.5rem 0;
    padding-left: 0;
}

.info-list li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 0.75rem;
    background: var(--bg-light);
    border-radius: 0 8px 8px 0;
}

.info-list li::before {
    content: "✓";
    position: absolute;
    left: 0.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Visa Types */
.visa-type,
.tax-type,
.grant-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

/* Tables */
.price-table {
    margin: 1.5rem 0;
    overflow-x: auto;
}

.price-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.price-table th,
.price-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.price-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.price-table tr:last-child td {
    border-bottom: none;
}

.price-table tr:hover {
    background: var(--bg-light);
}

.note {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.5rem;
}

/* SEO Description Section */
.seo-description {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 4rem 0;
    margin-top: 3rem;
}

.seo-description h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.seo-content {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    line-height: 1.9;
}

.seo-content p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.keywords-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.keywords-section h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.keyword {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.2s, background 0.2s;
}

.keyword:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
    color: #9ca3af;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.875rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .intro-section h2,
    .content-section h2,
    .seo-description h2 {
        font-size: 1.5rem;
    }

    .content-section {
        padding: 2rem 1.5rem;
    }

    .intro-grid {
        grid-template-columns: 1fr;
    }

    .step-list li {
        padding-left: 2.5rem;
    }

    .step-list li::before {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.875rem;
    }

    .price-table {
        font-size: 0.875rem;
    }

    .price-table th,
    .price-table td {
        padding: 0.75rem 0.5rem;
    }

    .seo-content {
        padding: 1.5rem;
    }

    .keywords {
        gap: 0.5rem;
    }

    .keyword {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 1rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .intro-card {
        padding: 1.5rem;
    }

    .content-section h3 {
        font-size: 1.25rem;
    }

    .content-section h4 {
        font-size: 1.1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cta-button,
    .mobile-menu-toggle {
        display: none;
    }

    .content-section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Services Section */
.services-section {
    padding: 4rem 0;
}

.services-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.service-link:hover {
    color: var(--primary-dark);
}

/* Blog Preview Section */
.blog-preview-section {
    padding: 4rem 0;
    background: var(--bg-white);
    margin: 3rem 0;
    border-radius: 12px;
}

.blog-preview-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.blog-preview-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-preview-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.blog-preview-card h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.blog-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-preview-card p:not(.blog-date) {
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.blog-link:hover {
    color: var(--primary-dark);
}

.blog-more {
    text-align: center;
    margin-top: 3rem;
}

.cta-button-secondary {
    display: inline-block;
    background-color: var(--bg-white);
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: 2px solid var(--primary-color);
}

.cta-button-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Article Page Styles */
.article-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 2rem 3rem 2rem;
    text-align: center;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.article-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: var(--bg-white);
    margin-top: -2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.article-content h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 2.5rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
    color: var(--text-dark);
    font-size: 1.4rem;
    margin: 2rem 0 1rem 0;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 600;
}

.back-link:hover {
    color: var(--primary-dark);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.submit-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* About Page */
.about-section {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.about-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-section h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
}

.about-section p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.team-member h4 {
    color: var(--text-dark);
    margin: 1rem 0 0.5rem 0;
}

.team-member p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Blog List Page */
.blog-list {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.blog-list-item {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-list-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.blog-list-item h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.blog-list-item h2 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-list-item h2 a:hover {
    color: var(--primary-color);
}

.blog-list-item .blog-date {
    display: block;
    margin-bottom: 1rem;
}

.blog-list-item p {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Page Header (for internal pages) */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .blog-preview-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }

    .article-content {
        padding: 2rem 1.5rem;
    }

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