/*
Theme Name: RiseCreatives Theme
Description: 專為 RiseCreatives 展躍網路設計的專業佈景主題，具備 SEO 優化、輕量化設計及完美的 Elementor 相容性。
Author: RiseCreatives Team
Version: 1.0.0
License: GPL v2 or later
Text Domain: rise-theme
*/

/* 基本重置樣式 */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background-color: #ffffff;
    padding-top: 40px; /* 為fixed header留出空間 */
}

/* 基本Header樣式 - 確保顯示 */
.rise-theme-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    /* 移除陰影 */
    z-index: 1000;
    padding: 15px 0;
}

.rise-theme-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rise-theme-header-logo a {
    display: block;
    text-decoration: none;
}

.rise-theme-header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rise-theme-lets-talk-btn {
    background-color: #007cba;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

.rise-theme-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

/* 基本Footer樣式 */
.rise-theme-footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
    /* 移除margin-top */
}

.rise-theme-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.rise-theme-footer-title {
    color: #fff;
    margin-bottom: 15px;
}

.rise-theme-footer a {
    color: #ccc;
    text-decoration: none;
}

.rise-theme-footer a:hover {
    color: #fff;
}

.rise-theme-footer-copyright {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: center;
    color: #ccc;
}

/* 優化熱門標籤在窄欄位中的顯示 */
.footer-tags-column .footer-tag-list {
    gap: 8px; /* 縮小間距 */
}

.footer-tags-column .footer-tag-list a {
    padding: 4px 12px; /* 縮小內距 */
    font-size: 13px; /* 稍微縮小字體 */
    line-height: 1.2;
}

/* 手機版標籤優化 */
@media (max-width: 768px) {
    .footer-tags-column .footer-tag-list {
        gap: 10px; /* 手機版恢復較大間距 */
    }
    
    .footer-tags-column .footer-tag-list a {
        padding: 6px 15px; /* 手機版恢復原始內距 */
        font-size: 14px; /* 手機版恢復原始字體 */
    }
}

/* Newsletter欄位樣式 */
.footer-newsletter-column {
    color: #fff;
}

.footer-newsletter-content {
    margin-top: 15px;
}

/* Newsletter表單基本樣式 */
.footer-newsletter-content input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
    background-color: rgba(255,255,255,0.9);
}

.footer-newsletter-content input[type="submit"],
.footer-newsletter-content button {
    background-color: #54847A;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.footer-newsletter-content input[type="submit"]:hover,
.footer-newsletter-content button:hover {
    background-color: #456B61;
}

/* 手機版Newsletter欄位調整 */
@media (max-width: 768px) {
    .footer-newsletter-column {
        margin-top: 20px;
    }
    
    .footer-newsletter-content input[type="email"] {
        font-size: 16px; /* 避免iOS縮放 */
    }
}

/* 手機版強制顯示submenu */
@media (max-width: 768px) {
    .rise-theme-menu-overlay .overlay-submenu {
        position: static !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        margin-left: 1em;
        margin-top: 5px;
    }
    
    .rise-theme-menu-overlay .overlay-submenu li {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    
    /* 隱藏submenu切換按鈕 */
    .rise-theme-menu-overlay .submenu-toggle {
        display: none !important;
    }
}
.rise-theme-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/wp-content/uploads/2025/09/risecreatives-clean-background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* 添加半透明遮罩以確保文字可讀性 */
    background-color: rgba(0,0,0,0.3);
    background-blend-mode: multiply;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rise-theme-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 容器基本樣式 */
.rise-theme-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 清除浮動 */
.rise-theme-clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 響應式圖片 */
img {
    max-width: 100%;
    height: auto;
}

/* WordPress 核心樣式 */
.alignleft {
    float: left;
    margin-right: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

/* 無障礙設計 */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Rank Math SEO Breadcrumb 樣式優化 */
nav.rank-math-breadcrumb a {
	font-weight: 900;
    color: #497871;
    text-decoration: none;
    background-image: linear-gradient(#497871, #497871);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s ease-in-out;
}
nav.rank-math-breadcrumb a:hover {
    background-size: 100% 2px;
}
