/* shared_styles.css - Common styles for the entire website */

/* Basic Reset & Box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --heading-color: #212529;
    --border-color: #dee2e6;
    --font-family-base: 'Roboto', sans-serif;
    --font-family-heading: 'Roboto', sans-serif;
    --header-height: 80px; /* Example height for fixed header */
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-family-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: var(--heading-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: #0056b3; /* Darker primary */
    text-decoration: underline;
}

ul, ol {
    list-style: none;
    margin-bottom: 1rem;
}

/* Layout & Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.col-lg-4, .col-md-6, .col-sm-12 { /* Simplified grid for example */
    padding-left: 15px;
    padding-right: 15px;
    flex: 0 0 auto;
}

/* Responsive columns */
@media (min-width: 576px) {
    .col-sm-12 { flex-basis: 100%; max-width: 100%; }
}
@media (min-width: 768px) {
    .col-md-6 { flex-basis: 50%; max-width: 50%; }
}
@media (min-width: 992px) {
    .col-lg-4 { flex-basis: 33.333333%; max-width: 33.333333%; }
    .col-lg-2 { flex-basis: 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex-basis: 25%; max-width: 25%; }
}


/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    color: #fff;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

/* Header Specific Styles */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
}

.site-header.sticky-top {
    position: sticky;
    top: 0;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.top-bar {
    font-size: 0.875rem;
    background-color: var(--dark-color) !important;
    color: rgba(255, 255, 255, 0.75) !important;
}

.top-bar .contact-info span,
.top-bar .social-links a {
    display: inline-flex;
    align-items: center;
    color: inherit;
}

.top-bar .social-links a:hover {
    color: #fff !important;
}

.navbar-brand img {
    max-height: 50px;
    width: auto;
}

.navbar-nav .nav-item .nav-link {
    color: var(--heading-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-item .nav-link.active,
.navbar-nav .nav-item .nav-link:hover {
    color: var(--primary-color);
}

.navbar-nav .nav-item.dropdown .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    border-radius: 0.25rem;
}

.navbar-nav .nav-item.dropdown .dropdown-item {
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
}

.navbar-nav .nav-item.dropdown .dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border-radius: 0.25rem;
    transition: box-shadow 0.15s ease-in-out;
}

/* Footer Specific Styles */
.site-footer {
    background-color: var(--dark-color) !important;
    color: #fff;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.site-footer .footer-brand img {
    filter: brightness(0) invert(1); /* For white logo on dark background */
}

.site-footer p {
    font-size: 0.9rem;
    line-height: 1.8;
}

.site-footer h5 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.site-footer .list-unstyled li a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.site-footer .list-unstyled li a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer .social-icons a {
    color: #fff;
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.site-footer .social-icons a:hover {
    color: var(--primary-color);
}

.site-footer address p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.site-footer address a {
    color: rgba(255, 255, 255, 0.75);
}

.site-footer address a:hover {
    color: #fff;
}

.site-footer .border-secondary {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.site-footer .list-inline-item a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
}

.site-footer .list-inline-item a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Utility Classes (examples, for brevity) */
.text-white { color: #fff !important; }
.text-white-50 { color: rgba(255, 255, 255, 0.75) !important; }
.bg-dark { background-color: var(--dark-color) !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-lg-0 { margin-bottom: 0 !important; } /* Media query specific */
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-4 { margin-left: 1.5rem !important; }
.ms-auto { margin-left: auto !important; }
.ms-lg-3 { margin-left: 1rem !important; }
.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.d-none { display: none !important; }
@media (min-width: 992px) {
    .d-lg-block { display: block !important; }
}
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important; }
.text-center { text-align: center !important; }
.text-md-start { text-align: start !important; }
.text-md-end { text-align: end !important; }
.border-secondary { border-color: var(--secondary-color) !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.list-inline { padding-left: 0; list-style: none; }
.list-inline-item { display: inline-block; }
.list-inline-item:not(:last-child) { margin-right: 0.5rem; }
.text-decoration-none { text-decoration: none !important; }

/* Responsive adjustments for header/nav */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
        padding: 1rem 0;
    }
    .navbar-nav {
        flex-direction: column;
    }
    .navbar-nav .nav-item {
        width: 100%;
    }
    .navbar-nav .nav-item .nav-link {
        padding: 0.75rem 1rem;
        display: block;
    }
    .navbar-nav .nav-item.dropdown .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        border-radius: 0;
        box-shadow: none;
        padding-left: 1.5rem;
    }
    .navbar-nav .nav-item.dropdown .dropdown-item {
        padding-left: 2rem;
    }
    .top-bar {
        display: none !important;
    }
    .navbar-toggler {
        display: block;
    }
}

/* Additional styles for specific components or sections */
.hero-section {
    background-color: #e9ecef;
    padding: 6rem 0;
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Scroll to top button styles */
#scrollToTopBtn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, opacity 0.3s ease;
    opacity: 0; /* Hidden by default */
    pointer-events: none; /* Make it non-interactive when hidden */
}

#scrollToTopBtn.show {
    opacity: 1;
    pointer-events: auto;
}

#scrollToTopBtn:hover {
    background-color: #0056b3;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
