/* Global */
html,
body {
    background-color: #fff;
    font-size: 0.28rem;
}

/* Module: Header */
.module-header {
    position: relative;
    width: 100%;
    height: auto;
    /* Height determined by image */
    background: none;
    /* Remove background image */
    padding-top: 0;
    display: block;
}

.header-bg-img {
    width: 100%;
    display: block;
}

.header-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

/* Remove old pseudo-element if it exists or clear it */
.module-header::before {
    display: none;
}

.logo-area {
    position: relative;
    z-index: 1;
    text-align: left;
    width: 100%;
    padding-left: 0.4rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: row;
    /* Stack logo icon and text vertically or adjust as needed. Assuming side-by-side or stacked based on image names */
    align-items: center;
}

.logo-icon {
    height: 0.62rem;
    /* Adjust height as needed */
    width: auto;
    margin-right: 0.2rem;
}

.logo-img-text {
    height: 0.55rem;
    /* Adjust height as needed */
    width: auto;
}

.search-bar {
    position: relative;
    z-index: 1;
    width: 4rem;
    height: 0.65rem;
    background: url('http://szshequ.org.cn/static/sgw-mobile/images/headers/bg-search.png') no-repeat center center;
    background-size: 100% 100%;
    /* Use image for search bar background */
    border: none;
    /* Remove border */
    border-radius: 0;
    /* Let image handle corners */
    display: flex;
    align-items: center;
    padding: 0 0.3rem;
    margin-top: 1.1rem;
    /* Adjust spacing */
}

/* Android閫傞厤 */
.is-android .search-bar {
    margin-top: 1.0rem;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #A29E9F;
    font-size: 0.28rem;
    text-align: left;
    padding-right: 0.5rem;
}


.search-icon-img {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.4rem;
    height: auto;
    cursor: pointer;
}


/* Module: Navigation */
.module-nav {
    padding: 0.4rem 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    margin-top: -1.8rem;
    position: relative;
    z-index: 3;
}

