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

/* CSS Variables */
:root {
    --young-serif: "Young Serif", serif;
    --mooli: "Mooli", serif;
    --montes: "Montserrat Alternates", serif;
    --koho: "KoHo", serif;
    --karma: "Karma", serif;
    --kant-pro: "Kantumruy Pro", serif;
    
    /* Color Variables */
    --primary-dark: rgba(16, 24, 40, 1);
    --primary-light: rgba(222, 246, 246, 1);
    --gradient-purple-start: rgba(51, 40, 94, 1);
    --gradient-purple-end: rgba(69, 49, 148, 1);
    --gradient-teal-start: rgba(0, 53, 52, 1);
    --gradient-teal-end: rgba(20, 111, 108, 1);
    --gradient-blue-start: rgba(59, 89, 194, 1);
    --gradient-blue-end: rgba(78, 117, 255, 1);
    --text-light: #f9f9f9;
    --text-dark: #101828;
    --accent-red: #FF6347;
    
    /* Spacing */
    --section-padding: 5rem 0;
    --border-radius: 10px;
    --border-radius-lg: 20px;
}

/* HTML & Body */
html {
    scroll-behavior: smooth;
    font-size: 120%; /* base ~22px */
}

html, body {
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Typography Utility Classes */
.young-serif {
    font-family: var(--young-serif);
}

.mooli-regular {
    font-family: var(--mooli);
}

/* Header */
header {
    background-color: var(--primary-dark);
}

/* Navigation */
nav {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    z-index: 100;
}

#nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    overflow-x: hidden;
    width: 100%;
    background-color: var(--primary-dark);
    z-index: 9999;
    padding: 1rem 2rem;
}

ul {
    font-family: var(--koho);
    font-weight: normal;
    font-size: 24px;
    display: flex;
    gap: 4rem;
    list-style: none;
}

li {
    display: flex;
}

/* Links */
a {
    text-decoration: none;
    color: rgba(255, 255, 255, 1);
    display: flex;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.nav-button {
    border: 1px solid var(--primary-dark);
    transition: all 0.2s ease;
}

.nav-button:hover,
.nav-button:focus {
    border: 1px solid white;
    box-shadow: 0 0.3rem 0.3rem 0 var(--primary-light);
    transform: translateY(-0.3rem);
}

.active-button {
    border: 1px solid white;
    transform: translateY(-0.3rem);
}

/* Language Switcher */
.language-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

#lang-no,
#lang-en {
    color: black;
}

.language-switcher::before {
    content: "";
    width: 1.75rem;
    height: 1.1rem;
    background-size: cover;
    background-repeat: no-repeat;
    margin-right: 0.5rem;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.language-switcher[data-lang="no"]::before {
    background-image: url("../images/Flag_of_Norway.png");
}

.language-switcher[data-lang="en"]::before {
    background-image: url("../images/Flag_of_the_United_Kingdom_(3-5).svg.png");
}

.language-switcher select {
    background: transparent;
    color: #ffffff;
    border: 1px solid var(--primary-dark);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    font: inherit;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s ease;
}

.language-switcher select:hover,
.language-switcher select:focus {
    border: 1px solid white;
    box-shadow: 0 0.3rem 0.3rem 0 var(--primary-light);
    transform: translateY(-0.3rem);
    outline: none;
}

.nav-links {
    font-size: 1.5rem;
    text-decoration: none;
    color: #fff;
}

.header-logo {
    max-width: 7rem;
}

/* Section Titles */
.section-title {
    font-family: var(--young-serif);
    font-size: 5rem;
    margin-bottom: 0;
}

.section-description {
    font-family: var(--karma);
    font-size: 1.5rem;
    max-width: 60rem;
    margin: auto;
}

/* Section Dividers */
.section-divider img {
    display: block;
    line-height: 0;
    width: 100%;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: center;
    padding-top: 10rem;
}

.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 20rem;
    gap: 5rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    width: 100%;
    max-width: 45rem;
    height: auto;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-text-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-left: 8rem;
}

.app-demo-pic {
    max-width: 20rem;
    grid-column: 2;
    grid-row: 1 / 3;
}

.button-container {
    justify-self: center;
    align-self: start;
}

