/* Font faces */
@font-face {
    font-family: young_serif;
    src: url(../fonts/YoungSerif_MediumItalic.woff2);
}

/* Standardized transition tokens */
:root {
    --ease: ease;
    --t: 400ms;
    --t-slow: 500ms;
    --delay: 120ms; /* stagger for inner content */
}

/* Base styles */
body {
    position: relative;
    background-color: #eafcf7;
}

header {
    position: fixed;
    height: calc(7.5vh + 2px);
    z-index: 100;
}
header .row {
    height: inherit;
}

main {
    height: 100vh;
    width: 100vw;
}

/* Typography */
h1 {
    font-family: young_serif;
    line-height: 0.8;
    font-size: 2rem;
    color: #015132;
}
h2, h3, h4 {
    font-family: Darker Grotesque;
    color: #015132;
}
h2 {
    font-weight: 500;
    transition: all 0.5s;
}
h3 {
    font-weight: 700;
}
h4 {
    font-family: young_serif;
    font-weight: 700;
}
h1, h2, h3 {
    margin-bottom: 0;
}
p {
    font-family: Darker Grotesque;
}

.link-style {
    color: #015132;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Logo */
.logo {
    z-index: 10;
    width: fit-content;
}

/* Tabs */
.tab {
    border-right: #015132 2px solid;
    border-bottom: #015132 2px solid;
    border-bottom-right-radius: 3rem;
    background-color: white;
    transition:
        width var(--t) var(--ease),
        height var(--t) var(--ease),
        transform var(--t) var(--ease),
        left var(--t) var(--ease),
        top var(--t) var(--ease);
}
.tab-1 {
    width: 66.66%;
    position: absolute;
    height: inherit;
}
.tab-2 {
    width: 100%;
    position: fixed;
    height: inherit;
}
.tab-1 button, .expanded-1 .header-btn-1 {
    left: 75%;
    transform: translateX(-50%);
    position: absolute;
    transition:
        left var(--t) var(--ease),
        transform var(--t) var(--ease),
        top var(--t) var(--ease);
    top: 0;
}
.tab-2 .header-btn-2 {
    left: 82.66%;
    transform: translateX(-50%);
    position: fixed;
    transition:
        left var(--t) var(--ease),
        transform var(--t) var(--ease),
        top var(--t) var(--ease);
    top: 0;
    z-index: 10; /* Ensure it stays above other elements */
}
.expanded-1, .expanded-2 {
    width: 100vw;
    height: 100vh;
    pointer-events: auto;
}
.expanded-1 .header-btn-1,
.expanded-2 .header-btn-2 {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
}

@media only screen and (max-width: 779px) {
    .expanded-1 .header-btn-1,
    .expanded-2 .header-btn-2 {
    top: 4rem;
    }
}

.expanded-1 h2, .expanded-2 h2 {
    font-weight: 700;
    font-size: 3rem;
}
.expanded-3 {
    width: 100%;
    height: fit-content;
}
.shrinked-1 {
    transform: translateY(-20vh);
    pointer-events: none !important;
}

/* Info panels */
.info-1, .info-2 {
    position: fixed;
    opacity: 0;
    transition: opacity var(--t) var(--ease);
    transition-delay: 0s; /* close: fade out immediately */
    height: 90vh;
    width: 70vw;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-bottom: 2rem;
    margin-top: 10vh;
}

@media only screen and (max-width: 779px) {
    .info-1, .info-2 {
    margin-top: 12rem;
    }
    .body-text {
        margin-top: 0 !important;
    }
}

@media only screen and (max-width: 599px) {
    .info-1, .info-2 {
    width: 80vw !important;
    }
}

@media only screen and (max-width: 424px) {
    .info-1, .info-2 {
    width: 90vw !important;
    }
}

.info-1.visible, .info-2.visible, .info-3.visible {
    opacity: 1;
    pointer-events: auto;
    transition-delay: var(--delay); /* open: reveal after container starts expanding */
}

/* Tab content */
.tab p {
    line-height: 1.3;
    font-weight: 500;
    color: #015132;
    font-size: 1.25rem;
    margin-bottom: 0;
}

/* Team/sub info */
.team-info, .sub-info {
    background-color: #015132;
    border-radius: 3rem;
}
.team-info h3, .sub-info h3 {
    color: white;
    font-family: young_serif;
}

/* Cards */
.card-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.card {
    border: #015132 2px solid;
    border-radius: 1.5rem;
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 380px;
}
.center-tab .card {
    border: transparent;
}
.card h4 {
    text-align: center;
    line-height: 1;
}
.card p {
    line-height: 1;
    text-align: center;
}

.team-info .card img {
    /* border-radius: 50%; */
    width: auto;
    height: 200px;
    object-fit:contain;
    margin-bottom: 0.5rem;
}

/* Audio controls */
.progress {
    -webkit-appearance: none;
    width: 150px;
    height: 16px;
    border: 5px solid white;
    background: #015132;
    border-radius: 10px;
    cursor: pointer;
    overflow: visible;
}

@media only screen and (max-width: 768px) {
    .progress {
        width: calc(100% - 2rem);
    }
  }

.progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background-color: #eafcf7;
    border: #015132 solid 2px;
    border-radius: 50%;
    height: 16px;
    width: 16px;
}
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
}
.controls .circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #015132;
    display: flex;
    justify-content: center;
    align-items: center;
}
.controls svg {
    width: 30px;
    height: auto;
}
.controls path {
    fill: #015132;
}
.play-btn {
    background-color: transparent;
    border: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}
