/* =================================================================
   ACF Flex Program Styles
   Responsive program display with improved readability
   ================================================================= */

/* Main Wrapper - Centers the program */
.sacrament-program-wrapper {
    margin: 0 auto;
}

/* Program Card - White card with shadow */
.sacrament-program {
    overflow: hidden;
}

/* Legacy program class support */
.program {
    margin-bottom: 2rem;
}
/* Featured Program Title */
h2.featured-program-title {
    font-family: "Quattrocento", Sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.5em;
    color: var(--e-global-color-text);
    text-align: center;
    margin: 0 0 0 0;
}

/* Featured Program Divider */
span.featured-program-divider {
    display: block;
    width: 5%;
    margin: 30px auto 40px;
    border-bottom: 2px solid var(--e-global-color-text);
}

/* Custom Program (Copy/Paste) */
.sacrament-program p {
    font-family: "Lato", sans-serif;
    font-size: 1.2rem;
    line-height: 1.75;
    margin-bottom: 1rem;
    color: #333333;
}

/* Leadership Row */
.sacrament-program .leadership-row {
    text-align: center;
    font-family: "Lato", sans-serif;
    font-size: 1.15rem;
    color: #333333;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.sacrament-program .leadership-row span {
    display: inline-block;
    margin: 0 1.5rem;
}

.sacrament-program .leadership-row strong {
    font-weight: 600;
    color: #1e3a5f;
}

/* Music Row */
.sacrament-program .music-row {
    text-align: center;
    font-family: "Lato", sans-serif;
    font-size: 1.15rem;
    color: #333333;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.sacrament-program .music-row span {
    display: inline-block;
    margin: 0 1rem;
}

.sacrament-program .music-row strong {
    font-weight: 600;
    color: #1e3a5f;
}

/* Standard Program Items */
.sacrament-program .program-item.standard {
    font-family: "Lato", sans-serif;
    line-height: 1.8;
    padding: 1.2rem 1.7rem;
    text-align: center;
    font-size: 1.15rem;
    color: #333333;
    border-top: 2px solid rgba(221, 221, 221, 0.4);
}

.sacrament-program .program-item.standard strong {
    font-weight: 700;
    color: #1e3a5f;
}

/* Featured Items (Administration of Sacrament, Primary Program, Sharing Testimonies) */
.sacrament-program .program-item.featured {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8fbff 100%);
    border-left: 4px solid #2c5282;
    padding: 1.2rem 1.7rem;
    text-align: center;
    font-size: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    line-height: 1.8;
    margin: 1rem 0;
}

/* Add spacing between consecutive featured items */
.sacrament-program .program-item.featured + .program-item.featured {
    margin-top: 1.5rem;
}

.sacrament-program .program-item.featured strong {
    font-weight: 700;
    color: #1e3a5f;
    font-size: 1.2rem;
}

/* Program Items */
.program__item {
    margin: 0.5rem 0 0.75rem;
    padding: 0;
}

.program__item + .program__item {
    border-top: 2px solid rgba(221, 221, 221, 0.4);
    padding-top: 1rem;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 80%;
}

/* Program Lines */
.program__line {
    display: flex;
    padding: 0.5rem 0;
    border-top: 1px solid #ddd;
}

.program__item .program__line:first-of-type {
    border-top: 0;
}

