* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f7fa;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(135deg, #0c9444 0%, #087d37 100%);
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(
            circle at 20% 50%,
            rgba(12, 148, 68, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(8, 125, 55, 0.05) 0%,
            transparent 50%
        );
    pointer-events: none;
    z-index: -1;
}

/* Hero Section */
.hero-section {
    background: transparent;
    color: white;
    padding: 60px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
    pointer-events: none;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 24px 48px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}

.hero-stat-label {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
}

/* Map Section - Side by Side Layout */
.map-container {
    max-width: 1400px;
    margin: -40px auto 40px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 24px;
    align-items: start;
}

.map-wrapper {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow:
        rgba(14, 63, 126, 0.06) 0px 0px 0px 1px,
        rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px,
        rgba(42, 51, 70, 0.04) 0px 2px 2px -1px,
        rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px,
        rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px,
        rgba(42, 51, 70, 0.03) 0px 10px 10px -5px,
        rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
    position: relative;
}

/* Right Sidebar - Portals Panel */
.portals-panel {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow:
        rgba(14, 63, 126, 0.06) 0px 0px 0px 1px,
        rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px,
        rgba(42, 51, 70, 0.04) 0px 2px 2px -1px,
        rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px,
        rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px,
        rgba(42, 51, 70, 0.03) 0px 10px 10px -5px,
        rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.portals-panel-header {
    padding: 20px 24px;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(135deg, #0c9444 0%, #0a7a38 100%);
    background-size:
        20px 20px,
        100%;
    background-position:
        0 0,
        0 0;
    color: white;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.portals-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    font-family: "IBM Plex Sans", sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portals-panel-title svg {
    width: 22px;
    height: 22px;
    color: white;
    opacity: 0.9;
}

.portals-panel-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
}

/* Portal Links as Badges in Header */
.portals-links-wrapper {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.portal-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.portal-badge svg {
    flex-shrink: 0;
}

.portal-badge-arrow {
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.portal-badge:hover .portal-badge-arrow {
    transform: translateX(2px);
    opacity: 1;
}

.portals-panel-content {
    overflow-y: auto;
    flex: 1;
}

/* Idle State */
.portals-panel-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    color: #94a3b8;
}

.portals-panel-idle svg {
    width: 64px;
    height: 64px;
    opacity: 0.3;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.portals-panel-idle h3 {
    font-size: 18px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
}

.portals-panel-idle p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 280px;
}

/* Portal Cards in Sidebar */
.portals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Region Top Articles */
.region-top-articles {
    padding: 28px;
}

.region-articles-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f0f0f;
    margin-bottom: 20px;
    font-family: "IBM Plex Sans", sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    color: #565c59;
}

.region-articles-title svg {
    color: #0c9444;
    width: 16px;
    height: 16px;
}

.region-article-card {
    margin-bottom: 16px;
}

.region-article-card:last-child {
    margin-bottom: 0;
}

.region-article-card a {
    display: flex;
    gap: 14px;
    text-decoration: none;
    padding: 16px;
    background: white;
    border: 1px solid #e9eefd;
    border-radius: 10px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.region-article-card a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #0c9444;
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.region-article-card a:hover::before {
    transform: scaleY(1);
}

.region-article-card a:hover {
    background: #fafbfc;
    border-color: #0c9444;
    transform: translateX(3px);
    box-shadow:
        rgba(12, 148, 68, 0.1) 0px 0px 0px 1px,
        rgba(42, 51, 70, 0.05) 0px 4px 8px -2px;
}

.region-article-rank {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0c9444 0%, #0a7a38 100%);
    color: white;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(12, 148, 68, 0.25);
}

.region-article-content {
    flex: 1;
    min-width: 0;
}

.region-article-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f0f0f;
    line-height: 1.45;
    margin-bottom: 0px;
    font-family: "IBM Plex Sans", sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.region-article-card a:hover .region-article-title {
    color: #0c9444;
}

.region-article-meta {
    font-size: 12px;
    color: #565c59;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.region-article-site {
    font-weight: 600;
    color: #0c9444;
}

.region-article-views {
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 4px;
}

.region-article-views::before {
    content: "•";
    opacity: 0.5;
}

.region-article-card a:hover .region-article-title {
    color: #0c9444;
}

.region-article-meta {
    font-size: 11px;
    color: #565c59;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.region-article-site {
    font-weight: 600;
    color: #0c9444;
}

.region-article-views {
    opacity: 0.7;
}

.no-articles {
    padding: 30px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.portal-item {
    background: #fafbfc;
    border: 1px solid #e9eefd;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.portal-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0c9444;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.portal-item:hover::before {
    transform: scaleY(1);
}

.portal-item:hover {
    background: white;
    border-color: #0c9444;
    transform: translateX(4px);
    box-shadow:
        rgba(12, 148, 68, 0.1) 0px 0px 0px 1px,
        rgba(42, 51, 70, 0.05) 0px 4px 8px -2px;
}

.portal-item-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0c9444 0%, #0a7a38 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(12, 148, 68, 0.2);
}

.portal-item-info {
    flex: 1;
    min-width: 0;
}

.portal-item-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f0f0f;
    margin-bottom: 4px;
    font-family: "IBM Plex Sans", sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-item:hover .portal-item-name {
    color: #0c9444;
}

.portal-item-domain {
    font-size: 12px;
    color: #565c59;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-item-arrow {
    width: 20px;
    height: 20px;
    color: #cbd5e1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.portal-item:hover .portal-item-arrow {
    color: #0c9444;
    transform: translateX(4px);
}

/* Hide old elements */
.portals-section,
.region-portals-wrapper,
.map-sidebar,
.trending-articles-wrapper,
.portal-item,
.trending-section-sidebar,
.trending-divider,
.trending-title-sidebar {
    display: none !important;
}

/* Trending Articles in Sidebar */
.trending-section-sidebar {
    margin-top: 24px;
}

.trending-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e9eefd, transparent);
    margin: 24px 0;
}

.trending-title-sidebar {
    font-size: 16px;
    font-weight: 700;
    color: #0f0f0f;
    margin-bottom: 16px;
    font-family: "IBM Plex Sans", sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-title-sidebar svg {
    color: #0c9444;
}

.trending-article {
    margin-bottom: 16px;
}

.trending-article a {
    display: block;
    text-decoration: none;
    padding: 14px;
    background: #fafbfc;
    border: 1px solid #e9eefd;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.trending-article a:hover {
    background: white;
    border-color: #0c9444;
    transform: translateX(2px);
    box-shadow:
        rgba(12, 148, 68, 0.08) 0px 0px 0px 1px,
        rgba(42, 51, 70, 0.03) 0px 2px 4px -1px;
}

.trending-rank {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #0c9444 0%, #0a7a38 100%);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.trending-article-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f0f0f;
    line-height: 1.4;
    margin-bottom: 8px;
    font-family: "IBM Plex Sans", sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-article a:hover .trending-article-title {
    color: #0c9444;
}

.trending-meta {
    font-size: 11px;
    color: #565c59;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trending-meta span {
    opacity: 0.8;
}

/* Trending Empty State */
.trending-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.trending-empty svg {
    opacity: 0.3;
    margin-bottom: 16px;
    color: #cbd5e1;
    width: 48px;
    height: 48px;
}

.trending-empty .empty-title {
    font-size: 15px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}

.trending-empty .empty-description {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

/* Latest Articles Section Below Map */
.latest-articles-section {
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.latest-articles-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow:
        rgba(14, 63, 126, 0.06) 0px 0px 0px 1px,
        rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px,
        rgba(42, 51, 70, 0.04) 0px 2px 2px -1px,
        rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px,
        rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px,
        rgba(42, 51, 70, 0.03) 0px 10px 10px -5px,
        rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
}

.latest-articles-header {
    text-align: center;
    margin-bottom: 36px;
}

.latest-articles-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f0f0f;
    margin-bottom: 8px;
    font-family: "IBM Plex Sans", sans-serif;
}

.latest-articles-subtitle {
    font-size: 15px;
    color: #565c59;
}

.latest-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.article-card {
    background: white;
    border: 1px solid #e9eefd;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    border-color: #0c9444;
    transform: translateY(-4px);
    box-shadow:
        rgba(12, 148, 68, 0.1) 0px 0px 0px 1px,
        rgba(42, 51, 70, 0.05) 0px 4px 12px -2px,
        rgba(42, 51, 70, 0.08) 0px 16px 32px -8px;
}

.article-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #f1f4fe;
}

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

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #0c9444 0%, #0a7a38 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(12, 148, 68, 0.3);
}

.article-card-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f0f0f;
    line-height: 1.4;
    margin-bottom: 12px;
    font-family: "IBM Plex Sans", sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card:hover .article-card-title {
    color: #0c9444;
}

.article-card-meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f4fe;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #565c59;
}

.article-card-site {
    font-weight: 600;
    color: #0c9444;
}

.article-card-views {
    opacity: 0.7;
}

/* Region Portals - Overlay within Map */
.region-portals-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(255, 255, 255, 0.96) 70%,
        rgba(255, 255, 255, 0.9) 100%
    );
    backdrop-filter: blur(12px);
    padding: 16px 36px 20px;
    border-top: 1px solid rgba(34, 197, 94, 0.12);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.06);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    border-radius: 0 0 24px 24px;
}

