/* Local Information Page Styles */

.local-info-container {
    max-width: 1304px;
    margin: 0 auto;
    padding: 80px 32px;
}

/* Region Section */
.region-section {
    margin-bottom: 50px;
}

.region-title {
    font-size: 40px;
    font-weight: 700;
    color: #27201f;
    padding: 0 20px;
    margin-bottom: 20px;
    line-height: normal;
}

/* Country Grid */
.countries-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.country-item {
    flex: 0 0 25%;
    max-width: 25%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #ccced2;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.country-item:hover {
    background-color: #f7f7f7;
}

.country-item.active .country-name {
    font-size: 24px;
    font-weight: 600;
    color: #27201f;
}

.country-item.empty {
    cursor: default;
    border-bottom: none;
    visibility: hidden;
}

.country-item.empty:hover {
    background-color: transparent;
}

.country-name {
    font-size: 20px;
    font-weight: 400;
    color: #6c6c6c;
    line-height: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    flex: 1;
    text-align: left;
}

.chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.chevron img {
    width: 20px;
    height: 20px;
    display: block;
}

.country-item.active .chevron {
    transform: rotate(180deg);
}

.country-item.active .chevron img {
    filter: brightness(0.19);
}

/* Expanded Panel - Single Layer (documents directly) */
.expanded-panel {
    display: none;
    width: 100%;
    flex: 0 0 100%;
    background-color: #f7f7f7;
    border-top: 4px solid #27201f;
    border-radius: 12px;
    padding: 20px;
    gap: 12px;
    overflow: hidden;
}

.expanded-panel.show {
    display: flex;
}

/* Document columns layout */
.doc-columns {
    display: flex;
    gap: 12px;
    width: 100%;
}

.doc-column {
    flex: 1 1 0%;
    min-width: 0;
    background: #ffffff;
    border-radius: 8px;
    padding: 12px 20px;
}

.doc-column-title {
    font-size: 20px;
    font-weight: 600;
    color: #27201f;
    padding: 6px 0 10px;
    border-bottom: 1px solid #27201f;
    margin-bottom: 16px;
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.doc-item:hover {
    opacity: 0.7;
}

.doc-item-name {
    font-size: 18px;
    font-weight: 400;
    color: #6c6c6c;
    word-break: break-word;
}

.doc-item-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Expanded Panel - Two Layer (sub-cities) */
.subcity-panel {
    display: none;
    width: 100%;
    flex: 0 0 100%;
    background-color: #f7f7f7;
    border-top: 4px solid #27201f;
    border-radius: 12px;
    padding: 10px 20px;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.subcity-panel.show {
    display: flex;
}

.subcity-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.subcity-item {
    flex: 0 0 25%;
    max-width: 25%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #ccced2;
}

.subcity-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.subcity-item.last-row {
    border-bottom: none;
}

.subcity-item.active-row {
    border-bottom: 2px solid #27201f;
}

.subcity-item.active .chevron {
    transform: rotate(180deg);
}

.subcity-item.active .chevron img {
    filter: brightness(0.19);
}

.subcity-name {
    font-size: 20px;
    font-weight: 400;
    color: #6c6c6c;
    line-height: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    flex: 1;
    text-align: left;
}

/* Sub-city expanded documents panel */
.subcity-docs {
    display: none;
    flex: 0 0 100%;
    width: 100%;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    padding: 12px 20px;
    margin: 0 0 10px 0;
    overflow: hidden;
}

.subcity-docs.show {
    display: block;
}

/* Animations - preparation class pattern for cross-browser consistency */
.expanded-panel.show,
.subcity-panel.show {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Responsive - 3 columns */
@media (max-width: 1279px) {
    .region-title {
        margin-top: 20px;
    }

    .country-item {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    .subcity-item {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

/* Responsive - 2 columns */
@media (max-width: 1024px) {
    .local-info-container {
        padding: 60px 25px;
    }

    .region-title {
        font-size: 32px;
    }

    .country-item {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .subcity-item {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .country-name,
    .subcity-name {
        font-size: 18px;
    }

    .doc-item-name {
        font-size: 16px;
    }
}

/* Responsive - 1 column */
@media (max-width: 767px) {
    .local-info-container {
        padding: 40px 12px;
    }

    .region-title {
        font-size: 28px;
    }

    .country-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .subcity-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .doc-columns {
        flex-direction: column;
    }

    .doc-column {
        flex: none;
    }

    .country-name,
    .subcity-name {
        font-size: 16px;
    }

    .doc-column-title {
        font-size: 18px;
    }

    .doc-item-name {
        font-size: 15px;
        white-space: normal;
        word-break: break-word;
    }
}
