/* Global font setup */
@font-face {
    font-family: "TimKid";
    src: url("TimKid.ttf") format("truetype");
}

/* General styles */
body {
    margin: 0;
    font-family: TimKid, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #dbcfb1;
}

/* Center content */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

/* Navigation Bar */
.topnav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1000px;
    background-color: #102f34;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: top 0.3s ease-in-out;
    z-index: 1000;
    border-radius: 10px;
}

/* Hide navbar on scroll down */
.hide-navbar {
    top: -100px;
}

/* Current tab text (Hidden on desktop, visible on mobile when menu is closed) */
#currentTab {
    color: #f2f2f2;
    font-size: 2em;
    display: none;
}

/* Navigation links */
.topnav a {
    color: #f2f2f2;
    text-align: center;
    padding: 10px 14px;
    text-decoration: none;
    font-size: 2em;
}

/* Hover and active state */
.topnav a:hover {
    background-color: #ddd;
    color: black;
    border-radius: 5px;
}

.topnav a.active {
    background-color: #2f8735;
    color: white;
    border-radius: 5px;
}

/* Hamburger menu icon */
.topnav .icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Responsive Design */
@media screen and (min-width: 1000px) {
    .topnav {
        max-width: 1000px;
        width: 100%;
        margin-top: 10px; /* Adds a small gap on top of navbar */
    }

    #currentTab {
        display: none !important;
    }
}

@media screen and (max-width: 1000px) {
    .topnav {
        left: 0;
        transform: none;
        max-width: 100%;
        padding: 10px;
        border-radius: 0;
        top: 0; /* Remove gap on mobile */
    }

    .topnav a {
        font-size: 1.5em;
        padding: 12px;
    }

    .topnav a:not(:first-child) {
        display: none;
    }

    .topnav a.icon {
        display: block;
        margin-left: 10px;
        margin-right: 10px;
    }

    .topnav.responsive {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
    }

    .topnav.responsive .icon {
        position: absolute;
        right: 10px;
        top: 10px;
    }

    .topnav.responsive a {
        display: block;
        text-align: left;
        width: 100%;
    }

    /* Add extra padding on top when menu is closed */
    .tab-content {
        padding-top: 100px;
    }

    /* Remove extra padding when the menu is open */
    .topnav.responsive + .tab-content {
        padding-top: 20px;
    }

    /* Show current tab text when menu is closed */
    .topnav:not(.responsive) #currentTab {
        display: block;
    }

    /* Hide current tab text when the menu is open */
    .topnav.responsive #currentTab {
        display: none;
    }

    /* Hide the hamburger menu toggle button when the menu is open */
    .topnav.responsive .icon {
        display: none;
    }

    .team-section {
        flex-direction: column;
        text-align: center;
        padding: 20px 10px;
    }

    .team-text {
        max-width: 90%;  /* Allow the text to take up more width on mobile */
        padding-right: 0;
        margin-bottom: 20px;
        text-align: center;  /* Ensure the text is centered */
    }

    .team-text h2 {
        font-size: 2em;  /* Adjust the font size for smaller screens */
        margin-bottom: 15px;
    }

    .team-text p {
        font-size: 1.1em;  /* Adjust the font size for readability */
    }

    .team-image {
        max-width: 100%;  /* Image takes up full width on mobile */
        margin-top: 20px;  /* Space between text and image */
    }

    .cozycottage {
        width: 100%;  /* Ensure the image takes up full width */
        height: auto;
    }
    .footer {
        font-size: 1em;
        padding: 15px;
    }
    .about-top-row,
    .about-bottom-row {
        flex-direction: column;
        text-align: center;
    }

    .about-text p,
    .about-features {
        text-align: center;
    }

    .about-features ul {
        padding-left: 0;
        list-style-position: inside;
    }

    .about-gif img {
        margin-top: 20px;
    }

    .about-title img.title-logo {
        width: 80%;
    }

}

/* Hide all sections except the active one */
.tab-content {
    display: none;
    padding: 100px 20px 20px; /* More padding when menu is closed */
    text-align: center;
    transition: padding-top 0.3s ease-in-out;
}

/* Show the active section */
.active-tab {
    display: block;
}

/* Team Section */
.team-section {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on mobile */
    align-items: center; /* Vertically align the content */
    padding: 40px 20px;  /* Space between the sections */
    max-width: 1000px; /* Ensure consistent width */
    margin: 0 auto;
    text-align: center; /* Center all text */
}

/* Text Styling */
.team-text {
    flex: 1; /* Allow the text to take up equal space */
    padding-right: 20px;
    max-width: 50%;  /* Ensure text doesn't take up too much space */
}

