@font-face {
    font-family: 'cmono';
    src: url('./font/cascadia-mono.woff2') format('woff2');
}


/* =========================
   OBSERVATIONS INTRO
========================= */

.observations-intro {
    width: 100%;
    max-width: 900px;
    margin: 16px auto 25px;
    padding: 25px 30px;

    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);

    font-family: 'cmono';
    text-align: center;
}

.observations-intro h1 {
    margin: 0 0 10px;
    font-size: 25px;
    font-weight: bold;
}

.observations-intro p {
    margin: 8px 0;
    font-size: 17px;
}

.observations-intro-text {
    max-width: 700px;
    margin: 18px auto 0 !important;
    font-size: 15px !important;
    line-height: 1.5;
}


/* =========================
   FILTERS
========================= */

.observations-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    margin: 0 auto 25px;
}

.observation-filter {
    appearance: none;

    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.95);

    padding: 8px 18px;

    font-family: 'cmono';
    font-size: 16px;
    color: #222;

    cursor: url("pickaxe2.png"), pointer;
}

.observation-filter:hover {
    background: #eeeae2;
}

.observation-filter.active {
    background: #222;
    color: #fff;
    border-color: #222;
}


/* =========================
   OBSERVATION GALLERY
========================= */

.observations-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;

    width: 100%;
    padding: 25px;

    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #ccc;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}


/* =========================
   OBSERVATION CARD
========================= */

.observation-card {
    width: 100%;
    max-width: 560px;

    margin: 0 auto;
    padding: 12px 12px 0;

    background: #ffffff;
    border: 1px solid #ccc;

    box-shadow: none;

    overflow: hidden;

    cursor: url("pickaxe2.png"), pointer;

    transition: box-shadow 0.2s ease;
}

.observation-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}


/* =========================
   CARD IMAGE
========================= */

.observation-image-wrap {
    position: relative;

    width: 100%;

    overflow: hidden;

    background: #eeeae2;
}

.observation-image {
    display: block;

    width: 100%;
    height: 380px;

    object-fit: cover;

    transition: transform 0.25s ease;
}

.observation-card:hover .observation-image {
    transform: scale(1.02);
}


/* =========================
   CARD OVERLAY
========================= */

.observation-card-overlay {
    position: absolute;
    inset: 0;

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

    background: rgba(255, 255, 255, 0.72);

    font-family: 'cmono';
    font-size: 18px;
    color: #222;

    opacity: 0;

    transition: opacity 0.2s ease;

    pointer-events: none;
}

.observation-card:hover .observation-card-overlay {
    opacity: 1;
}


/* =========================
   CARD INFORMATION
========================= */

.observation-card-info {
    padding: 16px 8px 18px;

    font-family: 'cmono';
}

.observation-card-info h2 {
    margin: 8px 0;

    font-size: 25px;
    font-weight: normal;
}

.observation-card-info p {
    margin: 0;

    font-size: 16px;
    line-height: 1.45;
}

.observation-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}


/* =========================
   VIEWER OVERLAY
========================= */

.observation-viewer {
    position: fixed;
    inset: 0;

    display: none;

    z-index: 10000;

    padding: 30px;

    background: rgba(0, 0, 0, 0.58);

    align-items: center;
    justify-content: center;
}

.observation-viewer.open {
    display: flex;
}


/* =========================
   VIEWER CONTENT
========================= */

.observation-viewer-content {
    position: relative;

    width: min(1200px, 95vw);
    max-height: 92vh;

    display: grid;

    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(300px, 0.65fr);

    background: #eeeae2;

    border: 1px solid #aaa;

    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3);

    overflow: hidden;
}


/* =========================
   CLOSE BUTTON
========================= */

.observation-close {
    position: absolute;

    top: 8px;
    right: 12px;

    z-index: 100;

    border: none;
    background: transparent;

    font-family: Arial, sans-serif;
    font-size: 38px;
    line-height: 1;

    color: #222;

    cursor: url("pickaxe2.png"), pointer;
}

.observation-close:hover {
    color: #777;
}


/* =========================
   VIEWER IMAGE AREA
========================= */

.observation-viewer-image-area {
    position: relative;

    min-height: 500px;

    display: flex;
    flex-direction: column;

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

    padding: 35px 55px;

    background: #e6e1d8;
}


/* =========================
   VIEWER IMAGE
========================= */

#observation-viewer-image {
    display: block;

    max-width: calc(100% - 90px);
    max-height: calc(100% - 80px);

    object-fit: contain;

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

    cursor: url("zoom-point.png"), zoom-in;

    position: relative;

    z-index: 1;

    touch-action: none;
}

/* =========================
   IMAGE COUNTER + CAPTION
========================= */

