/* shared.css */

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

/* Body and Typography */
body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #212529;
}

p {
    margin-bottom: 1em;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Utility Classes (inspired by Tailwind but explicit for shared CSS) */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.hidden { display: none !important; }
.block { display: block; }
.relative { position: relative; }
.absolute { position: absolute; }
.group:hover .dropdown-menu { display: block; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 0.375rem; /* rounded-md */
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

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

.btn-secondary {
    color: #6c757d;
    background-color: transparent;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus, textarea:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Header Specifics */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.site-branding .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-branding .logo img {
    height: 2.5rem; /* h-10 */
    margin-right: 0.5rem;
}

.main-navigation .nav-link {
    padding: 0.5rem 0;
    font-weight: 500;
}

.dropdown-menu {
    min-width: 12rem; /* w-48 */
}

.dropdown-menu a {
    padding: 0.5rem 1rem;
    display: block;
    color: #333;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

/* Footer Specifics */
.site-footer {
    background-color: #212529;
    color: #dee2e6;
}

.site-footer h3 {
    color: #fff;
}

.site-footer a {
    color: #adb5bd;
}

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

.social-links a {
    font-size: 1.25rem;
}

.bottom-bar {
    border-top: 1px solid #343a40;
    padding-top: 1.5rem;
    margin-top: 2rem;
    color: #6c757d;
}

/* Font Awesome for icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');

/* Media Queries for responsiveness */
@media (max-width: 767px) {
    .main-navigation, .search-box.md\:block, .btn.md\:block {
        display: none !important;
    }
    .menu-toggle {
        display: block !important;
    }
    .site-header .container {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    .mobile-menu-drawer {
        display: none; /* Controlled by JS */
        flex-direction: column;
        align-items: center;
        width: 100%;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        background-color: #fff;
        z-index: 10;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .mobile-menu-drawer.active {
        display: flex;
    }
    .mobile-menu-drawer .nav-link {
        padding: 0.75rem 0;
        width: 100%;
        text-align: center;
    }
    .mobile-menu-drawer .search-box {
        margin-top: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .mobile-menu-drawer .search-box input {
        border-radius: 0.375rem;
    }
    .footer-section {
        text-align: center;
    }
    .footer-section.about-us .social-links {
        justify-content: center;
    }
    .site-footer .container {
        grid-template-columns: 1fr;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
