/* Import the Outfit font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

html {
    scroll-behavior: smooth;
}

/* Reset defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 80px;
    align-items: center;
    justify-content: center;
}

/* Headings use Outfit with serif fallback */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', serif;
}

/*--------- GENERAL SETTINGS ---------*/

h1 {
    font-size: 60px;
    font-style: normal;
    font-weight: 500;
    text-transform: none;
    color: #ffffff;
    display: block;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
h2 {
    font-size: 36px;
    font-weight: 500;
    padding: 0 0 30px 0;
}
h3 {
    font-size: 28px;
    font-weight: 500;
}
h4 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 0;
}

p {
  font-style: normal;
    font-weight: 400;
    letter-spacing: 0.2px;
    font-size: 18px;
    line-height: 1.5em;
}

button {
    display: flex;
    justify-content: center;
    margin: 10px auto;
    width: fit-content;
    border: none;
    border-radius: 8px;
    padding: 12px;
    width: 50%;
    background: #222;
    color: white;
    cursor: pointer;
    font-size: 16px;
}
button:hover {
    background: #333;
    color: #E4F7F3;
}

/*--------- HEADER SETTINGS ---------*/

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    padding: 10px 5%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.2s ease;
}

.header.hide {
    transform: translateY(-100%);
}

.logo {
    padding-left: 20px;
}

.logo img {
    height: 70px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-right: 30px;
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: #222;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-menu a::before {
    content: "";
    position: absolute;
    width: 0;
    height: 1.5px;
    background-color: #222;
    bottom: -2px;
    left: 0;
    transition: width 0.6s;
}

.nav-menu a:hover::before {
    width: 100%;
}

/* Mobile menu toggle - hidden by default */
.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 20;
}

/* Responsive styles */
@media (max-width: 950px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background-color: #ffffff;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 10px 0;
        padding: 0 5%;
    }
    
    .nav-menu li:last-child {
        padding-right: 5%;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/*--------- HOME SECTION ---------*/

#home {
    background: url('images/home-bg.webp') no-repeat center center/cover;
    height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
#home h1 {
    padding: 50px 20px;
}
#home h2 {
    font-size: 32px;
    color: white;
    padding: 0 20px;
}

/*--------- ABOUT SECTION ---------*/

#about {
    color: #222;
    background-color: #E4F7F3;
    text-align: center;
    margin: auto;
    padding: 100px 0 80px 0;
}
.about-fade {
    opacity: 0; /* Start invisible */
    transform: translateY(20px); /* Slight upward offset */
}
.about-fade.animate__fadeInUp {
    opacity: 1;
    transform: translateY(0);
}
.about-container {
    width: 90%;
    max-width: 1000px;
    margin: auto;
    padding: 20px 10px;
    color: #fff;
    background: #222;
    border-radius: 8px;
    box-shadow: rgb(38, 57, 77) 0px 20px 30px -10px;
}
.about-container p {
    font-weight: 400;
    letter-spacing: 0.6px;
    line-height: 2em;
}
.about-column {
    width: 90%;
    max-width: 800px;
    align-items: center;
    margin: auto;
    margin-top: 80px;
}
.about-column p {
    padding: 0 0 16px 0;
}
.counter-section {
    padding: 40px 0px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
    font-weight: 700;
    font-family: 'Outfit', serif;
}
.counter-container {
    display: flex;
    align-items: center;
    gap: 5px;
}
.counter .plus-symbol {
    color: #222;
}
.counter-text {
    padding: 10px 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: 600;
    font-family: 'Outfit', serif;
}

/*--------- PRODUCT SECTION ---------*/