#observation-image-navigation {
    width: 100%;

    margin-top: 12px;

    text-align: center;

    font-family: 'cmono';

    flex-shrink: 0;
}

#observation-image-counter {
    display: block;

    font-size: 15px;
    line-height: 1.2;

    margin-bottom: 6px;
}

#observation-image-caption {
    max-width: 700px;

    margin: 0 auto;

    font-size: 16px;
    line-height: 1.4;
}

/* =========================
   ZOOM MAGNIFIER
========================= */

.observation-zoom {
    position: fixed;

    display: none;

    width: 160px;
    height: 160px;

    border: 2px solid #555;
    border-radius: 50%;

    background: #fff;

    overflow: hidden;

    pointer-events: none;

    z-index: 20000;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

.observation-zoom.active {
    display: block;
}

#observation-zoom-image {
    position: absolute;

    max-width: none;
    max-height: none;

    width: auto;
    height: auto;

    pointer-events: none;
}


/* =========================
   VIEWER NAVIGATION
========================= */

.observation-viewer-nav {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 42px;
    height: 60px;

    border: none;

    background: rgba(255, 255, 255, 0.7);

    font-family: Arial, sans-serif;
    font-size: 38px;
    line-height: 1;

    color: #222;

    cursor: url("pickaxe2.png"), pointer;

    z-index: 20;
}

.observation-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.95);
}

.observation-prev {
    left: 10px;
}

.observation-next {
    right: 10px;
}


/* =========================
   VIEWER INFORMATION
========================= */

.observation-viewer-info {
    padding: 45px 30px 30px;

    overflow-y: auto;

    font-family: 'cmono';

    background: #eeeae2;
}

.observation-viewer-info h2 {
    margin: 12px 0 20px;

    font-size: 32px;
    font-weight: normal;
}


/* =========================
   VIEWER TAGS
========================= */

.observation-viewer-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}

.observation-tag {
    display: inline-block;

    padding: 5px 10px;

    border: 1px solid #999;
    border-radius: 3px;

    font-family: 'cmono';
    font-size: 13px;
    line-height: 1.2;

    color: #222;
    background: #fff;

    box-sizing: border-box;
}


/* =========================
   SCALE TAGS
========================= */

.observation-tag.micro {
    background: #ffffff;
    border-color: #555;
    color: #222;
}

.observation-tag.macro {
    background: #d6d6d6;
    border-color: #888;
    color: #222;
}

.observation-tag.astro {
    background: #222;
    border-color: #222;
    color: #ffffff;
}


/* =========================
   GEOLOGY TAGS
========================= */

.observation-tag.geology {
    background: #d9c2ad;
    border-color: #b99d84;
}

.observation-tag.mineral {
    background: #72d5d3;
    border-color: #63a6b5;
}

.observation-tag.rock {
    background: #c9c3bd;
    border-color: #aaa29a;
}

.observation-tag.soil {
    background: #cdb69e;
    border-color: #ae9478;
}

.observation-tag.sediment {
    background: #ddd0ad;
    border-color: #c1b184;
}


/* =========================
   BIOLOGY TAGS
========================= */

.observation-tag.botany {
    background: #c5d6bd;
    border-color: #a4bb99;
}

.observation-tag.insect {
    background: #d7c7a8;
    border-color: #b9a47c;
}


/* =========================
   WATER TAG
========================= */

.observation-tag.water {
    background: #bcd5d9;
    border-color: #96b9be;
}


/* =========================
   ASTRONOMY TAG
========================= */

.observation-tag.astronomy {
    background: #c7c2d9;
    border-color: #a6a0bc;
}
.observation-tag.weather {
    background: #bed3f9;
    border-color: #79a7fd;
}
.observation-tag.environment {
    background: #b0fb8a;
    border-color: #8bfd79;
}
.observation-tag.optical-phenomena {
    background: #dac3f9;
    border-color: #c479fd;
}
.observation-tag.planet {
    background: #e1e0e3;
    border-color: #7a7a7a;
}



/* =========================
   MATERIAL TAGS
========================= */

.observation-tag.material {
    background: #e0c4c8;
    border-color: #c49da4;
}

.observation-tag.paper {
    background: #e4d8c4;
    border-color: #c8b89d;
}

.observation-tag.textile {
    background: #d5c1d2;
    border-color: #b79eb5;
}

.observation-tag.wood {
    background: #d5b99c;
    border-color: #b99a79;
}

.observation-tag.metal {
    background: #c5cbd0;
    border-color: #a4abb1;
}

.observation-tag.glass {
    background: #c5d9d5;
    border-color: #9fbdb8;
}

.observation-tag.plastic {
    background: #d5c6d8;
    border-color: #b5a2b9;
}

