@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Carattere&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

:root {
    --main-elemenet-color: rgba(255, 255, 255, 0.7);
    --main-text-color: rgb(0, 0, 0);
    --main-background-color: rgb(250, 250, 250);
    --footer-text-color: rgb(16, 16, 16);
    --navbar-highlight-color: rgba(234, 234, 234, 0.3);
    --border-color: rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background-color: var(--main-background-color);
}

main {
    color: var(--main-text-color);
}

header ul {
    padding-left: 1rem;
}

h1 {
    font-weight: 700;
}

.header-with-padding {
    padding-left: 3rem;
    padding-right: 3rem;
    padding-top: 6rem;
    padding-bottom: 2rem;
    color: var(--main-text-color);
}

.header-without-padding {
    padding: 0;
    color: rgb(255, 255, 255);
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    color: var(--footer-text-color);
}

footer section img {
    width: 130px;
}

footer section {
    font-weight: 300;
}

time,
address {
    white-space: pre-line;
    font-style: normal;
}

a,
a:visited,
a:active {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: rgb(193, 160, 160);
}

.logo {
    position: fixed;
    top: 0.8rem;
    left: 2rem;
    z-index: 1000;
}

.logo a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--main-text-color);
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.cursive {
    font-family: "Carattere", cursive;
}

#navbar-burgericon {
    position: fixed;
    top: 0.8rem;
    right: 2rem;
    width: 24px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1000;
}

.burger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--main-text-color);
    transition: all 0.5s ease-in-out;
    border-radius: 2px;
}

#navbar-burgericon.active .burger-bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

#navbar-burgericon.active .burger-bar:nth-child(2) {
    opacity: 0;
}

#navbar-burgericon.active .burger-bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--main-elemenet-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s ease-in-out;
    z-index: 999;
}

.fullscreen-menu.active {
    visibility: visible;
    opacity: 1;
}

.menu-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-content ul li {
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-in-out;
}

.fullscreen-menu.active .menu-content ul li {
    opacity: 1;
    transform: translateY(0);
}

.menu-content ul li a {
    font-size: 2rem;
    color: var(--main-text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.fullscreen-menu.active .menu-content ul li:nth-child(1) {
    transition-delay: 0.2s;
}
.fullscreen-menu.active .menu-content ul li:nth-child(2) {
    transition-delay: 0.3s;
}
.fullscreen-menu.active .menu-content ul li:nth-child(3) {
    transition-delay: 0.4s;
}
.fullscreen-menu.active .menu-content ul li:nth-child(4) {
    transition-delay: 0.5s;
}
.fullscreen-menu.active .menu-content ul li:nth-child(5) {
    transition-delay: 0.6s;
}
.fullscreen-menu.active .menu-content ul li:nth-child(6) {
    transition-delay: 0.7s;
}

#p35-rounded {
    border-radius: 15px;
    padding-left: 5px;
}

.betty {
    width: 200px;
    position: absolute;
    transform-origin: bottom center;
    transition: transform 0.1s linear;
    bottom: 300px; /* Decreased from 450px to move Betty lower */
    left: 50px;
    z-index: 2;
}

.bettysmall {
    width: 40px;
    position: absolute;
    transform-origin: bottom center;
    transition: transform 0.05s ease-out;
    bottom: 400px; /* Position at grass height */
    left: 0;
    z-index: 2;
    will-change: transform;
}

.main-container {
    padding: 0;
    position: relative;
    min-height: 100vh; /* Ensure minimum height */
    overflow: hidden;
}

.section-flex-container {
    display: flex;
    padding-bottom: 4rem;
}

.section-flex-container figure {
    flex: 0.7;
    border-style: solid;
    border-width: 1px;
    border-radius: 15px;
    border-color: var(--border-color);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.07);
    margin: 0.5rem;
}

.section-flex-container figure img {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    object-fit: cover;
}

.section-flex-container figure figcaption {
    position: relative;
    left: 5px;
    top: 2px;
    font-size: 0.8rem;
}

.section-flex-text {
    flex: 1;
    padding: 2rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    margin: 10px;
    opacity: 0;
    transform: translateY(20px);
    animation: sectionFadeIn 0.8s ease-out forwards;
}

@keyframes sectionFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-flex-text h2 {
    margin-top: 0;
    color: var(--main-text-color);
    font-weight: 800;
}