.region-portals-wrapper.empty {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.region-portals-wrapper.empty {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.region-portals-wrapper .region-info {
    background: transparent;
    border: none;
    padding: 0;
    min-height: auto;
}

.region-portals-wrapper .region-header {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.region-portals-wrapper .region-name-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.3px;
}

.region-portals-wrapper .region-name-header svg {
    width: 16px;
    height: 16px;
    color: #22c55e;
    filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.3));
}

.region-portals-wrapper .region-stats {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.region-portals-wrapper .region-stats::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.region-portals-wrapper .region-info-idle {
    background: transparent;
    border: none;
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.region-portals-wrapper .region-info-idle svg {
    width: 32px;
    height: 32px;
    opacity: 0.2;
    margin-bottom: 8px;
}

/* Portal Quick Access - Bold 2-Column Layout */
.portal-quick-access {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 0;
}

.portal-quick-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fffe 0%, #f0fdf4 100%);
    border: 2px solid rgba(34, 197, 94, 0.15);
    border-radius: 14px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Animated corner accent */
.portal-quick-link::before {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 60px;
    height: 60px;
    background: radial-gradient(
        circle at top right,
        rgba(34, 197, 94, 0.12),
        transparent 70%
    );
    transition: all 0.3s ease;
}

.portal-quick-link:hover::before {
    width: 90px;
    height: 90px;
    background: radial-gradient(
        circle at top right,
        rgba(34, 197, 94, 0.2),
        transparent 70%
    );
}

.portal-quick-link:hover {
    border-color: rgba(34, 197, 94, 0.4);
    transform: translateY(-2px);
    box-shadow:
        0 8px 16px rgba(34, 197, 94, 0.12),
        0 3px 6px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

/* Header row with icon and arrow */
.portal-quick-link .portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 1;
}

.portal-quick-link .portal-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.portal-quick-link:hover .portal-icon {
    transform: scale(1.08) translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.45);
    border-color: rgba(255, 255, 255, 1);
}

.portal-quick-link .portal-arrow {
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #22c55e;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.3));
}

.portal-quick-link:hover .portal-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* Portal name - compact */
.portal-quick-link .portal-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    position: relative;
    z-index: 1;
    letter-spacing: -0.2px;
}

