/* =========================================
   STYLE: LIST (Homepage 3-Column Grid)
   ========================================= */

/* The Main Container */
.bc-region-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    /* margin: 40px 0; */
}

/* The Link Wrapper */
.bc-region-list-item {
    text-decoration: none !important;
    display: block;
    outline: none;
}

/* The Card Body */
.bc-region-list-item-inner {
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hover State */
.bc-region-list-item:hover .bc-region-list-item-inner {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: #222;
    transform: translateY(-5px);
}

/* Active State */
.bc-region-list-item.active .bc-region-list-item-inner {
    border-color: #222;
    /* background-color: #f9f9f9; */
    /* border-width: 2px; */
}

/* Flag Wrapper & Image */
.bc-region-list-item-flag-wrapper {
    margin-bottom: 2rem;
}

.bc-region-list-item-flag-img {
    width: 60px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    /* border: 1px solid #eeeeee; */
    /* box-shadow: 0 4px 10px rgba(0,0,0,0.05); */
    transition: transform 0.3s ease;
}

.bc-region-list-item:hover .bc-region-list-item-flag-img {
    transform: scale(1.05);
}

/* Flag Placeholder */
.bc-region-list-item-flag-placeholder {
    width: 70px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f1f1;
}

.bc-region-list-item-flag-placeholder span {
    font-weight: 700;
    font-size: 18px;
    color: #999;
    text-transform: uppercase;
}

/* Typography & Info Block */
.bc-region-list-item-info {
    width: 100%;
}

.bc-region-list-item-title {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 700;
    /* color: #1a1a1a; */
    letter-spacing: 0.2px;
}

.bc-region-list-item-cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    display: inline-block;
}

/* Interaction colors */
.bc-region-list-item:hover .bc-region-list-item-cta {
    color: var(--primary);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .bc-region-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .bc-region-list { grid-template-columns: 1fr; }
    .bc-region-list-item-inner { padding: 40px 20px; }
}


/* =========================================
   STYLE: MODAL
   ========================================= */

.bc-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, .8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    backdrop-filter: blur(2px);
}

.bc-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.bc-modal-content {
    background: var(--body-bg);
    width: 90%;
    max-width: 650px;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.28);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.bc-modal-overlay.open .bc-modal-content {
    transform: translateY(0);
}

.bc-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--body-bg);
    z-index: 10;
}

.bc-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
}

.bc-modal-body {
    padding: 24px;
}

.bc-close-btn {
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--dark);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.bc-close-btn:hover {
    background: var(--gray-200);
}

/**
 * Adjust region listing style when it's inside a modal 
 */
.bc-modal .bc-region-list {
    gap: 20px;
}

.bc-modal .bc-region-list-item-inner {
    padding: 20px;
    text-align: unset;
    align-items: unset;
}

/* Hover State */
.bc-region-list-item:hover .bc-region-list-item-inner {
    box-shadow: unset;
    border-color: #222;
    transform: unset;
}

.bc-modal .bc-region-list-item-flag-wrapper {
    margin-bottom: 10px;
}

.bc-modal .bc-region-list-item-title {
    font-size: 16px;
    margin-bottom: 2px;
}

.bc-modal .bc-region-list-item-cta {
    font-size: 11px;
    gap: 24px;
}

.bc-modal .bc-region-list-item-flag-img {
    width: 32px;
}

.bc-modal .bc-region-list-item-flag-placeholder {
    width: 32px;
}