/* =========================================================================
   🌿 BRAND SYSTEM CORE VARS & STRUCTURE
   ========================================================================= */
:root {
    --brand-gold: #D8CF82;
    --brand-green: #384E2D;
    --card-dark-bg: rgba(25, 20, 18, 0.65);
    --card-dark-hover: rgba(56, 78, 45, 0.35);
}

/* 🌟 CATALOG OVERVIEW ONLY (reflections.html) */
.library-main-container {
    margin-top: 10px !important; 
    padding-top: 10px !important;
    width: 100% !important;
    max-width: 1140px !important; 
    margin-left: auto !important;
    margin-right: auto !important;
    background: transparent !important;
}

/* 🎬 CINEMATIC BREAKOUT ONLY (reflection_detail.html) */
.reflection-detail-page-container {
    width: 100% !important;
    max-width: 1650px !important; 
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 20px 4vw !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

.reflection-detail-page-container .row {
    width: 100% !important;
    margin: 0 auto !important;
}

/* 🌟 CATALOG OVERVIEW HEADER SUBTITLE ALIGNMENT */
.reflections-catalog-subtitle {
    text-align: center !important; /* Centered by default on Desktop & Tablets */
    max-width: 800px;
    margin: 0 auto !important;
}

/* Catalog View Editorial Grid Configuration */
.reflections-editorial-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    justify-content: center;
}

/* Premium Card Interactive Base Architecture */
.reflection-editorial-card {
    background: var(--card-dark-bg) !important;
    border: 1px solid rgba(216, 207, 130, 0.2) !important;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
}

.reflection-editorial-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-gold) !important;
    background: var(--card-dark-hover) !important;
    box-shadow: 0 12px 30px rgba(56, 78, 45, 0.4);
}

.card-meta-stamp {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-gold);
}

.card-category-badge {
    background: rgba(56, 78, 45, 0.5);
    border: 1px solid rgba(216, 207, 130, 0.2);
    color: #ffffff !important;
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================================================
   🔢 PURE JS PAGINATION CONTROLS (Responsive Single Line Engine)
   ========================================================================= */
.pagination-controls-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 65px !important; /* Generous bottom margin so pagination never sits on the footer border */
    user-select: none;
    width: 100%;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff !important;
    border: 1px solid rgba(216, 207, 130, 0.2);
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
}

.pagination-btn:hover {
    background: var(--brand-green);
    border-color: var(--brand-gold);
    color: var(--brand-gold) !important;
}

.pagination-btn.active-page {
    background: var(--brand-gold) !important;
    color: #000000 !important;
    border-color: var(--brand-gold) !important;
    font-weight: 600;
}

.pagination-btn.disabled-btn {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.05);
}

/* Ellipsis (...) structural string separator styling */
.pagination-ellipsis {
    color: rgba(255, 255, 255, 0.4);
    padding: 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Page X of Y tracker element display setup (Default hidden on Desktop/Tablets) */
.pagination-mobile-indicator {
    display: none;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.85;
}

/* =========================================================================
   🎬 CINEMATIC DETAIL INTERACTION LOOKS
   ========================================================================= */
.immersive-reflection-canvas {
    border: 1px solid rgba(216, 207, 130, 0.35) !important;
    border-radius: 16px;
    padding: 40px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background-repeat: no-repeat !important;
    width: 100% !important;
    min-height: 400px;
}

.immersive-quote-mark {
    font-size: 6.5rem; 
    color: rgba(216, 207, 130, 0.12); 
    position: absolute; 
    top: -15px; 
    left: 20px; 
    font-family: serif; 
    user-select: none;
    line-height: 1;
}

.sidebar-action-card {
    background: rgba(25, 20, 18, 0.65) !important; 
    border: 1px solid rgba(216, 207, 130, 0.2) !important; 
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.deceased-circular-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-gold);
    background-color: var(--brand-green);
}

.action-intent-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
    margin-bottom: 10px;
}

.btn-obituary-intent {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff !important;
    border: 1px solid rgba(216, 207, 130, 0.25);
}

.btn-obituary-intent:hover {
    background: var(--brand-green);
    border-color: var(--brand-gold);
    color: var(--brand-gold) !important;
}