#products {
    background-image: linear-gradient(180deg, #222, #333);
    color: #fff;
    text-align: center;
    margin: auto;
    padding: 100px 0 80px 0;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
    margin: auto;
    width: 90%;
}
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 800px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
.product {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
    text-decoration: none;
    color: #222;
}
.product:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
}
.product img {
    width: 100%;
    max-width: 300px;
    transition: transform 0.1s ease-in-out;
    border-radius: 8px;
}
.product-category {
    font-size: 16px;
    color: #555;
    margin: 10px;
}
.product-hr {
    border: 1px solid #555;
    border-radius: 8px;
    margin: auto;
    width: 90%;
}
.product-button {
    display: inline-block;
    padding: 10px 30px;
    margin-top: 15px;
    margin-bottom: 15px;
    background-color: #222;
    color: white;
    border-radius: 8px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}
.product-button:hover {
    background-color: #3f3f3f;
}
.product-intro {
    font-style: normal;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.2px;
    font-size: 18px;
    line-height: 1.5em;
    margin-bottom: 40px;
    padding: 0 20px;
}

/*--------- SERVICES SECTION ---------*/

#services {
    color: #222;
    text-align: center;
    background: #E4F7F3;
    padding: 100px 0 80px 0;
}
.wrapper-services {
    width: 100%;
    margin: auto;
}
input[type=radio] {
    display: none;
}
input[type=radio]:checked + .item .title {
    background: #222;
    color: white;
    cursor: pointer;
    font-size: 24px;
    padding: 24px;
}
input[type=radio]:checked + .item .title:after {
    transform: rotate(180deg);
}
input[type=radio]:checked + .item .content {
    margin-top: 32px;
    margin-bottom: 16px;
    height: auto;
    font-size: 18px;
    opacity: 1;
    visibility: visible;
    transition: all 0.1s, opacity 1.0s;
}
.item {
    width: 80%;
    display: block;
    margin: auto;
    padding: 16px 0;
}
.title {
    border-radius: 8px;
    color: #222;
    border: 1px solid #222;
    font-size: 24px;
    font-weight: bold;
    padding: 24px;
    cursor: pointer;
    transition: all 0.1s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.title:after {
    content: "▼";
    display: inline-block;
    font-size: 16px;
}
.content {
    width: 90%;
    margin: 0 auto;
    padding: 0;
    line-height: 1.6;
    font-size: 18px;
    color: #222;
    height: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.1s;
}

.content {
    max-width: 900px;
    margin: auto;
}

/* Image and wrapper */
.service-image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
}

.service-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Overlay text block */
.service-overlay-text-left,
.service-overlay-text-right {
    position: absolute;
    max-width: 40%;
    top: 20px;
    bottom: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #111;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease, transform 1s ease;
}

.service-overlay-text-left {
    left: 20px;
}

.service-overlay-text-right {
    right: 20px;
}

.service-overlay-text-left p,
.service-overlay-text-right p {
    font-size: 17px;
    line-height: 1.6;
}

input:checked + label .service-overlay-text-left,
input:checked + label .service-overlay-text-right {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive behavior below 1000px */
@media (max-width: 1000px) {
    .service-image-wrapper {
        display: flex;
        flex-direction: column;
    }

    .service-overlay-text-left,
    .service-overlay-text-right {
        position: static;
        background: none;
        color: #222;
        max-width: 100%;
        padding: 20px 0 0 0;
        border: none;
    }
}

/* Zoom in when the accordion label is selected */
input:checked + label .service-image {
    transform: scale(1);
    opacity: 1;
}

/*--------- PUBLICATION SECTION ---------*/

#publications {
    background: url('images/publications-bg.webp') no-repeat center center/cover;
    color: #222;
    text-align: center;
    margin: auto;
    padding: 100px 0 80px 0;
}
.publications-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px;
}
.publications-list {
    column-count: 2;
    column-gap: 40px;
    text-align: justify;
    flex: 1;
    min-width: 300px;
    font-size: 16px;
    color: #222;
    line-height: 1.6;
}
@media (max-width: 800px) {
    .publications-list {
        column-count: 1;
        text-align: left;
    }
}
.publications-list p {
    break-inside: avoid;
    margin-bottom: 10px;
}
.publications-list a {
    color: #222;
    text-decoration: none;
}
.publications-list a:hover {
    text-decoration: underline;
}

