/* static/css/styles.css */

:root {
    --font1: 'Urbanist', Gill Sans, Arial, sans-serif;
    --font2: 'Ubuntu', Gill Sans, Arial, sans-serif;

  --circle: 50%;        /* 50% */
  --smallcorner: 10px;  /* 10px */
  --bigcorner: 16px;     /* 16px */
  --blur: 0px; 
  --trans: 1;
  --lightcolor:  #f8f1e9; /* change to lightbeige */
  --darkcolor:   #2f3273; /* change to darkblue */
  --highlight:   #6396ee; /* change to cornflowerblue */
  --accent:      #ff8300; /* not in use */
  --lowlight:    #fef351; /* change to accent2 */
  --lightgrey:   #90D5FF; /* change to lightblue*/
  --beige:       #cfc8c1; /* not in use */
  --darkgrey:    #8a9282; /* change to mediumgreen */
  --darkergreen: #53544f; /* not in use */
  --darkergrey:  #353631; /* change to textcolor */

  --border-color:     #FFFFFF;

  --white:      255, 255, 255;
  --white2:     255, 255, 255;
  --black:      0, 0, 0;
  --map-base-weight: 0.5;
  --map-base-opacity: 0.8;
  --map-base-fill-opacity: 0.2;
  --map-base-fill-blur: 0px;
  
  --map-highlight-weight: 3;
  --map-highlight-opacity: 0;
  --map-highlight-fill-opacity: 0.2;
  --map-highlight-fill-blur: 3px;
}

html {background: transparent;}

.prose {
  color: var(--darkergrey);
  font-weight: 300;
  text-align: left;
  margin: 20px;}
.prose :is(h1,h2,h3,h4,h5,h6) {
  color: var(--darkcolor);
  text-align: center;
  font-weight: 700;}

body {
    font-family: var(--font1);
    
    background-color: var(--lightcolor);
    color: var(--darkergrey);
    text-align: center;
    font-weight: 300;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;}

a {text-decoration: none;}
b, strong {font-weight: 400;}
h1 {color: var(--darkcolor); font-weight: 600;    font-family:    var(--font2)}
h2 {color: var(--darkcolor); font-weight: 500;    font-family:    var(--font2)}
h3 {color: var(--darkcolor); font-weight: 400;    font-family:    var(--font2)}

.header {
    background-color: var(--darkcolor);
    font-family:      var(--font2)}
    color: var(--white);
    padding: 15px;
    font-size: 24px;
    font-weight: 600;
    position: sticky; 
    top: 0;
    left: 0;
    width: 100%; 
    text-align: center;
    display: flex;
    z-index: 1000;
    justify-content: space-between;
    align-items: center;}
.search-bar {
    flex-grow: 1;
    font-size: 16px;
    background-color: rgb(var(--white));
    border: 1px solid transparent;
    border-radius: var(--smallcorner);
    padding: 8px;
    width: 300px;    
    text-align: left;}
.search-bar:focus {
  border: 1px solid var(--highlight);
  outline: none;
  transition: border-color 0.2s ease-in-out;}
::selection {
  color: rgba(var(--black));
  background-color: var(--lowlight);
}
a {color: var(--darkgrey);}
a:hover { color: var(--darkcolor);}

/* Menu */
.logo-bar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    z-index: 1000;
    background: rgba(var(--white), var(--trans));
    -webkit-backdrop-filter: blur(var(--blur));
    backdrop-filter: blur(var(--blur));
}
.menu {
    position: sticky;
    align-items: center;
    top: 0px;
    left: 0;
    width: 100%;
    z-index: 999;
    margin: 0 auto;
    background: rgba(var(--white), var(--trans));
    -webkit-backdrop-filter: blur(var(--blur));
    backdrop-filter: blur(var(--blur));
    border-bottom: 1px solid rgba(var(--black), 0.05);
}
.menu :hover{
    fill: var(--highlight);}
.menu-icon  {
    height: auto;
    max-width: 100%;
    display: block; 
    vertical-align: middle; 
    fill: rgb(var(--black));
    stroke: none; 
    transition: transform 0.2s ease-in-out;}
