@import url("bootstrap-icons.css");

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'Roboto';
    src: url('../font/Roboto/static/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto Bold';
    src: url('../font/Roboto/static/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../font/Roboto/static/Roboto-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Roboto Bold Italic';
    src: url('../font/Roboto/static/Roboto-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../font/JetBrainsMono/fonts/ttf/JetBrainsMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../font/JetBrainsMono/fonts/ttf/JetBrainsMono-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'JetBrains Mono Bold';
    src: url('../font/JetBrainsMono/fonts/ttf/JetBrainsMono-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../font/JetBrainsMono/fonts/ttf/JetBrainsMono-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../font/JetBrainsMono/fonts/ttf/JetBrainsMono-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../font/JetBrainsMono/fonts/ttf/JetBrainsMono-MediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../font/JetBrainsMono/fonts/ttf/JetBrainsMono-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../font/JetBrainsMono/fonts/ttf/JetBrainsMono-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'Noto Serif';
    src: url('../font/Noto_Serif/NotoSerif.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../font/Inter/Inter.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Regular */
@font-face {
    font-family: 'IBM Plex Serif Regular';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-Regular.ttf') format('truetype');
}

/* Italic */
@font-face {
    font-family: 'IBM Plex Serif Italic';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-Italic.ttf') format('truetype');
}

/* Bold */
@font-face {
    font-family: 'IBM Plex Serif Bold';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-Bold.ttf') format('truetype');
}

/* Bold Italic */
@font-face {
    font-family: 'IBM Plex Serif Bold Italic';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-BoldItalic.ttf') format('truetype');
}

/* Medium */
@font-face {
    font-family: 'IBM Plex Serif Medium';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-Medium.ttf') format('truetype');
}

/* Medium Italic */
@font-face {
    font-family: 'IBM Plex Serif Medium Italic';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-MediumItalic.ttf') format('truetype');
}

/* Light */
@font-face {
    font-family: 'IBM Plex Serif Light';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-Light.ttf') format('truetype');
}

/* Light Italic */
@font-face {
    font-family: 'IBM Plex Serif Light Italic';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-LightItalic.ttf') format('truetype');
}

/* SemiBold */
@font-face {
    font-family: 'IBM Plex Serif SemiBold';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-SemiBold.ttf') format('truetype');
}

/* SemiBold Italic */
@font-face {
    font-family: 'IBM Plex Serif SemiBold Italic';
    src: url('../font/IBM_Plex_Serif/IBMPlexSerif-SemiBoldItalic.ttf') format('truetype');
}


/* ============= BASE STYLES ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: white;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* fill remaining vertical space, pushing footer down */
}

/* Profile button (just the image) */
.profile-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.profile-btn,
.profile-btn:focus,
.profile-btn:active {
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.profile-pic {
    width: 38px;
    height: 38px;
    vertical-align: middle;
    border-radius: 50%;
    border: 2px solid #eee;
    object-fit: cover;
    transition: transform 0.2s ease-in-out;
}

.profile-pic:hover {
    border: 2px solid dodgerblue;
}

/* Floating dropdown */
.profile-dropdown {
    display: none;
    position: absolute;
    top: 10px; /* space below profile image */
    left: 0;
    min-width: 220px;
    line-height: 1.2;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

/* Dropdown items */
.profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 8px 8px;
    color: #444;
    font-size: 16px;
    font-weight: 400;
    transition: background 0.2s;
    border: none;
}

.profile-dropdown .dropdown-item:hover {
    color: blue;
    font-weight: 600;
    background: none;
    border: none;
}

/* Greeting header inside dropdown */
.profile-dropdown .dropdown-header {
    font-size: 14px;
    font-weight: 400;
    color: blue;
    padding: 8px 8px;
    gap: 6px;
}

.greeting-emoji {
    font-size: 20px; /* make emoji bigger */
    line-height: 1; /* keeps it vertically centered */
}

/* Logout item highlight */
.profile-dropdown .logout {
    color: dimgrey;
    font-weight: 400;
}

.profile-dropdown .logout:hover {
    color: red;
    font-weight: 600;
}

.profile-dropdown.show {
    display: block;
}

.password-reset-container {
    width: 100%;
    margin-top: 3px; /* adds spacing from login form */
    text-align: left; /* or left/center depending where you want it */
}

.password-reset-link {
    all: unset; /* resets everything */
    display: inline; /* behave like a normal text link */
    font-size: 12px;
    font-weight: 300;
    color: dimgrey;
    cursor: pointer;
    border: none;
    margin: 0;
    padding: 0;
}

.password-reset-link:hover {
    text-decoration: underline;
    color: blue;
    border: none;
    font-weight: 300;
    margin: 0;
    padding: 0;
}

/* Auth buttons container */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px; /* space between buttons */
}

/* Unified button style for <button> and <a> */
.btn-auth {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px; /* space between icon and text */
    width: 110px; /* fixed width for uniformity */
    height: 40px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: 0;
    text-decoration: none;
    color: #808080;
    background: lightgrey;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* include border/padding in width */
    appearance: none; /* normalize button across browsers */
}


/* Hover effect for both */
.btn-auth:hover {
    background: #0d6efd;
    border-color: transparent;
    color: #fff;
}


/* Icon spacing */
.btn-auth i {
    margin-right: 6px;
    vertical-align: middle;
}


/* Outline version (used for navbar Log In + Sign Up) */
.btn-auth.btn-outline {
    background: #0d6efd;
    color: white;
    border: 1px solid #0d6efd;
}

.btn-auth.btn-outline:hover {
    background: #0d6efd;
    color: #fff;
    border-color: black;
}

/* Filled style (optional for contrast) */
.btn-auth.btn-filled {
    background: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.btn-auth.btn-filled:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
    color: white;
}


/* Modal login form (stacked) */
.login-modal form {
    display: flex;
    flex-direction: column;
    gap: 10px; /* spacing between inputs */
}

/* Inputs: aligned nicely */
.login-modal form input {
    height: 40px;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 0; /* square corners like Sign Up */
    border: 1px solid dimgrey;
}

/* Last button in modal: full width */
.login-modal form .btn-auth {
    width: 100%;
    border-radius: 0; /* match inputs */
    padding: 8px 0;
}

/* Reset password link inside login */
.login-form .password-reset-link {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 300;
    color: dimgrey;
    text-align: center;
}

.login-form .password-reset-link:hover {
    color: blue;
    text-decoration: underline;
}


/* ============= HEADER AND NAVIGATION ============= */
.header {
    background-color: #dddddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    position: sticky;
    top: 0;
    z-index: 4000;
    margin-bottom: 20px;
    width: 100%;
}

.nav-container {
    width: 90%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}


.logo {
    display: flex;
    align-items: center;
    line-height: normal;
    font-size: 1.8em;
    font-weight: 600;
    color: black;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    margin-right: 8px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 16px; /* space between boxes, adjust as you like */
    align-items: center;
    flex-wrap: wrap;
    padding-top: 16px;
}


/* stylelint-disable-next-line no-duplicate-selectors */
.nav-links a {
    display: flex; /* makes centering easier */
    justify-content: center;
    align-items: center;
    height: 40px; /* fixed height, adjust as needed */
    color: #222;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 0;
    padding: 10px 16px;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    font-family: "Inter", sans-serif;
}

.nav-links a:hover {
    opacity: 1;
    border-color: #222;
}


.nav-links a.active {
    font-weight: 600; /* make text bold */
    color: white !important; /* white text */
    background-color: #222 !important; /* black background */
    border-color: #222 !important; /* optional: keep border same color */
}


/* ---- Match normal nav link look ---- */
.nav-search {
    list-style: none;
    height: 40px; /* match .nav-links a height */
    display: flex;
    align-items: center;
}

.search-container {
    display: flex;
    align-items: center;
    border: 1px solid #222;
    border-radius: 0;
    padding: 10px 16px;
    height: 100%;
    transition: width 0.2s ease, background-color 0.2s ease;
    width: 110px; /* initial width to fit icon + label */
    cursor: pointer;
    background: transparent;
}

.search-container:hover {
    background-color: white;
}

.search-container.active {
    width: 220px; /* expands when active */
    cursor: text;
    background-color: white;
}

.search-label {
    font-weight: 600;
    color: #222;
    margin-left: 6px;
    transition: opacity 0.3s ease;
    font-family: "Inter", sans-serif;
}

.search-container.active .search-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.search-icon,
.clear-icon {
    font-size: 1.2rem;
    color: #222;
    cursor: pointer;
}

.clear-icon {
    display: none;
    margin-left: 6px;
}

#nav-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    width: 0;
    transition: width 0.3s ease;
    padding: 0 4px;
    font-family: "Inter", sans-serif;
}

/* Expand input only when active */
.search-container.active #nav-search-input {
    width: 100%;
}


.user-profile {
    width: 35px;
    height: 35px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
}

/* ============= SEARCH GRID & SECTION ============= */

.search-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-section {
    background-color: white;
    padding: 30px;
    border-radius: 0;
}

.search-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 1.1em;
    transition: border-color 0.3s ease;
    background-color: #e5e5e5;
}

.search-input:focus {
    outline: none;
    background-color: white;
    border: 1px solid black;
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2em;
    color: #6c757d;
    cursor: pointer;
}

.search-button img {
    width: 35px; /* adjust as needed */
    height: 35px; /* adjust as needed */
}

.search-results {
    position: absolute;
    top: 100%; /* directly below the input */
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    margin-top: 4px; /* small gap from input */
    max-height: 300px; /* optional: to avoid being too tall */
    overflow-y: auto; /* scroll if too many results */
}

.search-results.hidden {
    display: none;
}

.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'Roboto', 'sans-serif';
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
}

