html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #4F46E5;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  font-family: 'Noto Sans TC', sans-serif;
  color: #333;
  line-height: 1.6;
}

/* 導航欄樣式 */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #4F46E5 !important;
}

.nav-item {
    margin: 0 0.5rem;
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #4F46E5;
    transition: width 0.3s ease;
}

.nav-link:hover:after {
    width: 100%;
}

/* 頁腳樣式 */
.footer {
    background-color: #f8f9fa;
    height: 80px;
    margin-top: 2rem;
    border-top: 1px solid #eaeaea;
}

.footer small {
    font-size: 0.85rem;
    color: #6c757d;
}

.footer a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0 0.5rem;
}

.footer a:hover {
    color: #4F46E5;
    text-decoration: none;
}

.footer .bi {
    margin-right: 0.5rem;
    color: #4F46E5;
}

/* 卡片樣式 */
.card {
    border-radius: 1rem;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.card-body {
    padding: 1.5rem;
}

.card-text {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* 按鈕樣式 */
.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: #4F46E5;
    border-color: #4F46E5;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background-color: #4338CA;
    border-color: #4338CA;
    box-shadow: 0 10px 15px rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: #4F46E5;
    border-color: #4F46E5;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #4F46E5;
    border-color: #4F46E5;
    color: white;
    box-shadow: 0 10px 15px rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
}

.btn-outline-light {
    border-width: 2px;
    font-weight: 600;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 表單樣式 */
.form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
}

/* 動畫效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 首頁特定樣式 */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.opacity-90 {
    opacity: 0.9;
}

.avatar-group {
    display: flex;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-left: -10px;
    border: 2px solid white;
}

.avatar:first-child {
    margin-left: 0;
}

.hero-image {
    max-width: 80%;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

.event-card .card-img-top {
    height: 200px;
    overflow: hidden;
}

.event-card .card-img-top img {
    object-fit: cover;
    height: 100%;
    transition: transform 0.5s ease;
}

.event-card:hover .card-img-top img {
    transform: scale(1.05);
}

.event-date {
    font-size: 0.85rem;
    font-weight: 500;
}

.empty-state {
    padding: 3rem 0;
}

.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(79, 70, 229, 0.1);
    z-index: -1;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(79, 70, 229, 0.1);
    z-index: -1;
}
        transform: translateY(0);
    }
}

/* 響應式調整 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    /* 租戶頁面Banner字體響應式調整 */
    .banner-section p {
        font-size: 24px !important;
        line-height: 1.2 !important;
        padding: 0 10px !important;
    }
    
    /* 活動列表表格響應式調整 */
    .events-section .table-responsive {
        font-size: 0.85rem;
    }
    
    .events-section .table td {
        padding: 0.5rem 0.25rem !important;
        vertical-align: middle;
    }
    
    /* 活動列表操作按鈕調整 */
    .events-section .table td:last-child {
        white-space: nowrap;
        min-width: 120px;
    }
    
    .events-section .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
        margin-bottom: 2px;
        display: block;
        width: 100%;
    }
    
    /* 隱藏部分欄位在極小螢幕上 */
    .events-section .table th:nth-child(2),
    .events-section .table td:nth-child(2) {
        display: none;
    }
    
    .events-section .table th:nth-child(4),
    .events-section .table td:nth-child(4) {
        display: none;
    }
}