.observation-tag.fibre {
    background: #d8d0bb;
    border-color: #bcb298;
}


/* =========================
   META INFORMATION
========================= */

.observation-meta {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 15px;

    margin-bottom: 25px;
    padding-bottom: 18px;

    border-bottom: 1px solid #bbb;
}

.observation-meta div {
    display: flex;

    flex-direction: column;

    gap: 4px;
}

.observation-meta strong {
    font-size: 13px;

    text-transform: uppercase;

    color: #555;
}

.observation-meta span {
    font-size: 15px;
}


/* =========================
   VIEWER SECTIONS
========================= */

.observation-section {
    margin-bottom: 23px;
}

.observation-section h3 {
    margin: 0 0 7px;

    font-size: 18px;
    font-weight: normal;
}

.observation-section p {
    margin: 0;

    font-size: 15px;
    line-height: 1.55;
}


/* =========================
   NOTE
========================= */

.observation-note {
    padding: 15px;

    background: rgba(255, 255, 255, 0.55);

    border-left: 3px solid #aaa;
}


/* =========================
   COUNTER
========================= */

.observation-viewer-counter {
    position: absolute;

    bottom: 8px;
    left: 50%;

    transform: translateX(-50%);

    z-index: 20;

    padding: 4px 9px;

    background: rgba(255, 255, 255, 0.75);

    font-family: 'cmono';
    font-size: 13px;
}


/* =========================
   HIDDEN CARDS
========================= */

.observation-card.hidden {
    display: none;
}


/* =========================
   MOBILE — TABLET
========================= */

@media (max-width: 800px) {

    .observations-gallery {
        grid-template-columns: 1fr;
    }

    .observation-image {
        height: 300px;
    }

    .observation-card {
        max-width: 100%;
    }


    /* Viewer */

    .observation-viewer {
        padding: 12px;
    }

    .observation-viewer-content {
        width: 96vw;
        max-height: 94vh;

        display: flex;
        flex-direction: column;
    }

    .observation-viewer-image-area {
        min-height: 300px;
        height: 48vh;

        padding: 35px 45px 30px;
    }

    #observation-viewer-image {
        max-width: 100%;
        max-height: 42vh;
    }

    .observation-viewer-info {
        padding: 25px 20px 30px;

        max-height: 42vh;
    }

    .observation-viewer-info h2 {
        font-size: 27px;
    }

    .observation-meta {
        grid-template-columns: 1fr 1fr;
    }
}


/* =========================
   MOBILE — PHONE
========================= */

@media (max-width: 600px) {

    .observations-intro {
        padding: 20px 18px;
    }

    .observations-intro h1 {
        font-size: 32px;
    }

    .observations-intro p {
        font-size: 18px;
    }

    .observations-intro-text {
        font-size: 15px !important;
    }


    /* Cards */

    .observation-image {
        height: 240px;
    }

    .observation-card-info h2 {
        font-size: 22px;
    }

    .observation-card-info p {
        font-size: 15px;
    }


    /* Viewer */

    .observation-viewer-image-area {
        height: 40vh;
        min-height: 230px;
    }

    #observation-viewer-image {
        max-height: 34vh;
    }

    .observation-viewer-info {
        max-height: 48vh;
    }

    .observation-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }


    /* Navigation arrows */

    .observation-viewer-nav {
        width: 34px;
        height: 50px;

        font-size: 30px;
    }

    .observation-prev {
        left: 5px;
    }

    .observation-next {
        right: 5px;
    }


    /* Image dots */

    .observation-image-dots {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        gap: 3px;
        padding: 6px 7px;
    }

    .observation-image-dot {
        width: 20px;
        height: 20px;

        flex-basis: 20px;
    }

    .observation-image-dot::before {
        width: 8px;
        height: 8px;
    }

}

/* =========================
   LOADING END MESSAGE
========================= */
.loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 10px 14px;

  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

  font-size: 20px;
  font-family: 'cmono';

  opacity: 0;
  transform: translateY(10px);
  transition: 0.6s ease;
}

.loading.active {
  opacity: 1;
  transform: translateY(0);
}

.loading:not(.active) .dots span {
  animation-play-state: paused;
}

/* signal dots */
.dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
}

.dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
  opacity: 0.25;
}

.loading.active .dots span {
  animation: signalPulse 1.2s infinite ease-in-out;
}

.loading.active .dots span:nth-child(1) { animation-delay: 0s; }
.loading.active .dots span:nth-child(2) { animation-delay: 0.2s; }
.loading.active .dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes signalPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* =========================
   FOOTER
========================= */

.footer {
    overflow: hidden;

    border: 1px solid #ccc;

    background-color: #fffdfd;

    display: list-item;

    justify-content: center;

    font-family: 'cmono';

    font-size: 20px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}