/* ==================================================
   HTNS LEADERSHIP TEAM MODULE STYLES
   - Pastor Components: Styles gốc (cho shortcode cũ)
   - Ban Thường Trực: CSS riêng
   - Ban Nhân Sự: CSS riêng
   ================================================== */

/* --- 1. DESIGN SYSTEM VARIABLES --- */
:root {
    --htns-color-primary: #0b3678;
    --htns-color-secondary: #ed920e;
    --htns-color-bg: #f8f9fa;
    --htns-color-surface: #ffffff;
    --htns-color-text-main: #333333;
    --htns-color-text-sub: #666666;

    --htns-font-heading: 'Playfair Display', serif;
    --htns-font-body: 'Inter', sans-serif;

    --htns-spacing-unit: 1rem;
    --htns-radius-card: 12px;
    --htns-radius-btn: 50px;

    --htns-shadow-normal: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --htns-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --htns-transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================================================
   SECTION A: PASTOR COMPONENTS (cho shortcode cũ)
   Giữ nguyên không namespace
   ================================================== */

/* Pastor Grid */
.team-grid {
    display: grid;
    gap: 2.5rem;
    padding-bottom: 5rem;
    grid-template-columns: repeat(3, 1fr);
}

.team-grid>article:first-child {
    border: 2px solid var(--htns-color-secondary);
    transform: scale(1.02);
}

/* Pastor Card */
.card {
    background: var(--htns-color-surface);
    border-radius: var(--htns-radius-card);
    overflow: hidden;
    box-shadow: var(--htns-shadow-normal);
    transition: var(--htns-transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--htns-shadow-hover);
}

.card:hover .card-img img {
    transform: scale(1.08);
}

.card-img {
    aspect-ratio: 3/4;
    overflow: hidden;
    position: relative;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(11, 54, 120, 0.9), transparent);
    padding: 4rem 1.5rem 1.5rem;
    opacity: 0;
    transition: var(--htns-transition-smooth);
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-role {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--htns-color-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-name {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-family: var(--htns-font-heading);
    color: var(--htns-color-primary);
}

.card-highlights {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--htns-color-text-sub);
    font-size: 0.9rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-view {
    margin-top: auto;
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--htns-color-primary);
    color: var(--htns-color-primary);
    background: transparent;
    border-radius: var(--htns-radius-btn);
    font-weight: 500;
    transition: var(--htns-transition-smooth);
    cursor: pointer;
    font-size: 0.9rem;
}

.card:hover .btn-view {
    background: var(--htns-color-primary);
    color: white;
}

/* Pastor Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
}

.modal {
    background: var(--htns-color-surface);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--htns-radius-card);
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-backdrop.active .modal {
    transform: translateY(0);
    opacity: 1;
}

.btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    color: var(--htns-color-text-main);
    transition: var(--htns-transition-smooth);
}

.btn-close:hover {
    background: var(--htns-color-secondary);
    color: white;
    transform: rotate(90deg);
}

.modal-content {
    background: #fff;
    max-width: 900px;
    max-height: 85vh;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    flex-direction: row;
}

.modal-img-col {
    flex: 0 0 40%;
    position: relative;
    background: #f0f0f0;
    min-height: 300px;
}

.modal-img-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.modal-info-col {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.modal-role {
    color: var(--htns-color-secondary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.modal-name {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    line-height: 1.1;
    font-family: var(--htns-font-heading);
    color: var(--htns-color-primary);
}

.modal-bio {
    color: var(--htns-color-text-sub);
    font-size: 1.05rem;
}

.modal-bio p {
    margin-bottom: 1rem;
    text-align: justify;
}

.modal-bio strong {
    color: var(--htns-color-primary);
}

/* Pastor Responsive */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .modal-content {
        flex-direction: column;
    }

    .modal-img-col {
        height: 300px;
    }

    .modal-info-col {
        padding: 1.5rem;
    }
}

/* ==================================================
   SECTION B: BAN THUONG TRUC STYLES
   ================================================== */

.ban-thuong-truc-section {
    margin-bottom: 80px;
}

@media (max-width: 768px) {
    .ban-thuong-truc-section {
        margin-bottom: 120px;
    }
}

.ban-thuong-truc-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    justify-items: center;
}

.thuong-truc-card {
    grid-column: span 2;
    width: 100%;
    max-width: 320px;
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.thuong-truc-card:nth-child(4):nth-last-child(2) {
    grid-column: 2 / 4;
}

.thuong-truc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--htns-color-primary), var(--htns-color-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 10;
}

.thuong-truc-card:hover::before {
    transform: scaleX(1);
}

.thuong-truc-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

.thuong-truc-image {
    width: 100%;
    height: 430px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.thuong-truc-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    transition: var(--htns-transition-smooth);
}

.thuong-truc-card:hover .thuong-truc-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.thuong-truc-info {
    padding: 25px 20px;
    background-color: #ffffff;
    text-align: center;
}

.thuong-truc-name {
    font-size: 1.2rem;
    color: var(--htns-color-primary);
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.3;
}

.thuong-truc-role {
    color: var(--htns-color-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 1024px) {
    .ban-thuong-truc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .thuong-truc-card {
        grid-column: span 1 !important; /* Reset desktop span 2 to fit 2-column layout */
    }
    
    /* Reset centering logic cho tablet 1024px */
    .thuong-truc-card:nth-child(4):nth-last-child(2) {
        grid-column: auto !important;
    }
}

@media (max-width: 768px) {
    .ban-thuong-truc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        max-width: 600px;
        padding-bottom: 40px;
    }

    .thuong-truc-card {
        grid-column: span 1 !important; /* Reset desktop span 2 */
        max-width: 100%;
    }
    
    /* Reset centering logic cho tablet */
    .thuong-truc-card:nth-child(4):nth-last-child(2) {
        grid-column: auto !important;
    }

    .thuong-truc-image {
        height: 350px; /* Fixed height cho tablet - override inline min-height */
    }

    .thuong-truc-name {
        font-size: 1rem;
    }

    .thuong-truc-role {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .ban-thuong-truc-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        gap: 25px;
        padding-bottom: 30px;
    }

    .thuong-truc-card {
        grid-column: span 1 !important; /* Reset desktop span 2 */
        max-width: 100%;
    }
    
    /* Reset tất cả positioning cho mobile */
    .thuong-truc-card:nth-child(4):nth-last-child(2) {
        grid-column: auto !important;
    }
    
    .thuong-truc-image {
        height: 430px; /* Fixed height cho mobile phone */
    }
}

/* --- 8. BAN NHAN SU STYLES --- */
.nhan-su-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.nhan-su-card {
    background-color: #ffffff;
    padding: 25px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--htns-transition-smooth);
    border: 2px solid transparent;
}

.nhan-su-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--htns-color-secondary);
}

.nhan-su-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid var(--htns-color-primary);
    transition: var(--htns-transition-smooth);
}

.nhan-su-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nhan-su-card:hover .nhan-su-avatar {
    border-color: var(--htns-color-secondary);
    transform: scale(1.05);
}

.nhan-su-card h5 {
    color: var(--htns-color-primary);
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.nhan-su-card p {
    font-size: 0.85rem;
    color: var(--htns-color-text-sub);
    margin: 0;
    line-height: 1.4;
}