.center-tab .play-btn {
    transform: translateX(0) !important;
}
.play-icon {
    margin-left: 0.25rem;
}
.pause-icon { 
    display: none; 
}
.circle.pause .pause-icon { 
    display: block; 
    padding: 0.25rem;
}
.circle.pause .play-icon { 
    display: none; 
}

/* Exit button for tabs */
.exit-btn {
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    width: fit-content;
    height: 40px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s;
    transform: translateY(-5rem);
    transition-delay: 0s;
}
.exit-btn button {
    background-color: transparent;
    border: transparent;
}
.exit-btn button h3 {
    font-family: Darker Grotesque;
    font-weight: 500 !important;
}
.expanded-1 ~ .exit-btn,
.expanded-2 ~ .exit-btn {
    opacity: 1;
    pointer-events: initial;
    transform: translateY(0);
    transition-delay: 0.5s;
}

/* Layout containers */
.overall-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: inherit;
}
.object-container {
    width: 85vw;
    height: 85vh;
    overflow: scroll;
    border: solid #015132 2px;
    border-radius: 3rem;
}

/* Map styles */
.map {
    position: relative;
    width: 1672px;
    height: 1180px;
    overflow: visible !important;
}
.map-content {
    width: 100%;
    height: 100%;
    transform-origin: 0 0; /* added to align Panzoom centering */
}
.map-content svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Marker styles */
button.marker, .btn_style {
    background-color: transparent;
    border: transparent;
    padding-top: 0;
    padding-bottom: 0;
    height: calc(7.5vh + 2px);
}
.marker {
    position: absolute;
    width: 4rem;
    height: 4rem;
    z-index: 10;
    pointer-events: auto;
    transform-origin: center center;
}
.marker svg path {
    transition: all 0.5s;
    stroke: none;
}
button.marker:hover svg path {
    fill: white;
    stroke: #015132;
    stroke-width: 0.25rem;
}
/* Marker positions */
.marker-1 {
    top: 84%;
    left: 65%;
}
.marker-2 {
    top: 55.5%;
    left: 55%;
    transform: translate(-50%, -50%);
}
.marker-3 {
    top: 46%;
    left: 49.4%;
}
.marker-4 {
    top: 40%;
    left: 51%;
}
.marker-5 {
    top: 69%;
    left: 44.3%;
}
.marker-6 {
    top: 63%;
    left: 57.8%;
}
.marker-7 {
    top: 10%;
    left: 56%;
}