/* Program Layout */
.program__pieces {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.program__pieces .program__piece {
    margin-left: 0.625rem;
}

/* Typography - Labels */
.program__label {
    font-family: "Lato", sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    line-height: 1.25;
    color: #333;
    margin: 0;
    display: inline;
}

.program__label--inline {
    font-family: "Lato", sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    line-height: 1.25;
    display: inline;
}

/* Typography - Values & Content */
.program__value,
.program__values {
    font-family: "Lato", sans-serif;
    font-size: 1.2em;
    font-weight: 400;
    line-height: 1.75rem;
    margin: 0;
}

.program__label + .program__values,
.program__label + .program__value {
    margin-left: 0.375rem;
}

/* WYSIWYG Content */
.program__wysiwyg {
    margin-top: 0.5rem;
}

.program__wysiwyg p {
    font-family: "Lato", sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.75rem;
    margin-bottom: 1rem;
}

/* Solo Value (Featured Content) */
.program__value--solo {
    display: block;
    text-align: center;
    font-family: "Lato", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.35;
    color: #333;
    padding: 1rem 0;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Featured Item Styles (items with ~tildes~) */
.program__value--featured,
.program__values--featured,
.program__wysiwyg--featured {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8fbff 100%);
    border-left: 4px solid #2c5282;
    padding: 1.2rem 1.7rem;
    text-align: center;
    font-weight: 700;
    color: #1e3a5f;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: block;
    margin: 0.5rem 0;
}

.program__label--featured {
    font-weight: 700;
    color: #1e3a5f;
}

.program__value--solo.program__value--featured {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8fbff 100%);
    border-left: 4px solid #2c5282;
    color: #1e3a5f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

dl.program__kv {
    display: flex;
    align-items: center;
}

/* =================================================================
   Responsive Design
   ================================================================= */

/* Tablet Styles */
@media (max-width: 768px) {
    .program,
    .sacrament-program {
        margin-bottom: 1.5rem;
    }
    
    .sacrament-program .program-content {
        padding: 2rem 1.5rem;
        border-radius: 8px;
    }

    span.featured-program-divider {
        width: 10%;
        margin: 10px auto 20px;
    }
    
    .sacrament-program .leadership-row,
    .sacrament-program .music-row {
        padding-bottom: 1.25rem;
    }
    
    .sacrament-program .leadership-row span,
    .sacrament-program .music-row span {
        margin: 0 1rem;
    }
    
    .sacrament-program .program-item {
        padding: 0.875rem 1.5rem;
    }
    
    .sacrament-program .program-item.featured {
        padding: 1.125rem 1.5rem;
    }
    
    .program__item + .program__item {
        max-width: 90%;
        padding-top: 0.75rem;
        margin-top: 1rem;
    }
    
    .program__value--solo {
        padding: 0.75rem;
    }
    
    .program__pieces {
        gap: 0.125rem;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    .program,
    .sacrament-program {
        margin-bottom: 1rem;
    }
    
    .sacrament-program .program-content {
        padding: 1.5rem 1rem;
        border-radius: 8px;
    }
    
    .sacrament-program .leadership-row,
    .sacrament-program .music-row {
        padding-bottom: 1rem;
    }
    
    .sacrament-program .leadership-row span,
    .sacrament-program .music-row span {
        display: block;
        margin: 0.5rem 0;
    }
    
    .sacrament-program .program-item {
        padding: 0.875rem 1rem;
    }
    
    .sacrament-program .program-item.featured {
        padding: 1rem 1rem;
        margin: 1rem 0;
    }
    
    .program__item + .program__item {
        max-width: 100%;
        width: 100%;
        padding-top: 0.5rem;
        margin-top: 0.75rem;
    }
    
    .program__pieces {
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .program__pieces .program__piece {
        margin-left: 0.5rem;
    }
    
    .program__label + .program__values,
    .program__label + .program__value {
        margin-left: 0.25rem;
    }
    
    .program__value--solo {
        padding: 0.5rem;
        margin: 0.75rem 0;
    }
    
    .program__line {
        padding: 0.375rem 0;
    }
}

/* =================================================================
   Accessibility & Print Styles
   ================================================================= */

/* Focus States */
.program__item:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .program__line {
        border-color: #000;
    }
    
    .program__item + .program__item {
        border-color: #000;
    }
    
    .program__value--solo {
        background-color: #f0f0f0;
        border: 1px solid #000;
    }
}

/* Print Styles */
@media print {
    .program,
    .sacrament-program {
        margin-bottom: 1rem;
        break-inside: avoid;
    }
    
    .sacrament-program .program-content {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .sacrament-program .program-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .sacrament-program .program-item.featured {
        background: #e3f2fd;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .program__item {
        break-inside: avoid;
    }
    
    .program__value--solo {
        background-color: transparent;
        border: 1px solid #000;
    }
}