.search-result-item:hover {
    background: #f2f2f2;
    text-decoration: underline;
}

.search-result-item a {
    text-decoration: none;
    color: inherit; /* keep link color same as parent if you want */
}

.search-result-item a:hover {
    text-decoration: underline;
}


/* ============= HOME GRID & SECTIONS ============= */

.home-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 20px;
    margin: 0 auto;
    padding: 20px;
    width: 98%;
    align-items: start;
}

/* Make each column a vertical stack */
.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-news {
    grid-area: news;
    padding: 0 0 0 0;
}

.data-release {
    grid-area: release;
    padding: 1em;
    width: 95%;
    background: #e5e5e5;
    margin: 0 auto;
    margin-bottom: 20px;
}

.indicators-panel {
    grid-area: indicators;
    padding: 1em;
    background: #e5e5e5;
}

/* ============= NEWS ============= */

.news-feed {
    margin-left: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 16px;
    background-color: #FAFAFA;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.news-feed-hrd-container {
    border-bottom: 1px solid #444444;
}

.news-feed-hdr {
    text-transform: uppercase;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: dimgrey;
}

/* ============= NEWS ITEM FLOW LAYOUT ============= */

.news-item {
    padding: 14px 8px;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.6; /* Crucial for readability when headline wraps */
    transition: background-color 0.2s ease;
}

.news-item:hover {
    background-color: #f9fafb;
}

.news-content-flow {
    display: block; /* Acts as a standard paragraph container */
}

.news-logo, .news-source-name, .news-tag, .news-divider {
    display: inline-block;
    vertical-align: middle;
}

/* Metadata elements are inline-block to sit on the same line as text */
.news-logo {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    margin-right: 3px;
    background: #fff;
}

.news-source-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-family: "Inter", sans-serif;
    margin-right: 8px;
}

.news-tag {
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 4px;
    font-family: "Inter", sans-serif;
}

.news-divider {
    width: 1px;
    height: 14px;
    background-color: #99A1AF;
    margin-right: 12px;
    position: relative;
    top: -1px;
}


.headline {
    font-size: 0.95rem;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    color: #111827;
    text-decoration: none;
    display: inline;
    -webkit-font-smoothing: antialiased;
}

.headline:hover {
    color: #0D6EFD;
    text-decoration: underline;
}

/* Interactive Icon */
.headline-icon {
    display: inline-block;
    font-size: 0.85rem;
    margin-left: 4px;
    color: #3b82f6;
    vertical-align: middle;
    opacity: 0;
    transition: all 0.2s ease;
}

.news-item:hover .headline-icon {
    opacity: 1;
    transform: translate(2px, -2px);
}



/* === News Item Pagination (Balanced, Subtle, Tight Layout) === */
.news-item-pagination {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 6px;
    margin: 10px 0;
}

.pagination-left,
.pagination-center,
.pagination-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Push center group to center dynamically */
.pagination-left {
    flex: 1;
}

.pagination-center {
    flex-shrink: 0;
}

.pagination-right {
    flex: 1;
    justify-content: flex-end;
}

/* Pagination buttons */
.news-item-pagination a,
.news-item-pagination span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #ccc;
    background-color: #FAFAFA;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    font-family: "Inter", sans-serif;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.news-item-pagination a:hover {
    background-color: #f1f1e6;
    color: #000;
}

.news-item-pagination span.active {
    background-color: #444;
    color: #fff;
    border-color: #444;
}

.news-item-pagination span.disabled {
    color: #aaa;
    border-color: #eee;
    cursor: not-allowed;
}

.news-item-pagination .ellipsis {
    border: none;
    background: transparent;
    color: #777;
    cursor: default;
}

.news-item-pagination i.bi {
    font-size: 12px;
}

.news-item-pagination .placeholder {
    display: inline-flex;
    width: 26px;
    height: 26px;
    visibility: hidden; /* keeps its slot width */
    margin: 0;
    padding: 0;
    border: none; /* remove border so it's truly invisible */
}


.news-image {
    background-image: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.8) 0%, /* bottom: 30% opacity black */ rgba(0, 0, 0, 0.6) 30%, /* fade starts quickly */ rgba(0, 0, 0, 0) 60% /* fully transparent at 60% height */
    ),
    linear-gradient(
            rgba(255, 255, 255, 0.1), /* white overlay at 20% opacity: makes image look lighter & faded */ rgba(255, 255, 255, 0.1)
    ),
    url('../images/bsp.jpg');
    height: 350px;
    background-size: 160%;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    border-radius: 0;
    border: 1px solid black;
    margin-top: 0;
}

