
:root {
    --color-main-yellow-orange: #FFCC00;
    --color-main-dark-grey: #333333;
    --color-aux-orange: #FF9900;
    --color-aux-teal: #00A8A8;
    --color-white: #ffffff;
    --color-black: #000000;
}


.line {
    position: absolute;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    height: calc(100vh - 200px); /* 減去 footer 預估高度 */
    z-index: -20;
    top: 0;
}
  
  .line::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 80px;
  
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0),
      #ffcc004a
    );
    animation: fall var(--ani-duration) var(--ani-delay) linear infinite;
  }
  
  @keyframes fall {
    0% {
      top: -100px;
    }
    100% {
      top: 100%;
    }
  }



body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--color-black);
    color: var(--color-white);
    margin: 0;
    padding: 0;
    overflow-x: hidden; 
}
.bg-img-top{
    background-image: url("/backImg/background01.png");
    background-repeat: no-repeat;
    background-position: left top;
    background-size: 45%;
    }
  
  .bg-img{
  background-image: url("/backImg/background03.png");
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 50%;
  }
  @media (min-width: 768px) {
    
    .bg-img-top{
        background-size: 40%;
        }
      
      .bg-img{
      background-size: 40%;
      }
}

.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.main-title {
    color: var(--color-white); 
    margin: 50px;
    position: relative;
    display: inline-block;
}

.main-title {
    color: var(--color-white); 
    margin: 50px;
    position: relative;
    display: inline-block;
    font-size: 1.72;
    letter-spacing: 2px;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--color-main-yellow-orange);
}

.main-title::before {
    content: 'Donor Disclosure';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: rgba(255, 255, 255, 0.15);
    font-family:  "Saira Stencil One", sans-serif ;
    font-size: 1.2em;
    z-index: -10;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;  
    font-weight: 800;
    letter-spacing: 3;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    white-space: nowrap;  
    width: auto;          
    min-width: 100%;     
}




.hexagonContainer {
    margin-top: 70px;
    margin-bottom: 100px;
    max-width: 1000px;
    display: grid !important; /* 這裡強制覆蓋Bootstrap */
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(2, 1fr);
    gap: 70px 60px;
    justify-items: center;
    align-items: center;
    /* 覆蓋Bootstrap的flex設定 */
    flex-wrap: unset !important;
    justify-content: unset !important;
    align-items: unset !important;
}

.hexagon-btn {
    position: relative;
    width: 150px; 
    height: 150px;
    background: var(--color-white);
    border: none;
    color: var(--color-main-dark-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.1rem; 
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* 正六角形的clip-path */
    -webkit-clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
    clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* 覆蓋Bootstrap的間距 */
    margin: 20px !important;
}

/* 第二行的按鈕置中 */
.hexagon-btn:nth-child(5) {
    grid-column: 2 / 3;
}

.hexagon-btn:nth-child(6) {
    grid-column: 3 / 4;
}

.hexagon-btn span {
    z-index: 10; 
    transition: all 0.4s ease;
}

/* 增強的追光效果 */
.hexagon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 204, 0, 0) 0%,
        rgba(255, 204, 0, 0.8) 30%,
        rgba(255, 153, 0, 1) 50%,
        rgba(255, 204, 0, 0.8) 70%,
        rgba(255, 204, 0, 0) 100%
    );
    transform: skewX(-20deg); 
    transition: left 0.6s ease;
    z-index: 1;
    opacity: 0;
}

/* 背景填充層 */
.hexagon-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-main-yellow-orange), var(--color-aux-orange));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.hexagon-btn:hover::before {
    left: 120%; 
    opacity: 1;
}

.hexagon-btn:hover::after {
    opacity: 1;
}

.hexagon-btn:hover {
    color: black;
    border-color: var(--color-aux-orange);
    transform: scale(1.12);
    animation: none;
    box-shadow: 
        0 0 20px var(--color-main-yellow-orange),
        0 0 35px var(--color-main-yellow-orange),
        0 0 50px var(--color-aux-orange),
        0 0 65px var(--color-aux-orange),
        inset 0 0 20px rgba(255, 204, 0, 0.4);
}

.hexagon-btn:hover span {
    font-weight: 900;
}

/* 為手機版添加觸控追光效果 */
.hexagon-btn:active::before {
    left: 120%; 
    opacity: 1;
    transition: left 0.3s ease;
}

.hexagon-btn:active::after {
    opacity: 1;
}