.marker p {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
    line-height: 1;
    color: #222;
    text-align: center;
    pointer-events: none;
}

/* Zoom controls */
.zoom-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 0.5rem;
}
.zoom-controls button {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    background: white;
    border: 1px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
}

/* Footer styles */
footer {
    position: absolute;
    bottom: 0;
    width: 100vw;
    height: calc(7.5vh + 2px);
    border-top: #015132 2px solid;
    border-left: #015132 2px solid;
    border-top-left-radius: 3rem;
    background-color: white;
    overflow: hidden;
}
.footer-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
    color: #015132;
    height: inherit;
    display: flex;
    align-items: center;
}
.footer-marquee span {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
    font-size: 1.5rem;
    font-family: Darker Grotesque;
}
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Footer tab container */
.tab-3 {
    display: block;
    width: clamp(260px, 35%, 600px);
    height: auto;
    padding: 0;
    position: fixed;
    right: 0;
    bottom: 0;
    background: white;
    border-top: 2px solid #015132;
    border-left: 2px solid #015132;
    border-top-left-radius: 3rem;
    transition: all var(--t-slow) var(--ease);
    z-index: 99;
}
@media (max-width: 780px) {
    .tab-3 {
        width: 50%;
        right: 0;
    }
    .tab-1 h2, .tab-2 h2, .tab-3 h2 {
        font-size: 1.25rem;
    }
    .tab-1.expanded-1 h2, .tab-2.expanded-2 h2 {
        font-size: 2rem;
    }
}
@media (max-width: 375px) {
    .tab-1 h2, .tab-2 h2, .tab-3 h2 {
        font-size: 1rem;
        font-weight: 700;
    }
    .tab-1.expanded-1 h2, .tab-2.expanded-2 h2 {
        font-size: 2rem;
    }
}
.tab-3 button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(7.5vh + 2px);
    background: transparent;
    border: none;
    padding: 0 2rem;
    font-family: inherit;
    cursor: pointer;
    z-index: 101;
    transition: all var(--t-slow) var(--ease);
    padding-top: 0;
}
.tab-3 button h2 {
    white-space: nowrap;
}
.tab-3 .chevron {
    display: inline-block;
    transition: all var(--t) var(--ease);
    line-height: 0;
    font-size: 1.2em;
    vertical-align: middle;
    position: relative;
}
.tab-3.open .chevron {
    transform: rotate(180deg);
}
.tab-3.expanded-3 {
    height: auto;
}
.tab-3.expanded-3 button h2 {
    font-weight: 700;
}
.tab-3.expanded-3 button {
    height: calc(7.5vh + 2px);
}
.info-3 {
    display: block;
    width: 100%;
    padding: 0 2rem;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: none;
    transition:
        all var(--t) var(--ease);
    /* per-property delays: [max-height, opacity] */
    transition-delay: 0s, 0s; /* close: no delay for fade-out */
}
.info-3.visible {
    /* keep max-height anim immediate; delay only opacity */
    max-height: 250px;
    opacity: 1;
    padding-bottom: 2rem;
    transition-delay: 0s, var(--delay);
}
.center-tab {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 500px;
    max-width: 90vw;
    background: white;
    border: 2px solid #015132;
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition:
        transform var(--t) var(--ease),
        opacity var(--t) var(--ease);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.center-tab.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    transition-delay: 0s, var(--delay);
}
.center-tab .x-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10001;
}
.exit-x {
    font-size: 2rem;
    color: #015132;
    font-weight: bold;
    line-height: 1;
}
/* Sound card styling */
.center-tab-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}
.sound-card {
    width: 100%;
    background: #eafcf7;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sound-card h4 {
    margin-bottom: 0.5rem;
    color: #015132;
}
.sound-card p {
    margin-top: 0.5rem;
    color: #015132;
    font-size: 1rem;
}