*{
    animation: 0.5s fadein;
}

html{
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
    background-color: #f0f0f0; /* Light gray background */
    color: #333; /* Dark text color */
}
html, body {
    overflow-x: hidden;
  }
  

:root{
    --main: #4C8690;
}
 
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-family: "Nunito", serif;
    width: 100%;
    overflow-x: hidden;
} 
/* Dropdown Button */


/* Dropdown button on hover & focus */
.dropbtn:hover, .dropbtn:focus {
    background-color: gray;
}


/* The container <div> - needed to position the dropdown content */
.dropdown {
    position: relative;
    display: inline-block;
    border: 1px solid #ddd;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: #f6f6f6;
    min-width: 230px;
    border: 1px solid #ddd;
    z-index: 1000;
    text-align: left;
    top: 100%;
    right: 0;
    left: auto;
}

.show {
    display: block; /* Makes the dropdown visible */
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {background-color: #f1f1f1}

.filter {
    padding: 7px; /* Add padding for better appearance */
    font-size: 16px; /* Match font size with the button */
    border: 1px solid #ddd; /* Optional: Add a border to match the dropdown button */
    border-radius: 0; /* Remove rounded corners for seamless alignment */
    box-sizing: border-box; /* Include padding in the width calculation */
}

#filters {
    
    gap: 16px; /* Add spacing between elements */
    margin-top: 10px; /* Adjust the margin as needed */
    width: 100%; /* Ensure the container spans the full width */
    box-sizing: border-box; /* Include padding and borders in width */
    align-items: center; /* Vertically align items */
}

.dropbtn {
    padding:6px 10px; /* Adjust padding for better appearance */
    font-size: 16px; /* Match font size with the input */
    border-radius: 0; /* Remove rounded corners */
    background-color: #04AA6D; /* Button background color */
    color: white; /* Button text color */
    border: 1px solid #ddd; /* Match the input border */
    cursor: pointer; /* Pointer cursor on hover */
    box-sizing: border-box;
}

#clear-filters {
    background-color: #f44336;
    color: white;
    padding: 7px 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    grid-column: span 2; /* Make the clear button span across two columns */
    justify-self: start; /* Align the button to the start of the grid */
}


nav h2 {
    font-family: "Nunito", serif;
    margin-right: 12rem;
    font-size: 100%;
}
 
#logo {
    width: auto;
    height: 60px;
    margin-left: 12%;
}

#shortcutT {
    margin-left: 12%;
}
 
#logo:hover {
    opacity: 0.8;
}
 
header {
    background-color: var(--main);
}
 
.headMain {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 8px;
}
 
.head-h {
    justify-content: end;
    background-color: var(--main);
    font-family: "Nunito Sans", serif;
    margin-right: 12%;
}
 
 
.head-v {
    justify-content: start;
    background-color: var(--main);
    font-family: "Nunito Sans", serif;
    margin-left: 12%;
}

#kontakt a{
    text-decoration: none;
    color: black;
}
#kontakt{
    background-color: var(--main);
    border: 0;
    font-size: larger;
} 

html {
    scroll-behavior: smooth;
  }

#oppdrag, #sprak, #kontakt, #show-video-button {
    background-color: var(--main);;
    border: 0;
    font-size: larger;
}

#oppdrag:hover, #sprak:hover, #show-video-button:hover, #kontakt:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}
*, *::before, *::after {
    box-sizing: border-box;
}
 
/* Mobile Layout Adjustments */
@media screen and (max-width: 768px) {
   
    #hoved {
        flex-direction: column !important;
        height: auto; /* Prevent overflow issues */
        width: 100%; /* Full width for the main container */
        
    }
 
    #stein, #sok {
        width: 100% !important; /* Ensure these take up full width */
    }
 

 
    footer {
        display: flex;
        flex-direction: column;
    }
 
    #logoFT {
        width: 60px; /* Make logo smaller on mobile */
        height: auto;
        padding: 5px 0;
    }
 
    #kontaktFooter {
        margin-top: 15px; /* Reduced margin for a better fit */
        font-size: 0.9rem; /* Smaller font size */
    }
    #footerbilde {
        display: none;
    }
}
 
button {
    font-family: "Nunito Sans", serif;
}
 
#søkefelt {
    width: 100%;
}
.søkeboksknapp {
    width: 40px; /* Adjust the width as needed */
    height: 40px; /* Adjust the height as needed */
    border-radius: 50%; /* Make it circular */
    overflow: hidden;
    cursor: pointer; /* Change cursor to pointer */
    display: inline-flex; /* Center the content */
    align-items: center; /* Center the content */
    justify-content: center; /* Center the content */
    margin: 0 5px; /* Add some margin if needed */
}
.søkeboksknapp img {
    object-fit: contain;
    width: 30px;
    height: 30px;
}
.søkeboksknapp:hover {
   background-color: var(--main);;
}
#add-stone-form h2
#edit-stone-form h2 {
    margin-top: 2%;
    margin-bottom: 1%;
}

#add-stone-form {
    margin-right: 2%;
}

#add-stone-form h2 {
    margin-top: 2%;
    margin-bottom: 3%; /* Reduce this value to decrease the space */
}
 