.news-title {
    color: white;
    font-size: 1.7em;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
}


/* === Data Release Homepage === */
.data-release-homepage {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-release-homepage .panel-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    color: #1a202c;
    margin: 0;
}

.data-release-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.data-release-homepage .panel-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    color: #373A40; /* Matches calendar header */
    margin: 0;
}

.release-link {
    color: #373A40; /* Matches calendar theme */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    transition: color 0.2s;
}

.release-link:hover {
    color: #0D6EFD; /* Accent blue on hover */
    text-decoration: underline;
}

.release-link i {
    font-size: 1rem;
}

/* Container - 3 Column Grid */
.release-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.date-group {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.date-group.today {
    border: 2px solid #1C69A8;
}

/* Date Styling - Inter Font */
.date-header {
    font-family: 'Inter', sans-serif;
    background: #dddddd; /* Light grey background */
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align to bottom */
}

.full-date {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}

.weekday {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b; /* Softer grey */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.release-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.indicator-item {
    background: #F2F2F2;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: #1a202c;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.indicator-item:hover {
    background: #e2e8f0;
}

.indicator-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a202c;
    line-height: 1.4;
}

.indicator-period {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

/* Responsive: 1 column on mobile */
@media (max-width: 900px) {
    .release-grid {
        grid-template-columns: 1fr;
    }
}

/* ============= INDICATORS ============= */

.indicators-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    background: white;
}

.indicators-table th, .indicators-table td {
    border-bottom: 1px solid grey; /* white line between entries */
    padding: 10px 8px;
}

.indicators-table th {
    background-color: #f5f5f5;
    font-weight: 200;
    color: grey;
}

/* Header alignment */
.indicators-table th:nth-child(1),
.indicators-table th:nth-child(2) {
    text-align: left;
}

.indicators-table th:nth-child(3) {
    text-align: left;
}

/* Data cells */
.indicators-table td:nth-child(1) { /* Indicator name */
    color: #333;
    text-align: left;
    font-weight: 700;
}

.indicators-table td:nth-child(2) { /* Trend and Value column */
    text-align: left;
    font-weight: 600;
    /* remove font-family here to stop applying monospace to whole cell */
}

.indicators-table td:nth-child(3) { /* Period */
    color: #666666;
    text-align: left;
    font-weight: 300;
}

/* Trend arrow styling */
.trend {
    font-size: 1.2em;
    margin-right: 4px; /* small space between arrow and number */
}

.trend-up {
    color: green;
}

.trend-down {
    color: red;
}

.trend-unchanged {
    color: #888;
}

/* Only apply monospace to the value */
.value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.value.negative {
    color: #e82c17;
}

/* ============= MAILING LIST ============= */

.mailing-list {
    grid-area: mailing;
    text-align: center;
    padding: 2em;
    background: #e5e5e5;
    border-radius: 0;
}

.mailing-icon {
    width: 50px;
    margin-bottom: 0.5em;
}

.mailing-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 0.8em;
}

.mailing-input-container {
    display: flex;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border: 1px solid #ccc;
    border-radius: 999px; /* oblong/pill shape */
    overflow: hidden;
}

.mailing-input {
    flex: 1;
    border: none;
    padding: 0.8em 1em;
    font-size: 1em;
    outline: none;
}

.mailing-button {
    background: #b2babb; /* nice brand blue / violet */
    color: white;
    border: none;
    padding: 0.8em 1.2em;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease, transform 0.2s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.2); /* subtle separator from input */
}

.mailing-button:hover {
    background: black; /* slightly darker or complementary shade */
}

/* ============= BLOG ============= */

.substack-feature {
    display: grid;
    grid-template-columns: 1fr 1fr; /* left and right columns */
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    align-items: start;
}

.substack-feature .left {
    display: flex;
    flex-direction: column;
    gap: 20px; /* spacing between items if you add more in the left */
}

.substack-feature .right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.substack-feature .right {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 20px;
}

/* Make the last row span only two items by adding an empty div */
.substack-feature .right img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-swap {
    position: relative;
    display: block;
}

.hover-swap img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

/* Default state */
.hover-swap .normal {
    opacity: 0.8;
    filter: brightness(0.7) saturate(0.8); /* add 'white cover' effect: less brightness, less saturation */
}

/* Blue version hidden by default */
.hover-swap .hovered {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

/* On hover: hide colored, show blue */
.hover-swap:hover .normal {
    opacity: 0;
}

.hover-swap:hover .hovered {
    opacity: 1;
}


/* ============= INDICATOR GRID ============= */

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 0 auto;
    width: 100%;
}

.indicator-grid a {
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #F8F9F9;
    transition: all 0.2s ease;
}

.indicator-grid a:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.indicator-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

/* Header Section */
.indicator-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 80px;
}

.indicator-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.indicator-header h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: #1a202c;
    line-height: 1.3;
    flex: 1;
}

.indicator-period {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

/* Value Display */
.indicator-value-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.indicator-value {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a202c;
}

.indicator-value.negative {
    color: #dc2626;
}

.indicator-trend {
    font-size: 1.25rem;
    line-height: 1;
}

.indicator-trend.up {
    color: #16a34a;
}

.indicator-trend.down {
    color: #dc2626;
}

.indicator-trend.flat {
    color: #64748b;
}

/* Chart Section */
.indicator-chart {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 16px;
    min-height: 140px;
}

.indicator-chart img {
    width: 100%;
    height: 120px;
    display: block;
    border-radius: 4px;
    object-fit: contain;
    object-position: bottom;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 1200px) {
    .indicator-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .indicator-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}


/* ============= TOC ================ */
.explore-by {
    margin-top: 60px; /* space above section */
    scroll-margin-top: 100px;
}

.explore-by .explore-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 10px;
    background: #f5f5f5;

    border: 1px solid black;
}

.explore-by .explore-header {
    font-size: 0.95rem; /* slightly smaller than normal text */
    font-weight: 500; /* medium weight, not too bold */
    line-height: 1.4; /* better vertical alignment with links */
    color: #333; /* subtle, not black */
    margin-right: 12px; /* space before the links */
    display: inline-block; /* align naturally with links */
    vertical-align: middle; /* center with link icons/text */
}

.explore-by .explore-link {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 0;
    color: #007bff;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    margin-right: 20px; /* space between links */
}

.explore-by .explore-link:last-child {
    margin-right: 0; /* remove margin on last link */
}

.explore-by .explore-link:hover {
    background-color: darkblue;
    color: white;
}

/* Header + Back to top wrapper */
.category-header-wrapper,
.region-header-wrapper {
    display: flex;
    justify-content: space-between; /* header left, back link right */
    align-items: center; /* vertically center header and link */
    margin-bottom: 25px; /* match current header spacing */
}

/* ============= CATEGORY SECTION ============= */

.category-section {
    margin-top: 60px; /* space above section */
    scroll-margin-top: 100px;
}

.category-container {
    max-width: 1200px;
    margin: 0 auto; /* center the whole container */
    padding: 0 10px; /* optional: horizontal padding for small screens */
}

.category-header {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px; /* space below header */
    text-align: left;
    color: #333;
}

