/* Funeral Home Single Page Styles */

/* Prevent horizontal overflow globally */
* {
    box-sizing: border-box;
}

body.is_singular-funeral_home {
    overflow-x: hidden;
}

/* Container */
.funeral-home-single-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.6;
    box-sizing: border-box;
    width: 100%;
}

/* Title */
.funeral-home-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1a1a1a;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 15px;
}

/* Contact Info Card */
.funeral-contact-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.funeral-contact-item {
    flex: 1 1 200px; /* Responsive grid */
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent flex items from overflowing */
}

.funeral-contact-item-address {
    flex-grow: 2;
}

.funeral-contact-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.funeral-contact-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.funeral-contact-value a {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.2s;
}

.funeral-contact-value a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* 주소 복사 버튼 */
.funeral-address-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.funeral-address-wrapper .funeral-contact-value {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.funeral-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.funeral-copy-btn:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
    color: #333;
}

.funeral-copy-btn:active {
    background-color: #d0d0d0;
}

.funeral-copy-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

.funeral-copy-btn.copied {
    background-color: #46b450;
    border-color: #46b450;
    color: #fff;
}

/* Section Heading (matches both custom class and content h2) */
.funeral-section-title,
.funeral-home-details h2 {
    font-size: 1.5rem;
    margin: 40px 0 20px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
}

.funeral-section-title::before,
.funeral-home-details h2::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background-color: #2271b1;
    margin-right: 12px;
    border-radius: 3px;
}

/* Detail Table */
.funeral-info-table-wrapper,
.funeral-home-details {
    overflow-x: auto; /* Scroll on mobile if needed */
    border-radius: 8px;
    /* border: 1px solid #e5e5e5; Remove border from wrapper if table has it? Let's keep wrapper clean or just style table */
}

.funeral-info-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e5e5; /* Border on table */
    border-radius: 8px; /* Rounded corners attempt (might need border-collapse: separate) */
    overflow: hidden;
    box-sizing: border-box;
    table-layout: auto;
}

.funeral-info-table th,
.funeral-info-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.funeral-info-table tr:last-child th,
.funeral-info-table tr:last-child td {
    border-bottom: none;
}

.funeral-info-table th {
    background-color: #f8f9fa;
    color: #555;
    font-weight: 600;
    width: 30%;
    white-space: nowrap;
}

.funeral-info-table td {
    color: #333;
}

.funeral-info-table tr:hover {
    background-color: #fcfcfc;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .funeral-home-single-container {
        margin: 20px auto;
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .funeral-home-title {
        font-size: 1.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .funeral-contact-card {
        padding: 20px;
        flex-direction: column;
        gap: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .funeral-contact-item {
        flex: 1 1 auto;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .funeral-contact-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .funeral-contact-value {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .funeral-address-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .funeral-copy-btn {
        align-self: flex-start;
        width: 36px;
        height: 36px;
        padding: 10px;
    }

    .funeral-copy-btn svg {
        width: 18px;
        height: 18px;
    }

    .funeral-info-table-wrapper,
    .funeral-home-details {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .funeral-info-table {
        min-width: 100%;
        width: 100%;
        max-width: 100%;
    }

    .funeral-info-table th {
        width: 40%;
        font-size: 0.9rem;
        padding: 12px 10px;
        word-wrap: break-word;
    }

    .funeral-info-table td {
        font-size: 0.95rem;
        padding: 12px 10px;
        word-wrap: break-word;
    }
}

/* Hide Footer Credits for Funeral Home Pages */
.site-info,
.site-footer .powered-by,
.footer-credits {
    display: none !important;
}

/* Call to Action Section */
.funeral-wreath-cta {
    background-color: #f0f7ff;
    border: 1px solid #cce5ff;
    border-radius: 12px;
    padding: 20px; /* Reduced padding */
    margin-bottom: 30px; /* Slightly reduced margin */
    text-align: center;
    box-sizing: border-box; /* Prevent padding from expanding width */
    width: 100%;
    max-width: 100%;
}

.cta-title {
    font-size: 1.3rem; /* Slightly smaller title */
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.cta-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 15px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 10px; /* Reduced gap */
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px; /* Reduced padding */
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem; /* Slightly smaller text */
    text-decoration: none !important;
    transition: all 0.2s ease;
    min-width: 0; /* Remove min-width constraint */
    flex: 1 1 auto; /* Allow buttons to flex */
    max-width: 100%; /* Prevent overflow */
    box-sizing: border-box; /* Include padding in width calculation */
}

.cta-button .dashicons {
    margin-right: 6px; /* Reduced margin */
    font-size: 1.1rem; /* Slightly smaller icon */
    width: 1.1rem;
    height: 1.1rem;
    line-height: 1.1;
}

.phone-order {
    background-color: #fff;
    color: #2271b1;
    border: 2px solid #2271b1;
}

.phone-order:hover {
    background-color: #f0f7ff;
    color: #135e96;
    border-color: #135e96;
}

.web-order {
    background-color: #2271b1;
    color: #fff;
    border: 2px solid #2271b1;
}

.web-order:hover {
    background-color: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* CTA Mobile Style */
@media (max-width: 600px) {
    .funeral-wreath-cta {
        padding: 15px;
        margin-left: 0;
        margin-right: 0;
    }

    .cta-title {
        font-size: 1.1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .cta-price {
        font-size: 0.9rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .cta-button {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
        padding: 12px 16px;
        box-sizing: border-box;
    }
}