#ekstrating {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

#addStone {
    border-radius: 15px;
    margin-top: 4%;
    background-color: #abaa9d83;
    transition: background-color 0.1s ease;
}

#addStone:hover {
    background-color: #63625883;  
}



#edit-stone-button {
    border-radius: 15px;
    margin-top: 2%;
    background-color: #8e8d8183;
}
#close-form-button {
    border-radius: 15px;
    background-color: #8e8d8183;
}
/* Simplified search field container */
.search-field {
    display: flex;
    align-items: center;
    max-width: 100%;
  }
  
  /* The text input for search */
.search__input {
    flex: 1;
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 25px 0 0 25px;
    outline: none;
}
  
  /* The search button */
.search__submit-button {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    width: 5%;
    height: 100%;
    display: flex;
    background-image: url(bilder/search.png);
    background-size: 55%, 50%;
    background-position: center;
    background-repeat: no-repeat; 
}
#søkeknapp {
    width: 10%;
    height: 100%;
    border-radius: 10px;
    background: url('bilder/search.png') no-repeat center;
    background-size: contain;
}
 
#hoved{
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
    
   
}
#beskrivelse{
    display: flex;
    flex-direction: column;
    align-items: center;
}
#info1{
    display: flex;
    flex-direction: column;
    align-items: center;
}
#sok {
    display: flex;
    flex-direction: column;
    border: 0px;
    height: 100%;
    width: 100%;
}
#data-table{
    width: 100%;
    text-align: center;

}
#cards-container{
    overflow: auto;
    width: 100%;
    justify-content: center;
    background-color: #ddd;
}
.card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 16px;
    margin: 8px;
    width: 200px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color:#f1f1f1;
}
#tablehead{
    cursor:pointer;
}


@media screen and (min-width: 768px) {
    #sok {
        margin-left: 12%;
        margin-right: 12%;
    }
}
#stein-samling {
    display: block; /* Ensure the table container is visible */
    padding:10px;
}    
/* Minimal Modal Styles */ /* midlertidig css fra gpt */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 100;
  }
  
  .modal-content {
    background: #fff;
    max-width: 500px;
    margin: 10% auto;
    padding: 20px;
    border-radius: 6px;
    position: relative;
    font-family: "Nunito", sans-serif;
  }
  
  .modal-content .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #000;
    cursor: pointer;
  }
  
  /* Request Form Base Styles */
  #request-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
  }
  
  #request-form label {
    color: #000;
    font-size: 14px;
    margin-bottom: 4px;
  }
  
  .form-input {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }
  
  textarea.form-input {
    resize: vertical;
    min-height: 80px;
  }
  
  /* Side-by-side layout for current and new values */
  .side-by-side {
    display: flex;
    gap: 20px;
  }
  
  .side-by-side > div {
    flex: 1;
  }
  
  /* Button Style */
  .form-button {
    height: 40px;
    border-radius: 15px;
    margin-top: 2%;
    background-color: #8e8d8183;
    cursor: pointer;
  }
  #request-type {
    display: none;
  }
  
  /* Hide Optional Sections Initially */
  #add-request-fields,
  #current-request-fields,
  #update-request-fields {
    display: none;
  }
#stein-samling{
    overflow: auto; /* Enables scrolling when content overflows */
}

nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 20px;
}
.underline {
    margin-left: 12%;
    margin-right: 12%;
    border-color: var(--main);;
    border-style: solid;
}
 
footer {
    background-color: var(--main);;
    color: black;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.fotL {
    display: flex;
    flex-direction: column;
    margin-left: 12%;
}

.fotR {
    display: flex;
    flex-direction: column;
    margin-right: 12%;
    margin-top: 5%;
}
 
#logoFT {
    width: auto;
    height: 100px;
    padding-top: 10px;
    padding-bottom: 10px;
}
 
#logoFT:hover {
    opacity: 0.8;
}

.footer1{
    display: flex;
    flex-direction: column;
    line-height: 0.001;
    margin-top: 5%;
    font-family: "Nunito Sans", serif;
}
 
#kontaktFooter {
    margin-top: 50px;
}
 
.footerIMG{
    margin-top: 75px;
    margin-bottom: 30px;
}

tbody :hover{
    background-color: var(--main);;
}

table, th, td {
    border-collapse: collapse;
}

@keyframes fadein {
    from { opacity: 0; scale: 0.99;} 
    to   { opacity: 1; }
}
#popup {
    display: none;
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: black;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 9999;
  }
#popup img{
    width: 100%;
    height: auto;
}
#secret {
    display: none;
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: black;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 9999;
}

/* Modal styles */
#video-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#video-player {
    width: 100%; /* Make the video take up the full width of the modal */
    max-width: 800px; /* Limit the maximum width */
    height: auto; /* Maintain aspect ratio */
} 
#video-modal .modal-content {
    position: relative;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#video-modal .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #000;
    cursor: pointer;
}

@media (max-width: 700px){
    nav h2{
        margin-right: 2px;
    }
    #shortcutT{
        margin-left: 0;
    }
    #shortcutT img{
        margin-left: 2px;
    }
}