/* Design System for FJCU USR Office Website
   Inspired by anniversary.fju.edu.tw and MoE Project
*/

/* Cards - Anniversary Style */
.card-modern {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    background: white;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Activity Zone Custom Card Layout */
.activity-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.activity-date {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-muted);
}

.activity-status-tag {
    background-color: #E2F5E9;
    /* Light green tint */
    color: #1A8754;
    /* Green color */
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.activity-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 10px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.activity-card-location {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.btn-activity-details {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background-color: transparent;
    border: 1.5px solid var(--primary-green);
    color: var(--primary-blue);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-base);
    text-decoration: none;
}

.btn-activity-details:hover {
    background-color: var(--primary-green);
    color: #2C3E35;
}

/* Hospital Plan 4 Cards */
.hospital-plan-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    /* Removed solid border */
    border-radius: 0;
    /* No rounded corners */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    /* Soft shadow */
    cursor: pointer;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Ensure header respects border radius */
}

.hospital-plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
}

.hospital-plan-card .hp-card-header {
    position: relative;
    color: white;
    padding: 15px 10px;
    height: 110px;
    /* Reduced fixed height for a slimmer header */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.15rem;
    /* For small text */
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    line-height: 1.4;
}

.hospital-plan-card .hp-card-body {
    background-color: white;
    padding: 30px 20px 40px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hospital-plan-card h3 {
    position: relative;
    font-size: 2.8rem;
    font-weight: 900;
    font-family: 'Noto Serif TC', serif;
    letter-spacing: 8px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hospital-plan-card h3 i {
    font-size: 2.2rem;
    margin-right: 15px;
}

/* Care Card - Deep Pink to Teal/Light Blue */
.card-care .hp-card-header {
    background-color: rgb(65, 166, 195);
}

.card-care h3 {
    color: rgb(65, 166, 195);
}

/* Empowerment Card - Medium Pink to Green/Teal */
.card-empower .hp-card-header {
    background-color: #64c0ab;
}

.card-empower h3 {
    color: #64c0ab;
}

/* Smart Card - Pale Pink to Purple */
.card-smart .hp-card-header {
    background-color: #b38ebf;
    color: white;
}

.card-smart h3 {
    color: #b38ebf;
}

/* Sustainability Card - Light Blue to Orange/Gold */
.card-sustain .hp-card-header {
    background-color: #e7a75c;
    color: white;
}

.card-sustain h3 {
    color: #e7a75c;
}

/* Modal Project Indicator Lights */
.modal-body .list-group-item {
    position: relative;
    padding-left: 40px !important;
    display: flex;
    align-items: center;
    border-left: none;
    border-right: none;
}

.modal-body .list-group-item::before {
    content: '';
    position: absolute;
    left: 15px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #dee2e6;
    /* Default gray light */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* When a project has data, add the 'has-data' class */
.modal-body .list-group-item.has-data::before {
    background-color: #ff3b30;
    /* Bright red light */
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}


/* --- Interactive Map / 合作亮點 --- */
.map-container {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.map-visual {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.map-marker {
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--primary-teal);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-teal);
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
}


/* 標記內不顯示數字 */


.map-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    animation: markerPulse 2s infinite;
}

@keyframes markerPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(3.5);
        opacity: 0;
    }
}

.map-marker.active {
    background: var(--primary-blue);
    box-shadow: 0 0 25px var(--primary-blue);
    width: 22px;
    height: 22px;
}

/* 停用標記：灰色、不可點選 */
.map-marker.disabled {
    background: #b0b8c1;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: none;
}

.map-marker.disabled::before {
    animation: none;
    opacity: 0;
}

.highlight-card {
    display: flex;
    flex-direction: column;
    animation: fadeInRight 0.5s ease-out;
    height: 100%;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.highlight-meta {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-teal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.highlight-kpi {
    background: var(--cream-bg);
    padding: 24px;
    border-radius: 16px;
    margin-top: auto;
}

.kpi-bar-bg {
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
}

.kpi-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-teal));
    transition: width 1.5s cubic-bezier(0.1, 0, 0.2, 1);
}

@media (max-width: 991px) {
    .map-container {
        grid-template-columns: 1fr;
    }
}

/* Circular Icon Links - MoE Style */
.feature-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: -50px;
    position: relative;
    z-index: 20;
}

.feature-circle {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    text-decoration: none;
    color: var(--dark-blue);
    font-size: 0.85rem;
    font-weight: 500;
}

.feature-circle i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--primary-blue);
}

.feature-circle:hover {
    background: var(--primary-green);
    color: #2C3E35;
    transform: translateY(-10px);
}

.feature-circle:hover i {
    color: #2C3E35;
}


/* News Badges and Decorations */
.news-date {
    background: var(--primary-green);
    color: #2C3E35;
    /* 深綠灰文字確保可讀性 */
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1.2;
    text-align: center;
}

.news-date strong {
    font-size: 1.2rem;
    display: block;
}

.card-modern .tag,
.tag {
    font-size: 0.75rem;
    padding: 3px 12px;
    border-radius: 20px;
    background: #E8F7EF;
    /* 薄荷綠淡色調 */
    color: var(--primary-blue);
    font-weight: 500;
}

/* News List Optimized Layout */
.news-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.news-list-item {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 12px 35px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border-left: 0px solid var(--primary-green);
    position: relative;
    overflow: hidden;
}

.news-list-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
    border-left: 6px solid var(--primary-green);
    background: #f0fbf5;
    /* 薄荷綠極淡底色 */
}

