:root {
  --font-primary: "Rajdhani", sans-serif;
}

.project-map {
    position: relative;
    width: 100%;
    isolation: isolate;
}

/* Prevent decorative pseudo-elements from blocking mouse and touch interaction with the Google Map. */
.project-map::before,
.project-map::after {
    pointer-events: none;
}

/* ===================================================== STATE NAVIGATION ===================================================== */

.project-map__navigation {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
}

.state-links ul li a span {
    transition: color 0.2s ease-in-out;
}
.state-links ul li a.is-active span {
    color: #ffffff !important;
    border-bottom: 1px solid #fbec0a;
}
.state-links ul li:hover a span {
    color: #ffffff !important;
    border-bottom: 1px solid #fbec0a;
}

/* PROJECT LIST */

ol.ares-project-list {
    list-style-type: decimal;
    margin: 0;
    padding-left: 17px;
}
.ares-project-item {
    color: #ffffff;
    line-height: 2.3;
}
ol.ares-project-list li a {
    color: #ffffff !important;
    font-size: 14px;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-primary);
}
ol.ares-project-list li:hover::marker {
    color:#fbec0a!important;
}
ol.ares-project-list li a:hover {
    color:#fbec0a!important;
}
ol.ares-project-list li::marker {
    font-family: var(--font-primary);
    font-size: 14px;
}
.ares-project-list li a svg {
    width: 28px;
    height: 28px;
}
.ares-project-arrow {
    display: flex;
}
.ares-project-empty {
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===================================================== MAP CANVAS ===================================================== */

.project-map__canvas {
    position: relative;
    z-index: 1;

    display: block;

    width: 100%;

    height: var(--project-map-height, 680px);

    min-height: 360px;

    overflow: hidden;

    /* Allow the map to receive mouse, wheel and touchscreen events. */
    pointer-events: auto !important;
    touch-action: none;

    background-color: #eeeeee;
}

/* Prevent pseudo-elements attached to the map canvas from intercepting map interaction. */
.project-map__canvas::before,
.project-map__canvas::after {
    pointer-events: none;
}

/* Make sure Google Maps' internal canvas and layers receive drag, scroll and touch events. */
.project-map__canvas .gm-style {
    width: 100% !important;
    height: 100% !important;

    pointer-events: auto !important;
}

.project-map__canvas .gm-style > div {
    pointer-events: auto;
}

/* Google Maps renders the map tiles in internal draggable layers. These must receive pointer events. */
.project-map__canvas .gm-style div[tabindex="0"] {
    pointer-events: auto !important;
}

/* Keep Google Maps controls interactive. */
.project-map__canvas .gm-control-active,
.project-map__canvas .gm-style-mtc,
.project-map__canvas .gm-fullscreen-control,
.project-map__canvas .gmnoprint {
    pointer-events: auto !important;
}

/* Prevent images inside Google Maps from inheriting restrictive WordPress or Elementor image styles. */
.project-map__canvas img {
    max-width: none;
}

/* ===================================================== MAP ERROR MESSAGE ===================================================== */

.project-map__error {
    position: relative;
    z-index: 2;

    margin: 12px 0 0;

    color: #a40000;

    font-size: 14px;
    line-height: 1.5;
}

/* ===================================================== CUSTOM MAP MARKER ===================================================== The marker contains: - White circular body - ARES logo - Downward pointer - Yellow project count badge */

.project-map-marker {
    position: relative;

    width: 76px;
    height: 92px;

    cursor: pointer;

    /* Only the visible marker should receive events. */
    pointer-events: auto;

    user-select: none;
    -webkit-user-select: none;
}

/* ===================================================== WHITE MARKER CIRCLE ===================================================== */

.project-map-marker__circle {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 76px;
    height: 76px;

    background-color: #ffffff;

    border: 0;
    border-radius: 50%;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);

    box-sizing: border-box;

    pointer-events: none;

    transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.project-map-marker__circle::after {
    transition: border-top-color 180ms ease;
}

/* Change the circular container to yellow. */
.project-map-marker:hover
.project-map-marker__circle {
    background-color: #fded08;
}

/* Change the downward arrow to the same yellow. */
.project-map-marker:hover
.project-map-marker__circle::after {
    border-top-color: #fded08;
}

/* ===================================================== DOWNWARD MARKER POINTER ===================================================== */

.project-map-marker__circle::after {
    position: absolute;
    bottom: -14px;
    left: 50%;
    z-index: -1;

    width: 0;
    height: 0;

    border-top: 21px solid #ffffff;
    border-right: 12px solid transparent;
    border-left: 12px solid transparent;

    content: '';

    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.08));

    pointer-events: none;

    transform: translateX(-50%);
}