.back-to-top {
    font-size: 0.9rem;
    color: #007bff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.back-to-top i {
    margin-right: 4px; /* space between icon and text */
    vertical-align: middle;
}

/* ============= CATEGORY SECTION (Grid on homepage etc.) ============= */

.category-section {
    margin-top: 60px;
}

.category-section .category-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;

}

.category-section .category-header {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: left;
    color: #333;
}

.category-section .category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 40px auto;
    max-width: 1200px;
}

.category-section .category-card {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 0 solid #ddd;
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
    color: black;
    transition: background 0.2s, color 0.2s;
    box-shadow: 3px 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.category-section .category-image {
    width: 100px;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.category-section .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.2s;
}

.category-section .category-text {
    flex: 1;
    padding: 20px;
    font-weight: 400;
}

.category-section .category-card:hover {
    background: black;
    color: white;
    font-weight: 900;
}

.category-section .category-card:hover .category-image img {
    filter: grayscale(0%);
}


/* ============= REGION SECTION ============ */

.region-section {
    margin-top: 60px;
    margin-bottom: 10px;
    scroll-margin-top: 100px;
}

.region-section .region-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.region-section .region-header {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: left;
    color: #333;
}

.region-section .region-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 40px auto;
    max-width: 1200px;
}

.region-section .region-card {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 0 solid #ddd;
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
    color: black;
    transition: background 0.2s, color 0.2s;
}

.region-section .region-image {
    width: 100px;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.region-section .region-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.2s;
}

.region-section .region-text {
    flex: 1;
    padding: 20px;
    font-weight: 400;
}

.region-section .region-card:hover {
    background: black;
    color: white;
    font-weight: 900;
}

.region-section .region-card:hover .region-image img {
    filter: grayscale(0%);
}


/* =========================================================
   REGION PAGE STYLES
   Structure:
   1. Layout & Wrapper
   2. Header Section
   3. Region Selector
   4. Tabs (Category/Subcategory)
   5. Sub-category Blocks
   6. Indicator Grid
   7. Utility & Misc
   ========================================================= */









/* ======================================
   3. Region Selector Section
   ====================================== */
.region-page .region-selector-wrapper {
    margin: 20px auto;
    padding: 5px 20px;
}

.region-page .shadow-box {
    width: 100%;
    height: 100%;
    border: 1px solid black;
}

.region-page .sub-region-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4e4e4e;
    background: #f4f4f4;
    padding: 10px 20px 0;
}

.region-page .region-selector-grid {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f4f4f4;
    padding: 0 20px 10px;
    margin: auto;
}

.region-page .region-selector-grid .region-label {
    font-size: 0.9rem;
    font-weight: 400;
    color: black;
}

.region-page .region-selector-grid .region-label[for="city-select"] {
    margin-left: 40px;
}

.region-page .dropdown {
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 0;
    font-size: 0.9rem;
}


/* ======================================
   4. Tabs Section
   ====================================== */
.region-page .tabs {
    min-height: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 5px 20px;
}

.region-page .tabs-inner {
    background-color: #f4f4f4;
    border: 1px solid black;
    padding: 10px;
}

/* --- Category Tabs --- */
.region-page .category-tabs {
    display: flex;
    flex-wrap: wrap; /* allow wrapping on small screens */
    align-items: stretch; /* make all li items same height per row */
    gap: 8px 0px;
    font-size: 0.8rem;
    border-bottom: 1px solid #2F2F2F;
    margin-bottom: 5px;
    padding-left: 5px;
    padding-bottom: 5px;
    list-style: none;
}

.region-page .category-tabs li {
    margin-right: 10px;
}

.region-page .tab-link {
    display: block;
    padding: 8px;
    text-decoration: none;
    color: #d3d3d3;
    background: #f4f4f4;
    border: 1px solid #2F2F2F;
    border-radius: 0;
    font-weight: 500;
}

.region-page .tab-link.active,
.region-page .tab-link:hover {
    background: #2F2F2F;
    color: white;
    border: 1px solid #2F2F2F;
    font-weight: 500;
}

/* --- Subcategory Tabs (if used) --- */
.region-page .sub-category-tabs {
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8rem;
    margin-bottom: 10px;
    padding-left: 0;
    list-style: none;
}

.region-page .sub-category-tabs li {
    margin-right: 8px;
    margin-top: 8px;
}

.region-page .sub-tab-link {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
    color: #555;
    background: #f4f4f4;
    border: 1px solid #2F2F2F;
    border-radius: 0;
}

.region-page .sub-tab-link.active,
.region-page .sub-tab-link:hover {
    background: #2F2F2F;
    color: white;
    border: 1px solid #2F2F2F;
    font-weight: 600;
}

.region-page .tab-content {
    display: none;
}

.region-page .tab-content.active {
    display: block;
}


/* ======================================
   5. Sub-category Blocks
   ====================================== */
.sub-category-block {
    margin-top: 1em;
    padding: 1em;
    position: relative;
    min-height: 300px;
}

.sub-category-block::after {
    content: '';
    display: block;
    width: 100%;
    border-bottom: 1px solid #000080;
    margin: 0 auto;
}

.sub-category-block:last-child::after {
    content: none;
}

.sub-category-title {
    font-weight: bold;
    font-size: 1.2em;
    color: black;
}


/* ======================================
   6. Indicator Grid & Series List
   ====================================== */
.region-page .indicator-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 5px auto;
    padding: 0;
    width: 100%;
    text-decoration: none;
}

.region-page .indicator-column {
    padding: 10px 20px;
    position: relative;
    border-radius: 6px;
}

/* vertical separators */
.region-page .indicator-column:not(:nth-child(3n))::after {
    content: "";
    position: absolute;
    top: 7%;
    bottom: 7%;
    right: 0;
    width: 1px;
    background: #ccc;
}

/* indicator title */
.region-page .indicator-column h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.region-page .indicator-column h3 a,
.region-page .indicator-link {
    text-decoration: none;
    color: #000099;
    font-weight: bold;
}

.region-page .indicator-column h3 a:hover,
.region-page .indicator-link:hover {
    color: black;
    text-decoration: underline;
}

/* series list */
.region-page .indicator-column ul,
.region-page .series-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.region-page .indicator-column li,
.region-page .series-list li {
    margin-bottom: 5px;
    margin-left: 10px;
}

.region-page .indicator-column li a,
.region-page .series-link {
    text-decoration: none;
    color: #007bff;
}

.region-page .indicator-column li a:hover,
.region-page .series-link:hover {
    color: black;
    text-decoration: underline;
}

/* show more toggle */
.region-page .see-more {
    margin-top: 8px;
}

.region-page .see-more a,
.region-page .toggle-series {
    margin-left: 10px;
    text-decoration: none;
    color: #666666;
    cursor: pointer;
}

.region-page .see-more a:hover,
.region-page .toggle-series:hover {
    text-decoration: underline;
    color: black;
}

.region-page .toggle-series::before {
    content: '(';
}

.region-page .toggle-series::after {
    content: ')';
}