/* Portal domain/subtitle */
.portal-quick-link .portal-domain {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.portal-quick-link .portal-domain::before {
    content: "";
    width: 3px;
    height: 3px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

/* Single column on smaller screens */
@media (max-width: 768px) {
    .portal-quick-access {
        grid-template-columns: 1fr;
    }
}

/* Interactive Map Header */
.map-header {
    text-align: center;
    margin-bottom: 24px;
}

.map-title {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.map-instruction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #0c9444;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    background: #e8f5e9;
    border-radius: 20px;
    display: inline-flex;
    transition: all 0.3s ease;
}

.map-instruction.selected {
    background: #0c9444;
    color: white;
}

.map-instruction-icon {
    width: 20px;
    height: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Map Container */
#map {
    min-height: unset;
    position: relative;
    /* Space for overlay panel */
    transition: padding-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#map.has-overlay {
    padding-bottom: 0;
    /* Remove padding when overlay is visible */
}

/* Simplemaps Tooltip Styling */
#tt_sm_map {
    z-index: 10000 !important;
}

.tt_sm {
    background: linear-gradient(135deg, #0c9444 0%, #0a7a37 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    box-shadow:
        0 8px 24px rgba(12, 148, 68, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(10px);
}

.tt_name_sm {
    display: none !important;
}

.tt_custom_sm {
    color: white !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Region List Fallback */
.region-list-wrapper {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.region-list-toggle {
    display: none;
    /* Hidden by default on desktop */
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 100%;
}

.region-list-toggle:hover {
    color: #0c9444;
    background: #e8f5e9;
    border-color: #c8e6c9;
}

.region-list-toggle svg {
    transition: transform 0.3s ease;
}

.region-list-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.region-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.region-list-item {
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid transparent;
}

.region-list-item:hover {
    background: #e8f5e9;
    color: #0c9444;
    transform: translateY(-2px);
    border-color: #c8e6c9;
}

.region-list-item.active {
    background: #0c9444;
    color: white;
    border-color: #0a7735;
}

.region-list-name {
    text-align: left;
    flex: 1;
}

.region-list-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.region-list-item.active .region-list-count {
    background: rgba(255, 255, 255, 0.3);
}

.region-list-item:hover .region-list-count {
    background: rgba(12, 148, 68, 0.15);
}

/* NEW: Portals Section Below Map */
.portals-section {
    max-width: 1400px;
    margin: 40px auto 60px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.portals-section.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.portals-container {
    background: white;
    border-radius: 12px;
    padding: 48px;
    box-shadow:
        rgba(14, 63, 126, 0.06) 0px 0px 0px 1px,
        rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px,
        rgba(42, 51, 70, 0.04) 0px 2px 2px -1px,
        rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px,
        rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px,
        rgba(42, 51, 70, 0.03) 0px 10px 10px -5px,
        rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
}

.portals-header {
    margin-bottom: 36px;
    text-align: center;
}

.portals-title {
    font-size: 32px;
    font-weight: 700;
    color: #0f0f0f;
    margin-bottom: 8px;
    font-family: "IBM Plex Sans", sans-serif;
}

.portals-subtitle {
    font-size: 15px;
    color: #565c59;
}

.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.portal-card {
    background: white;
    border: 2px solid #e9eefd;
    border-radius: 12px;
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.portal-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0c9444 0%, #0a7a38 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

.portal-card:hover {
    border-color: #0c9444;
    transform: translateY(-6px);
    box-shadow:
        rgba(12, 148, 68, 0.15) 0px 0px 0px 1px,
        rgba(42, 51, 70, 0.05) 0px 4px 8px -2px,
        rgba(42, 51, 70, 0.1) 0px 16px 32px -8px;
}

.portal-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0c9444 0%, #0a7a38 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(12, 148, 68, 0.25);
}

.portal-card-info {
    flex: 1;
    min-width: 0;
}

.portal-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #0f0f0f;
    margin-bottom: 4px;
    font-family: "IBM Plex Sans", sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-card:hover .portal-card-name {
    color: #0c9444;
}

.portal-card-domain {
    font-size: 13px;
    color: #565c59;
    display: flex;
    align-items: center;
    gap: 4px;
}

.portal-card-domain svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.portal-card-arrow {
    margin-top: 12px;
    padding-top: 18px;
    border-top: 1px solid #f1f4fe;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #0c9444;
    font-weight: 600;
}

.portal-card-arrow svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.portal-card:hover .portal-card-arrow svg {
    transform: translateX(6px);
}

/* Hide portal overlay */
.region-portals-wrapper {
    display: none !important;
}

/* Sidebar */
.map-sidebar {
    position: sticky;
    top: 20px;
}

.region-info {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 0;
    min-height: 150px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

/* Idle State */
.region-info-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
    color: #999;
}

.region-info-idle .empty-text {
    font-size: 13px;
    line-height: 1.6;
}

.region-info-idle svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.region-info-idle h3 {
    font-size: 18px;
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
}

.region-info-idle p {
    font-size: 14px;
    line-height: 1.6;
}

/* Region Header */
.region-header {
    background: linear-gradient(135deg, #0c9444 0%, #087d37 100%);
    color: white;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}

.region-header::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.region-name-header {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.region-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.region-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Portal Groups */
.portal-groups {
    padding: 28px;
}

.portal-group {
    margin-bottom: 28px;
}

.portal-group:last-child {
    margin-bottom: 0;
}

.portal-group-title {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-group-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* Portal Cards */
.portal-card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    border: 1px solid #e8e8e8;
}

.portal-card:hover {
    border-color: #0c9444;
    box-shadow: 0 4px 12px rgba(12, 148, 68, 0.1);
    transform: translateY(-2px);
}

.portal-card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.portal-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.portal-card-domain {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.portal-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #0c9444;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 100%;
}

.portal-card-link:hover {
    background: #087d37;
}

.portal-card-link svg {
    transition: transform 0.2s ease;
}

.portal-card-link:hover svg {
    transform: translateX(2px);
}

.region-info-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #999;
    text-align: center;
}

.region-info-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-text {
    color: #999;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.region-name {
    font-size: 24px;
    font-weight: 800;
    color: #0c9444;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 3px solid #0c9444;
}

.region-name svg {
    color: #0c9444;
}

.region-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0c9444 0%, #087d37 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(12, 148, 68, 0.3);
}

.site-list {
    list-style: none;
}

.site-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.site-item:hover {
    background: #e8f5e9;
    transform: translateX(4px);
}

.site-item-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.site-item-domain {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.site-item-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #0c9444;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.site-item-link:hover {
    background: #087d37;
    transform: translateX(2px);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .map-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .map-sidebar {
        position: relative;
        top: 0;
    }

    .region-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .map-wrapper {
        padding: 20px;
        position: relative;
        top: auto;
    }

    .map-header {
        margin-bottom: 20px;
    }

    .map-title {
        font-size: 20px;
    }

    .map-instruction {
        font-size: 13px;
        padding: 6px 12px;
    }

    .region-list-toggle {
        display: flex;
        /* Show on mobile */
    }

    .region-list-wrapper {
        margin-top: 12px;
    }

    #map {
        min-height: unset;
    }

    .portal-groups {
        padding: 20px;
    }

    .region-name-header {
        font-size: 20px;
    }

    .portal-card {
        padding: 14px;
    }

    .region-info-idle {
        padding: 40px 24px;
    }
}

/* Trending Articles Section */
.trending-section {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 600px;
}

.trending-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trending-article {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.trending-article:last-child {
    border-bottom: none;
}

.trending-article a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.trending-article:hover {
    transform: translateX(4px);
    transition: transform 0.2s ease;
}

.trending-rank {
    font-size: 20px;
    font-weight: 900;
    color: #0c9444;
    opacity: 0.3;
    margin-bottom: 8px;
}

.trending-article-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.trending-article:hover .trending-article-title {
    color: #0c9444;
}

.trending-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Trending Empty State */
.trending-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
}

.trending-empty svg {
    opacity: 0.3;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.trending-empty .empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.trending-empty .empty-description {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 320px;
}

/* Responsive adjustments for new portals section */
@media (max-width: 1024px) {
    .map-container {
        grid-template-columns: 1fr;
    }

    .portals-panel {
        position: relative;
        top: 0;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .portals-container {
        padding: 28px 20px;
    }

    .portals-title {
        font-size: 24px;
    }

    .portals-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portal-card {
        padding: 20px;
    }

    .portal-card-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .portal-card-name {
        font-size: 16px;
    }

    .portals-panel {
        max-height: 400px;
    }

    .portals-panel-header {
        padding: 20px;
    }

    .portals-panel-title {
        font-size: 18px;
    }

    .portal-item {
        padding: 14px;
    }

    .portal-item-icon {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .trending-section {
        grid-template-columns: 1fr;
    }

    .latest-articles-container {
        padding: 24px 20px;
    }

    .latest-articles-title {
        font-size: 22px;
    }

    .latest-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-card-image {
        height: 200px;
    }
}