.beta-button {
    padding: 1.1rem 2.4rem;
    background-color: var(--accent-red);
    color: white;
    border-radius: var(--border-radius);
    font-size: 1.35rem;
    font-family: var(--koho);
    letter-spacing: 0.03em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.beta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.title {
    font-family: var(--kant-pro);
    font-size: 3em;
    font-weight: normal;
}

.coming-soon {
    font-family: var(--karma);
    font-size: 2em;
}

.title-text {
    text-align: end;
    margin: 0;
}

.hero-container {
    margin-top: 2rem;
}

/* About Section */
#about-us {
    padding: var(--section-padding);
    background: linear-gradient(to bottom, var(--gradient-purple-start), var(--gradient-purple-end));
}

.about-us-header-wrapper {
    color: white;
    place-self: center;
    text-align: center;
    margin: 0 1rem;
}

.about-content-container {
    display: flex;
    justify-content: center;
    margin: 0 1rem;
    gap: 2rem;
}

.about-us-text-wrapper {
    color: white;
    display: flex;
    gap: 1rem;
    max-width: 35rem;
}

.info-detail-content-wrapper {
    max-width: 20rem;
}

.about-us-number {
    font-size: 10rem;
    font-family: var(--montes);
    font-weight: 700;
}

.about-text-container {
    font-family: var(--kant-pro);
}

.about-text-container > h3 {
    margin-top: 35px;
    font-size: 2.5rem;
}

.about-text-container p {
    font-size: 1.2rem;
}

.learn-more-button {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.learn-more-button > a {
    max-width: 20rem;
}

/* Team Section */
#the-team {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 2rem 1rem 0;
}

.the-team-header-wrapper {
    margin-left: 10rem;
    place-self: start;
    text-align: start;
}

.the-team-header-wrapper > p {
    margin-left: 1rem;
}

#team-members {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5rem;
    margin-top: 3rem;
}

.employee-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.employee-img {
    width: 15rem;
    height: 15rem;
    object-fit: cover;
    overflow: hidden;
    border-radius: 50%;
}

.employee-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 30rem;
    margin-left: 1rem;
    gap: 0.5rem;
}

.employee-text h5,
.employee-text h3,
.employee-text p {
    margin: 0;
}

.employee-text > h5 {
    font-family: var(--karma);
    font-size: 1rem;
}

.employee-text > p {
    font-family: var(--kant-pro);
    font-weight: 500;
}

.employee-text > h3 {
    font-family: var(--kant-pro);
    font-size: 2rem;
    font-weight: 400;
}

/* Blog Section */
#latest-blog {
    background: linear-gradient(to top, var(--gradient-teal-start), var(--gradient-teal-end));
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    color: var(--text-light);
}

.blog-header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    text-align: center;
}

.latest-blog-container {
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 3rem 1rem 0;
}

.latest-blog-container h4 {
    font-family: var(--kant-pro);
    font-weight: 500;
    font-size: 2.7rem;
    text-align: right;
}

.latest-blog-item {
    display: flex;
    gap: 2rem;
    padding: 20px;
    margin-bottom: 6rem;
    border-radius: var(--border-radius-lg);
    background-color: var(--primary-light);
}

.latest-blog-image {
    width: 100%;
    max-width: 400px;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
}

.latest-blog-description {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 600px;
    color: #000;
}

.latest-blog-description h2 {
    font-family: var(--kant-pro);
    font-weight: 500;
    font-size: 1.5rem;
    margin: 0;
}

.latest-blog-date {
    text-align: right;
    font-family: var(--kant-pro);
    font-weight: 600;
    font-size: 0.9rem;
}

.latest-blog-description p {
    margin: 0.5rem 0;
    font-family: var(--karma);
    font-weight: 600;
    line-height: 1.5;
}

.latest-blog-description p a {
    color: #000;
    text-decoration: underline;
    display: inline;
    padding: 0;
}

#read-blog-button {
    padding: 1.1rem 2.4rem;
    background-color: var(--primary-light);
    color: #000;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-family: var(--koho);
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 5rem;
    letter-spacing: 0.03em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#read-blog-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Blog Page */
.blog-page-header {
    padding-top: 4rem;
    color: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.blog-page-header > h1 {
    margin-top: 4rem;
    margin-bottom: 0;
}

.blog-page-header > p {
    text-align: center;
    margin-bottom: 5rem;
}

.blog-feed {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    align-items: center;
    width: min(1200px, 95vw);
    margin: 0 auto 6rem;
}

.blog-item {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 3.8rem;
    width: 100%;
}

.blog-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 22px;
}

.blog-description {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    color: var(--text-dark);
}