/* extra-series animation */
.sub-category-page .extra-series {
    opacity: 1;
    max-height: 1000px;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.sub-category-page .extra-series.hidden {
    opacity: 0;
    max-height: 0;
}


/* ======================================
   7. Utility & Misc
   ====================================== */
.region-page .tab-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.region-page .tab-label {
    font-size: 0.75rem;
    color: grey;
    margin-bottom: 2px;
    margin-left: 2px;
}

.region-page .tab-label-blank {
    visibility: hidden;
}

.region-page .no-series-message {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.5em;
}


/* ============= CATEGORY PAGES ============= */

.category-page .see-more a {
    margin-bottom: 5px;
    margin-left: 10px;
    text-decoration: none;
    color: #666666;
}

.category-page .see-more a:hover {
    margin-bottom: 5px;
    margin-left: 10px;
    text-decoration: underline;
    color: black;
}

.category-page .subcategory-column li a {
    text-decoration: none;
    color: #007bff; /* adjust color as you like */
}

.category-page .subcategory-column li a:hover {
    color: black;
    text-decoration: underline;
}

.series-count {
    color: grey;
    font-weight: 300;
    font-size: 16px;
}



/* ============= DATA DETAIL ============= */

/* General wrapper & header */
.data-detail .category-header-wrapper {
    max-width: 98%;
    min-height: 120px;
    margin: 0 auto;
    padding: 0 20px;
}

.data-detail .category-header-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    background: center / cover no-repeat;
    color: white;
}

.data-detail .category-header-overlay {
    width: 100%;
    height: 100%;
    display: inline-block;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
}

.data-detail .category-header-overlay .data-title {
    margin: 0;
    text-align: left;
    color: white !important;
    font-size: 1.8rem;
    font-weight: 600;
}

.data-detail .category-breadcrumb {
    margin-top: 5px;
    font-size: 0.9em;
    text-align: left;
}

.data-detail .category-breadcrumb a {
    color: white;
    text-decoration: underline;
}

/* Controls wrapper and row */
.data-detail .data-controls-wrapper {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 20px 0 20px;
}


.data-detail .top-grid {
    display: grid;
    grid-template-columns: 1fr 160px; /* flexible left, fixed right */
    gap: 20px;
    align-items: stretch; /* make both items stretch to same row height */
}

/* Make sure direct children stretch to fill */
.data-detail .top-grid > * {
    align-self: stretch;
}

.data-detail .left-info,
.data-detail .action-buttons {
    height: auto; /* reset any fixed height */
}


/* Left info container */
.data-detail .left-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}


/* Data tabs */
.data-detail .data-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f4f4f4;
    padding: 10px;
    flex: 1;
    margin-bottom: 20px;
}

.data-detail .tab-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.data-detail .tab-label {
    font-size: 0.75rem;
    color: grey;
    margin-bottom: 2px;
    margin-left: 2px;
}

.data-detail .tab-label-blank {
    visibility: hidden;
}

.data-detail .tab-select {
    font-size: 0.9rem;
    padding: 4px 8px;
    min-width: 160px;
    max-width: 200px;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.data-detail .tab-select:disabled {
    background-color: white;
    color: #999;
    cursor: not-allowed;
}

.data-detail .go-button {
    background: #dddddd;
    color: grey;
    border: none;
    border-radius: 0;
    padding: 5px 20px;
    margin-right: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.data-detail .go-button:hover {
    background: black;
    color: white;
}

.data-detail .tab-separator {
    width: 1px;
    height: 95%;
    background-color: #797d7f;
    align-self: center;
}

.data-detail .detail-container {
    max-width: 95%;
    margin: 0 auto;
    padding: 0 20px;
}

.data-detail .label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: grey;
}

.data-detail .sub-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9rem;
    color: grey;
}


/* Info grid */
.data-detail .info-grid {
    display: grid;
    grid-template-columns: 3fr 3fr 3fr 3fr 4fr;
    align-items: stretch;
    padding-bottom: 10px;
    font-size: 0.9em;
}

.data-detail .info-grid.geo {
    display: grid;
    grid-template-columns: 1fr 1fr 3fr 3fr 7fr;
    align-items: stretch;
}


.data-detail .info-grid > * {
    position: relative; /* required for the pseudo-element */
    padding: 0 20px;
}

/* Create custom divider */
.data-detail .info-grid > *:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 8%;
    bottom: 8%;
    right: 0;
    border-right: 1px solid #C4C4C4;
}

/* Remove default divider for geo */
.data-detail .info-grid.geo > *:not(:last-child)::after {
    content: none;
}

.data-detail .info-grid.geo.bordered {
    border-bottom: 1px dashed grey;
}

.data-detail .info-grid.geo.padded {
    padding-bottom: 10px;
}


/* SVG preview map*/
.data-detail .region-svg {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}


.svg-map {
    display: flex;
    align-items: center; /* vertically center the text and map */
    gap: 1rem; /* space between region name and map */
}

.region-link {
    text-decoration: none;
    color: black;
}

.region-link:hover {
    text-decoration: underline;
}

/* Data summary */
.data-detail .data-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 10px 0 10px;
}

.aggregated-split .split-columns {
    display: flex;
    gap: 1rem;
}

.split-column {
    flex: 1;
}


.split-separator {
    width: 1px;
    background-color: #ccc; /* light gray, adjust as you like */
    margin: 0 0.5rem; /* horizontal space around the separator */
}

.data-detail .latest-value {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.data-detail .change-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}


.data-detail .change-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.data-detail .datapoints-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.data-detail .datapoints-data {
    display: flex;
    flex-direction: row; /* horizontal layout */
    gap: 20px; /* spacing between items */
}


/* Chart type button container */


.chart-settings-popup {
    position: absolute; /* positioned relative to viewport via JS top/left */
    z-index: 9999; /* above charts and other elements */
    background-color: #fff; /* white background */
    border: 1px solid #ccc; /* subtle border */
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 300px; /* fixed width */
    max-height: 400px; /* max height with scrolling if needed */
    overflow-y: auto;
    padding: 8px;
    font-size: 14px;
    left: calc(100% - 320px);
}

.chart-settings-popup .popup-header {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: #555;
}

.chart-settings-popup .related-series-group {
    margin-bottom: 10px;
}

.chart-settings-popup .group-header {
    font-weight: 300;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Dropdown (select) styling */
.chart-settings-popup .series-select {
    padding: 4px 6px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 6px; /* space between dropdown and Go button */
}

/* Go button styling */
.chart-settings-popup .series-go-btn {
    padding: 4px 10px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
}

.chart-settings-popup .series-go-btn:hover {
    background-color: #000080;
    color: white;
}

/* Optional: wrapper for dropdown + button */
.chart-settings-popup .series-controls {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

/* Y-Axis Confirm Button */
.y-axis-confirm-btn {
    align-self: flex-start;
    background-color: #ccc;
    color: #333;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: default;
    transition: background-color 0.2s ease;
}

.y-axis-confirm-btn.active {
    color: black;
    cursor: pointer;
}

.y-axis-confirm-btn.active:hover {
    background-color: #000080;
    color: white;
}

.compare-years-body {
    display: flex;
    align-items: center;
    gap: 6px;
}

.compare-years-body .year-select {
    width: 80px;
    font-size: 13px;

}

.compare-years-body .compare-separator {
    font-weight: bold;
}

.compare-years-body .compare-btn {
    margin-left: 6px;
    background-color: lightgrey;
    color: black;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 80px;
}

.compare-years-body .compare-btn:hover {
    background-color: #000080;
    color: white;
}

.compare-years-body .compare-btn.clear-mode {
    background-color: #ffe5e5; /* light red/pink */
    color: black; /* red text, or black if you prefer */
}

.compare-years-body .compare-btn.clear-mode:hover {
    background-color: #ffcccc; /* darker pink on hover */
}


#chart-slider {
    width: 95%; /* or a fixed width, e.g., 800px */
    height: 60px; /* enough for slider + handles */
    margin: 0 auto; /* center if desired */
    position: relative; /* for tooltip positioning if needed */
}

#chart-slider #play-pause-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 24px;
    border-radius: 6px;
    background-color: #f2f2f2; /* default grey */
    color: #555;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#chart-slider #play-pause-btn:hover {
    background-color: #000080; /* dark blue */
    color: white;
}