.btn-charity-intent {
    background: var(--brand-gold);
    color: #000000 !important;
    border: 1px solid var(--brand-gold);
}

.btn-charity-intent:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #000000 !important;
}

.recent-memorial-link-item {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.recent-memorial-link-item:hover {
    background-color: rgba(216, 207, 130, 0.06) !important;
}

/* =========================================================================
   🌐 PLATFORM WORKFLOW GRID ELEMENTS
   ========================================================================= */
.share-workflow-tray-hidden {
    display: none !important;
}

.platform-share-circle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.platform-share-circle-btn:hover, 
.platform-share-circle-btn.active-target {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-whatsapp:hover, .btn-whatsapp.active-target { background: #25D366 !important; border-color: #25D366 !important; }
.btn-facebook:hover, .btn-facebook.active-target { background: #1877F2 !important; border-color: #1877F2 !important; }
.btn-x:hover, .btn-x.active-target { background: #000000 !important; border-color: #333333 !important; }
.btn-linkedin:hover, .btn-linkedin.active-target { background: #0077B5 !important; border-color: #0077B5 !important; }
.btn-instagram:hover, .btn-instagram.active-target { 
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important; 
    border-color: #dc2743 !important; 
}

.custom-dedication-box {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(216, 207, 130, 0.2) !important;
    color: #ffffff !important;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    width: 100%;
    min-height: 85px;
    resize: none;
}

.custom-dedication-box:focus {
    outline: none;
    border-color: var(--brand-gold) !important;
}

/* 📱 RESPONSIVE ACTIONS PILL SETUP */
.dispatch-pill-btn {
    background: var(--brand-gold) !important;
    color: #111111 !important;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 20px;
    border: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ✨ GATEWAY ANIMATED HOOKS */
@keyframes starBlink {
    0%, 100% { opacity: 0.3; transform: scale(0.9) rotate(0deg); color: #ffffff; }
    50% { opacity: 1; transform: scale(1.2) rotate(15deg); color: var(--brand-gold); text-shadow: 0 0 8px rgba(216,207,130,0.6); }
}
.blinking-star { display: inline-block; animation: starBlink 1.8s infinite ease-in-out; }

/* =========================================================================
   🎨 RECENT DETAIL PAGE STYLING ADJUSTMENTS & DESKTOP ARCHITECTURE
   ========================================================================= */

/* Centralized header title banner wrapper */
.reflection-page-header-banner {
    width: 100%;
    margin-top: -10px !important; 
    padding: 0;
    text-align: center !important;
}

.reflection-main-page-title {
    font-family: 'Playfair Display', serif !important;
    font-style: normal !important; 
    color: #ffffff !important;
    font-size: 2.3rem;
    font-weight: 700;
    margin: 0;
    text-align: center !important;
}

/* Desktop layout baseline configuration */
.reflection-breadcrumb-nav {
    display: flex;
    justify-content: flex-start; 
    width: 100%;
}

.reflection-breadcrumb-nav .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start !important; 
    gap: 12px;
}

/* 🌿 Green padded link button badge configuration */
.gateway-breadcrumb-link {
    background-color: #384E2D !important; 
    color: #D8CF82 !important; 
    padding: 8px 20px !important; 
    border-radius: 25px;
    border: 1px solid rgba(216, 207, 130, 0.3);
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.9rem;
    display: inline-block;
    transition: all 0.2s ease-in-out;
}

.gateway-breadcrumb-link:hover {
    background-color: #ffffff !important;
    color: #384E2D !important;
    border-color: #ffffff !important;
}

.reflection-breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
    display: none !important;
}

.reflection-date-badge {
    font-size: 0.95rem;
    color: #ffffff !important;
    opacity: 0.85;
}

.platform-icons-row-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.action-execution-flex-wrapper {
    display: flex;
}

.sidebar-card-sticky-wrapper {
    top: 110px;
}

/* =========================================================================
   🖥️ DEVICE RESPONSIVE LAYOUT PIPELINE (Desktop, Tablet, and Mobile)
   ========================================================================= */

/* 1. 🖥️ LARGE VIEWPORTS: Desktop / Laptops */
@media only screen and (min-width: 992px) {
    .reflections-editorial-grid { grid-template-columns: repeat(3, 1fr) !important; }

    .dispatch-pill-btn {
        padding: 8px 18px;
    }
    .btn-desktop-text-label {
        display: inline !important;
    }
    .share-icon-primary {
        margin-left: 6px;
        font-size: 0.9rem;
    }
    .share-routing-reference-text {
        display: inline;
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.75rem;
        font-weight: 500;
        letter-spacing: 0.5px;
    }
}

/* 2. 📁 MEDIUM VIEWPORTS: Tablet / iPad / Small Laptops (The layout bridge) */
@media only screen and (max-width: 991px) and (min-width: 601px) {
    /* Set left/right padding blocks so catalog grids never hit device edge walls on iPads */
    .library-main-container {
        padding-left: 24px !important;
        padding-right: 24px !important;
        box-sizing: border-box !important;
    }
    
    .reflections-editorial-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .immersive-reflection-canvas {
        padding: 35px 24px;
        min-height: 350px;
    }
    
    .reflection-detail-page-container {
        padding: 15px 3vw !important;
    }

    /* Keep button labels intact on mid-sized tablet surfaces */
    .dispatch-pill-btn {
        padding: 8px 16px;
    }
    .btn-desktop-text-label {
        display: inline !important;
    }
    .share-icon-primary {
        margin-left: 6px;
        font-size: 0.9rem;
    }
    .share-routing-reference-text {
        display: none !important; 
    }
    
    /* Retain left alignment layout properties on tablet sizes */
    .platform-icons-row-container {
        gap: 12px !important;
        justify-content: flex-start !important;
    }
}

/* 3. 📱 SMALL VIEWPORTS: Mobile Phones */
@media only screen and (max-width: 600px) {
    .library-main-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Forces catalog overview post subtitle description to be fully justified */
    .reflections-catalog-subtitle {
        text-align: justify !important;
        text-justify: inter-word;
        padding-left: 8px;
        padding-right: 8px;
    }

    .reflections-editorial-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .immersive-reflection-canvas {
        padding: 24px;
        min-height: auto;
    }
    
    .immersive-quote-mark {
        font-size: 4.5rem;
        top: -5px;
        left: 10px;
    }

    .reflection-detail-page-container {
        padding: 5px 2vw !important; 
    }
    
    .reflection-main-page-title {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    /* Convert execution button to a clean centered icon circle */
    .dispatch-pill-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        padding: 0;
        margin: 0 auto !important; 
    }
    .btn-desktop-text-label {
        display: none !important;
    }
    .share-icon-primary {
        font-size: 1.2rem;
        margin: 0 !important;
    }
    .share-routing-reference-text {
        display: none !important;
    }

    /* Mobile elements centering triggers */
    .reflection-breadcrumb-nav {
        justify-content: center !important;
    }

    .reflection-breadcrumb-nav .breadcrumb {
        flex-direction: column !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 10px !important;
        width: 100%;
    }
    
    .reflection-date-badge {
        padding: 0 !important;
        text-align: center !important;
    }

    .workflow-sharing-card {
        text-align: center !important;
    }

    .workflow-card-title,
    .workflow-card-subtitle,
    .text-center-mobile {
        text-align: center !important;
        width: 100%;
    }

    .platform-icons-row-container {
        justify-content: center !important;
        gap: 10px !important;
        max-width: 290px;
        margin: 0 auto 24px auto !important;
    }

    .platform-share-circle-btn {
        width: 42px !important;
        height: 42px !important;
        font-size: 1.15rem !important;
    }

    .action-execution-flex-wrapper {
        justify-content: center !important;
        width: 100%;
    }

    /* Single-Line Mobile Pagination Engine */
    .pagination-controls-wrapper {
        gap: 16px !important; 
        margin-bottom: 45px !important;
    }
    
    .pagination-controls-wrapper .pagination-number-btn,
    .pagination-controls-wrapper .pagination-ellipsis {
        display: none !important;
    }
    
    .pagination-mobile-indicator {
        display: inline-block !important;
    }
}