/**
 * CopperPress Obituaries - Frontend Styles
 * 
 * Single Obituary Page Layout
 * Based on modern obituary design with hero image and profile card overlay
 */

/* ============================================================================
   Obituary Container
   ========================================================================= */

.cp-obituary-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a1a;
    width: 100%;
    margin: 0 auto;
}

/* ============================================================================
   Hero Section
   ========================================================================= */

.cp-obit-hero {
    width: 100%;
    height: 24rem;
    position: relative;
    overflow: hidden;
    margin-bottom: -12rem;
}

.cp-obit-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(50%);
}

/* ============================================================================
   Profile Card (Overlaps Hero)
   ========================================================================= */

.cp-obit-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 80%;
}

.cp-obit-profile-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.cp-obit-profile-image {
    border-radius: 8px;
    width: 16rem;
    height: 20rem;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cp-obit-name {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin: 1.5rem 0;
    color: #333;
    line-height: 1.2;
}

.cp-obit-years {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-style: italic;
    color: #666;
}

.cp-obit-years span {
    border-bottom: 1px solid #ccc;
    padding: 0.5rem 1rem;
}

.cp-obit-separator {
    border-bottom: none !important;
    padding: 0 !important;
}

/* ============================================================================
   Social Share Buttons
   ========================================================================= */

.cp-obit-social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cp-obit-social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #e6e6e6;
    color: #1a1a1a;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cp-obit-social-links a:hover {
    background-color: #0077b5;
    color: #fff;
}

.cp-obit-social-links svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

/* ============================================================================
   Article Content
   ========================================================================= */

.cp-obit-article-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    width: 80%;
    background: #fff;
    border-radius: 8px;
    line-height: 1.8;
}

.cp-obit-article-content p {
    margin-bottom: 1.5rem;
}

.cp-obit-original-link {
    margin-top: 2rem;
    padding: 1rem;
    font-style: italic;
    border-top: 1px solid #e5e7eb;
}

.cp-obit-original-link a {
    color: #0066cc;
    text-decoration: none;
}

.cp-obit-original-link a:hover {
    text-decoration: underline;
}

/* ============================================================================
   Funeral Home Card
   ========================================================================= */

.cp-obit-fh-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    width: 80%;
}

.cp-obit-fh-original {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.cp-obit-fh-original a {
    color: #333;
    text-decoration: none;
}

.cp-obit-fh-original a:hover {
    text-decoration: underline;
}

.cp-obit-farewell-message {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-left: 4px solid #0066cc;
    line-height: 1.6;
}

.cp-obit-fh-container {
    margin: 2rem auto;
    max-width: 36rem;
    position: relative;
    background-color: #e5e7eb;
}

.cp-obit-fh-card-border {
    position: absolute;
    top: 11px;
    left: 11px;
    width: 100%;
    height: 100%;
    border: 2px solid #565656;
    pointer-events: none;
}

.cp-obit-fh-card-content {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    padding: 1.25rem;
}

.cp-obit-fh-text-section {
    order: 0;
    width: 60%;
    padding-left: 6px;
}

.cp-obit-fh-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #111;
    margin: 0 0 0.5rem 0;
}

.cp-obit-fh-address {
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.5;
}

.cp-obit-fh-link {
    display: block;
    color: #0000ee;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.cp-obit-fh-link:hover {
    text-decoration: underline;
}

.cp-obit-fh-image-section {
    order: 1;
    width: 40%;
    background: #565656;
    border: none;
    margin-top: 0.8em;
    margin-left: 0.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.cp-obit-fh-image {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ============================================================================
   Responsive Design
   ========================================================================= */

@media (max-width: 768px) {
    .cp-obit-content,
    .cp-obit-article-content,
    .cp-obit-fh-wrapper {
        width: 92%;
        margin-left: auto;
        margin-right: auto;
    }

    .cp-obit-content {
        margin-top: -10rem;
    }

    .cp-obit-name {
        font-size: 2rem;
    }

    .cp-obit-profile-image {
        width: 12rem;
        height: 15rem;
    }

    .cp-obit-years {
        font-size: 1rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 450px) {
    .cp-obit-fh-card-content {
        flex-direction: column;
    }

    .cp-obit-fh-text-section {
        order: 1;
        width: 100%;
        padding-left: 0;
    }

    .cp-obit-fh-image-section {
        order: 0;
        width: 100%;
        margin-left: 0;
    }

    .cp-obit-name {
        font-size: 1.75rem;
    }

    .cp-obit-profile-image {
        width: 10rem;
        height: 12.5rem;
    }
}
