﻿body {
    font-size: 16px;
    font-family: "Helvetica Nueue", Arial, Verdana, sans-serif;
    background-color: #e6e6e6;
}
.btn:hover,
.btn:focus,
.btn:active {
    outline: 0 !important;
}
/* entire container, keeps perspective */
.rotating-card-container {
    -webkit-perspective: 800px;
    -moz-perspective: 800px;
    -o-perspective: 800px;
    perspective: 800px;
    margin-bottom: 2rem;
    transition: box-shadow 0.3s;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.rotating-card-container:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
/* flip the pane when hovered */
.rotating-card-container:not(.manual-flip):hover .rotating-card,
.rotating-card-container.hover.manual-flip .rotating-card {
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    -o-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.rotating-card-container.static:hover .rotating-card,
.rotating-card-container.static.hover .rotating-card {
    -webkit-transform: none;
    -moz-transform: none;
    -o-transform: none;
    transform: none;
}
/* flip speed goes here */
.rotating-card {
    -webkit-transition: -webkit-transform 0.5s;
    -moz-transition: -moz-transform 0.5s;
    -o-transition: -o-transform 0.5s;
    transition: transform 0.5s;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -o-transform-style: preserve-3d;
    transform-style: preserve-3d;
    position: relative;
}

/* hide back of pane during swap */
.front,
.back {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -o-backface-visibility: hidden;
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #fff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.14);
    border-radius: 1rem;
}

/* front pane, placed above back */
.front {
    z-index: 2;
}

/* back, initially hidden pane */
.back {
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    -o-transform: rotateY(180deg);
    transform: rotateY(180deg);
    z-index: 3;
}

.back .btn-simple {
    position: absolute;
    left: 0;
    bottom: 4px;
}
/*        Style       */

.rotating-card {
    background: none repeat scroll 0 0 #ffffff;
    border-radius: 4px;
    color: #444444;
    text-align: center;
}
.rotating-card-container,
.front,
.back {
    width: 100%;
    min-height: 380px;
}
.rotating-card .cover {
    height: 70px;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}
.rotating-card .cover img {
    width: 100%;
    object-fit: cover;
}
.rotating-card .user {
    /*border-radius: 50%;*/
    display: block;
    min-height: 132px;
    margin: -40px auto 10px;
    overflow: hidden;
    width: 200px;
}
.rotating-card .img-thumbnail {
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}
.rotating-card .img-thumbnail:hover {
    transform: scale(1.05);
}

.rotating-card .content {
    background-color: rgba(0, 0, 0, 0);
    box-shadow: none;
    padding: 10px 20px 20px;
}
.rotating-card .back .content .main {
    height: 215px;
}
.rotating-card .name {
    /*    font-size: 22px;*/
    font-size: 16px;
    line-height: 28px;
    margin: 10px 0 0;
    text-align: center;
    text-transform: capitalize;
}
.rotating-card h5 {
    margin: 5px 0;
    font-weight: 400;
    line-height: 20px;
}
.rotating-card .profession {
    color: #999999;
    text-align: center;
    margin-bottom: 20px;
    font-size: 12px;
}
.rotating-card .footer {
    border-top: 1px solid #eeeeee;
    color: #999999;
    margin: 30px 0 0;
    padding: 10px 0 0;
    text-align: center;
}
.rotating-card .footer .social-links {
    font-size: 18px;
}
.rotating-card .footer .social-links a {
    margin: 0 7px;
}
.rotating-card .footer .btn-simple {
    margin-top: -6px;
}
.rotating-card .header {
    padding: 15px 20px;
    height: 90px;
}
.rotating-card .motto {
    border-bottom: 1px solid #eeeeee;
    color: #999999;
    font-size: 14px;
    font-weight: 400;
    padding-bottom: 10px;
    text-align: center;
}

/*      Just for presentation        */

.title {
    color: #506a85;
    text-align: center;
    font-weight: 300;
    font-size: 44px;
    margin-bottom: 90px;
    line-height: 90%;
}
.title small {
    font-size: 17px;
    color: #999;
    text-transform: uppercase;
    margin: 0;
}
.space-50 {
    height: 50px;
    display: block;
}
.space-200 {
    height: 200px;
    display: block;
}
.white-board {
    background-color: #ffffff;
    min-height: 200px;
    padding: 60px 60px 20px;
}
.ct-heart {
    color: #f74933;
}

pre.prettyprint {
    background-color: #ffffff;
    border: 1px solid #999;
    margin-top: 20px;
    padding: 20px;
    text-align: left;
}
.atv,
.str {
    color: #05ae0e;
}
.tag,
.pln,
.kwd {
    color: #3472f7;
}
.atn {
    color: #2c93ff;
}
.pln {
    color: #333;
}
.com {
    color: #999;
}

.btn-simple {
    opacity: 0.8;
    color: #666666;
    background-color: transparent;
}

.btn-simple:hover,
.btn-simple:focus {
    background-color: transparent;
    box-shadow: none;
    opacity: 1;
}
.btn-simple i {
    font-size: 16px;
}

.navbar {
    background-image: url("../images/rotating_card_thumb3.png");
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-brand-logo {
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

#bd_appcnt {
    font-size: 0.8rem;
    padding: 0.35em 0.65em;
}

.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-brand {
    color: #333;
    text-shadow: none;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-brand:hover {
    color: #000;
}

/* base.css */
#content .box {
    width: 50%;
    padding: 6px;
    display: inline-block;
    vertical-align: top;
    margin-bottom: 12px;
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box; /* Firefox, other Gecko */
    box-sizing: border-box; /* Opera/IE 8+ */
}

@media screen and (min-width: 720px) {
    #content .box {
        width: 33%;
    }
}

@media screen and (min-width: 992px) {
    #content .box {
        width: 20%;
    }
}

.input-group h1 {
    font-size: 20px;
    color: #a0a417;
    display: block;
    margin: 0px;
    padding-top: 6px;
}

.pull-right {
    margin-bottom: 8px;
    margin-top: 8px;
}

.btn-default {
    background-color: #eee;
}

span.hint {
    color: #8d1009;
}

/* Card adjustments (from old panel-body) */
.card-body ol {
    list-style: none;
    line-height: 2em;
}

.card-body p {
    padding-left: 38px;
    line-height: 1.5em;
}

#footer {
    background: url("../images/footer-02.png") no-repeat right bottom;
    height: 140px;
}

