* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "微軟正黑體", "Microsoft JhengHei", sans-serif;
}


/* Keep navigation menu colors */
.nav-menu a,
#header a {
    color: white !important;
}

.nav-menu a:hover {
    color: white !important;
}

/* Keep button colors */
.btn {
    color: red !important;
}

.btn a:hover {
    color: red !important;
}

a {
    color: inherit !important;
    text-decoration: none !important;
}

a:hover {
    color: inherit !important;
    text-decoration: none !important;
}

.inline-elements {
    display: inline-block;
    margin-right: 10px; /* Optional: Add some spacing between elements */
}
  
body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

#header {
    background-color: royalblue; /*#FF5555; /*rgba(200,0,0,0.7); /*#4169E1; /* for desktop and mobile */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    height: 50px;
    margin-right: 15px;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
}

.context-st {
    color: green;
    font-weight: bold;
}
.context-stl {
    color: green;
    font-weight: bold;
	font-size: 1.3em;
}
.text-hl {
    color: brown;
    font-weight: bold;
}

.menu-btn {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
    position: absolute;
    right: 20px; /* 20px*/
    top: 15px;
    z-index: 1001;
    background: none;
    border: none;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu a {
    color: white; /* for both desktop & mobile */
    text-decoration: none;
    font-size: 14px; /* 16px */
    transition: all 0.3s;
    padding: 3px 3px; /* -padding: 5px 10px; */
    border-radius: 4px;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

#content {
    max-width: 1900px; /* 1200*/
    margin: 20px auto;
    padding: 0 20px;
}

.page-title {
    text-align: center;
    margin-bottom: 30px;
    color: #d10000;
    font-size: 28px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /*minmax(300px, 1fr));*/
    gap: 20px;
    margin-bottom: 30px;
}

.content-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.content-item:hover {
    transform: translateY(-5px);
}

.content-image {
    width: 100%;
    height: auto;
    display: block;
}

.content-youtube {
    width: 100%;
    height: 250px;
    display: block;
}
.content-desc {
    padding: 10px; /* 15px */
}
.content-title {
	color: royalblue;
    font-size: 22px;
	font-weight: bold;
}
.content-sub-title {
    font-size: 16px;
	font-weight: bold;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination button {
    background: royalblue ;/*blue;*/
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.pagination button:hover {
    background: #c10000;
}

#footer {
    background: rgba(100,100,100,0.8);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Homepage specific styles */
.hero {
    background: linear-gradient(rgba(65,105,225,0.7), rgba(65,105,225,0.7)), url('../images/ee3_logo_wp.png'); /* 4169E1 rgba(200,0,0,0.7)*/
    background-size: contain; /*cover;*/
    background-position: center;
	background-repeat: no-repeat; /* Optional: Prevent image repetition */
    color: white;
    text-align: center;
    padding: 10px 10px;
    margin-bottom: 10px;
}

.hero h1 {
    font-size: 1.5rem;
    margin-bottom: 6px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1rem;
    max-width: 800px;
    margin: 0 auto 8px;
}

/* Special specific styles */
.sps {
    background: linear-gradient(rgba(200,200,200,0.7), rgba(200,200,200,0.7));
    color: #111;
    padding: 10px 10px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background: white;
    color: red;
    padding: 8px 10px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.small-btn {
    display: inline-block;
    background: #eeeeee;
    color: blue;
    padding: 3px 12px;
    text-decoration: none;
    border-radius: 2px;
	font-size: 10px;
    font-weight: bold;
    transition: all 0.3s;
}

/* Features Grid - Optimized for more items */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.feature-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.feature-img {
    height: 100px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 2.2rem;
    flex-shrink: 0;
}

.feature-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.feature-content h3 {
    color: #d10000;
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.3;
}

.feature-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.feature-content .btn {
    align-self: flex-start;
    margin-top: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.latest-news {
    background: #f9f9f9;
    padding: 40px 20px;
    margin: 40px 0;
}

.news-container {
    max-width: 1000px;
    margin: 0 auto;
}

.news-item {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.news-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.testimonials {
    text-align: center;
    padding: 10px 20px;
    background: white;
}

.testimonial {
    max-width: 800px;
    margin: 0 auto 30px;
    font-style: italic;
    color: #555;
}

.testimonial-author {
    font-weight: bold;
    color: #333;
    font-style: normal;
}

/* Overlay for mobile menu */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.overlay.show {
    display: block;
}

@media screen and (max-width: 768px) {
    .menu-btn {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        background: royalblue; /*#4169E1; /* mobile menu color */
        width: 50%;
        flex-direction: column;
        padding: 10px 0px 0px; /* 80px 20px 20px */
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        overflow-y: auto;
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
        padding: 5px 0; /*15px 0;*/
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu a {
        display: block;
        padding: 10px;
        font-size: 18px;
    }
    
    .site-title {
        font-size: 20px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 15px 15px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}

/* Scrolling Banner Base Styles */
.scrolling-banner-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.scrolling-banner-track {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.scrolling-banner-content {
    display: flex;
    height: 100%;
    width: max-content;
}

.scrolling-banner-item {
    flex: 0 0 auto;
    height: 100%;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scrolling-banner-item img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.scrolling-banner-item img:hover {
    transform: scale(1.05);
}

.scrolling-banner-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive scrolling banner */
@media screen and (max-width: 768px) {
    .scrolling-banner-container {
        height: 80px !important;
        margin: 15px 0;
    }
    
    .scrolling-banner-item img {
        height: 80px;
    }
    
    .scrolling-banner-item {
        padding: 0 8px;
    }
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
    .features {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 18px;
    }
}

@media screen and (max-width: 992px) {
    .features {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .feature-img {
        height: 80px;
        font-size: 2rem;
    }
    
    .feature-content {
        padding: 12px;
    }
}

@media screen and (max-width: 768px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .feature-img {
        height: 80px;
        font-size: 1.8rem;
    }
    
    .feature-content h3 {
        font-size: 1rem;
    }
    
    .feature-content p {
        font-size: 0.85rem;
    }
}

@media screen and (max-width: 480px) {
    .features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}



/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: royalblue; /*linear-gradient(135deg, royalblue 0%, #c0392b 100%); /*linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);*/
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.scroll-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
/*    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);*/
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.scroll-to-top:active {
    transform: translateY(0);
}

/* Alternative styles */
.scroll-to-top.rounded {
    border-radius: 8px;
    width: 60px;
    height: 60px;
}

.scroll-to-top.small {
    width: 40px;
    height: 40px;
    font-size: 16px;
    bottom: 20px;
    right: 20px;
}

.scroll-to-top.large {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.scroll-to-top.with-text {
    width: auto;
    height: auto;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

.scroll-to-top.with-text::before {
    content: "回到頂部";
    margin-right: 8px;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .scroll-to-top.with-text {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .scroll-to-top.with-text {
        padding: 8px 14px;
        font-size: 12px;
    }
}



//* Tab Container Styles - FIXED */
.tab-container {
    width: 100%;
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: white;
}

.tab-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.tab-button {
    padding: 5px 5px;
    background: #eeffee;
    border: none;
    cursor: pointer;
    font-size: 15px; /*16px*/
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
    min-width: 120px; /*100px; */
    text-align: center;
}
.tab-button:nth-child(odd) {
    background-color: #faedce; /*#e3f2fd;;*/
}

.tab-button:nth-child(even) {
    background-color: #fefae0; /*#f3e5f5;*/
}

.tab-button:hover {
    background: #e9ecef;
    color: #333;
}

.tab-button.active {
    color: #e74c3c;
    border-bottom-color : #e74c3c;
    background: #ECFAE5; /*white;*/
}



.tab-content {
    display: none; /* Important: hide all by default */
    padding: 5px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block; /* Important: only show active */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Ensure proper initialization */
.tab-content:not(.active) {
    display: none !important;
}

.tab-content.active {
    display: block !important;
}











/* Popup Overlay - Hidden by default */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    display: flex;
    opacity: 1;
}

.popup-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
	position: fixed;
    position: absolute;
}

.popup-overlay.active .popup-box {
    transform: scale(1);
    opacity: 1;
}

.popup-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.popup-content {
    padding: 10px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    line-height: 1.6;
}







/* try verison */
/* Popup Overlay - Hidden by default */
./*popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    display: flex;
    opacity: 1;
}

.popup-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    width: 95%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
	position: fixed;
}

.popup-overlay.active .popup-box {
    transform: scale(1);
    opacity: 1;
}

.popup-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1px 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    margin: 0;
    font-size: 0.9rem;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 12px;
    cursor: pointer;
    padding: 1px;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.popup-content {
    padding: 1px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    line-height: 1;
}

*/








/* Popup Trigger Styles */
.popup-trigger {
    cursor: pointer;
    transition: all 0.3s ease;
}

a.popup-trigger {
    color: brown;/*#3498db;*/
    text-decoration: none;
}

a.popup-trigger:hover {
    /*color: #2980b9;*/
    text-decoration: underline;
}

button.popup-trigger {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

button.popup-trigger:hover {
    background: #2980b9;
}

span.popup-trigger, div.popup-trigger {
    color: brown; /*#3498db;*/
    cursor: pointer;
    /*text-decoration: underline;*/
}

span.popup-trigger:hover, div.popup-trigger:hover {
    color: lightbrown; /*#2980b9;*/
}

img.popup-trigger {
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

img.popup-trigger:hover {
    border-color: #3498db;
}



.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 2fr)); /*minmax(300px, 1fr));*/
    gap: 5px;
    margin-bottom: 10px;
}

.book-item {
    background: white;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
   /* transition: transform 0.3s;*/
}
/*
.book-item:hover {
    transform: translateY(-3px);
}*/

.book-image {
    width: 65px;
    height: auto;
    display: block;
}

.book-desc {
    padding: 10px; /* 15px */
}
.book-sub-title {
    font-size: 10px;
	font-weight: bold;
}