/*--------- CONTACT SECTION ---------*/

#contact {
    background: #E4F7F3;
    color: #222;
    text-align: center;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0 0 0;
}
.map-container {
    position: relative;
    width: 80%;
    align-items: center;
    justify-content: center;
}
.pin {
    cursor: pointer;
    fill: red;
    stroke: black;
    stroke-width: 1;
}
.pin:hover {
    fill: yellow;
}
.popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.popup-content {
    background-color: white;
    border: 1px solid #ccc;
    padding: 0 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-width: 600px;
    max-width: 1000px;
    text-align: left;
    line-height: 1.2;
    position: relative;
}
.popup-content h3 {
    margin: 15px 0 5px 0;
}
.popup-hr {
    border: 1px solid #666;
    border-radius: 8px;
    margin: auto;
    width: 80%;
}
.popup-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 70px;
    height: 70px;
    object-fit: cover;
}
.contact-intro {
    padding: 0 20px;
}
.contact-intro p {
    font-style: normal;
    font-weight: 400;
    color: #222;
    letter-spacing: 0.2px;
    font-size: 18px;
    line-height: 1.5em;
    margin-bottom: 60px;
}
.form-container {
    display: flex;
    width: 100%;
    background-color: #fff;
    padding: 40px 0 40px 0;
    justify-content: center;
}
.form-container form {
    width: 80%;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: left;
}
.form-container input,
textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #666;
    border-radius: 8px;
    box-sizing: border-box;
    margin-top: 6px;
    margin-bottom: 16px;
    resize: vertical;
    font-size: 16px;
    font-weight: 300;
    color: #666;
    font-family: Outfit, sans-serif;
}
.form-container input:focus,
textarea:focus {
    border: 0;
    outline: 2px solid #444;
}
.form-container label {
    padding-left: 12px;
    font-size: 18px;
}
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    width: fit-content;
}
.form-container button {
    display: flex;
    justify-content: center;
    margin: 10px auto;
    width: 80%;
    max-width: 400px;
    border: none;
    border-radius: 8px;
    padding: 12px;
    background: #222;
    color: white;
    cursor: pointer;
    font-size: 16px;
}
.form-container button:hover {
    background: #333;
}

#form-message {
  font-weight: 500;
  font-size: 18px;
  padding-top: 10px;
  display: none;
}

/*--------- BACK-TO-TOP Button ---------*/
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #222;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    display: none;
    transition: opacity 0.1s, transform 0.1s;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}
#backToTop:hover {
    background-color: #3f3f3f;
    transform: scale(1.1);
    font-weight: 600;
}

/*--------- SEISMOGRAM GIF ---------*/
.gif-container {
    width: 100%;
    height: 100px; /* Fixed height */
    background-color: #222;
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    overflow: hidden; /* Hide any GIF overflow */
}

.responsive-gif {
    width: 100%;
    height: 90%; /* Fill container height */
    object-fit: cover; /* Cover the container without distorting */
}

/*--------- FOOTER ---------*/
footer {
    background-image: linear-gradient(180deg, #222, #333);
    color: white;
    text-align: center;
    padding: 25px 0;
    font-size: 16px;
    font-weight: 300;
}

/*--------- COOKIES BANNER ---------*/
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #222;
    color: #fff;
    padding: 20px 30px;
    z-index: 9999;
    font-size: 14px;
    animation: slideUp 0.6s ease;
    display: flex;
    justify-content: center;
}

.cookie-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-content p {
    margin: 0;
    line-height: 1.5;
    flex: 1 1 70%;
}

.cookie-content a {
    color: #00bfff;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex: 1 1 auto;
    justify-content: flex-end;
    padding: 0 0 0 10px;
}

.cookie-buttons button {
    background: #00bfff;
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-buttons .decline {
    background: #666;
}

.cookie-buttons button:hover {
    background: #008ecc;
}

.cookie-buttons .decline:hover {
    background: #444;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}