.team-text h2 {
    font-size: 3em;
    color: black;
    margin-bottom: 20px;
}

.team-text p {
    font-size: 1.5em;
    color: black;
    line-height: 1.6;
}

/* Image Styling */
.team-image {
    flex: 1; /* Allow image to take up remaining space */
    max-width: 45%; /* Limit image size */
    margin-top: 20px;
}

.cozycottage {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Members Section */
.members-section {
    display: flex;
    flex-direction: column; /* Stack content vertically */
    align-items: center;
    padding: 40px 20px;
    max-width: 1000px;
    margin: 40px auto;  /* Added margin to space it from the team section */
    text-align: center; /* Center the text */
}

/* Centered Heading for "Jäsenet" */
.members-text h1 {
    font-size: 3em;
    color: black;
    margin-bottom: 20px;
}

/* Cards Container */
.members-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;  /* Space between the cards */
    margin-top: 20px;  /* Add space between heading and cards */
    font-size: 1.5em;
}

/* Individual Member Card */
.member-card {
    background-color: #d49577;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 30%;  /* Each card will take up 30% of the container width */
    padding: 20px;
    text-align: center;
    color: black;
}

/* Member Image */
.member-img {
    width: 100%;
    height: auto;               /* Ensure it scales proportionally */
    aspect-ratio: 1 / 1;        /* Ideal, but not always respected on img */
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    display: block;             /* Remove default inline gap */
}

.member-img.ilmari {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    object-position: top center;
    border-radius: 50%;
    margin-bottom: 15px;
    background-color: #000000;
}

.partners-container {
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    align-items: center;
    text-align: center;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    margin-top: 10px;
}

.partners-container h1 {
    font-size: 2.5em;
}

/* Logos Container */
.partner-logos {
    display: flex;
    flex-direction: column; /* Stack logos vertically */
    align-items: center;
    gap: 20px;
    width: 100%;
    font-size: 1.5em;
}

/* Logo Styling */
.partner-logos img {
    width: 80%; /* Takes half the width of navbar on desktop */
    height: auto; /* Maintain aspect ratio */
    max-width: 800px; /* Prevent logos from getting too large */
}

/* Partner Text */
.partner-text {
    max-width: 600px;
    font-size: 1.5em;
    color: black;
    text-align: center;
}

.footer {
    background-color: #102f34; /* Dark background */
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 1.2em;
    margin-top: 40px; /* Space before the footer */
    width: 100%;
    max-width: 100vw; /* Prevents horizontal scrolling */
    box-sizing: border-box; /* Makes sure padding doesn’t add extra width */
    overflow-x: hidden; /* Hides any overflow */
}

.footer-content {
    margin: 0 auto;
}

.partner-link {
    text-align: center; /* Center the link */
    margin-top: 1px; /* Add space between text and link */
}

.partner-link a {
    display: block; /* Make it a block for padding */
    padding: 10px 15px;
    background-color: #2f8735; /* Button color */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.partner-link a:hover {
    background-color: #236927; /* Darker green on hover */
}

.other_partners {
    margin-top: 20px;
    padding-top: 100px;
}

.about-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.about-title img.title-logo {
    max-width: 100%;
    width: 800px;
    height: auto;
    margin: 20px 0;
}

.about-title h1 {
    font-size: 3em;
}

.about-top-row,
.about-bottom-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
}

.about-text,
.about-features,
.about-gif {
    flex: 1;
    min-width: 280px;
}

.about-text p {
    font-size: 1.5em;
    color: black;
    line-height: 1.6;
    text-align: left;
}

.about-features {
    text-align: left;
    font-size: 1.3em;
}

.about-features ul {
    list-style-type: disc;
    padding-left: 20px;
}

.about-gif img {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.download-button-container {
    margin-top: 40px;
    text-align: center;
}

.download-button {
    display: inline-block;
    padding: 20px 40px;
    font-size: 2em;
    background-color: #2f8735;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.download-button:hover {
    background-color: #236927;
    transform: scale(1.05);
}

.about-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.about-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile View */
@media screen and (max-width: 1000px) {
    .team-section {
        flex-direction: column; /* Stack content vertically on mobile */
        text-align: center; /* Center all text */
    }

    .team-text {
        max-width: 90%; /* Allow the text to take up more width on mobile */
        padding-right: 0;
        margin-bottom: 20px;
    }

    .team-image {
        max-width: 100%;  /* Image takes up full width on mobile */
    }

    .members-cards {
        flex-direction: column;
        align-items: center;
    }

    .member-card {
        width: 80%;  /* Card will take up 80% width on mobile */
    }

}