.menu-icon :hover{
    fill: var(--highlight);}
.menu a.active .menu-icon svg {
    fill: var(--highlight); }
.menu a.active .menu-icon {
    fill: var(--highlight);
    filter: brightness(1);}
.menu a {
    color: var(--highlight)}
.menu a.active .menu-label  {
    color: var(--highlight); }
.menu a:hover .menu-icon,
.menu a:hover .menu-label {
    color: var(--highlight);
    fill: var(--highlight);}
.scrollable-content {
    flex-grow: 1;
    overflow-y: auto;}

/* Map */
.map-border {
  stroke: true;
  fill: true;
  color: var(--darkergrey);
  weight: 0.5;
  fill-opacity: 0.88;
}

/* Map */
#map {height: 85vh;}

/* Buttons */
.button {
    padding: 12px 25px;
    border: none;
    border-radius: var(--smallcorner);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    margin-top: 10px;
    align-self: center;
    width: fit-content; 
    background-color: var(--darkgrey);
    color: rgb(var(--white));
    text-decoration: none;}
.button:hover {
    background-color: var(--highlight);
    color: rgb(var(--white))}
.button:active {
  color: var(--lowlight);
}


/* Main Content Area (Card Centered) */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;}
.card {
    background: rgba(var(--white), var(--trans)) !important;   
    border-radius: var(--bigcorner);
    padding: 20px;
    max-width: calc(100% - 50px);
      width: min(90vw, 800px);
    margin: 0 auto;
    box-shadow: 2px 2px 10px rgba(var(--black), 0.1);}
.story-title {
    color: var(--darkcolor);
    font-weight: bold;}
.label {
    color: var(--darkcolor);
    font-weight: 400;}
.content {
    font-weight: 200;
    color: var(--darkgrey);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}
.login-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;}
.hidden-img {
  display: none;}
.gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;}
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;  
    padding: 5px 0;}
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(var(--black), 0.5);
    color: rgb(var(--white));
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    cursor: pointer;
    border-radius: var(--circle);
    transition: background 0.2s ease-in-out;}
.nav-btn.left {
    left: 10px;}
.nav-btn.right {
    right: 10px;}
.nav-btn:hover {
    background: rgba(var(--black), 0.8);}
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(var(--darkergrey), 0.5);
    color: rgb(var(--white));
    border: none;
    padding: 8px 12px;
    font-size: 20px;
    cursor: pointer;
    border-radius: var(--circle);
    transition: background 0.2s ease-in-out;}
.close-btn:hover {
    background: rgba(var(--darkergrey), 0.8);}
.thumbnail {
    width: calc(100% - 20px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--smallcorner);
    display: block;
    margin: 10px auto; }
.story-card {
    max-width: 320px;
    min-height: auto;
    background-color: rgb(var(--white));
    width: calc(100% - 10px);
    justify-content: space-between;
    color: var(--darkgrey);
    padding: 5px;
    text-align: center;
    border-radius: var(--smallcorner);
    text-decoration: none;
    font-size: 18px;
    font-weight: 300;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0px 5px 10px rgba(var(--black), 0);
    transition: 0.2s ease-in-out;}
.story-card img,
.gallery img {
    max-width: 1024px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: var(--smallcorner);}
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 10px;
    min-height: 200px;}
.gallery {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;}
.story-card:hover {
    box-shadow: 0px 5px 20px rgba(var(--black), 0.15);}
.story-info {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 10px;
    width: calc(100% - 20px);
    max-width: 100%;
    padding: 10px;
    background-color: rgba(var(--white), var(--trans));
    border-radius: 0 0 var(--smallcorner); var(--smallcorner);;}
.profile-img {
    width: 30px;
    height: 30px;
    border-radius: var(--circle);
    object-fit: cover;
    max-width: 40px;
    max-height: 40px;}
.text-info {
    display: flex;
    flex-direction: column;
    text-align: left;}
.text-info strong {
    font-size: 16px;}
.text-info span {
    font-size: 14px;
    color: var(--darkgrey);}
.add-story {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(var(--white), 0.5);
    border: 2px dashed var(--darkgrey);
    color: var(--darkgrey);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;}