.blog-description > h2 {
    font-size: 1.75rem;
    font-family: var(--kant-pro);
    font-weight: 600;
    margin: 0;
}

.blog-info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-info {
    font-family: var(--kant-pro);
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(16, 24, 40, 0.65);
    margin: 0;
}

.blog-description > p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    font-family: var(--karma);
    font-weight: 600;
}

.blog-description p a {
    display: inline;
    font-weight: 800;
    margin: 0;
    padding: 0;
    color: black;
    text-decoration: underline;
}

/* Partners Section */
.partners {
    padding: 50px 20px;
    background-color: #f0f0f0;
}

.partners-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.partner-logo {
    max-width: 150px;
    height: auto;
}

/* Contact Section */
#contact {
    position: relative;
    padding: 50px 20px;
    background-color: var(--text-light);
}

.contact-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6rem;
}

.contact-info {
    border-left: 2px solid #a8a8a8;
    padding-left: 2rem;
}

.contact-info > h2 {
    font-family: var(--mooli);
    font-size: 3rem;
    font-weight: 300;
    margin: 0;
}

.company-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.2rem;
    font-family: var(--koho);
}

.company-details p {
    margin: 0.5rem 0;
}

.company-details i {
    margin-right: 10px;
    color: #000000;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: white;
    text-align: center;
    font-family: var(--koho);
    padding: 10px 0;
}

#copyright {
    font-size: 20px;
}

.social-media {
    margin-bottom: 10px;
}

.social-link {
    color: white;
    margin: 0 10px;
    font-size: 1.5em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: #ddd;
}

/* Hamburger Menu */
.hamburger-parent {
    display: none;
}

.off-screen-menu {
    display: none;
}

/* Responsive Media Queries */
@media (max-width: 1550px) {
    #team-members {
        display: grid;
        grid-template-rows: repeat(4, 1fr);
        grid-template-columns: repeat(4, 1fr);
        place-self: center;
    }

    .employee1 {
        grid-column: 1/4;
        grid-row: 1;
    }

    .employee2 {
        grid-column: 2/5;
        grid-row: 2;
    }

    .employee3 {
        grid-column: 1/4;
        grid-row: 3;
    }

    .employee4 {
        grid-column: 2/5;
        grid-row: 4;
    }
}

@media (max-width: 1500px) {
    /* Logo positioning adjustments removed - keep logo visible */
}

@media (max-width: 1350px) {
    /* Logo positioning adjustments removed - keep logo visible */
}

@media (max-width: 1200px) {
    #team-members {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media (max-width: 1150px) {
    /* Navigation - Hamburger Menu */
    #nav-container {
        display: none;
    }

    .off-screen-menu {
        z-index: 9998;
        height: auto;
        min-height: 400px;
        width: 250px;
        position: fixed;
        right: -300px;
        top: 80px;
        display: flex;
        justify-content: flex-start;
        flex-direction: column;
        font-size: 5rem;
        font-weight: 300;
        transition: 0.3s ease;
        border-radius: 5px 0 0 20px;
        background-color: var(--primary-dark);
        box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
    }

    .off-screen-menu li {
        display: flex;
        list-style: none;
        justify-content: center;
        padding: 0.5rem 0;
    }

    .off-screen-menu.active {
        flex-direction: column;
        justify-content: flex-start;
        right: 0;
        top: 80px;
        z-index: 9998;
    }

    .hamburger-parent {
        padding: 1rem;
        position: fixed;
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
        align-items: center;
        background-color: var(--primary-dark);
        z-index: 9999;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .hamburger-parent img {
        width: 7rem;
        height: auto;
    }

    #hamburger-logo {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger-menu {
        background-color: transparent;
        border: none;
        z-index: 10000;
        cursor: pointer;
        position: relative;
        height: 50px;
        width: 50px;
    }

    .hamburger-menu span {
        z-index: 10001;
        height: 5px;
        width: 100%;
        background-color: white;
        border-radius: 25px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        transition: 0.3s ease;
    }

    .hamburger-menu span:nth-child(1) {
        top: 25%;
    }

    .hamburger-menu span:nth-child(3) {
        top: 75%;
    }

    .hamburger-menu.active span:nth-child(1) {
        top: 50%;
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        top: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    ul {
        flex-direction: column;
        background-color: var(--primary-dark);
        border-radius: 5px 0 0 20px;
        justify-content: center;
        height: auto;
        padding: 2rem 0;
        gap: 1rem;
    }

    li > a {
        border: 1px solid var(--primary-dark);
        width: 100%;
        text-align: center;
    }

    li > a:active {
        border: 1px solid white;
    }

    li > a:hover {
        border: 1px solid white;
    }

    /* Hero Section */
    .hero-content-wrapper {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 3rem;
        grid-template-columns: unset;
    }

    .logo-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .logo {
        margin: 0 auto;
        max-width: 80%;
    }

    .hero-text-container {
        display: flex;
        flex-direction: column;
        margin-left: 0;
        text-align: center;
    }

    .title-text {
        margin-top: 1rem;
        text-align: center;
    }

    .title {
        font-size: 2rem;
    }

    .coming-soon {
        font-size: 2rem;
        margin-top: 0;
    }

    .button-container {
        align-self: center;
    }

    .app-demo-pic {
        max-width: 20rem;
        margin: 0 auto;
    }
}

