/* 全局樣式 */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
}
        
body {
	background-color: #f9f9f7;
	color: #333;
	line-height: 1.6;
}
        
a {
	text-decoration: none;
	color: #4a6ea9;
}

/* 頂部導航↓ */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* 收放選單按鈕 */
.menu-toggle {
    display: none; /* 預設隱藏 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1000;
}
.menu-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #555;
    margin: 5px 0;
    transition: all 0.3s ease;
}
/* 導覽選單 */
.nav-menu {
    display: flex;
    transition: all 0.3s ease;
}

.nav-menu ul {
    display: flex;
    list-style: none;
}

.nav-menu ul li {
    margin-left: 2rem;
}

.nav-menu ul li a {
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu ul li a:hover {
    color: #d4a017;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px;
    margin-right: 10px;
}

.logo h1 {
    color: #d4a017;
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #d4a017;
}

.header-social-icons {
    display: flex;
    align-items: center;
    gap: 15px; /* 圖示間距 */
    margin-left: 2rem; /* 與導航菜單的間距 */
}

.header-social-icons a {
    color: #555; /* 圖示顏色 */
    font-size: 1.5rem; /* 圖示大小 */
    transition: color 0.3s ease;
}

.header-social-icons a:hover {
    color: #d4a017; /* 鼠標懸停顏色 */
}
/* 手機樣式 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* 顯示收放按鈕 */
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        flex-direction: column;
        justify-content: center;
        z-index: 999;
        padding: 2rem;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
    }
    
    .nav-menu ul li {
        margin: 1rem 0;
    }
    
    /* 收放選單動畫 */
    .menu-toggle.active .menu-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active .menu-bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .menu-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* 防止背景滾動 */
    body.menu-open {
        overflow: hidden;
    }

    .header-social-icons {
        display: none;
    }
}
/* 頂部導航↑ */

/* 頁面內容容器 */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 3%;
}

/* 頁腳↓ */
footer {
    background-color: #333;
    color: #fff;
    padding: 2rem 3%;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1rem;
}

.footer-section h3 {
    color: #d4a017;
    margin-bottom: 1rem;
}

.social-icons a {
    color: #fff;
    margin-right: 10px;
    font-size: 1.5rem;
}

.copyright {
    width: 100%;
    padding-top: 1rem;
    border-top: 1px solid #555;
    margin-top: 1rem;
}
/* 頁腳↑ */

/* 首頁↓ */
.hero {
	background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://example.com/buddha-image.jpg');
	background-size: cover;
	background-position: center;
	height: 60vh;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	text-align: center;
}
        
.hero-content h2 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}
        
.hero-content p {
	font-size: 1.2rem;
	max-width: 800px;
	margin: 0 auto 2rem;
}
/* 首頁↑ */
        
/* 每日法語區塊↓ */
.daily-wisdom {
	background-color: #f8f4e9;
    padding: 0;
    border-top: 3px solid #d4a017;
    border-bottom: 3px solid #d4a017;
    margin-bottom: 2rem;
}

.wisdom-title {
    text-align: center;
    color: #8c6a3d;
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.3rem;
}

.wisdom-title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 3px;
    background-color: #d4a017;
}

.wisdom-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    padding: 0;
    position: relative;
}

.wisdom-text {
    font-size: 1.4rem;
    line-height: 1.8;
    color: #5a4a3a;
    margin-bottom: 1rem;
    font-style: italic;
    position: relative;
    padding: 0 2rem;
}

.wisdom-text:before,
.wisdom-text:after {
    content: '"';
    font-size: 2.5rem;
    color: #d4a017;
    position: absolute;
    opacity: 0.6;
}

.wisdom-text:before {
    left: -5px;
    top: -15px;
}

.wisdom-text:after {
    right: -1px;
    bottom: -35px;
}

.wisdom-source {
    font-size: 1.1rem;
    color: #8c6a3d;
    text-align: right;
    font-weight: 500;
}

/* 響應式調整 */
@media (max-width: 768px) {
	.wisdom-title {
    	font-size: 1.7rem;
	}
	
	.wisdom-title:after {
    	width: 110px;
	}

    .wisdom-text {
        font-size: 1.2rem;
        padding: 0 1.5rem;
    }
    
    .wisdom-content {
        padding: 0.2rem;
    }
}