.add-story:hover {
    background-color: rgba(var(--white), 0.8);
    border-color: var(--darkgrey);}
.add-icon {
    font-size: 50px;
    line-height: 1;}
.likert-scale label {
    margin-right: 10px;}
.question {
    margin-top: 10px;
    font-size: 16px;}

/* Profile in network.js  */
.person-marker {
    position: relative;
    width: 40px; 
    height: 40px;
    border-radius: var(--circle);
    overflow: hidden;
    box-shadow: 0 0 0 2px  var(--border-color), 0 2px 8px rgba(0,0,0,.3);
    /* transform: translate(-20px, -20px);  */ 
    background: var(--lightgrey);
    cursor: pointer;
    transition: box-shadow 0.2s ease-in-out;
}
.person-marker img {
    width: 100%; 
    height: 100%;
    object-fit: cover; 
    display: block;
}
.person-marker:hover {
    /* Slightly bigger shadow on hover */
    box-shadow: 0 0 0 3px var(--highlight), 0 4px 12px rgba(0,0,0,.4);
}
.person-popup-container {
    min-width: 220px;
    font-size: 0.95rem; /* Standardizing font size */
    color: var(--darkergrey);
}
.person-popup-profile {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--lightgrey);
}
.person-popup-profile img {
    width: 36px;
    height: 36px;
    border-radius: var(--circle);
    object-fit: cover;
}
.person-popup-contact-line {
    /* Styles for email, telephone, website lines */
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    gap: 6px;
}
.person-popup-tags-container {
    margin-top: 6px; 
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid var(--lightgrey);
}
.person-popup-tag {
    background: var(--lowlight); /* Replaces #E0F2FE */
    color: var(--darkcolor);
    padding: 2px 8px;
    border-radius: var(--smallcorner);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Form */
.auth-forms {
    background-color: rgba(var(--white));
    border-radius: var(--bigcorner);
    padding: 30px;
    max-width: 600px;
    margin: 30px auto;
    box-shadow: 0px 5px 15px rgba(var(--black), 0.1);
    text-align: left;
    color: var(--darkgrey);}
.auth-forms h2 {
    color: var(--darkcolor);
    font-size: 2em;
    margin-bottom: 20px;
    text-align: center;}
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;}
form label {
    font-weight: bold;
    color: var(--darkcolor);
    margin-bottom: -10px; }
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"] {
    padding: 12px;
    border: 1px solid var(--lightgrey);
    border-radius: var(--smallcorner);
    font-size: 16px;
    width: calc(100% - 24px); 
    box-sizing: border-box; 
    transition: border-color 0.2s ease-in-out;}
form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="date"]:focus {
    border-color: var(--highlight);
    outline: none;}
form button:hover, {
    background-color: var(--darkcolor);
    transform: translateY(-2px);}
form button:active,  {
    transform: translateY(0);}

.terms-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 20px;}

.terms-checkbox-container {
    margin-top: 10px;
    margin-bottom: 10px;}
.terms-checkbox-container label {
    display: inline;
    vertical-align: top; }
.terms-checkbox-container a {
    text-decoration: none;}
.loginhere {
    text-decoration: none;}


/* Leaflet */
.leaflet-pane.leaflet-popup-pane .leaflet-popup-content-wrapper {
  background: rgba(var(--white2),var(--trans)) !important;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid rgba(var(--white),0.22);
  box-shadow: 0 8px 24px rgba(var(--black),0.12) !important;
  border-radius: var(--smallcorner) !important;
  z-index: 10;}
.leaflet-pane.leaflet-popup-pane .leaflet-popup-tip{
  background: rgba(var(--white2),var(--trans)) !important;
  border: 1px solid rgba(var(--white),0.22);}
.leaflet-popup-content .person-card{
  background: transparent;
  border: 0;
  box-shadow: none;}
.leaflet-popup-pane   { z-index: 2000 !important; } /* 1500*/


.leaflet-tooltip {
    line-height: 1.2;
    padding: 0;
}

