/**
 * Marthoma Church Theme - Parish Accordion Widget Styles
 *
 * Dark background accordion with two-column layout
 * Sections split evenly: left gets ceiling of half, right gets remainder
 * E.g., 6 sections = 3 left + 3 right, 5 sections = 3 left + 2 right
 *
 * @package MarthomaChurch
 */

/* ==========================================
   MAIN CONTAINER
   ========================================== */

.marthoma-parish-accordion-widget {
    width: 100%;
    background-color: #04141E;
    padding: 50px;
    box-sizing: border-box;
}

/* ==========================================
   TWO-COLUMN LAYOUT
   ========================================== */

.parish-accordion-container {
    display: flex;
    flex-direction: row;
    gap: 60px;
    width: 100%;
}

.parish-accordion-left {
    width: 37%;
    flex-shrink: 0;
}

.parish-accordion-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   SECTION
   ========================================== */

.parish-section {
    width: 100%;
}

/* Section spacing in both columns */
.parish-accordion-left .parish-section + .parish-section,
.parish-accordion-right .parish-section + .parish-section {
    margin-top: 40px;
}

.parish-section-wrapper {
    display: flex;
    flex-direction: row;
    gap: 17px;
}

/* ==========================================
   DECORATIVE LINE
   ========================================== */

.parish-section-line {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 5px;
    color: #FFFFFF;
}

.parish-section-line svg {
    display: block;
}

/* Hide decorative line when section is expanded */
.parish-section.is-expanded .parish-section-line {
    visibility: hidden;
}

/* ==========================================
   SECTION CONTENT
   ========================================== */

.parish-section-content {
    flex: 1;
    min-width: 0;
}

.parish-section-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ==========================================
   TITLE
   ========================================== */

.parish-section-title {
    font-family: var(--marthoma-font-heading, 'Montserrat', sans-serif);
    font-size: 35px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================
   SUBTITLE
   ========================================== */

.parish-section-subtitle {
    font-family: var(--marthoma-font-heading, 'Montserrat', sans-serif);
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================
   SECTION BODY (EXPANDABLE)
   ========================================== */

.parish-section-body {
    margin-top: 20px;
    overflow: hidden;
}

/* ==========================================
   BULLET LIST
   ========================================== */

.parish-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.parish-bullet-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.parish-bullet-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    margin-top: 2px;
}

.parish-bullet-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.parish-bullet-text {
    font-family: var(--marthoma-font-body, 'Inter', sans-serif);
    font-size: 16px;
    font-weight: 400;
    color: #FFFFFF;
    line-height: 1.5;
}

/* ==========================================
   WYSIWYG CONTENT
   ========================================== */

.parish-wysiwyg-content {
    font-family: var(--marthoma-font-body, 'Inter', sans-serif);
    font-size: 16px;
    font-weight: 400;
    color: #FFFFFF;
    line-height: 1.6;
}

.parish-wysiwyg-content p {
    margin: 0 0 1em 0;
}

.parish-wysiwyg-content p:last-child {
    margin-bottom: 0;
}

.parish-wysiwyg-content ul,
.parish-wysiwyg-content ol {
    margin: 0 0 1em 0;
    padding-left: 1.5em;
}

.parish-wysiwyg-content li {
    margin-bottom: 0.5em;
}

.parish-wysiwyg-content a {
    color: #B7D8FB;
    text-decoration: underline;
}

.parish-wysiwyg-content a:hover {
    color: #FFFFFF;
}

/* ==========================================
   TOGGLE BUTTON
   ========================================== */

.parish-toggle-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--marthoma-font-heading, 'Montserrat', sans-serif);
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    transition: color 0.3s ease;
}

.parish-toggle-btn:hover {
    color: #B7D8FB;
}

.parish-toggle-btn:focus {
    outline: 2px solid rgba(183, 216, 251, 0.5);
    outline-offset: 4px;
}

.parish-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: inherit;
}

.parish-toggle-icon svg {
    display: block;
}

.parish-toggle-text {
    white-space: nowrap;
}