div#dtl {
    min-height: 500px;
}

div#dtl .card .user {
    width: 90%;
}

div#dtl .front,
.back {
    position: relative;
}

div#dtl .card-body p {
    /* Specific override for dtl */
    padding-left: 0px;
    line-height: 1.5em;
}
div#dtl .card-body ul {
    /* Specific override for dtl */
    padding: 0px;
    line-height: 1.5em;
    list-style: none;
}
#divquery {
    padding: 1em 0; /* Adjust padding */
}
h1.title {
    color: #a0a417;
    display: block;
    margin: 0px;
    padding: 0.3em 0 0.3em 0;
    font-weight: 900;
    line-height: 1.5em;
}

/* Navbar active item styling */
.navbar-nav .nav-item .nav-link.active {
    color: #9f3400; /* Match old color */
    background-color: #a0a417; /* Match old active background */
}
.navbar-nav .nav-item .nav-link.active:hover,
.navbar-nav .nav-item .nav-link.active:focus {
    color: #9f3400;
    background-color: #8d9115; /* Slightly darker for hover/focus */
}

/* 分頁區塊美化 (Modern Pill Design) */
.pagination {
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.page-item .page-link {
    border-radius: 50rem !important; /* 強制全圓角 */
    margin: 0 0.15rem;
    border: 1px solid transparent;
    color: #475569;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: transparent;
}
.page-item .page-link:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    transform: translateY(-1px);
}
.page-item.active .page-link {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3) !important;
}
.page-item.disabled .page-link {
    background-color: transparent;
    color: #cbd5e1;
}

