/**
 * Marthoma Church Theme - Historical Office Bearers Widget Styles
 *
 * Stacked layout with dark background:
 * - Term title on top
 * - Text tiles grid below
 *
 * @package MarthomaChurch
 */

/* Main Container */
.marthoma-historical-officers-widget {
    width: 100%;
}

/* Dark Background Container */
.historical-officers-container {
    background-color: #04141E;
    padding: 60px 40px;
    width: 100%;
}

/* Term Block */
.historical-officers-term {
    width: 100%;
}

.historical-officers-term + .historical-officers-term {
    margin-top: 60px;
}

/* Term Title */
.historical-officers-title {
    font-family: var(--marthoma-font-heading, 'Montserrat', sans-serif);
    font-size: 35px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 30px 0;
    line-height: 1.3;
}

/* Tiles Grid */
.historical-officers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Tile */
.historical-officer-tile {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
}

/* Vertical Line */
.historical-officer-line {
    width: 2px;
    height: 60px;
    background-color: #FFFFFF;
    flex-shrink: 0;
}

/* Tile Content */
.historical-officer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tile Header (Position + Arrow) */
.historical-officer-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

/* Position */
.historical-officer-position {
    font-family: var(--marthoma-font-heading, 'Montserrat', sans-serif);
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.4;
}

/* Arrow Icon */
.historical-officer-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.historical-officer-arrow svg {
    width: 7px;
    height: 12px;
    stroke: #FFFFFF;
}

/* Name */
.historical-officer-name {
    font-family: var(--marthoma-font-body, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 400;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.4;
}

/* No Terms Message */
.historical-officers-no-terms {
    padding: 40px;
    text-align: center;
    color: #FFFFFF;
    background-color: #04141E;
    font-family: var(--marthoma-font-body, 'Inter', sans-serif);
}

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

/* Large Tablet */
@media (max-width: 1200px) {
    .historical-officers-container {
        padding: 50px 30px;
    }

    .historical-officers-title {
        font-size: 30px;
    }

    .historical-officers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .historical-officers-container {
        padding: 40px 25px;
    }

    .historical-officers-title {
        font-size: 28px;
        margin-bottom: 25px;
    }

    .historical-officers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .historical-officers-term + .historical-officers-term {
        margin-top: 50px;
    }

    .historical-officer-position {
        font-size: 15px;
    }

    .historical-officer-name {
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .historical-officers-container {
        padding: 30px 20px;
    }

    .historical-officers-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .historical-officers-term + .historical-officers-term {
        margin-top: 40px;
    }

    .historical-officers-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .historical-officer-line {
        height: 50px;
    }
}

/* ==========================================
   LOAD MORE
   ========================================== */

/* Hidden terms */
.historical-officers-term.historical-officers-hidden {
    display: none;
}

/* Animation when showing */
.historical-officers-term.historical-officers-showing {
    animation: historicalOfficersFadeIn 0.4s ease-out;
}

@keyframes historicalOfficersFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Load More Wrapper */
.historical-officers-load-more-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
}

.historical-officers-load-more-line {
    flex: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

.historical-officers-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    font-family: var(--marthoma-font-body, 'Inter', sans-serif);
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.historical-officers-load-more:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #FFFFFF;
}

.historical-officers-load-more:focus {
    outline: none;
    border-color: #FFFFFF;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.historical-officers-load-more-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.historical-officers-load-more:hover .historical-officers-load-more-icon {
    transform: translateY(3px);
}

.historical-officers-load-more-icon svg {
    stroke: currentColor;
}

/* Count Wrapper */
.historical-officers-count-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.historical-officers-count {
    font-family: var(--marthoma-font-body, 'Inter', sans-serif);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Load More */
@media (max-width: 768px) {
    .historical-officers-load-more-wrapper {
        margin-top: 35px;
        gap: 15px;
    }

    .historical-officers-load-more {
        font-size: 14px;
        padding: 10px 18px;
    }

    .historical-officers-count {
        font-size: 13px;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .historical-officer-tile,
    .historical-officers-load-more,
    .historical-officers-load-more-icon {
        transition: none;
    }

    .historical-officers-term.historical-officers-showing {
        animation: none;
    }
}

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

.elementor-editor-active .marthoma-historical-officers-widget {
    min-height: 150px;
}

/* Show all terms in editor */
.elementor-editor-active .historical-officers-term.historical-officers-hidden {
    display: block;
    opacity: 0.5;
}