.chart-footer-r2 {
    display: grid;
    grid-template-columns: 1fr 6fr 3fr; /* logo | footnotes | controls */
    align-items: center;
    gap: 10px; /* Spacing between columns */
}




.pres-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 10px 0;
}

.download-pres-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: lightgrey;
    color: black;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.download-pres-btn:hover {
    background-color: #000080;
    color: white;
}


.tabulator-row:hover {
    background-color: #cccccc !important; /* or #f0f0f0 for a bit stronger */
    transition: background-color 0.2s ease;
}


.trend-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 12px;
    padding-right: 12px;
}

.trend-arrow.green {
    color: green;
}

.trend-arrow.red {
    color: red;
}

.trend-arrow.grey {
    color: grey;
}

.trend-value {
    color: black;
    font-weight: 300;
}

.trend-arrow {
    font-weight: 600;
}


.data-detail .update-info {
    display: flex;
    flex-direction: row; /* horizontal layout for the blocks */
    justify-content: flex-start;
    align-items: center; /* vertically center the text */
    gap: 87px; /* space between "Updated" and "Next release" */
    margin-top: 2px;
    font-size: 0.9rem;
}

.data-detail .update-info > div {
    display: flex;
    flex-direction: row; /* label and value on the same line */
    align-items: center;
    gap: 6px; /* space between label and value */
}

.data-detail .update-info-date {
    font-family: 'JetBrains Mono', monospace;
}


/* Units */
.data-detail .units {
    padding: 10px 10px 0 10px;
}

.data-detail .units-label {
    margin-bottom: 4px;
    font-style: italic;
}

.data-detail .units-list {
    list-style: none;
    margin-left: 10px;
    padding: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* Date range */
.data-detail .date-range {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 10px 0 10px;
}

.data-detail .range-buttons button {
    margin-right: 5px;
    padding: 10px 15px;
    border: 0;
    border-radius: 0;
    background: #dddddd;
    cursor: pointer;
}

.data-detail .range-buttons button:hover {
    background: black;
    color: white;
}

.data-detail .range-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-detail .period-select {
    align-items: center;
    gap: 8px;
    max-width: 60%;
    padding: 5px;
}

.data-detail .range-picker input[type="date"] {
    padding: 2px 4px;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
}


.data-detail .period-selector-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
}

.data-detail .period-trigger {
    margin-right: auto;
    padding: 10px 15px;
    border: 0;
    border-radius: 0;
    background: #dddddd;
    cursor: pointer;
    width: 50%;
}

.data-detail .period-trigger:hover {
    background: black;
    color: white;
}

.data-detail .floating-month-selector {
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    padding: 1em;
    margin-top: 0.5em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 6px;
    min-width: 300px;
}


.data-detail .floating-month-selector button {
    margin: 4px 6px;
    padding: 10px 15px;
    border: 0;
    border-radius: 0;
    background: #dddddd;
    cursor: pointer;
    width: 80px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.data-detail .floating-month-selector button:hover:not(.disabled) {
    background: black;
    color: white;
}

/* Disabled buttons stay unclickable and gray */
.data-detail .floating-month-selector button.disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}


/* Action buttons */
.data-detail .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px;
}


.data-detail .action-buttons button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    color: grey;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.data-detail .action-buttons button:hover {
    color: black;
}

.data-detail .action-buttons button i {
    font-size: 16px; /* adjust size */
    margin-right: 10px;
    color: grey;
    transition: color 0.2s ease;
}

.data-detail .action-buttons button:hover i {
    color: black;
}


/* Custom dropdown wrapper */
.custom-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* The toggle button */
.custom-dropdown .dropdown-toggle {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Dropdown menu */
.custom-dropdown .dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    display: none; /* hidden by default */
    position: absolute;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Each menu item */
.custom-dropdown .dropdown-menu li {
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-dropdown .dropdown-menu li:hover {
    background: #f2f2f2;
}


/* ============= CHART IMAGE EXPORT ============= */

#footer-controls,
#chart-qr {
    justify-self: end; /* 👈 aligns to the right within its grid cell */
}

#chart-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background-color: #f2f2f2;
    color: #555;
    cursor: default;
    margin-left: 0.5rem; /* spacing from logo or footnotes */
    margin-right: 24px;
}

#chart-qr img {
    height: 30px;
    width: 30px;
    opacity: 0.9;
}


/* ============= PLOTLY CHART --- DATA DETAIL PAGE ============= */

.plotly-chart-container {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 0 20px;
    min-height: 600px; /* minimum height so it never gets too small */
}


.plotly-chart {
    width: 100%;
    height: 100%; /* fill the container’s height */
    min-height: 600px; /* minimum height */
}


#chart-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    /*z-index: 2000;*/

    /* hidden by default */
    display: none;

    /* Center the chart when visible */
    justify-content: center;
    align-items: center;

    padding: 20px;
    overflow: auto;
}


.leaflet-chart-container {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}


.leaflet-chart {
    width: 100%;
    height: 90vh;
    margin-bottom: 20px;
    margin-left: 20px;
    margin-right: 20px;
    z-index: 0;
}

/* --- Timeline Control Styles --- */
.timeline-control {
    background: ghostwhite;
    padding: 10px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.timeline-label {
    font-size: 14px;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 300;
    margin-right: 8px;
}

.timeline-btn {
    border: none;
    background: #f0f0f0;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.timeline-btn:hover {
    background: #ddd;
}

.timeline-btn.playing {
    background: mediumblue;
    color: white;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(42, 122, 226, 0.6);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(42, 122, 226, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(42, 122, 226, 0);
    }
}

.timeline-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px; /* adjust length */
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    cursor: pointer;
}

/* Track */
.timeline-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}

.timeline-slider::-moz-range-track {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}

/* Thumb → vertical line instead of circle */
.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 2px; /* thin vertical line */
    height: 14px; /* taller than track */
    background: black;
    cursor: pointer;
    margin-top: -5px; /* centers line on track */
}

.timeline-slider::-moz-range-thumb {
    width: 2px;
    height: 14px;
    background: black;
    border: none;
    cursor: pointer;
}