/* ========== 分類導覽列 #subNavbar 樣式 ========== */
#subNavbar {
    background: linear-gradient(
        135deg,
        #3b6d9c 0%,
        #5a8db8 50%,
        #4a7ea8 100%
    ) !important;
    border-bottom: none !important;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.25);
    z-index: 1050;
}
/* 桌面版 nav-link 膠囊風格 */
#subNavbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1.1rem;
    margin: 0.5rem 0.15rem;
    border-radius: 50rem;
    border-bottom: none;
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
}
#subNavbar .navbar-nav .nav-link:hover,
#subNavbar .navbar-nav .nav-link:focus {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.18);
}
#subNavbar .navbar-nav .nav-link.active,
#subNavbar .navbar-nav .show > .nav-link {
    color: #1e3a5f !important;
    background-color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
/* Dropdown 下拉選單 */
#subNavbar .dropdown-menu {
    border: none;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
    border-radius: 1rem;
    padding: 0.5rem;
    min-width: 200px;
    margin-top: 0.25rem;
    animation: subnavFadeIn 0.2s ease-out;
    z-index: 9999;
}
@keyframes subnavFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
#subNavbar .dropdown-item {
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    color: #334155;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}
#subNavbar .dropdown-item:hover {
    background-color: #eef2ff;
    color: #1e3a5f;
    transform: translateX(3px);
}
#subNavbar .dropdown-divider {
    margin: 0.25rem 0.75rem;
    border-color: #e2e8f0;
}
/* 手機版 Toggle 按鈕 */
.subnav-toggler {
    display: flex;
    color: #ffffff !important;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5d8a 100%) !important;
    border-radius: 0 !important;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}
.subnav-toggler:hover {
    background: linear-gradient(135deg, #264a73 0%, #3670a0 100%) !important;
}
.subnav-toggler .fa-chevron-down {
    transition: transform 0.3s ease;
}
.subnav-toggler[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}
/* 手機版 RWD */
@media (max-width: 767.98px) {
    #subNavbar {
        background: linear-gradient(
            180deg,
            #1e3a5f 0%,
            #234b72 100%
        ) !important;
    }
    #subNavbar .navbar-nav {
        padding: 0.75rem 0;
        gap: 0.15rem;
    }
    #subNavbar .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.9);
        padding: 0.6rem 1rem;
        border-radius: 0.6rem;
        margin: 0;
    }
    #subNavbar .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }
    #subNavbar .navbar-nav .nav-link.active,
    #subNavbar .navbar-nav .show > .nav-link {
        background-color: rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
    }
    #subNavbar .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.1);
        border: none;
        box-shadow: none;
        border-radius: 0.5rem;
        margin: 0 0.5rem;
        padding: 0.25rem;
    }
    #subNavbar .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
        border-radius: 0.4rem;
        padding: 0.45rem 1.25rem;
    }
    #subNavbar .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.15);
        color: #ffffff;
        transform: none;
    }
    #subNavbar .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.15);
    }
}
.page-item.ddspageinfo .page-link {
    background-color: transparent !important;
    border: none !important;
    color: #64748b;
    font-size: 0.9rem;
    pointer-events: none;
    margin-left: 0.5rem;
}
.title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 2rem 0 1.5rem 0;
    letter-spacing: 0.05em;
}
/* 搜尋表單 (Modern Hero Section) 美化 */
.search-form-modern {
    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}
