/* style.css */
:root {
    --primary-orange: #FF8C00;
    /* 深橘色 - 用於按鈕、重點 */
    --accent-red: #FF4500;
    /* 紅橘色 - 用於標題強調 */
    --soft-bg: #FFF5E6;
    /* 淺橘白 - 用於背景區塊 */
    --text-dark: #333333;
}

body {
    font-family: "Noto Sans TC", sans-serif;
    /* 建議引入 Google Fonts */
    color: var(--text-dark);
}

/* 導覽列設定 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    color: var(--accent-red) !important;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-orange) !important;
}

.nav-link.active {
    color: var(--accent-red) !important;
}

/* 按鈕樣式 */
.btn-custom {
    background-color: var(--primary-orange);
    color: white;
    border-radius: 50px;
    padding: 10px 30px;
    border: none;
    transition: all 0.3s;
}

.btn-custom:hover {
    background-color: var(--accent-red);
    color: white;
    transform: translateY(-2px);
}

/* 首頁 Hero 區塊 */
.hero-section {
    background: linear-gradient(rgba(255, 69, 0, 0.1), rgba(255, 140, 0, 0.2)), url('https://images.unsplash.com/photo-1518509562904-e7ef99cdcc86?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.section-title {
    color: var(--accent-red);
    font-weight: bold;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background: var(--primary-orange);
    margin: 10px auto 0;
}

/* 卡片樣式 */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    overflow: hidden;
}

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

.footer {
    background-color: #333;
    color: white;
    padding: 40px 0;
    margin-top: 50px;
}

/* 活動頁面的照片容器：用來隱藏放大時超出的邊界 */
.activity-img-wrapper {
    overflow: hidden;
    /* 超出範圍隱藏 */
    border-radius: 20px;
    /* 圓角大一點比較可愛 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* 增加陰影立體感 */
    height: 100%;
    /* 跟隨欄位高度 */
    min-height: 400px;
    /* 設定最小高度，確保照片夠大張！ */
}

/* 照片本體設定 */
.activity-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 重要！確保照片填滿且不變形 */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* 平滑過渡動畫 */
}

/* 滑鼠移過去時的放大效果 */
.activity-img-wrapper:hover .activity-img {
    transform: scale(1.1);
    /* 放大 1.1 倍 */
}

/* Why Us Section Icons */
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary-orange);
    font-size: 2.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-icon:hover {
    background-color: var(--primary-orange);
    color: white;
    transform: rotateY(180deg);
}



/* --- Premium Hot Schools Section --- */
.hot-schools-section {
    background-color: #F8FAFC;
    padding: 80px 0;
    overflow: hidden;
    /* Hide scrollbar from main page */
}

.hot-schools-title {
    font-size: 32px;
    font-weight: bold;
    color: #0F172A;
}

.hot-schools-subtitle {
    font-size: 16px;
    color: #64748B;
    margin-top: 12px;
}

/* Horizontal Scroll Container */
.school-scroll-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 40px;
    /* Space for shadow */
    padding-left: 5vw;
    /* Start with some padding */
    padding-right: 5vw;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.school-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Premium Card Style */
.premium-school-card {
    flex: 0 0 66.66vw;
    /* Desktop: 2/3 of screen width */
    width: 66.66vw;
    aspect-ratio: 16 / 10;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    scroll-snap-align: center;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-decoration: none;
    /* Removel link underline */
    display: flex;
    flex-direction: column;
}

/* Responsive Card Widths */
@media (max-width: 992px) {
    .premium-school-card {
        flex: 0 0 75vw;
        /* Tablet: Wider */
        width: 75vw;
    }
}

@media (max-width: 576px) {
    .premium-school-card {
        flex: 0 0 90vw;
        /* Mobile: ~1 card */
        width: 90vw;
    }
}

.premium-school-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* Card Top (Image) */
.card-top {
    height: 70%;
    position: relative;
    overflow: hidden;
}

.card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.premium-school-card:hover .card-bg-img {
    transform: scale(1.1);
}

/* Overlays */
.region-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.school-logo-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.school-logo-badge img {
    width: 80%;
    height: auto;
}

/* Card Bottom (Content) */
.card-bottom {
    height: 30%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Tags */
.tag-container {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.capsule-tag {
    background-color: #FFF7ED;
    color: #FF8C00;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.school-name-premium {
    font-size: 18px;
    font-weight: bold;
    color: #0F172A;
    margin-bottom: 6px;
    display: block;
}

.school-desc-premium {
    font-size: 14px;
    color: #64748B;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto;
    /* Push footer down */
}

/* Card Footer */
.card-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    border-top: 1px solid #F1F5F9;
    padding-top: 12px;
}

.rating-box {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    color: #0F172A;
    font-size: 14px;
}

.rating-box i {
    color: #FFC107;
}

.price-text {
    font-weight: bold;
    color: #0F172A;
    font-size: 14px;
}

/* Navigation Circles */
.scroll-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0F172A;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
}

.scroll-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.scroll-prev {
    left: 2vw;
}

.scroll-next {
    right: 2vw;
}





/* Testimonials Section */
.testimonial-section {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

.testimonial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff8c00' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 1;
}

