/* CSS 通用設定 */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: Arial, sans-serif;
            background-color: #f0f2f5;
            line-height: 1.6;
        }

        /* 導覽列 — 已由 head5-tw.asp 的 .ct-nav 接管，舊版隱藏 */
        .top-nav, .modal-overlay, .modal-content,
        .close-btn, .search-modal-content, .login-modal-content {
            display: none !important;
        }

        /* 外層容器：控制左右留白與最大寬度 */
        .container {
			width: 100%;
			max-width: 1200px;
			margin: 0 auto;
			padding: 0 16px; 
			box-sizing: border-box;
		}
        
        .content-wrapper {
			display: flex;
			flex-wrap: wrap;
			gap: 24px;         /* 這是 24px 的間距 */
			margin-top: 20px;
			justify-content: center; /* 修正偏移：讓主要內容和側欄在容器內水平置中 */
		}

        /* 搜尋區塊樣式 */
        .search-block {
			background-color: #fff;
			border-radius: 8px;
			box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
			padding: 20px;
			margin-bottom: 25px;
		}

		.search-field {
			display: flex;
			align-items: center;
			gap: 8px;
			font-size: 0.9em;
			color: #555;
		}

		.search-block input, .search-block select {
			padding: 8px;
			border: 1px solid #ccc;
			border-radius: 5px;
			font-size: 1em;
		}

		.search-block input {
			width: 180px;
		}

		.search-block button {
			padding: 10px 20px;
			background-color: #007BFF;
			color: white;
			border: none;
			border-radius: 5px;
			cursor: pointer;
			font-size: 1em;
			transition: background-color 0.3s;
		}

		.search-block button:hover {
			background-color: #0056b3;
		}

        /* 主要區塊：新聞列表 */
        .main-section {
			width: calc(70% - 12px); 
			flex: 1 1 calc(70% - 12px);
			max-width: 720px;
        }
        
        .main-section h3 {
            font-size: 1.5em;
            color: #333;
            margin-bottom: 15px;
        }
		.main-section h2 a {
			text-decoration: none !important;
			color: #0b5f89 !important;
		}
        /* 附加區塊：廣告與列表 */
        .sidebar {
            width: calc(30% - 12px);
			flex: 0 0 calc(30% - 12px);
        }

        /* 新聞單元樣式 */
        .news-item {
			background-color: #fff;
			border-radius: 8px;
			box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
			padding: 20px;
			margin-bottom: 15px;
			display: flex;
			flex-direction: column;
			/* 核心修改：確保內部內容靠左 */
			align-items: flex-start; 
			text-align: left;
		}
		
		.news-icon {
			display: inline-block;
			vertical-align: middle; /* 與文字中線對齊 */
			margin-right: 10px;    /* 與標題的間距 */
			width: 24px;           /* 統一 ICON 大小 */
			height: 24px;
		}

		.news-icon img {
			width: 100%;
			height: auto;
			display: block;
		}

        .news-header {
            display: block; 
			line-height: 1.6;
			text-align: left;
        }

        .news-date {
            font-size: 0.9em;
            color: #666;
            flex-shrink: 0;
            white-space: nowrap;
            margin-left: 15px;
        }

        .news-title {			
			color: #333;			
			width: 100%;
			display: inline;
			font-size: 1.45rem;    /* 加大標題 */
			font-weight: bold;
			word-wrap: break-word;
			vertical-align: middle;
		}
		
		.news-title a {
			display: inline;
			color: #0b5f89;
			text-decoration: none;
			font-size: 1.3rem;
		}
		
		.news-summary {
			color: #555;
			width: 100%;
			font-size: 1.05rem;    /* 加大摘要，比標題小 */
			line-height: 1.7;
		}
        
        /* 附加區塊內部的樣式 */
        .sidebar-block {
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            padding: 20px;
            margin-bottom: 20px;
        }

        .ad-banner {
			min-height: 100px; /* 設定最小高度而非固定高度 */
			background-color: #e0e0e0;
			border: 1px dashed #ccc;
			display: flex;
			flex-direction: column; /* 讓圖片與 <br> 垂直排列 */
			align-items: center;
			justify-content: center;
			font-size: 1.2em;
			color: #999;
			text-align: center;
			overflow: hidden; /* 防止內容溢出 */
			padding: 10px;
		}

		/* 確保廣告圖片不會撐破容器 */
		.ad-banner img {
			max-width: 100%;
			height: auto;
			display: block;
		}

        .sidebar-list h3 {
            margin-bottom: 10px;
            color: #555;
        }

        .sidebar-list ul {
            list-style-type: none;
        }

        .sidebar-list li {
            padding: 8px 0;
            border-bottom: 1px solid #eee;
        }
        
        .sidebar-list li:last-child {
            border-bottom: none;
        }
		
		.sidebar-block.sidebar-list ul {
			list-style-type: none;
			padding: 0;
			margin: 0;
			text-align: left;
		}

		
		.sidebar-block.sidebar-list li {
			display: flex;
			align-items: flex-start; /* 編號對齊標題第一行文字 */
			padding: 10px 0;
			border-bottom: 1px solid #eee;
			text-align: left;
			line-height: 1.5;
		}

		.sidebar-block.sidebar-list li span {
			display: inline-block;
			flex-shrink: 0; 
			font-size: 11px;       
			font-weight: 500; 
			color: #888;	
			width: 42px; 
			margin-right: 12px;
			font-family: Arial, sans-serif;
		}

		.sidebar-block.sidebar-list li a {
			display: inline;
			text-decoration: none !important;
			color: #110f0f !important; 
			font-size: 14px;
			word-break: break-all;
		}
		.sidebar-block.sidebar-list li:last-child {
			border-bottom: none;
		}

		
		

        /* 分頁區塊 */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 20px;
        }

        .page-link {
            display: inline-block;
            padding: 8px 12px;
            margin: 0 4px;
            border: 1px solid #ccc;
            border-radius: 5px;
            text-decoration: none;
            color: #555;
            background-color: #fff;
            transition: background-color 0.3s;
        }

        .page-link:hover {
            background-color: #e0e0e0;
        }

        .page-link.active {
            background-color: #007BFF;
            color: white;
            border-color: #007BFF;
        }

        .pagination span {
            padding: 0 8px;
            color: #888;
        }
        
		.find {color:#ff0000;}
		
        /* 底部頁尾 */
        .footer {
            background-color: #333;
            color: white;
            text-align: center;
            padding: 20px;
            margin-top: 40px;
        }
		.ad-section {
			display: flex;
			justify-content: center;
			align-items: center;
			flex-wrap: wrap;
			padding: 16px 16px 10px 16px; /* 上方加間距，與 nav 保持距離 */
			gap: 24px;
		}
		.ad-item {
			background-color: transparent; /* 移除灰色底色 */
			color: #fff;
			text-align: center;
			display: flex;
			justify-content: center;
			align-items: center;
			font-size: 14px;
		}
		/* 寬度對齊內容區 */
		.ad-item-720 { width: 100%; max-width: 720px; height: 90px; }
		.ad-item-720 img { max-width: 100%; height: auto; }
		/* DCM 廣告 <ins> 元素：強制 block 並置中 */
		.ad-item-720 ins.dcmads {
			display: block !important;
			margin: 0 auto !important;
			max-width: 728px !important;
		}
		.ad-item-336 { width: 336px; height: 90px; }
		
		.popular ul {
			list-style: none;
			padding: 0;
			text-align: left; /* 靠左 */
		}
		.popular ul li {
			padding: 8px 0;
			color: #110f0f;
			font-size: 14px;
		}
		.popular ul li a {
			text-decoration: none !important;
			color: #110f0f !important;
		}
        /* 隱藏搜尋區塊 */
        .search-block { display: none !important; }

        /* RWD 設定：當螢幕寬度小於 768px 時 */
        @media (max-width: 768px) {
            .container {
                padding: 0 10px;
            }
            
            .sidebar {
                display: none;
            }
            
            .main-section h3 {
                text-align: center;
            }
			
            .news-header {
                display: block !important;
            }
			
			.news-icon {
				width: 20px;
				height: 20px;
				margin-right: 8px;
			}

            .news-date {
                order: 2;
                margin-left: 0;
                margin-top: 5px;
            }
			
			.news-title a {
				white-space: normal; 
			}

            .news-title {
                font-size: 1.2rem;
				display: inline;
            }

            .news-summary {
                font-size: 0.95rem;
            }
            
            .pagination span {
				display: inline-block;
				color: #888;
			}
			
			.pagination .page-link {
				padding: 6px 10px;
				font-size: 14px;
			}
          
            .sidebar-block.sidebar-list li span {
				width: 38px;
				margin-right: 8px;
				font-size: 10px;
			}
			.content-wrapper {
				flex-direction: column;
				gap: 0;
			}
			.main-section, .sidebar {
				width: 100% !important;
				flex: 1 1 100% !important;
				max-width: 100% !important;
			}	
        }

        /* 手機版：DCM 廣告等比縮放，避免跑版 */
        @media (max-width: 728px) {
            .ad-section {
                padding-top: 12px; /* 手機版與 nav 的額外間距 */
            }
            .ad-item-720 {
                overflow: hidden;
                height: calc(100vw * 90 / 728); /* 等比高度 */
				display: none !important;
            }
            .ad-item-720 ins.dcmads {
                width: 728px !important;         /* 保持廣告原始寬度 */
                transform-origin: top left;
                transform: scale(calc(100vw / 728));
            }
        }

        /* 對齊 default7 斷點：1055px 以下隱藏 336 廣告 */
        @media (max-width: 1055px) {
            .ad-item-336 {
                display: none !important;
            }
        }