/* ===================================================== ARES LOGO ===================================================== */

.project-map-marker__logo {
    position: relative;
    z-index: 2;

    display: block;

    width: 46px;
    height: 46px;

    max-width: none;

    object-fit: contain;

    pointer-events: none;

    user-select: none;
    -webkit-user-drag: none;
}

/* ===================================================== PROJECT COUNT BADGE ===================================================== */

.project-map-marker__count {
    position: absolute;
    top: -5px;
    right: -4px;
    z-index: 3;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 28px;
    height: 28px;

    padding: 0 6px;

    color: #111111;
    background-color: #fff200;

    border: 2px solid #ffffff;
    border-radius: 999px;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);

    box-sizing: border-box;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    pointer-events: none;
}

/* ===================================================== MARKER HOVER EFFECT ===================================================== */

.project-map-marker:hover
.project-map-marker__circle {
    box-shadow: 0 9px 24px rgba(0, 0, 0, 0.22);

    transform: translateY(-2px);
}

/* ===================================================== INDIVIDUAL PROJECT MARKER ===================================================== Individual project markers are slightly smaller than state summary markers. */

.project-map-marker--project {
    width: 62px;
    height: 76px;
}

.project-map-marker--project
.project-map-marker__circle {
    width: 62px;
    height: 62px;
}

.project-map-marker--project
.project-map-marker__circle::after {
    bottom: -12px;

    border-top-width: 18px;
    border-right-width: 10px;
    border-left-width: 10px;
}

.project-map-marker--project
.project-map-marker__logo {
    width: 38px;
    height: 38px;
}

/* ===================================================== GOOGLE MAPS INFO WINDOW ===================================================== */

.project-map-info {
    min-width: 180px;
    padding: 5px 3px;
    font-family: var(--font-primary);
}