@media (max-width: 480px) {
    .daily-wisdom {
        padding: 2rem 0;
    }
    
    .wisdom-text {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .wisdom-text:before,
    .wisdom-text:after {
        font-size: 2rem;
    }
    
    .wisdom-title {
        font-size: 1.7rem;
    }
}
/* 每日法語區塊↑ */
        
/* YouTube影片嵌入↓ */
.video-section {
    padding: 0.5rem 0;
    background-color: #fff;
}

.video-container {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.youtube-embed {
    flex: 3;
    position: relative;
    /* 移除固定比例，改用動態高度 */
    height: 0;
    padding-bottom: calc(56.25% * 0.75); /* 調整為原始高度的75% */
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-btn {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f8f4e9;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #d4a017;
}

.list-btn {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f8f4e9;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #d4a017;
}

.video-btn:hover {
    background-color: #f0e6d2;
    transform: translateY(-2px);
}

.video-btn.active {
    background-color: #d4a017;
    color: white;
}

.video-btn.active .btn-icon {
    color: white;
}

.btn-icon {
    margin-right: 0.8rem;
    color: #d4a017;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.btn-text {
    font-weight: 500;
    font-size: 20px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .youtube-embed {
        padding-bottom: 56.25%; /* 恢復標準16:9比例 */
    }
    .video-container {
        flex-direction: column;
    }
    
    .video-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .video-btn {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: 0.8rem 0.5rem;
    }
    
    .list-btn {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: 0.8rem 0.5rem;
    }

    .btn-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
        font-size: 1rem;
    }
    
    .btn-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .video-buttons {
        flex-wrap: wrap;
    }
    
    .video-btn {
        min-width: calc(50% - 0.5rem);
    }

    .list-btn {
        min-width: calc(50% - 0.5rem);
    }
}
/* YouTube影片嵌入↑ */

/* 按鈕樣式↓ */
.btn {
    display: inline-block;
    background-color: #d4a017;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #b38a14;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}
/* 按鈕樣式↑ */

.features {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin: 3rem 0;
}
        
.feature-box {
	flex: 1;
	min-width: 250px;
	background-color: white;
	padding: 2rem;
	margin: 1rem;
	border-radius: 5px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	text-align: center;
}
        
.feature-box i {
	font-size: 2.5rem;
 	color: #d4a017;
	margin-bottom: 1rem;
}
        
/* 其他共用樣式↓ */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #d4a017;
}

.page-header h2 {
    color: #d4a017;
    font-size: 2rem;
}
/* 其他共用樣式↑ */

/* 行事曆樣式↓ */
.calendar {
    width: 100%;
    border-collapse: collapse;
}
        
.google-calendar-container {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-actions {
    text-align: center;
    margin: 1.5rem 0;
}

.calendar-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #d4a017;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.calendar-actions .btn:hover {
    background-color: #b38a14;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .google-calendar-container iframe {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .google-calendar-container iframe {
        height: 300px;
    }
} 
/* 行事曆樣式↑ */
     
/* 協會列表樣式↓ */
.association-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.association-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.association-card:hover {
    transform: translateY(-5px);
}

.association-image {
    display: block;
    max-height: auto;
    max-width: 100%;
    object-fit: contain;
    background-size: cover;
    padding: 1px;
}

.association-image img {
    width: 100%;
    height: 100%;
}

.association-info {
    padding: 1.2rem;
}

.association-info h3 {
    color: #d4a017;
    margin-bottom: 0.5rem;
}

.association-info p {
    color: #666;
    margin-bottom: 1rem;
}

.btn-more {
    background-color: #f8f4e9;
    color: #d4a017;
    border: 1px solid #d4a017;
}

.btn-more:hover {
    background-color: #d4a017;
    color: white;
}

/* 詳細介紹彈出層 */
.association-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.association-detail-container {
    background-color: #fff;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 2rem;
    position: relative;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0e6d2;
}

.detail-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.detail-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    padding: 2px;
    background-color: white;
}

#detail-title {
    margin: 0;
    color: #d4a017;
    font-size: 2rem;
}

.detail-image {
    display: block;
    max-height: auto;
    max-width: 100%;
    object-fit: contain;
    background-size: cover;
    background-position: center;
    margin: 1.5rem 0;
    border-radius: 5px;
}

.detail-image img {
    width: 100%;
    height: 100%;
}