.news-date-side {
    flex: 0 0 100px;
    text-align: center;
    border-right: 1px solid #eee;
    margin-right: 30px;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-date-side .year {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
}

.news-date-side .day {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-blue);
    display: block;
}

.news-content-side {
    flex: 1;
}

.news-title {
    font-size: 1.25rem;
    color: var(--dark-blue);
    margin-bottom: 5px;
    transition: var(--transition-base);
}

.news-list-item:hover .news-title {
    color: var(--primary-blue);
}

.news-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-arrow-side {
    font-size: 1.2rem;
    color: #ccc;
    margin-left: 20px;
    transition: var(--transition-base);
}

.news-list-item:hover .news-arrow-side {
    color: var(--primary-green);
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .news-list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .news-date-side {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #eee;
        margin-right: 0;
        margin-bottom: 15px;
        padding-right: 0;
        padding-bottom: 10px;
        flex-direction: row;
        gap: 10px;
        align-items: baseline;
    }

    .news-arrow-side {
        display: none;
    }
}


/* Project Category Tabs */
.project-tabs-container {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.project-tab {
    background: transparent;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 8px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition-base);
    cursor: pointer;
}

.project-tab:hover {
    border-color: var(--primary-green);
    color: var(--primary-blue);
}

.project-tab.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: #2C3E35;
    box-shadow: 0 4px 12px rgba(151, 216, 178, 0.35);
}

/* Project Filter Section - Refined Style */
.project-filter-container {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary-green);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    flex: 1 1 calc(16.66% - 15px);
    min-width: 150px;
}

.custom-filter-select {
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: #fcfcfc;
    transition: var(--transition-base);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23FF8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 14px 10px;
}

.custom-filter-select:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.15);
    outline: none;
}

.search-row .input-group {
    max-width: 100%;
    border-radius: 30px !important;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-row input {
    border: 1px solid #e0e0e0;
    border-right: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 30px 0 0 30px !important;
}

.search-row input:focus {
    border-color: #5bc0de;
    box-shadow: none;
}

.btn-search-custom {
    background-color: #5bc0de;
    color: white;
    font-weight: 700;
    padding: 0 40px;
    border: none;
    letter-spacing: 1px;
    transition: var(--transition-base);
    border-radius: 0 30px 30px 0 !important;
}

.btn-search-custom:hover {
    background-color: #46b8da;
    color: white;
}

@media (max-width: 991px) {
    .filter-group {
        flex: 1 1 calc(33.33% - 15px);
    }
}

@media (max-width: 576px) {
    .filter-group {
        flex: 1 1 100%;
    }

    .btn-search-custom {
        padding: 0 20px;
        font-size: 0.8rem;
    }
}

/* Video Section Styles */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.video-card {
    background: var(--white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: #5bc0de;
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
    opacity: 0.8;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2C3E35;
    box-shadow: 0 0 20px rgba(151, 216, 178, 0.6);
    transform: scale(0.8);
    transition: var(--transition-base);
}

.video-card:hover .play-button {
    transform: scale(1);
}

.video-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #E8F7EF;
    /* 薄荷綠淡色調 */
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.video-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
    font-size: 0.85rem;
    color: #999;
}

.video-views {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-blue);
    font-weight: 500;
}

.video-views svg {
    width: 16px;
    height: 16px;
}

/* Modal / Lightbox for Video */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.video-modal.active {
    display: flex;
}

.modal-content-video {
    width: 100%;
    max-width: 1000px;
    position: relative;
    background: transparent;
    border-radius: 12px;
    border: none;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.close-modal-video {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: var(--transition-base);
    line-height: 1;
    z-index: 2001;
}

.close-modal-video:hover {
    color: var(--primary-green);
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }

    .video-modal {
        padding: 20px;
    }

    .close-modal-video {
        top: -35px;
        right: 0px;
    }
}

/* ============================================================
   index.php — 從 inline style 提取的 CSS（2026-03）
   ============================================================ */

/* Hero Carousel */
.carousel-slide {
    height: 500px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .carousel-slide {
        height: auto;
    }
    .carousel-slide-img {
        height: auto;
    }
}

.carousel-caption-box {
    background: rgba(0, 51, 102, 0.7);
    border-radius: 8px;
    padding: 20px;
}

/* Four Cards Wrapper (四大範疇) */
.four-cards-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto 3rem;
    z-index: 1;
}

/* Center Logo */
.center-logo-link {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    z-index: 2;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.center-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.3)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    transition: filter 0.3s ease;
}

/* Activity Card Image */
.activity-card-img {
    object-fit: cover;
}

/* Modal Title Colors */
.modal-title-care {
    color: rgb(65, 166, 195);
    font-weight: bold;
    font-family: 'Noto Serif TC', serif;
}

.modal-title-empower {
    color: #3b8d78;
    font-weight: bold;
    font-family: 'Noto Serif TC', serif;
}

.modal-title-smart {
    color: #8b5d9b;
    font-weight: bold;
    font-family: 'Noto Serif TC', serif;
}

.modal-title-sustain {
    color: #c87f28;
    font-weight: bold;
    font-family: 'Noto Serif TC', serif;
}

/* Highlight Card — name & body */
.highlight-name {
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 2rem;
    border-left: 5px solid var(--primary-orange);
    padding-left: 15px;
    margin-bottom: 1rem;
}

.highlight-body {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* KPI icon badge */
.kpi-icon-badge {
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

.kpi-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--primary-blue);
}

/* Highlight btn */
.highlight-btn {
    border-radius: 12px;
}