.hexagon-btn:active {
    transform: scale(1.08);
    box-shadow: 
        0 0 15px var(--color-main-yellow-orange),
        0 0 25px var(--color-main-yellow-orange),
        0 0 35px var(--color-aux-orange),
        inset 0 0 15px rgba(255, 204, 0, 0.3);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--color-white);
    color: var(--color-main-dark-grey);
    padding: 2rem;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    display: flex;
    flex-direction: column;
    margin: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-aux-teal);
}
.modal-title h2::after {
    content: '';
    display: block; 
    width: 80px;    
    height: 4px;
    background-color: #FFD700; 
    position: absolute; 
    bottom: 20px;
    left: 50%; 
    transform: translateX(-50%); 
}


.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-main-dark-grey);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close-btn:hover {
    color: var(--color-aux-orange);
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--color-aux-orange) #e5e7eb;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--color-aux-orange);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-main-yellow-orange);
}

.modal-body .modal-action-btn {
    display: block;
    width: 100%;
    background-color: var(--color-aux-orange);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    margin-bottom: 0.75rem;
    border-radius: 0.375rem;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.5s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.modal-body .modal-action-btn:hover {
    background-color: var(--color-main-yellow-orange);
    color: var(--color-main-dark-grey);
    transform: translateY(-2px);
}

.modal-body .modal-action-btn:last-child {
    margin-bottom: 0;
}

.main-content-container {
    min-height: calc(100vh - 160px); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        padding: 1.5rem;
        max-height: calc(100vh - 20px);
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    .main-title::before {
        content: 'Donor Disclosure';
        position: absolute;
        font-size: 1.2em;
    }
    .modal-body .modal-action-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    .main-title::before {
        content: '財務徵信';
        position: absolute;
        font-size: 1.3em;
    }

    .modal-body .modal-action-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (min-width: 992px) {
    .hexagonContainer {
        max-width: 900px;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 80px 70px;
    }
    
    .hexagon-btn {
        width: 150px;
        height: 150px;
        font-size: 1.1rem;
    }
    
    .hexagon-btn:nth-child(5) {
        grid-column: 2 / 3;
    }
    
    .hexagon-btn:nth-child(6) {
        grid-column: 3 / 4;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .hexagonContainer {
        max-width: 650px;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(2, 1fr);
        gap: 50px 40px;
    }
    
    .hexagon-btn {
        width: 130px;
        height: 130px;
        font-size: 1rem;
    }
    
    .hexagon-btn:nth-child(5) {
        grid-column: auto;
        grid-row: auto;
    }
    
    .hexagon-btn:nth-child(6) {
        grid-column: auto;
        grid-row: auto;
    }
}

/* 手機版改為2個一行的佈局 */
@media (max-width: 767px) {
    .hexagonContainer {
        max-width: 400px;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(3, 1fr);
        gap: 25px 20px; /* 大幅減少間距 */
    }
    
    .hexagon-btn {
        width: 110px;
        height: 110px;
        font-size: 0.9rem;
        margin: 5px !important; /* 減少外邊距 */
    }

    .main-title {
        font-size: 1.7rem !important;
        margin: 30px 20px;
    }
    
    .hexagon-btn:nth-child(5) {
        grid-column: auto;
        grid-row: auto;
    }
    
    .hexagon-btn:nth-child(6) {
        grid-column: auto;
        grid-row: auto;
    }

    /* 增強手機版追光效果 */
    .hexagon-btn::before {
        width: 70%;
        background: linear-gradient(
            to right,
            rgba(255, 254, 254, 0.785) 0%,
            rgba(255, 204, 0, 0.9) 25%,
            rgba(255, 153, 0, 1) 50%,
            rgba(255, 204, 0, 0.9) 75%,
            rgba(255, 204, 0, 0) 100%
        );
    }
}

@media (max-width: 480px) {
    .hexagonContainer {
        max-width: 340px;
        gap: 20px 15px; 
    }
    
    .hexagon-btn {
        width: 95px;
        height: 95px;
        font-size: 0.8rem;
        margin: 3px !important;
    }

    /* 超小螢幕的追光效果更強烈 */
    .hexagon-btn:hover {
        transform: scale(1.3);
        box-shadow: 
            0 0 25px var(--color-main-yellow-orange),
            0 0 40px var(--color-main-yellow-orange),
            0 0 55px var(--color-aux-orange),
            inset 0 0 25px rgba(255, 204, 0, 0.5);
    }

    .hexagon-btn:active {
        transform: scale(1.1);
    }
}