/* 修正輪播圖文字顏色與背景 */
.testimonial-section .section-title {
    color: var(--accent-red) !important;
}

/* 確保評論卡片在視覺上突出 */
.carousel-inner .card {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary-orange);
    border-radius: 50%;
    padding: 20px;
    background-size: 50%, 50%;
}

/* --- School Detail Page Styles --- */

/* School Header */
.school-header {
    height: 50vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1541339907198-e08756dedf3f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    margin-top: 76px;
    /* Navbar height compensation */
}

/* Section Blocks */
.section-block {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.block-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--soft-bg);
}

.block-title i {
    color: var(--primary-orange);
}

/* Gallery Grid */
.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-item.large {
    height: 400px;
}

.gallery-item.small {
    height: 196px;
    /* (400 - 8gap) / 2 */
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    /* opacity: 1;  Removed uniform hover effect to only show on the last one if needed, or specific class */
}

/* Show overlay only on the item with the text */
.gallery-item .gallery-overlay:not(:empty) {
    opacity: 1;
}

/* --- Additional School Detail Blocks --- */

/* Block 2: Summary */
.summary-item {
    padding: 15px;
    background: #F8F9FA;
    border-radius: 15px;
    transition: transform 0.3s;
}

.summary-item:hover {
    transform: translateY(-5px);
    background: #FFFBF5;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.summary-item i {
    transition: transform 0.3s;
}

.summary-item:hover i {
    transform: scale(1.1);
}

/* Block 3: Course Accordion Customization */
.accordion-button:not(.collapsed) {
    background-color: var(--soft-bg);
    color: var(--text-dark);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, .125);
}

/* Block 4: Rich Review */
.review-content {
    background: #fdfbfb;
    padding: 20px;
    border-left: 4px solid var(--primary-orange);
    border-radius: 4px;
    font-style: italic;
}

/* Social Buttons in Navbar */
.btn-social-line {
    background-color: #06c755;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    margin-right: 10px;
}

.btn-social-line:hover {
    background-color: #05b34c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.btn-social-fb {
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.btn-social-fb:hover {
    background-color: #166fe5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

/* Yellow Dot Indicator */
.btn-social-line::after,
.btn-social-fb::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #FFC107;
    border-radius: 50%;
}

/* Adjust padding to make room for dot if needed, but flex gap might suffice. */
.btn-social-line,
.btn-social-fb {
    padding-right: 28px;
    /* Make space for the dot */
    width: 150px;
    height: 48px;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
}

/* Responsive adjustment for navbar */
@media (max-width: 991px) {
    .navbar-nav .nav-item.d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
        margin-top: 10px;
    }

    .btn-social-line,
    .btn-social-fb {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }
}

/* Softer Badge Colors */
.badge-soft-blue {
    background-color: #E3F2FD;
    color: #1976D2;
}

.badge-soft-red {
    background-color: #FFEBEE;
    color: #D32F2F;
}

.badge-soft-green {
    background-color: #E8F5E9;
    color: #388E3C;
}

.badge-soft-cyan {
    background-color: #E0F7FA;
    color: #0097A7;
}

.badge-soft-purple {
    background-color: #F3E5F5;
    color: #7B1FA2;
}

/* Gallery Lightbox */
.gallery-lightbox-modal .modal-dialog {
    max-width: 90vw;
    /* Wide modal */
    margin: 1.75rem auto;
}

.gallery-lightbox-modal .modal-content {
    background-color: transparent;
    /* Transparent background */
    border: none;
    box-shadow: none;
}

.gallery-lightbox-modal .carousel-item {
    height: 80vh;
    /* Fixed height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    /* Dark background for images */
}

.gallery-lightbox-modal img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    /* Ensure full image is visible */
}

.gallery-lightbox-modal .carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 10px;
    bottom: 2rem;
}

/* === PECA Page Styles === */

:root {
    --peca-navy: #001F3F;
    /* Navy Blue */
    --peca-gold: #D4AF37;
    /* Metallic Gold */
}

/* PECA Hero */
.peca-hero {
    background: url('https://images.unsplash.com/photo-1577962917302-cd874c4e31d2?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: 76px;
}

.peca-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 31, 63, 0.85);
    /* Navy Blue Overlay */
    z-index: 1;
}

.text-gold {
    color: var(--peca-gold) !important;
}

.text-navy {
    color: var(--peca-navy) !important;
}

.bg-navy {
    background-color: var(--peca-navy) !important;
}

/* PECA Value Cards */
.peca-value-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    /* Gold border low opacity */
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.peca-value-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--peca-gold);
}

.peca-value-card .icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--peca-gold);
    color: var(--peca-navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto;
}

/* Certificate Frames */
.cert-frame-wrapper {
    padding: 10px;
}

.cert-frame {
    border: 8px solid var(--peca-gold);
    padding: 5px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.cert-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--peca-navy);
    margin: 3px;
    pointer-events: none;
    z-index: 10;
}

.cert-frame:hover {
    transform: scale(1.05);
    /* Zoom effect */
    z-index: 2;
}

.section-title.text-gold.border-white::after {
    background: white;
    /* Underline white on dark bg */
}