.search-form-modern:focus-within {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border-color: rgba(13, 110, 253, 0.25) !important;
}
.search-form-modern .form-control:focus {
    box-shadow: none;
    background-color: transparent;
}
.search-form-modern .input-group-text {
    width: 40px;
    justify-content: center;
}
.submit-btn-hover {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.submit-btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.3) !important;
}
@media (max-width: 767.98px) {
    .search-form-modern {
        border-radius: 1rem !important;
        padding: 1rem !important;
    }
    .search-form-modern .input-group {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding-bottom: 0.5rem;
    }
    .search-form-modern .input-group:last-of-type {
        border-bottom: none;
    }
    .submit-btn-hover {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}
/* 卡片美化 */
.gallery-card {
    border-radius: 1.2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition:
        box-shadow 0.3s,
        transform 0.2s;
    background: #fff;
    overflow: hidden;
    margin-bottom: 2rem;
    border: none;
}
.gallery-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    transform: translateY(-4px) scale(1.025);
    z-index: 2;
}
.gallery-card .cover {
    aspect-ratio: 4/3;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.gallery-card .img-thumbnail {
    border-radius: 0.8rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    object-fit: contain;
    width: 100%;
    height: 100%;
    background-color: transparent;
    border: none;
    transition: transform 0.2s;
}
.gallery-card .img-thumbnail:hover {
    transform: scale(1.06);
}
.gallery-card .main {
    padding: 1rem 1.2rem 0.8rem 1.2rem;
}
.gallery-card .name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1a237e;
}
.gallery-card .profession {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.gallery-card .btn-app {
    border-radius: 2rem;
    font-weight: 500;
    width: 100%;
    margin-bottom: 0.5rem;
    background: #f5f5f5;
    color: #1976d2;
    border: 1px solid #e3e3e3;
    transition:
        background 0.2s,
        color 0.2s;
}
.gallery-card .btn-app:hover {
    background: #1976d2;
    color: #fff;
}
.gallery-card .btn-app .fa {
    margin-right: 0.5em;
}
/* Dropdown 美化 */
.dropdown-menu {
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: none;
    min-width: 200px;
    padding: 0.5rem 0;
    background: #fff;
}
.dropdown-item {
    border-radius: 0.5rem;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    transition:
        background 0.18s,
        color 0.18s;
    font-weight: 500;
    color: #1a237e;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background: #e3f2fd;
    color: #1976d2;
}
.dropdown-item.active,
.dropdown-item:active {
    background: #1976d2;
    color: #fff;
}
@media (max-width: 767px) {
    .gallery-card .main {
        padding: 0.7rem 0.7rem 0.6rem 0.7rem;
    }
}
@media (max-width: 991.98px) {
    .dropdown-menu {
        box-shadow: none;
        border-radius: 0.5rem;
    }
}
/* 讓漢堡選單 icon 變深色（黑色） */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(33,37,41,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Navbar Custom Styles */
.transition-all {
    transition: all 0.2s ease-in-out;
}
.nav-hover-fx:hover {
    opacity: 0.75;
}

/* History Button */
.btn-history {
    color: #475569;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.btn-history:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Ask Button */
.btn-ask {
    color: #b45309;
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
}
.btn-ask:hover {
    background-color: #fde68a;
    color: #92400e;
    border-color: #fcd34d;
    transform: translateY(-2px);
    box-shadow:
        0 4px 6px -1px rgba(217, 119, 6, 0.15),
        0 2px 4px -1px rgba(217, 119, 6, 0.1);
}

/* Clear Button */
.btn-clear {
    color: #b91c1c;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}
.btn-clear:hover {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
    transform: translateY(-2px);
    box-shadow:
        0 4px 6px -1px rgba(239, 68, 68, 0.15),
        0 2px 4px -1px rgba(239, 68, 68, 0.1);
}

.login-partial-wrapper a {
    color: #475569 !important;
    font-weight: 500;
    transition: all 0.2s;
}
.login-partial-wrapper a:hover {
    color: #0f172a !important;
    opacity: 0.8;
}

/* 修正 GLightbox 按鈕不可見與對比度問題 */
.gclose,
.gnext,
.gprev {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 50% !important;
    width: 45px !important;
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    position: fixed !important; /* 強制定位在畫面上層 */
    color: #ffffff !important; /* 圖示顏色 */
    transition: all 0.2s ease;
}
.gclose i,
.gnext i,
.gprev i {
    color: #ffffff !important;
    font-size: 1.25rem;
}
.gclose {
    top: 20px !important;
    right: 20px !important;
}
.gprev {
    top: 50% !important;
    left: 20px !important;
    transform: translateY(-50%) !important;
}
.gnext {
    top: 50% !important;
    right: 20px !important;
    transform: translateY(-50%) !important;
}

.gclose:hover,
.gnext:hover,
.gprev:hover {
    background-color: rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.1);
}