@media (max-width: 1100px) {
    .the-team-header-wrapper {
        margin-left: 5rem;
    }

    #team-members {
        display: flex;
        flex-direction: column;
        margin-top: 2rem;
    }
}

@media (max-width: 950px) {
    .the-team-header-wrapper {
        margin-left: 2rem;
    }

    .blog-feed {
        width: min(96vw, 900px);
        gap: 4rem;
    }

    .blog-item {
        grid-template-columns: 1fr;
        gap: 2.2rem;
    }

    .blog-image {
        height: 260px;
    }

    .blog-description {
        padding: 0;
    }

    .contact-container {
        flex-direction: column;
    }
}

@media (max-width: 780px) {
    .info-detail-content-wrapper {
        max-width: 40rem;
    }

    #about-us {
        padding: 3rem 0;
    }

    #our-goal::before {
        content: "1. ";
        font-family: var(--montes);
    }

    #what-is-varde::before {
        content: "2. ";
        font-family: var(--montes);
    }

    .about-us-number {
        display: none;
    }

    .about-content-container {
        flex-direction: column;
        align-items: center;
        margin-top: 3rem;
    }

    .about-us-header-wrapper p {
        margin: 0;
    }

    .about-text-container > h3 {
        margin-top: 1rem;
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 120%;
    }

    nav {
        flex-direction: column;
    }

    .latest-blog-item {
        flex-direction: column;
    }

    .latest-blog-date {
        justify-content: flex-start;
    }

    .latest-blog-container > h4 {
        align-self: flex-start;
    }
}

@media (max-width: 750px) {
    .logo {
        max-width: 90%;
    }
}

@media (max-width: 600px) {
    .partners-container {
        flex-direction: column;
        gap: 3rem;
    }
}

@media (max-width: 550px) {
    .logo {
        max-width: 95%;
    }

    .title {
        font-size: 1.5rem;
    }

    .coming-soon {
        font-size: 1.5rem;
    }

    .app-demo-pic {
        max-width: 15rem;
        margin: 0 auto;
    }

    .section-title {
        font-size: 3.5rem;
    }

    .employee-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .employee-text {
        margin-left: 0;
        align-items: center;
    }

    .employee-text > p {
        text-align: left;
    }

    #the-team {
        padding-top: 2rem;
    }

    .the-team-header-wrapper > p {
        font-size: 1.3rem;
    }

    .the-team-header-wrapper {
        margin-left: 0;
    }
}

@media (max-width: 530px) {
    #latest-blog {
        padding: 0;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 110%;
    }

    .hero {
        padding: 30px 10px;
        margin: 5rem 0 0 0;
    }

    .learn-more {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .blog-feed {
        gap: 3rem;
    }

    .blog-item {
        gap: 1.5rem;
    }

    .blog-description h2 {
        font-size: 1.5rem;
    }

    .blog-description p {
        font-size: 0.9em;
    }

    .contact-info h2 {
        font-size: 2em;
    }

    .company-details p {
        font-size: 1rem;
    }

    #contact {
        padding: 50px 1rem 0 1rem;
    }

    iframe {
        max-width: 20rem;
        height: 20rem;
    }
}

@media (max-width: 474px) {
    .about-us-header-wrapper p {
        font-size: 1.2rem;
    }
}

@media (max-width: 375px) {
    .latest-blog-description > h2 {
        font-size: 1.2rem;
    }

    .latest-blog-container > h4 {
        align-self: center;
    }
}

@media (max-width: 340px) {
    .logo {
        max-width: 95%;
    }
}