.nav-slider {
    display: flex;
    overflow-x: scroll;
    /* scroll-snap-type: x mandatory; */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-slider::-webkit-scrollbar {
    display: none;
}

.nav-page {
    flex: 0 0 100%;
    display: flex;
    justify-content: flex-start;
    scroll-snap-align: start;
    padding: 0 0.2rem;
}

/* Ensure direct children (NFC_CATEGORY or nav-item) take 25% width */
.nav-page>* {
    flex: 0 0 25%;
    width: 25%;
    max-width: 25%;
    display: flex;
    justify-content: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.nav-pagination {
    display: flex;
    justify-content: center;
    margin-top: 0.2rem;
    gap: 0.1rem;
}

.nav-dot {
    width: 0.16rem;
    height: 0.08rem;
    background-color: #6EA9F6;
    border-radius: 0.04rem;
    transition: all 0.3s;
}

.nav-dot.active {
    width: 0.38rem;
    background-color: #056AF0;
}

.icon-box {
    width: 0.81rem;
    /* Adjust to fit image */
    height: 0.81rem;
    background: none;
    /* Remove background color */
    border: none;
    /* Remove border */
    box-shadow: none;
    /* Remove shadow */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.1rem;
}

.icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-label {
    font-size: 0.26rem;
    color: #333;
    font-weight: 500;
}

.pagination-dots {
    display: flex;
    justify-content: center;
    margin-top: 0.4rem;
    gap: 0.1rem;
}

.dot {
    width: 0.4rem;
    height: 0.08rem;
    background-color: #ccc;
    border-radius: 0.04rem;
}

.dot.active {
    background-color: #0F6ED6;
}


/* Module: News */
.module-news {
    padding: 0.3rem;
    padding-bottom: 0.5rem;
    /* Reduced bottom padding */
    background-color: #fff;
}

.news-card {
    background: url('http://szshequ.org.cn/static/sgw-mobile/images/index-images/bg-headline.png') no-repeat center center;
    background-size: 100% 100%;
    /* Light blueish background replaced by image */
    border-radius: 0.2rem;
    padding: 0.6rem 0.4rem;
    text-align: center;
    position: relative;
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); */
}

.news-title {
    font-size: 0.4rem;
    color: #222;
    line-height: 1.4;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.news-desc {
    font-size: 0.28rem;
    color: #555;
    line-height: 1.6;
    text-align: justify;
    /* Or center depending on preference, image looks centered/justified */
    text-align-last: center;
}

/* Module: Affairs (Current Affairs), Work News, Showcase, Tabs */
.module-affairs,
.module-work,
.module-showcase {
    background: url('http://szshequ.org.cn/static/sgw-mobile/images/index-images/bg-list.png') no-repeat center center;
    background-size: 100% 100%;
    margin: 0.3rem;
    padding: 0.3rem;
    background-color: #fff;
    border-radius: 0.3rem;
}

/* Module: Tabs */
.module-tabs {
    background: url('http://szshequ.org.cn/static/sgw-mobile/images/index-images/bg-list.png') no-repeat center center;
    background-size: 100% 100%;
    border-radius: 0.3rem;
    margin: 0.3rem;
}

.tab-header {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.tab-nav {
    display: flex;
    justify-content: space-between;
    gap: 0.1rem;
    width: 100%;
    padding: 0.45rem 0 0 0;
    /* Force full width so next item wraps */
}

.tab-btn {
    display: flex;
    align-items: center;
    font-size: 0.23rem;
    color: #0F6ED6;
    cursor: pointer;
    padding: 0.16rem;
    border-radius: 0.15rem 0.15rem 0 0;
    transition: all 0.3s;
    font-weight: bold;
}

.tab-sep {
    width: 0.02rem;
    height: 0.3rem;
    background-color: #0F6ED6;
    margin: 0 0.07rem;
    border-radius: 0.02rem;
}

.tab-text {
    font-size: 0.3rem;
    line-height: 0.36rem;
    white-space: nowrap;
}

.icon-tab-sep {
    height: 0.16rem;
    display: block;
    margin: 0 0.07rem;
}

.tab-text-img {
    height: 0.3rem;
    display: block;
}

.tab-btn.active {
    background-color: #fff;
    color: #0F6ED6;
    position: relative;
    z-index: 1;
}

.tab-btn.active.slope-right {
    border-top-right-radius: 0.2rem;
}

.tab-btn.active.slope-right::after {
    content: '';
    position: absolute;
    top: 0;
    right: -0.15rem;
    width: 0.2rem;
    height: 100%;
    background-color: #fff;
    clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.tab-btn.active.slope-left {
    border-top-left-radius: 0.2rem;
}

.tab-btn.active.slope-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.15rem;
    width: 0.2rem;
    height: 100%;
    background-color: #fff;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.tab-icon {
    margin-right: 0.05rem;
    font-size: 0.3rem;
    display: none;
    /* Hide icon if not needed or use specific img */
}



/* More link */
.tab-content-wrapper .header-more {
    font-size: 0.26rem;
    color: #0F6ED6;
    width: 100%;
    /* Take full width on new line */
    justify-content: flex-end;
    /* Align right */
    margin-top: 0.1rem;
    /* Spacing */
    padding-bottom: 0.1rem;
    /* Spacing */
    padding-right: 0.2rem;
}

/* Tab content wrapper */
.tab-content-wrapper {
    background-color: #fff;
    padding: 0.1rem 0;
    /* Assuming first tab is active */
    min-height: 3rem;
}

/* Custom list styles for this module to match the "card" look inside */
.module-tabs .affairs-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Very subtle grey separator */
    padding: 0.25rem 0.3rem 0.25rem 0.45rem;
    /* Add side padding, extra left for dot */
}

/* Remove last border if desired */
.module-tabs .affairs-list li:last-child {
    border-bottom: none;
    /* Keep background for last item per request */
}

.module-tabs .affairs-list li::before {
    background: url('http://szshequ.org.cn/static/sgw-mobile/images/index-images/icon-item-before.png') no-repeat center center;
    background-size: contain;
    /* Blue dots replaced by image */
    left: 0.2rem;
    /* Adjust dot position */
    top: 0.35rem;
    width: 0.15rem;
    height: 0.15rem;
}

.tab-pane {
    display: none;
    padding-left: 0.25rem;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.module-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
    padding-bottom: 0.1rem;
}

.header-left {
    display: flex;
    align-items: center;
}

/* Header Icon Image */
.header-icon-img {
    height: 0.4rem;
    width: auto;
    /* margin-right: 0.15rem; */
}


.header-title {
    font-size: 0.36rem;
    color: #0F6ED6;
    font-weight: bold;
}

.header-more {
    font-size: 0.26rem;
    color: #0F6ED6;
    display: flex;
    align-items: center;
}

.header-more-img {
    height: 0.24rem;
    width: auto;
    margin-left: 0.1rem;
}


.carousel-dot.active {
    background-color: #0F6ED6;
}

/* Module: Footer */
.module-footer {
    background-color: #CDEEFE;
    /* Light blue background from image */
    padding: 0.4rem 0.3rem;
    color: #333;
    font-size: 0.24rem;
    line-height: 1.6;
    margin-top: 0.3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
    width: 100%;
}

.footer-logo {
    margin-right: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo img {
    width: 0.8rem;
    height: auto;
}

/* Fallback styling for placeholder */
.footer-logo.no-img .logo-fallback {
    display: inline-block;
    font-size: 0.6rem;
}

.footer-logo .logo-fallback {
    display: none;
    /* Hidden if img loads */
}

.footer-logo.no-img img {
    display: none;
}

.footer-info {
    text-align: left;
    font-size: 0.22rem;
    color: #444;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.5;
}

.footer-info p {
    margin: 0.02rem 0;
}

.footer-bottom {
    /* border-top: 1px solid rgba(0, 0, 0, 0.05); Removed border */
    padding-top: 0.1rem;
    width: 100%;
    color: #555;
    font-size: 0.2rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    /* Increased gap slightly */
    margin-top: 0.05rem;
}

.footer-links a,
.footer-links span {
    color: #555;
}

.affairs-featured {
    position: relative;
    width: 100%;
    height: 3.8rem;
    background-color: #e0e0e0;
    border-radius: 0.1rem;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.featured-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.featured-img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.15rem 0.2rem;
    font-size: 0.28rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.featured-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.featured-slide.active {
    opacity: 1;
    z-index: 2;
}

.featured-pagination {
    position: absolute;
    bottom: 0.8rem;
    right: 0.2rem;
    z-index: 3;
    display: flex;
    gap: 0.1rem;
}

.f-dot {
    width: 0.12rem;
    height: 0.12rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: background-color 0.3s;
}

.f-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}



.affairs-list {
    list-style: none;
    padding: 0;
}

.affairs-list li {
    position: relative;
    padding: 0.25rem 0;
    padding-left: 0.4rem;
    border-bottom: 1px solid #eee;
    font-size: 0.3rem;
    color: #333;
    line-height: 1.5;
    text-align: left;
}

.affairs-list li:last-child {
    /* background: none; Keep background for last item */
    /* Remove separator for last item */
    border-bottom: none;
}

.affairs-list li::before {
    content: "";
    position: absolute;
    left: 0.1rem;
    top: 0.35rem;
    /* Adjusted top alignment */
    width: 0.15rem;
    /* Adjusted size for image */
    height: 0.15rem;
    /* Adjusted size for image */
    background: url('http://szshequ.org.cn/static/sgw-mobile/images/index-images/icon-item-before.png') no-repeat center center;
    background-size: contain;
}

.tab-icon-img {
    height: 0.3rem;
    width: auto;
    margin-right: 0.05rem;
}

.affairs-list li a {
    display: block;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Module: Carousel */
.module-carousel {
    padding: 0.4rem;
    overflow: hidden;
    background-color: #fff;
    margin-bottom: 0.3rem;
}

.carousel-stage {
    position: relative;
    width: 100%;
    height: 3.5rem;
    perspective: 1000px;
    /* Enable 3D perspective */
    margin-bottom: 0.3rem;
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 50%;
    width: 5.5rem;
    /* Card width */
    height: 100%;
    margin-left: -2.75rem;
    /* Center the card: width/2 */
    transition: all 0.5s ease;
    opacity: 0;
    z-index: 0;
    transform: scale(0.8);
    /* Default state for hidden items */
}

.carousel-item img {
    border-radius: 0.2rem;
}

/* 
  We will use classes added by JS to control positions:
  .item-center: Active item, centered, full scale, top z-index
  .item-prev: Left item, scaled down, lower z-index
  .item-next: Right item, scaled down, lower z-index
*/

.carousel-item.item-center {
    opacity: 1;
    z-index: 10;
    transform: translateX(0) scale(1);
}

.carousel-item.item-prev {
    opacity: 1;
    z-index: 5;
    transform: translateX(-50%) scale(0.85);
    /* Move left */
    /* -50% here is relative to the item itself, but we want it to peek out.
       Since item is centered at 50% of screen, moving it -50% of its width 
       might not be enough or too much depending on screen. 
       Let's use fixed rems or percentage of viewport width logic in transform.
       Actually, translateX(-50%) moves it left by half its width.
       Since it starts at center, moving left by half width puts its right edge at center.
       This is good for peeking.
    */
    transform: translateX(-2.5rem) scale(0.85);
    filter: brightness(0.9);
}

.carousel-item.item-next {
    opacity: 1;
    z-index: 5;
    transform: translateX(2.5rem) scale(0.85);
    /* Move right */
    filter: brightness(0.9);
}

.carousel-card {
    width: 100%;
    height: 100%;
    border-radius: 0.2rem;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    /* Red Theme Background */
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 0.2rem;
    position: relative;
}

/* Optional: Add background image overlay pattern for "Red Theme" to look more like the screenshot */
.carousel-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIiBmaWxsPSJub25lIiBzdHJva2U9IiZmZmZmZmYiIHN0cm9rZS13aWR0aD0iMC41IiBzdHJva2Utb3BhY2l0eT0iMC4xIj48cGF0aCBkPSJNMCAyMEwyMCAwIiAvPjwvc3ZnPg==');
    opacity: 0.3;
}

.card-content {
    position: relative;
    z-index: 2;
}

.card-content h3 {
    font-size: 0.36rem;
    margin-bottom: 0.2rem;
    font-weight: normal;
    opacity: 0.9;
}

.card-content h2 {
    font-size: 0.48rem;
    font-weight: bold;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 0.15rem;
}

.carousel-dot {
    width: 0.4rem;
    height: 0.08rem;
    background-color: #ddd;
    border-radius: 0.04rem;
    transition: background-color 0.3s;
    cursor: pointer;
}

.carousel-dot.active {
    background-color: #0F6ED6;
}

/* Module: Footer */
.module-footer {
    background-color: #CDEEFE;
    /* Light blue background from image */
    padding: 0.4rem 0.3rem;
    color: #333;
    font-size: 0.24rem;
    line-height: 1.6;
    margin-top: 0.3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
    width: 100%;
}

.footer-logo {
    margin-right: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo img {
    width: 0.8rem;
    height: auto;
}

/* Fallback styling for placeholder */
.footer-logo.no-img .logo-fallback {
    display: inline-block;
    font-size: 0.6rem;
}

.footer-logo .logo-fallback {
    display: none;
    /* Hidden if img loads */
}

.footer-logo.no-img img {
    display: none;
}

.footer-info {
    text-align: left;
    font-size: 0.22rem;
    color: #444;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.5;
}

.footer-info p {
    margin: 0.02rem 0;
}

.footer-bottom {
    /* border-top: 1px solid rgba(0, 0, 0, 0.05); Removed border */
    padding-top: 0.1rem;
    width: 100%;
    color: #555;
    font-size: 0.2rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    /* Increased gap slightly */
    margin-top: 0.05rem;
}

.footer-links a,
.footer-links span {
    color: #555;
}

.page-footer {
    background: #C2E5FF !important;
    padding: 0 10px !important;
}