/* spinner css*/
.chart-body {
    position: relative;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.spinner-inner {
    width: 100%;
    height: 100%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #555;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.table-container {
    max-width: 1200px;
    margin: 0 auto; /* centers the container */
    padding: 20px; /* optional horizontal padding */
    width: 100%;
}

.recession-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 1200px;
    margin: 1rem auto;
    font-family: 'Roboto', sans-serif;
}

.recession-table th, .recession-table td {
    border: 1px solid #7F8C8D;
    padding: 10px 15px;
    text-align: center;
    vertical-align: middle;
}

.recession-table th {
    font-weight: 700;
    background: #1C2833;
    color: white;
}

.recession-table td {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: #17202A;
}


.recession-table td:last-child {
    font-family: 'Roboto', sans-serif;
    text-align: justify;
    max-width: 400px;
    word-wrap: break-word;
    color: #17202A;
}


/* ============= NOTES ============= */

.notes-container {
    max-width: 95%;
    margin: 0 auto;
    padding: 20px 0 20px;
}

/* ---- Tabs Row ---- */
.notes-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid transparent;
    margin-bottom: 10px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* ---- Each Tab Button ---- */
.tab-header {
    background: none;
    border: none;
    color: grey;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.tab-header:hover {
    color: #2563eb;
}

.tab-header.active {
    color: black;
    font-weight: 500;
    border-bottom-color: #000080;
}

/* ---- Tab Content Containers ---- */
.tab-contents {
    margin-top: 10px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---- Series Notes ---- */
.series-notes {
    padding: 20px;
    border: 1px solid #ccc;
}

.series-notes,
.series-notes p,
.series-notes ul,
.series-notes li,
.series-notes h1,
.series-notes h2,
.series-notes h3 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9rem;
    color: #444;
}

.series-notes .footnote {
    font-family: 'Roboto', sans-serif;
}

/* ---- Lists ---- */
.series-notes ol {
    margin: 10px 0 0 20px;
}

.series-notes li {
    margin: 10px 0 20px 20px;
}

/* ---- Links ---- */
.series-notes a[target="_blank"]:not(.footnote-backref)::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    background: url('../images/external.svg') no-repeat center;
    background-size: contain;
}

.series-notes a,
.series-notes a:visited,
.series-notes a:hover,
.series-notes a:active {
    color: blue;
    text-decoration: none;
}

/* ---- Footnotes ---- */
.series-notes .footnote-ref a::after,
.series-notes .footnote-backref::after {
    display: none;
    content: none;
}

.series-notes .footnote-ref a,
.series-notes .footnote-backref {
    color: blue;
    text-decoration: none;
}

.series-notes .footnote-ref a:hover,
.series-notes .footnote-backref:hover {
    color: blue;
    text-decoration: none;
}


/* ============= CUSTOM CHART ============= */

.custom-chart {
    counter-reset: item; /* start the counter named 'item' */
}


.custom-chart .container {
    display: grid;
    grid-template-columns: minmax(60px, 30%) 1fr;
    gap: 5px;
    margin: 5px 20px;
}

.custom-chart .sidebar {
    background: #DCDCDC;
    padding-right: 5px;
    margin-right: 5px;
}

.custom-chart .edit-series {
    padding: 20px;
}

.custom-chart .sidebar-title {
    font-size: 1.5rem;
    font-weight: 500;
}


.custom-chart .series-item {
    margin-bottom: 10px;
    counter-increment: item;
}

.custom-chart .series-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-chart .series-item-header {
    font-size: 1rem;
    font-weight: 500;
    display: flex; /* align number and text side by side */
    align-items: flex-start;
    padding-bottom: 10px;
}

.custom-chart .series-number {
    flex: 0 0 auto; /* fixed width for number */
    width: 1.5rem; /* adjust until it looks right */
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
}

.custom-chart .series-description {
    flex: 1; /* text takes the rest */
}

.custom-chart .remove-btn {
    color: #222;
    border: none;
    background: none;
    cursor: pointer;
}

.custom-chart .remove-btn:hover {
    color: #FF0000;
}


.custom-chart .series-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
    color: #696969;
    padding-left: 1.5rem;
    list-style-type: none;
}


.custom-chart .series-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.custom-chart .series-meta label {
    min-width: 70px;
    margin-right: 5px;
    font-weight: 300;
    flex-shrink: 0;
}

.custom-chart .series-meta select,
.custom-chart .series-meta input[type="date"] {
    min-width: 130px;
    flex: none;
    font-size: 0.8rem;
    max-width: 200px;
    padding: 4px 8px;
    border: 0;
}

.custom-chart .date-range {
    display: flex;
    align-items: center;
    gap: 3px;
}


.custom-chart .chart-area {
    background: white;
    padding-right: 5px;
}


.custom-chart .edit-format {
    padding: 20px;
}

.custom-chart .format-option {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 15px;
    gap: 5px; /* spacing between label and control */
}

.custom-chart .format-option label {
    min-width: 100px;
    font-size: 0.9rem;
    color: #696969;
}

.custom-chart .format-option-break {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}


.custom-chart .format-option-break label {
    min-width: 120px;
    font-size: 0.9rem;
    color: #696969;
}

.custom-chart .graph-types {
    display: flex;
    gap: 16px;
}


.custom-chart .graph-btn {
    color: #A9A9A9;
    border: none;
    background: none;
    cursor: pointer;
}

.custom-chart .graph-btn:hover {
    color: #424242;
}

.custom-chart .graph-btn.active {
    color: #000080;
}

.custom-chart .color-picker-combo {
    display: flex;
    align-items: center;
    gap: 5px;
}

.custom-chart .format-option {
    display: flex;
    align-items: center;
    gap: 8px; /* space between label, checkbox, and text */
}

.custom-chart .format-option label {
    min-width: 100px;
    font-size: 0.9rem;
    color: #696969;
}


.custom-chart .grid-state {
    font-size: 0.9rem;
    color: #9E9E9E;
}

.custom-chart input[type="color"] {
    width: 3rem;
    height: 2rem;
    border: none;
    border-radius: 0; /* make rounded corners */
    cursor: pointer;
    padding: 0;
    background: none; /* optional, keep native swatch */
}

.custom-chart input[type="text"] {
    width: 70px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    padding: 2px 4px;
}

.custom-chart .format-option-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px; /* space between label & input */
    margin: 20px 0;
    padding: 5px 10px;
    border: 1px solid darkgrey;
}

.custom-chart .format-option-vertical textarea {
    flex: 1;
    padding: 4px 6px;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif; /* keep it same style as input */
    resize: vertical; /* allow user to resize vertically only, optional */
    border: 0;
}


.custom-chart .format-option-vertical input[type="text"] {
    font-family: "Roboto", sans-serif; /* set font family */
    font-size: 0.9rem; /* set font size */
    padding: 4px 6px;
}


.custom-chart .format-option-vertical > div {
    display: flex;
    align-items: center;
    gap: 8px; /* this is the horizontal space between label and input */
}

.custom-chart .format-option-vertical label {
    min-width: 100px; /* keeps labels aligned by giving them the same width */
    font-size: 0.9rem;
    color: #696969;
    margin-left: 15px;
}