/* 極小螢幕響應式調整 (小於480px) */
@media (max-width: 480px) {
    /* Banner字體進一步縮小 */
    .banner-section p {
        font-size: 18px !important;
        line-height: 1.1 !important;
    }
    
    /* 活動列表進一步調整 */
    .events-section .table-responsive {
        font-size: 0.8rem;
    }
    
    .events-section .table th,
    .events-section .table td {
        padding: 0.4rem 0.2rem !important;
    }
    
    /* 活動名稱欄位允許換行 */
    .events-section .table td:first-child {
        max-width: 120px;
        word-wrap: break-word;
        white-space: normal;
    }
    
    /* 操作按鈕調整 */
    .events-section .btn-sm {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* 列印相關樣式 */
@media print {
    @page {
        size: A4;
        margin: 10mm;
    }
    
    body {
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .navbar, .footer, .card-header, .btn, form, .col-md-4 {
        display: none !important;
    }
    
    /* 確保容器顯示完整 */
    .container, .container-fluid, .row, .col-md-8, .card, .card-body {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    /* 表格列印樣式 */
    .table-print {
        width: 100% !important;
        border-collapse: collapse !important;
        display: table !important;
    }
    
    .table-print tr {
        display: table-row !important;
    }
    
    .table-print th, .table-print td {
        display: table-cell !important;
        padding: 8px !important;
        border: 1px solid #ddd !important;
    }
    
    /* 確保圖片顯示 */
    img {
        max-width: 100% !important;
        page-break-inside: avoid !important;
    }
    
    /* 防止分頁問題 */
    .page-break {
        page-break-before: always !important;
    }
    
    .no-break {
        page-break-inside: avoid !important;
    }
}

/* 社交分享按鈕樣式 */
.social-share-buttons .share-btn[data-platform="facebook"] {
    background-color: #1877f2;
    border-color: #1877f2;
    color: white;
}

.social-share-buttons .share-btn[data-platform="facebook"]:hover {
    background-color: #0e5fc0;
    border-color: #0e5fc0;
}

.social-share-buttons .share-btn[data-platform="line"] {
    background-color: #06c755;
    border-color: #06c755;
    color: white;
}

.social-share-buttons .share-btn[data-platform="line"]:hover {
    background-color: #049c43;
    border-color: #049c43;
}

.social-share-buttons .share-btn[data-platform="twitter"] {
    background-color: #000000;
    border-color: #000000;
    color: white;
}

.social-share-buttons .share-btn[data-platform="twitter"]:hover {
    background-color: #333333;
    border-color: #333333;
}

.social-share-buttons .share-btn[data-platform="threads"] {
    background-color: #000000;
    border-color: #000000;
    color: white;
}

.social-share-buttons .share-btn[data-platform="threads"]:hover {
    background-color: #333333;
    border-color: #333333;
}

/* 共用社交分享按鈕樣式 */
.social-share-buttons button.share-btn {
    padding: 0.25rem 0.5rem;
    margin-right: 2px;
}

.social-share-buttons a.share-btn {
    display: flex;
    align-items: center;
}

.social-share-buttons a.share-btn i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 浮動分享按鈕樣式 */
.floating-share-buttons {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.floating-share-buttons .share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.floating-share-buttons .share-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .floating-share-buttons {
        left: 10px;
    }
    
    .floating-share-buttons .share-btn {
        width: 35px;
        height: 35px;
    }
}

/* ==========================================================================
   手機版底部導覽列
   ========================================================================== */
@media (max-width: 991.98px) {
    body {
        /* 預留空間給底部導覽列 */
        padding-bottom: 80px; 
    }

    /* 在手機版隱藏漢堡選單 */
    .navbar-toggler {
        display: none;
    }

    /* 確保主內容區域不會被底部導覽列遮擋 */
    .container, .container-fluid {
        padding-bottom: 20px;
    }
}

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    display: flex;
    padding: 0;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
    padding: 8px 0;
    transition: all 0.25s ease-in-out;
    border-radius: 0;
    margin: 0;
    position: relative;
}

.mobile-nav-item + .mobile-nav-item {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.mobile-nav-item i {
    font-size: 1.5rem;
    margin-bottom: 2px;
    color: white;
    transition: all 0.25s ease-in-out;
}

.mobile-nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    transition: all 0.25s ease-in-out;
}

.mobile-nav-item#mobile-nav-product i,
.mobile-nav-item:nth-child(2) i,
.mobile-nav-item:nth-child(3) i,
.mobile-nav-item#mobile-nav-account i {
    color: white;
}

.mobile-nav-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.mobile-nav-item.active {
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-5px);
    border-radius: 12px;
    margin: 0 2px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.mobile-nav-item.active i,
.mobile-nav-item.active span {
    color: #4c1d95;
}

.mobile-popup-menu {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transition: bottom 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.mobile-popup-menu.active {
    bottom: 0;
}

.popup-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
    font-weight: 600;
}

.popup-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0;
}

.popup-menu-content {
    overflow-y: auto;
    padding: 10px 0;
}

.popup-menu-item {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s;
}

.popup-menu-item:last-child {
    border-bottom: none;
}

.popup-menu-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}