.detail-text {
    line-height: 1.8;
    color: #555;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .association-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .association-detail-container {
        padding: 1.5rem;
    }

    .detail-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    #detail-title {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .association-list {
        grid-template-columns: 1fr;
    }
    
    #detail-title {
        font-size: 1.5rem;
    }
}
/* 協會列表樣式↑ */

/* 道場列表樣式↓ */
.region-selector {
    margin: 2rem 0;
    text-align: center;
}

.region-dropdown {
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 1rem;
    background-color: #fff;
    width: 100%;
    max-width: 300px;
}

.temple-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin: 2rem 0;
}

.temple-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.temple-card:hover {
    transform: translateY(-5px);
}

.temple-image {
    height: 200px;
    background-color: #f8f4e9;
    background-size: cover;
    background-position: center;
    position: relative;
}

.temple-info {
    padding: 1.5rem;
}

.temple-info h3 {
    color: #d4a017;
    margin-bottom: 0.5rem;
}

.temple-info p {
    color: #666;
    margin-bottom: 0.5rem;
}

.temple-info .btn {
    display: inline-block;
    margin-top: 1rem;
}

/* 道場詳細資訊彈出層 */
.temple-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.temple-detail-container {
    background-color: #fff;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 2rem;
    position: relative;
}

.detail-info {
    margin: 1.5rem 0;
}

.detail-info p {
    margin-bottom: 1rem;
    color: #555;
}

.detail-info i {
    color: #d4a017;
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.map-container {
    width: 100%;
    height: 300px;
    background-color: #eee;
    margin-top: 1.5rem;
    border-radius: 5px;
    overflow: hidden;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .temple-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .temple-detail-container {
        padding: 1.5rem;
    }
    
    .map-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .temple-list {
        grid-template-columns: 1fr;
    }
    
    .temple-detail-container {
        padding: 1rem;
    }
    
    .map-container {
        height: 200px;
    }
}
/* 道場列表樣式↑ */
         
/* 影音專區樣式↓ */
.playlist-selector {
    margin: 2rem 0;
    text-align: center;
}

.playlist-dropdown {
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 1rem;
    background-color: #fff;
    width: 100%;
    max-width: 400px;
}

.video-player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    margin: 2rem 0;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-list-container {
    margin-top: 1.5rem;
}

#playlist-title {
    color: #d4a017;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0e6d2;
}

.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.video-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.video-item:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    background-size: cover;
    background-position: center;
}

.video-thumbnail:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

.video-item:hover .video-thumbnail:after {
    background-color: rgba(0,0,0,0);
}

.video-info {
    padding: 1rem;
}

.video-info h4 {
    color: #333;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-info p {
    color: #666;
    font-size: 0.9rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .video-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .video-list {
        grid-template-columns: 1fr;
    }
    
    .playlist-dropdown {
        padding: 0.7rem 1rem;
    }
}
/* 影片彈出層樣式 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.video-modal-content {
    width: 100%;
    max-width: 900px;
    background-color: #ffffff00;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.close-video-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

#youtube-player {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
}

.video-info-panel {
    padding: 1.5rem;
}

#video-modal-date {
    color: #888;
    font-size: 0.9rem;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .video-modal-content {
        max-width: 95%;
    }
    
    .video-info-panel {
        padding: 1rem;
    }
}
/* 影音專區樣式↑ */
      
/* 聯絡表單樣式↓ */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
        
.form-group {
    margin-bottom: 1.5rem;
}
        
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
        
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}
        
.form-group textarea {
    height: 150px;
}
/* 聯絡表單樣式↑ */
            
/* 響應式設計 */
@media (max-width: 1200px) {
	.container, .navbar, .footer-content {
		max-width: 100%;
	}
}
        
@media (max-width: 992px) {
	.temple-card {
		flex: 0 0 calc(50% - 1rem);
	}
}

@media (max-width: 768px) {
	/*.navbar {
		flex-direction: column;
		padding: 1rem;
	}*/
            
	nav ul {
		margin-top: 1rem;
		flex-wrap: wrap;
		justify-content: center;
	}
            
	nav ul li {
		margin: 0.5rem 1rem;
	}
            
	.hero-content h2 {
		font-size: 2rem;
	}
            
	.temple-card {
		flex: 0 0 100%;
	}
            
	.feature-box {
		flex: 0 0 100%;
		margin: 1rem 0;
	}
}