.custom-chart .format-option-vertical input[type="text"] {
    padding: 4px 6px;
    font-size: 0.9rem;
    border: 0;
    min-width: 130px;
}

.custom-chart .format-option-vertical input[type="number"] {
    padding: 6px 2px;
    font-size: 0.9rem;
    border: 0;
    min-width: 130px;
}

.custom-chart .format-option-vertical select {
    padding: 6px 2px;
    font-size: 0.9rem;
    border: 0;
    min-width: 130px;
}

.custom-chart #select-series {
    width: 100%; /* or whatever matches other selects */
}


.custom-chart .apply-button {
    padding: 6px 2px;
    font-size: 0.9rem;
    border: 0;
    min-width: 80px;
    margin: 5px 0 5px 1rem;
}

.custom-chart .apply-button:hover {
    background: black;
    color: white;
}

/* ============= CONTENT SECTIONS ============= */
.content {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    border-left: 5px solid #667eea;
}

.content ul {
    list-style: none;
    padding-left: 0;
}

.content li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #555;
}

.content li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* ============= ANIMATIONS ============= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* ============= TYPOGRAPHY ============= */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h2, .panel-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: left;
}

.panel-title {
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    word-spacing: 4px;
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}


/* ============= UTILITIES ============= */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }

    .nav-links {
        margin-top: 15px;
        gap: 20px;
    }

    .container, .main-content {
        padding: 20px;
        margin: 10px;
    }

    h1 {
        font-size: 2rem;
    }

    .logo {
        font-size: 1.5em;
    }

    .content-grid, .stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 2.5rem;
    }

    .nav a {
        display: block;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .container, .main-content {
        padding: 15px;
    }
}

/* ============= DARK MODE ============= */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

    .container, .main-content {
        background: rgba(44, 62, 80, 0.95);
        color: #ecf0f1;
    }

    .header {
        background-color: rgba(52, 73, 94, 0.95);
    }

    .content, .search-section {
        background: rgba(52, 73, 94, 0.8);
    }

    .stat-card, .featured-news, .indicators-panel, .data-release {
        background: rgba(52, 73, 94, 0.9);
    }

    p, .content li {
        color: #bdc3c7;
    }
}


#map .choroplethlocation:hover {
    stroke: red; /* or any color */
    stroke-width: 2; /* make border wider */
}


#leaflet-chart:focus {
    outline: none;
    box-shadow: none;
}


.footer {
    display: flex;
    justify-content: space-between; /* left stays left, right stays right */
    align-items: center;
    padding: 1rem 2rem;
    background-color: #dddddd;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.7);
    flex-wrap: wrap;
}

.footer-left {
    font-size: 0.9rem;
    color: #555;
}

/* === FOOTER RIGHT ICON SECTION === */
.footer-right {
    display: flex; /* horizontal layout */
    align-items: center;
    gap: 0.5rem; /* space between icons */
    list-style: none; /* remove bullets */
    margin: 0 0 0 auto; /* push to the right side */
    padding: 0;
}

.footer-item {
    display: flex; /* keep items aligned vertically */
    align-items: center;
    padding-bottom: 8px;
}

/* === ICON BUTTONS === */
.footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* circular icon button */
    height: 32px;
    background-color: #2869db;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
}

.footer-btn:hover {
    background-color: #1f50a0;
    transform: scale(1.05);
}

/* === SVG ICONS (as <img> or inline <svg>) === */
.footer-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}


/* Mobile responsiveness */
@media (max-width: 576px) {
    .footer {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-right {
        justify-content: center;
        flex-wrap: wrap;
    }
}


/* ===== WRAPPER ===== */
.auth-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start; /* top aligned */
    justify-content: center;
    gap: 2rem;
}

/* ===== ANIMATION CONTAINER ===== */
.animation-container {
    flex: 1 1 300px;
    max-width: 400px;
    min-width: 250px;
    display: flex;
    align-items: center; /* vertically center cat inside its box */
    justify-content: center;
}

/* ===== FORM CONTAINER ===== */
.auth-form-container {
    flex: 1 1 300px;
    max-width: 500px;
    min-width: 250px;
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Make signup & login same height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Optional: force fixed height */
.auth-form-container.fixed-height {
    height: 480px; /* adjust to match the taller form */
}

/* Form title */
.auth-form-container h2 {
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    font-size: 1.5rem;
}

/* Form elements */
.auth-form .mb-3 {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.auth-form input {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-container input.form-control {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-container input.form-control:focus {
    border-color: #2869db;
    box-shadow: 0 0 0 2px rgba(40, 105, 219, 0.2);
    outline: none;
}

/* Buttons */
.auth-form-container .btn-primary {
    background-color: #2869db;
    border-color: #2869db;
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    width: 100%;
    transition: background-color 0.2s, border-color 0.2s;
}

.auth-form-container .btn-primary:hover {
    background-color: #1f50a0;
    border-color: #1f50a0;
}

/* Toggle text */
.auth-form-container .mt-3.text-center {
    font-size: 0.9rem;
}

.auth-form-container .mt-3.text-center a {
    color: #2869db;
    text-decoration: none;
    font-weight: 500;
}

.auth-form-container .mt-3.text-center a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .auth-form-container.fixed-height {
        height: auto;
    }
}

/* ===== PROFILE PAGE (TOP TABS) ===== */
.profile-container {
    max-width: 900px;
    margin: 2rem auto;
}

/* Tabs styling */
.nav-tabs {
    border-bottom: none;
}

.nav-tabs .nav-link {
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 0.5rem 0.5rem 0 0;
    color: grey;
    margin-right: 0.25rem;
    padding: 8px 16px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-tabs .nav-link.active {
    background-color: #fff;
    border: 1px solid #ddd; /* uniform border */
    color: #2869db;
    box-shadow: none; /* remove shadow from tab */
}

.nav-tabs .nav-link:hover {
    background-color: #f1f1f1;
}

/* Tab content */
.tab-content .tab-pane {
    margin-top: 1rem;
}

/* Cards inside tabs */
.card.shadow-sm {
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    background-color: #fff;
}

/* Profile picture */
#profilePreview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border: 2px solid #ddd;
}

/* Center the Apply button in profile picture modal */
#profilePicModal .modal-footer {
    justify-content: center;
    border-top: none; /* optional, since you removed header border */
    padding-top: 1rem;
}

#profilePicModal .modal-footer button {
    min-width: 120px; /* optional: make button look balanced */
}

/* Form fields */
.profile-section form input,
.profile-section form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #ccc;
}

input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Buttons inline for form */
.profile-section .d-flex.gap-2 {
    align-items: center;
    flex-wrap: wrap;
}

.profile-section .btn {
    margin-top: 0.25rem;
}

/* Modal adjustments */
.modal-content {
    border-radius: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-container {
        padding: 0 1rem;
    }

    .nav-tabs .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
        margin-right: 0.1rem;
    }

    #profilePreview {
        width: 80px;
        height: 80px;
    }

    .profile-section .d-flex.gap-2 {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Make sure labels and inputs are aligned nicely */
.form-label {
    font-weight: 500;
}

.row.g-3 > .col-md-6 {
    display: flex;
    flex-direction: column;
}

/* For sub-category page */