.project-map-info__title {
    margin: 0 0 5px;

    color: #1b1b1b;

    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.project-map-info__description {
    margin: 0;

    color: #555555;

    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

/* Prevent WordPress or Elementor typography styles from changing the Google information window. */
.project-map__canvas
.gm-style-iw-chr,
.project-map__canvas
.gm-style-iw-d {
    font-family: inherit;
}

/* Allow normal scrolling when the information window contains more content than its maximum height. */
.project-map__canvas
.gm-style-iw-d {
    max-height: 260px !important;

    overflow-y: auto !important;

    pointer-events: auto;
}

/* Keep the Google Maps close button interactive. */
.project-map__canvas
.gm-ui-hover-effect {
    pointer-events: auto !important;
}

/* ===================================================== ELEMENTOR SUPPORT ===================================================== Assign "project-map-section" as the CSS class of the Elementor container holding the shortcode. */

.project-map-section {
    position: relative;
}

.project-map-section::before,
.project-map-section::after {
    pointer-events: none;
}

/* Stop Elementor background overlays from preventing map dragging. */
.project-map-section
> .elementor-background-overlay {
    pointer-events: none;
}

/* Make sure the shortcode widget remains interactive. */
.project-map-section
.elementor-shortcode,
.project-map-section
.elementor-widget-container {
    position: relative;

    pointer-events: auto;
}

/* Zoomed-out state marker: yellow pinpoint with a project-count badge positioned above it. Zoomed-in project marker: small yellow dot. */
.project-map-marker--state {
    width: 24px;
    height: 34px;
    transform-origin: center bottom;
}

.project-map-marker__pin {
    display: block;
    width: 24px;
    height: 34px;
    max-width: none;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 180ms ease;
}

.project-map-marker--state:hover .project-map-marker__pin {
    transform: translateY(-2px);
}

.project-map-marker--state .project-map-marker__count {
    top: -8px;
    right: 12%;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;

	color: #181819;
	background-color: #fbec0a;
	border: 1px solid #fbec0a;
	font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 700;
    transform: translateX(60%);
}

.project-map-marker--project {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    transform-origin: center;
}

.project-map-marker__dot {
    display: block;
    width: 12px;
    height: 12px;
    background-color: #fbec0a;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    pointer-events: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-map-marker--project:hover .project-map-marker__dot {
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.34);
    transform: scale(1.25);
}

/* Screens wider than 1420px. */
@media (min-width: 1421px) {

    .project-map__canvas {
        height: 550px;
        min-height: 550px;
    }
}

/* Screens wider than 1920px. This must appear after the 1421px rule so it overrides the 550px height. */
@media (min-width: 1921px) {

    .project-map__canvas {
        height: 650px;
        min-height: 650px;
    }
}

@media (min-width: 500px) {
    ol.ares-project-list li a {
        width: 350px;
    }
}

/* ===================================================== TABLET ===================================================== */

@media (max-width: 1024px) {

    .project-map__canvas {
        height: min(var(--project-map-height, 600px), 75vh);

        min-height: 480px;
    }
}

/* ===================================================== MOBILE ===================================================== */

@media (max-width: 767px) {

    .project-map__navigation {
        gap: 8px;

        margin-bottom: 15px;
    }

    .project-map__state-link {
        min-height: 36px;

        padding: 7px 13px;

        font-size: 13px;
    }

    .project-map__canvas {
        height: min(var(--project-map-height, 520px), 70vh);

        min-height: 420px;
    }

    /* State marker. */
    .project-map-marker {
        width: 66px;
        height: 80px;
    }

    .project-map-marker__circle {
        width: 66px;
        height: 66px;
    }

    .project-map-marker__circle::after {
        bottom: -12px;

        border-top-width: 18px;
        border-right-width: 10px;
        border-left-width: 10px;
    }

    .project-map-marker__logo {
        width: 40px;
        height: 40px;
    }

    .project-map-marker__count {
        top: -5px;
        right: -5px;

        min-width: 26px;
        height: 26px;

        padding: 0 5px;

        font-size: 13px;
    }

    /* Individual project marker. */
    .project-map-marker--project {
        width: 56px;
        height: 68px;
    }

    .project-map-marker--project
    .project-map-marker__circle {
        width: 56px;
        height: 56px;
    }

    .project-map-marker--project
    .project-map-marker__circle::after {
        bottom: -10px;

        border-top-width: 16px;
        border-right-width: 9px;
        border-left-width: 9px;
    }

    .project-map-marker--project
    .project-map-marker__logo {
        width: 34px;
        height: 34px;
    }
}

/* Keep the simplified markers consistent on mobile. */
@media (max-width: 767px) {
    .project-map-marker--state {
        width: 30px;
        height: 43px;
    }

    .project-map-marker--state .project-map-marker__pin {
        width: 30px;
        height: 43px;
    }

    .project-map-marker--state .project-map-marker__count {
        top: -20px;
        right: 50%;
        min-width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .project-map-marker--project {
        width: 16px;
        height: 16px;
    }
}

/* ===================================================== REDUCED MOTION ===================================================== */

@media (prefers-reduced-motion: reduce) {

    .project-map__state-link,
    .project-map-marker__circle {
        transition: none;
    }
}