/* YUNFAN Website Stylesheet */
/* Author: Gemini */

@import url('https://fonts.font.im/css?family=Noto+Sans+SC:300,400,500,700|Noto+Serif+SC:400,600,700');

:root {
    --color-primary: #0A3D62;
    --color-secondary: #0097e6;
    --color-accent: #FFC312;
    --color-text: #2c3e50;
    --color-text-light: #5a6876;
    --bg-color: #ffffff;
    --bg-color-alt: #f8f9fa;
    --white: #ffffff;
    --font-sans: 'Noto Sans SC', sans-serif;
    --font-serif: 'Noto Serif SC', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--bg-color);
    line-height: 1.7;
    font-size: 16px;
}

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

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

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

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

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--color-primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 151, 230, 0.3);
}

/* Header */
.site-header {
    background: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--color-primary);
}

.logo svg {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 500;
    font-size: 1.1em;
    color: var(--color-text);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background-color: var(--bg-color-alt);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.2em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-text .subtitle {
    font-size: 1.3em;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5em;
    display: inline-block;
    border-bottom: 3px solid var(--color-secondary);
    padding-bottom: 10px;
}

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

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.feature-card .icon {
    font-size: 3em;
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--color-text-light);
    font-size: 0.95em;
}

/* Process Section */
.process-section {
    background-color: var(--bg-color-alt);
}

/* Footer */
.site-footer {
    background-color: var(--color-primary);
    color: var(--white);
    padding: 50px 0;
    font-size: 0.95em;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-about, .footer-links, .footer-contact {
    flex: 1;
    min-width: 250px;
}

.site-footer h4 {
    color: var(--white);
    font-size: 1.3em;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-secondary);
    padding-bottom: 10px;
}

.site-footer p, .site-footer a {
    color: rgba(255,255,255,0.8);
}

.site-footer a:hover {
    color: var(--white);
}

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

.footer-links li {
    margin-bottom: 10px;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
}

/* Mermaid diagram styling */
.mermaid {
    text-align: center;
    margin-top: 40px;
}

/* About Page Specifics */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
    font-size: 1.1em;
    line-height: 1.9;
}

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

.team-card {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.team-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 4px solid var(--bg-color-alt);
}

.team-card h4 {
    font-size: 1.3em;
    margin-bottom: 5px;
}

.team-card .role {
    color: var(--color-secondary);
    font-weight: 500;
    margin-bottom: 15px;
}

.team-card .bio {
    font-size: 0.9em;
    color: var(--color-text-light);
}

/* Services Page Specifics */
.service-category {
    margin-bottom: 60px;
}

.service-category h3 {
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--color-primary);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-item {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.service-item .service-icon {
    font-size: 3.5em;
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: 20px;
}

.service-item h4 {
    font-size: 1.5em;
    margin-bottom: 15px;
    text-align: center;
}

.service-item p {
    font-size: 0.95em;
    color: var(--color-text-light);
    margin-bottom: 10px;
}

.service-item p.pain-point strong {
    color: #d9534f; /* Red for pain point */
}

.service-item p.business-value strong {
    color: #28a745; /* Green for business value */
}

/* Laws Page Specifics */
.law-search-filter {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

#law-search-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.3s ease;
}

#law-search-input:focus {
    border-color: var(--color-secondary);
    outline: none;
}

.law-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.law-category-btn {
    background-color: var(--bg-color-alt);
    color: var(--color-text);
    padding: 10px 20px;
    border: 1px solid #eee;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.law-category-btn:hover {
    background-color: var(--color-secondary);
    color: var(--white);
    border-color: var(--color-secondary);
}

.law-category-btn.active {
    background-color: var(--color-primary);
    color: var(--white);
    border-color: var(--color-primary);
}

.law-content-area {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Adjust as needed */
    gap: 40px;
}

.law-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 600px; /* Example height for scrollability */
    overflow-y: auto;
    padding-right: 15px; /* For scrollbar */
}

.law-item {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.law-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.law-item h3 {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 10px;
}

.law-item p {
    font-size: 0.9em;
    color: var(--color-text-light);
    margin-bottom: 10px;
}

.law-item .law-meta span {
    font-size: 0.8em;
    color: #888;
    margin-right: 15px;
}

.law-detail-view {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    max-height: 600px; /* Example height */
    overflow-y: auto;
}

.law-detail-view h2 {
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.law-detail-view p {
    font-size: 1em;
    line-height: 1.8;
}

/* Contact Page Specifics */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.contact-info h3, .contact-form h3 {
    font-size: 1.6em;
    margin-bottom: 25px;
    color: var(--color-primary);
}

.contact-info p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--color-text);
}

.contact-info p i {
    color: var(--color-secondary);
    margin-right: 10px;
    min-width: 25px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-size: 0.95em;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.contact-form .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--color-secondary);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .form-note {
    font-size: 0.85em;
    color: var(--color-text-light);
    margin-top: 15px;
}

.map-placeholder {
    margin-top: 60px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.map-placeholder iframe {
    width: 100%;
    height: 450px;
    border: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .law-content-area {
        grid-template-columns: 1fr;
    }

    .law-list, .law-detail-view {
        max-height: 400px; /* Adjust for smaller screens */
    }
}

/* Mobile Navigation */
.menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--color-primary);
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        background: var(--white);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        padding: 20px 0;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .main-nav a {
        padding: 10px 0;
        display: block;
    }

    .menu-toggle {
        display: block;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5em;
    }
}
