/* 首頁隨機寵物圖片樣式 - 確保所有圖片大小一致 */
.random-pet-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #f0f0f0;
    border-radius: 0.375rem;
}

.random-pet-image-bg {
    display: none; /* 預設隱藏，由 JavaScript 控制 */
}

.random-pet-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 2;
    display: block;
}

/* 手機版首頁優化 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
        line-height: 1.3;
    }

    h4 {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    h5 {
        font-size: 1rem;
    }

    .list-unstyled li {
        margin-bottom: 1rem !important;
    }

    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    .btn-lg {
        width: 100%;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .bg-light {
        margin-top: 2rem;
    }

    .random-pet-image-container {
        height: 180px;
        border-radius: 10px;
    }
}

/* 當畫面寬度小於 576px 時的優化 */
@media (max-width: 576px) {
    .display-4 {
        font-size: 1.75rem;
    }

    h4 {
        font-size: 1rem;
    }

    h5 {
        font-size: 0.95rem;
    }

    .list-unstyled li {
        margin-bottom: 0.75rem !important;
    }

    .btn-lg {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }

    .bg-light {
        padding: 1rem !important;
        border-radius: 10px !important;
    }

    .random-pet-image-container {
        height: 160px;
    }
}

/* 當畫面寬度小於 500px 時，改為單格呈現 */
@media (max-width: 500px) {
    .bg-light .row .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

        .bg-light .row .col-6:last-child {
            margin-bottom: 0;
        }

    .random-pet-image-container {
        height: 220px;
    }
}

/* Footer 聯絡方式樣式 */
.footer-contacts {
    width: 49%;
    max-width: 100%;
    margin-left: auto;
    margin-right: 0;
    padding: 30px 0 0;
}

.footer-contacts-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-contacts .contact-name {
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
}

.footer-contacts .contact-phone {
    color: #004767;
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.footer-contacts .contact-address {
    color: #6b7280;
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

@media (max-width: 1200px) {
    .footer-contacts {
        width: 66%;
    }
}

@media (max-width: 986px) {
    .container {
        max-width: 880px;
    }

    .footer-contacts {
        width: 80%;
    }
}

@media (max-width: 768px) {
    .footer-contacts {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* 防止水平溢出 */
body {
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}