.section-flex-text p {
    color: var(--main-text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.section-flex-text:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

@media (max-width: 710px) {
    footer section img {
        display: none;
    }

    .text-white {
        color: rgb(161, 23, 23);
        font-size: 2vw;
    }

    #navbar-burgericon {
        display: flex;
    }

    .navbar-container {
        flex-direction: column;
        height: auto;
        width: 90%;
    }

    .navbar-container::before {
        content: "";
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 50px;
        width: 100%;
    }

    #navbar-burgericon {
        display: flex;
        position: fixed;
        top: 1.25rem;
        right: 2rem;
    }

    .navbar-buttons {
        width: 100%;
        display: none;
    }

    .navbar-buttons ul {
        flex-direction: column;
    }

    .navbar-buttons ul li {
        text-align: center;
    }

    .navbar-buttons.active {
        display: block;
        margin-top: 50px;
    }

    .current-actvie-tab {
        background-color: rgba(0, 0, 0, 0);
    }

    .section-flex-container {
        flex-direction: column;
        max-height: 100%;
        padding-bottom: 50px;
    }

    .section-flex-container figure {
        max-height: 100%;
        display: flex;
        flex-direction: column;
    }

    .letter-container,
    .future-timeline {
        padding: 1rem;
        padding-bottom: 6rem; /* Add padding on mobile too */
    }
}

.main-page-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    filter: brightness(30%);
    padding-bottom: 4rem;
}

.main-page-header-text {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 8rem;
    padding-left: 3rem;
    padding-right: 3rem;
}

.tekst-bilde-link a {
    color: var(--main-text-color);
    text-decoration: none;
    font-size: 20px;
}

.bilde-link {
    min-width: 100%;
    max-height: 170px;
    object-fit: cover;
}

.bilde-link-bakgrunn {
    height: 250px;
    background-color: var(--main-elemenet-color);
    transition: transform 0.3s;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-color: var(--border-color);
    border-width: 1px;
    border-style: solid;
}

.tekst-bilde-link {
    text-align: center;
    padding: 20px;
}

.bilde-link-bakgrunn:hover {
    transform: scale(1.05);
}

.container-item-slim {
    flex: 0.4;
    padding-left: 1rem;
    padding-right: 1rem;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    padding: 2rem;
}

.memory-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.memory-card:hover {
    transform: translateY(-10px);
}

.memory-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.memory-card p {
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
}

.reasons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

@media (min-width: 711px) {
    .reasons-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    /* Center last row when it has fewer items */
    .reasons-container::after {
        content: "";
        grid-column: span 3;
    }

    .reason-card:last-child:nth-child(3n-1) {
        grid-column-end: -2;
    }

    .reason-card:last-child:nth-child(3n-2) {
        grid-column-end: -3;
    }
}

.reason-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
    z-index: -2;
}

.reason-card h2 {
    color: var(--main-text-color);
    margin-bottom: 1rem;
}

.future-timeline {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.dream-list {
    list-style: none;
    padding: 0;
}

.dream-list li {
    margin: 1rem 0;
    font-size: 1.2rem;
}

.letter-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0rem;
    padding-bottom: 6rem; /* Add padding to prevent footer overlap */
}

.love-letter {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.love-letter p {
    margin-bottom: 1.5rem;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 710px) {
    .memory-grid,
    .reasons-container {
        grid-template-columns: 1fr;
        padding: 0.5rem;
    }

    .letter-container,
    .future-timeline {
        padding: 1rem;
        padding-bottom: 6rem; /* Add padding on mobile too */
    }

    .love-letter {
        padding: 1.5rem;
    }
}

.nav-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--main-background-color);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 999;
    pointer-events: none;
}

.logo {
    position: fixed;
    top: 0.8rem;
    left: 2rem;
    z-index: 1000;
}

#navbar-burgericon {
    position: fixed;
    top: 0.8rem;
    right: 2rem;
    width: 24px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1000;
}

.spacer {
    height: 200px;
    width: 100%;
}

.memory-text {
    text-align: center;
    padding-bottom: 2rem;
    margin-top: 10px;
}

.cat {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    padding: 0;
    margin: 0;
}

.scooter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.scooter-item {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease-out,
        transform 0.6s ease-out;
    aspect-ratio: 1;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.scooter-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.scooter-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.scooter-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .scooter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .scooter-grid {
        grid-template-columns: 1fr;
    }
}

.image-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.image-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-card h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
}

.image-card img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.image-card img:hover {
    transform: translateY(-5px);
}

.falling-heart {
    position: fixed;
    top: -20px;
    z-index: -3;
    pointer-events: none;
    animation: fall 4s linear forwards;
    opacity: 1;
}

@keyframes fall {
    0% {
        transform: translateY(0vh);
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

#password-protection {
    text-align: center;
    padding: 2rem;
}

#password-form {
    max-width: 400px;
    margin: 0 auto;
}

#password-form input {
    display: block;
    width: 100%;
    padding: 0.5rem;
    margin: 1rem 0;
    border: 2px solid pink;
    border-radius: 4px;
}

#password-form button {
    background-color: #ff69b4;
    color: white;
    padding: 0.5rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#password-form button:hover {
    background-color: pink;
}

.grass-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    z-index: 1;
    overflow: hidden;
}

.grass-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Prevents inline image gaps */
}
