/* Climate Trends — page-specific styles */

        /* Trends layout */
        .trends-layout {
            display: flex;
            align-items: flex-start;
            gap: 2.5rem;
            min-height: 500px;
        }

        .map-panel {
            flex: 1 1 100%;
            max-width: 100%;
            transition: flex 0.5s ease, max-width 0.5s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .map-panel.shifted {
            flex: 0 0 45%;
            max-width: 45%;
        }

        .data-panel {
            flex: 0 0 0%;
            max-width: 0%;
            overflow: hidden;
            opacity: 0;
            transition: flex 0.5s ease, max-width 0.5s ease, opacity 0.4s ease 0.2s;
        }
        .data-panel.visible {
            flex: 0 0 53%;
            max-width: 53%;
            opacity: 1;
            overflow: visible;
        }

        /* Variable toggle buttons */
        .var-toggles {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.2rem;
            flex-wrap: wrap;
            justify-content: center;
        }
        .var-btn {
            padding: 0.4rem 1rem;
            border: 1.5px solid var(--clr-border-mid);
            border-radius: 999px;
            background: white;
            font-family: 'Inter', sans-serif;
            font-size: 0.78rem;
            font-weight: 500;
            color: var(--clr-text-secondary);
            cursor: pointer;
            transition: all 0.2s;
        }
        .var-btn:hover {
            border-color: var(--clr-text-muted);
            color: var(--clr-text);
        }
        .var-btn.active {
            background: var(--clr-primary);
            border-color: var(--clr-primary);
            color: white;
        }

        /* Leaflet map */
        .trends-map {
            width: 100%;
            max-width: 600px;
        }
        #trends-leaflet-map {
            width: 100%;
            height: 500px;
            border-radius: 12px;
            background: var(--clr-bg);
        }
        .leaflet-control-attribution { font-size: 9px !important; }

        .map-instructions {
            font-size: 0.78rem;
            color: var(--clr-text-muted);
            text-align: center;
            margin-top: 0.8rem;
        }

        /* Color legend */
        .color-legend {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 1rem;
            font-size: 0.72rem;
            color: var(--clr-text-secondary);
        }
        .legend-bar {
            width: 180px;
            height: 10px;
            border-radius: 5px;
            background: linear-gradient(to right, #2563eb, #93c5fd, var(--clr-border), #fca5a5, #dc2626);
        }
        .legend-bar.humidity {
            background: linear-gradient(to right, var(--clr-border), #93c5fd, #3b82f6, #1d4ed8);
        }
        .legend-bar.wind {
            background: linear-gradient(to right, var(--clr-border), #a7f3d0, #10b981, #047857);
        }
        .legend-bar.utci {
            background: linear-gradient(to right, var(--clr-border), #fde68a, #f59e0b, #dc2626);
        }

        /* Data panel contents */
        .country-header {
            background: var(--clr-dark-panel);
            color: white;
            border-radius: 12px;
            padding: 1.2rem 1.5rem;
            margin-bottom: 1.2rem;
        }
        .country-header h2 {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 0.3rem;
        }
        .country-header .country-sub {
            font-size: 0.78rem;
            color: var(--clr-text-muted);
        }

        /* Trend summary (inline compact) */
        .trend-summary {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
            margin-bottom: 1rem;
        }
        .trend-summary h4 {
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--clr-text);
            margin-bottom: 0.8rem;
        }
        .trend-row {
            display: flex;
            align-items: baseline;
            gap: 0.5rem;
            flex-wrap: wrap;
            font-size: 0.88rem;
            line-height: 1.8;
            color: var(--clr-dark-text);
        }
        .trend-val {
            font-weight: 700;
            font-size: 1rem;
        }
        .trend-val.warming { color: var(--clr-danger); }
        .trend-val.cooling { color: #2563eb; }
        .trend-val.neutral { color: var(--clr-text-secondary); }
        .trend-sep {
            color: var(--clr-border-mid);
            margin: 0 0.2rem;
        }

        /* Stat pills */
        .stat-pills {
            display: flex;
            flex-wrap: wrap;
            gap: 0.6rem;
            margin-top: 1rem;
        }
        .stat-pill {
            background: var(--clr-bg);
            border-radius: 8px;
            padding: 0.6rem 1rem;
            font-size: 0.82rem;
            color: var(--clr-dark-text);
        }
        .stat-pill strong {
            color: var(--clr-text);
            font-weight: 600;
        }

        /* Period label */
        .period-label {
            font-size: 0.72rem;
            color: var(--clr-text-muted);
            text-transform: uppercase;
            letter-spacing: 0.06em;
            font-weight: 600;
            margin-bottom: 0.4rem;
        }

        /* Insight cards */
        .insight-card {
            background: var(--clr-accent-bg);
            border-radius: 10px;
            padding: 1rem 1.2rem;
            margin-top: 0.8rem;
            border-left: 3px solid var(--clr-accent);
        }
        .insight-card p {
            font-size: 0.82rem;
            color: var(--clr-primary);
            line-height: 1.6;
        }

        /* Region sidebar */
        .region-sidebar {
            position: fixed;
            top: 50%;
            right: 1.5rem;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            z-index: 50;
        }
        .region-sidebar-label {
            font-size: 0.6rem;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--clr-text-muted);
            margin-bottom: 0.2rem;
            text-align: right;
        }
        .region-sidebar a {
            font-size: 0.72rem;
            font-weight: 500;
            color: var(--clr-text-muted);
            text-decoration: none;
            text-align: right;
            letter-spacing: 0.02em;
            transition: color 0.2s;
            padding: 0.15rem 0;
            display: block;
        }
        .region-sidebar a:hover {
            color: var(--clr-primary);
        }
        .region-sidebar a.active-region {
            color: var(--clr-primary);
            font-weight: 600;
        }

        @media (max-width: 768px) {
            .trends-layout { flex-direction: column; }
            .map-panel, .map-panel.shifted { flex: 1 1 100%; max-width: 100%; }
            .data-panel, .data-panel.visible { flex: 1 1 100%; max-width: 100%; }
            #trends-leaflet-map { height: 350px; }
            .region-sidebar { display: none; }
        }