.leaflet-tooltip-label {
    background: transparent !important;
    border: none !important;
    font-weight: 200 !important
    box-shadow: none !important;
    padding: 0 !important; 
    background: rgba(var(--white2),var(--trans)) !important;
    backdrop-filter: blur(var(--blur)) !important; 
    -webkit-backdrop-filter: blur(var(--blur)) !important; 
    font-family:   var(--font1)}
    font-weight: normal;
    color: var(--black);
    pointer-events: none;
}

.leaflet-tooltip-pane { z-index: 1500 !important; }
.leaflet-pane.peoplePane { z-index: 1050 !important; } 
.leaflet-pane > svg path.leaflet-interactive {
  pointer-events: auto !important;
  z-index: 10;}
.leaflet-control-layers {
  background: rgba(var(--white2),var(--trans)) !important;
  backdrop-filter: blur(var(--blur)) !important; 
  -webkit-backdrop-filter: blur(var(--blur)) !important; 
  border: 0px solid rgba(var(--white),0.22) !important;
  box-shadow: 0 8px 24px rgba(var(--black),0.12) !important;
  font-family:   var(--font1)}
  border-radius: var(--smallcorner) !important;
  z-index: 10;}
.leaflet-control-layers-base, .leaflet-control-layers-overlays {
  color: var(--white); }
.leaflet-control-layers-expanded {
  background: rgba(var(--white), var(--trans));
    text-align: left;}
.leaflet-control-layers-expanded label {
  color: rgb(var(--black));}





/* Mobile */
@media (max-width: 768px) {
    .logo {
        width: 15%;
        margin-right: 10px;}
    .header {
        padding: 10px;
        font-size: 20px;}
    .search-bar {
        font-size: 16px;}
    .menu {
        padding: 5px;
        top: 60px;
        display: flex;
        justify-content: space-around;
        gap: 8%;
        align-items: center; }
    .menu a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 10%;
        padding: 8px 0;
        margin: 0;
        text-decoration: none;
        color: inherit;
        flex-direction: column; }
    .menu-icon {
        fill: rgb(var(--black)); 
        filter: brightness(1);
        max-height: none; 
        width: 100%; 
        height: auto; 
        margin: 0;
        flex-grow: 0;}
    .menu-icon svg {
        width: 90%;
        height: auto;
        display: block;}
    .menu-label {
    font-size: 12px;
    margin-top: 2px;
    color:rgb(var(--black));
    text-align: center;
    font-size: 3vw; }

    .profile-container {
        padding: 10px;
        margin-top: 60px; }
    .profile-display,
    .auth-forms {
        padding: 20px;
        margin: 20px auto;
        border-radius: var(--smallcorner); }
    form input[type="text"],
    form input[type="email"],
    form input[type="password"],
    form input[type="date"] {
        padding: 10px;
        font-size: 14px;}
    form button {
        padding: 10px 20px;
        font-size: 16px;}
    .profile-display h2,
    .auth-forms h2 {
        font-size: 1.8em;}
}

/* Desktop */
@media (min-width: 769px) {
    .logo {
        width: 15%;
        max-height: 50px;
        width: auto;
        margin-right: 15px;}
    .header {
        padding: 15px;
        font-size: 24px;
      flex-direction: row;
          justify-content: flex-start; }
     .header .search-bar {
          width: auto;
          max-width: none; }
    .search-bar {
        max-width: 400px; }
    .menu {
        padding: 10px;
        top: 20px;
        display: flex;
        justify-content: center;
        align-items: center;   }
    .menu a {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-decoration: none;
        color: inherit;
        margin: 0 15px; }
    .menu-icon {
        max-height: 60px;
        margin-right: 10px;}
    .menu a {
        flex-direction: row;}
        .menu-label {
        color: rgb(var(--black));
        transition: font-size 0.2s ease-in-out; }
    .menu a:hover .menu-icon {
        transform: scale(1.2);}
    .menu a:hover .menu-label {
        font-size: 1.2em;}
    .menu a span {
        font-size: 1em;}
}

#registration-message,
#login-message,
#profile-message {
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;}
hr {
    border: none;
    border-top: 1px solid var(--lightcolor);
    margin: 40px 0;}