/* shared.css */
: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;
    --link-color: #007bff;
    --background-color: #f4f7f6;
    --border-color: #dee2e6;
    --font-family: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

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

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .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: #545b62;
    border-color: #545b62;
}

/* Header specific styles for demonstration */
.main-header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

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

.main-header .logo img {
    height: 40px; /* Adjust as needed */
}

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

.main-nav ul li {
    position: relative;
    margin-left: 25px;
}

.main-nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    padding: 10px 0;
    left: 0;
    top: 100%; /* Position below the parent link */
}

.dropdown-content a {
    color: black;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-actions .btn {
    margin-left: 10px;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 15px;
}

/* Footer specific styles for demonstration */
.main-footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 40px 0;
    font-size: 0.9rem;
}

.main-footer a {
    color: var(--light-color);
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

.footer-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-right: 20px;
    margin-bottom: 20px;
}

.footer-section:last-child {
    margin-right: 0;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section p, .footer-section ul {
    margin-bottom: 10px;
    line-height: 1.8;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.social-media a {
    display: inline-block;
    margin-right: 10px;
}

.social-media img {
    width: 24px;
    height: 24px;
    filter: invert(1); /* Makes SVG icons white */
}

.footer-section .newsletter input[type="email"] {
    width: calc(100% - 70px);
    padding: 8px;
    border: 1px solid #555;
    background-color: #333;
    color: #eee;
    border-radius: 4px 0 0 4px;
    box-sizing: border-box;
}

.footer-section .newsletter button {
    width: 70px;
    padding: 8px;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.footer-section .newsletter button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-nav {
        display: none; /* Hide main nav on small screens */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,.08);
    }
    .main-nav.active {
        display: flex;
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }
    .main-nav ul li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    .main-nav ul li a {
        padding: 15px;
    }
    .dropdown-content {
        position: static; /* Make dropdowns stack vertically */
        box-shadow: none;
        background-color: #f1f1f1;
        padding-left: 20px;
    }
    .menu-toggle {
        display: block; /* Show menu toggle button */
    }
    .footer-sections {
        flex-direction: column;
    }
    .footer-section {
        margin-right: 0;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
