/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main Content Styles */
main {
    background-color: #fff;
    min-height: calc(100vh - 220px);
    padding: 2rem 0;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
    border-radius: 0 0 5px 5px;
}

/* Main Container Enhancement */
main .container {
    position: relative;
    z-index: 1;
}

/* Responsive Main Content */
@media (max-width: 768px) {
    main {
        padding: 1rem 0;
        min-height: calc(100vh - 250px);
    }
    
    main .container {
        width: 95%;
    }
}

/* Base Section Styles */
section {
    padding: 2rem;
    margin-bottom: 0;
    background-color: inherit;
    border-radius: 5px;
    transition: box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

/* Enhanced Section Styles */
section:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Centered Section Styles (for sections with centered h2) */
section.hero, 
section.about, 
section.services, 
section.news, 
section.about-page, 
section.services-page, 
section.news-page, 
section.contact-page, 
section.login-page {
    text-align: center;
}

/* Standard Section Padding */
section.hero, 
section.about, 
section.services, 
section.news, 
section.about-page, 
section.services-page, 
section.news-page, 
section.contact-page, 
section.login-page {
    padding: 3rem 2rem;
}

/* Consistent h2 Centering */
section.hero h2, 
section.services h2, 
section.news h2, 
section.about-page h2, 
section.services-page h2, 
section.news-page h2, 
section.contact-page h2, 
section.login-page h2 {
    left: 50%;
    transform: translateX(-50%);
}

/* Consistent h2 After Pseudo-element Centering */
section.hero h2::after, 
section.services h2::after, 
section.news h2::after, 
section.about-page h2::after, 
section.services-page h2::after, 
section.news-page h2::after, 
section.contact-page h2::after, 
section.login-page h2::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Background Color Consistency */
section.about, 
section.about-page, 
section.news, 
section.news-page, 
section.contact-page {
    background-color: #fff;
}

section.services, 
section.services-page, 
section.login-page {
    background-color: #f4f4f4;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Base Link Styles */
a {
    color: #e74c3c;
    text-decoration: none;
}

.container {
    width: 80%;
    margin: 0 auto;
    overflow: hidden;
}

/* Header Styles */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 1rem 0;
}

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

header .logo img {
    height: 60px;
    width: auto;
}

header nav ul {
    display: flex;
    list-style: none;
}

header nav ul li {
    margin: 0 1rem;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 0;
    position: relative;
}

header nav ul li a:hover {
    color: #3498db;
}

header nav ul li a.active {
    color: #3498db;
}

header nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3498db;
}

.auth-buttons a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-left: 1rem;
    font-weight: bold;
}

.login-btn {
    background-color: #3498db;
}

.register-btn {
    background-color: #27ae60;
}

/* Hero Section */
.hero {
    background-color: #3498db;
    color: #fff;
}

/* Base h2 Styles */
h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: #3498db;
    border-radius: 2px;
}

/* Hero Section h2 */
.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-btn {
    background-color: #e74c3c;
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* About Section */
.about {
    /* Using base section styles */
}

.about p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Services Section */
.services {
    /* Using base section styles */
}

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

.service-item {
    background-color: #fff;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #3498db;
}

/* News Section */
.news {
    /* Using base section styles */
}

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

.news-item {
    background-color: #f4f4f4;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.news-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 3rem 0;
}

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

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

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

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
}

/* About Page Styles */
.about-page {
    padding: 3rem 0;
    background-color: #fff;
}

.about-page h2 {
    /* 使用基础h2样式 */
}

.about-page h2::after {
    /* 使用基础h2样式 */
}

.mission-vision {
    padding: 2rem 0;
}

.mission-vision h2 {
    /* 使用基础h2样式 */
}

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

.mission,
.vision {
    background-color: #f4f4f4;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mission h3,
.vision h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #3498db;
}

/* Services Page Styles */
.services-page {
    /* Using base section styles */
}

.services-page h2 {
    /* Using base section h2 styles */
}

.services-page h2::after {
    /* Using base section h2 styles */
}

/* News Page Styles */
.news-page {
    /* Using base section styles */
}

.news-page h2 {
    /* Using base section h2 styles */
}

.news-page h2::after {
    /* Using base section h2 styles */
}

/* Contact Page Styles */
.contact-page {
    /* Using base section styles */
}

.contact-page h2 {
    /* Using base section h2 styles */
}

.contact-page h2::after {
    /* Using base section h2 styles */
}

/* Service Details Styles */
.service-details {
    padding: 2rem;
    background-color: #fff;
}

.service-detail {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.service-detail:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.service-detail h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #3498db;
    position: relative;
    padding-bottom: 0.5rem;
}

.service-detail h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #3498db;
    border-radius: 2px;
}

.service-detail img {
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.service-detail p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #555;
}

/* Contact Form Styles */
.contact-info {
    padding: 2rem 0;
}

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

.contact-item {
    background-color: #f4f4f4;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.contact-form {
    padding: 2rem 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.submit-btn {
    background-color: #3498db;
    color: #fff;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* Login Form Styles */
.login-page {
    /* Using base section styles */
}

.register-page {
    /* Using base section styles */
    background-color: #fff;
    text-align: center;
    padding: 3rem 2rem;
}

.login-page h2,
.register-page h2 {
    /* Using base section h2 styles */
}

.login-page h2::after,
.register-page h2::after {
    /* Using base section h2 styles */
}

.login-form,
.register-form {
    padding: 2rem 0;
    max-width: 500px;
    margin: 0 auto;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-submit-btn,
.register-submit-btn {
    background-color: #3498db;
    color: #fff;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.login-submit-btn:hover,
.register-submit-btn:hover {
    background-color: #2980b9;
}

.login-links,
.register-links {
    margin-top: 1.5rem;
    text-align: center;
}

.login-links a,
.register-links a {
    color: #3498db;
    text-decoration: none;
    margin: 0 1rem;
}

.login-links a:hover,
.register-links a:hover {
    text-decoration: underline;
}

/* Read More Button */
.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Section Image Styles */
section img {
    margin-bottom: 2rem;
}

/* Service Item Image Styles */
.service-item img,
.news-item img,
.service-detail img {
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    header nav ul {
        margin: 1rem 0;
    }

    .auth-buttons {
        margin-top: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

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