/* Arrow icon animation on hover */
.parish-toggle-btn:not(.is-close):hover .parish-toggle-icon {
    transform: translate(2px, -2px);
}

.parish-toggle-icon {
    transition: transform 0.3s ease;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

/* Large Tablet (1024px and below) */
@media (max-width: 1024px) {
    .marthoma-parish-accordion-widget {
        padding: 40px 30px;
    }

    .parish-accordion-container {
        flex-direction: column;
        gap: 0;
    }

    .parish-accordion-left,
    .parish-accordion-right {
        width: 100% !important;
    }

    /* Remove gap between columns, use section spacing instead */
    .parish-accordion-right {
        margin-top: 30px;
    }

    .parish-section-title {
        font-size: 26px;
        line-height: 1.3;
    }

    .parish-section-subtitle {
        font-size: 15px;
    }

    .parish-accordion-left .parish-section + .parish-section,
    .parish-accordion-right .parish-section + .parish-section {
        margin-top: 30px;
    }

    .parish-section-line svg {
        height: 100px;
    }

    .parish-bullet-text {
        font-size: 15px;
    }

    .parish-wysiwyg-content {
        font-size: 15px;
    }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .marthoma-parish-accordion-widget {
        padding: 30px 20px;
    }

    .parish-accordion-right {
        margin-top: 25px;
    }

    .parish-section-wrapper {
        gap: 12px;
    }

    .parish-section-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .parish-section-subtitle {
        font-size: 14px;
    }

    .parish-bullet-list {
        gap: 12px;
    }

    .parish-bullet-text {
        font-size: 14px;
    }

    .parish-bullet-icon svg {
        width: 16px;
        height: 16px;
    }

    .parish-wysiwyg-content {
        font-size: 14px;
    }

    .parish-toggle-btn {
        font-size: 14px;
        margin-top: 15px;
    }

    .parish-toggle-icon svg {
        width: 16px;
        height: 16px;
    }

    .parish-accordion-left .parish-section + .parish-section,
    .parish-accordion-right .parish-section + .parish-section {
        margin-top: 25px;
    }

    .parish-section-line svg {
        height: 80px;
    }

    .parish-section-body {
        margin-top: 15px;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .marthoma-parish-accordion-widget {
        padding: 25px 15px;
    }

    .parish-accordion-right {
        margin-top: 20px;
    }

    .parish-section-wrapper {
        gap: 10px;
    }

    .parish-section-title {
        font-size: 18px;
        line-height: 1.3;
    }

    .parish-section-subtitle {
        font-size: 13px;
    }

    .parish-bullet-list {
        gap: 10px;
    }

    .parish-bullet-item {
        gap: 8px;
    }

    .parish-bullet-text {
        font-size: 13px;
        line-height: 1.5;
    }

    .parish-bullet-icon svg {
        width: 14px;
        height: 14px;
    }

    .parish-wysiwyg-content {
        font-size: 13px;
        line-height: 1.5;
    }

    .parish-toggle-btn {
        font-size: 13px;
        margin-top: 12px;
        gap: 6px;
    }

    .parish-toggle-icon svg {
        width: 14px;
        height: 14px;
    }

    .parish-accordion-left .parish-section + .parish-section,
    .parish-accordion-right .parish-section + .parish-section {
        margin-top: 20px;
    }

    .parish-section-line svg {
        height: 60px;
    }

    .parish-section-body {
        margin-top: 12px;
    }

    .parish-section-header {
        gap: 3px;
    }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    .parish-toggle-btn,
    .parish-toggle-icon {
        transition: none;
    }

    .parish-section-body {
        transition: none;
    }
}

/* ==========================================
   ELEMENTOR EDITOR
   ========================================== */

.elementor-editor-active .marthoma-parish-accordion-widget {
    min-height: 200px;
}

/* Show all sections in editor for editing */
.elementor-editor-active .parish-section-body {
    display: block !important;
    opacity: 1 !important;
}

.elementor-editor-active .parish-section:not(.is-expanded) .parish-section-body {
    opacity: 0.6;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    padding: 10px;
}
