/* Frontpage Styles for Metsa Theme */


body.home .sidebar-nav .sidebar-icon {
    display: none;
}

body.home .sidebar-nav {
    top: 0;
    bottom: 0;
    display: flex;
    align-items: start;
    flex-direction: column;
    justify-content: center;
}

/* Reset and Base */
#frontpage {
    margin: 0;
    padding: 0;
    background: var(--m-white);
}

#frontpage .m-container {
    max-width: 1432px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section-main {
    height: calc(100vh - 64px);
    min-height: 500px;
    overflow: hidden;
    z-index: 999;
    left: 0;
    right: 0;
    background: var(--m-sand-80-t);
    z-index: 999;
    position: relative;
    max-height: 900px;
}

/* Mobile Top Nav - Hidden on desktop */
.hero-mobile-nav {
    display: none;
}

.hero-mobile-menu-btn {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
}

.hero-mobile-menu-btn:focus {
    outline: none;
    border: none;
}

.hero-mobile-menu-btn .hamburger-icon {
    display: block;
}

.hero-mobile-menu-btn .close-icon {
    display: none;
}

.hero-mobile-menu-btn.active .hamburger-icon {
    display: none;
}

.hero-mobile-menu-btn.active .close-icon {
    display: block;
}

.hero-image {
    max-height: 624px;
    position: relative;
    width: 100%;
    height: 100%;
    padding: 80px 32px 0 32px;
}

.hero-image img,
.hero-image video {
    max-height: calc(100vh - 360px);
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Bottom bar with logo and tagline */
.hero-bottom-bar {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 0 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hero-logo-left {
    flex: 0 0 auto;
}

.hero-logo-left .logo-image {
    height: 48px;
    width: 228px;
}

.hero-logo-left .logo-desktop {
    display: block;
}

.hero-logo-left .logo-mobile {
    display: none;
}

.hero-logo-left .site-title {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.4em;
    margin: 0;
    color: var(--m-white);
    text-transform: uppercase;
}

.hero-tagline-right {
    flex: 0 0 auto;
    text-align: right;
    max-width: 500px;

}

.hero-tagline-right p {
    font-weight: 600;
    font-size: 16px;
    line-height: 160%;
    letter-spacing: 0.3em;
    text-align: right;
    text-transform: uppercase;
    color: var(--m-forest);
    margin: 0;
}

/* Journey Section (Teekond Algab) */
.journey-section {
    padding: 80px 32px;
    background: var(--m-pine-80-t);
}


.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.image-column img,
.image-column video {
    width: 100%;
    height: auto;
    display: block;
}

/* Two Worlds Section (Kahe Maailma Vahel) */
.two-worlds-section {
    position: relative;
    padding: 0;
    padding-left: 177px;
    padding-right: 32px;
    padding-top: 80px;
    background: var(--m-sand-80-t);
}

.two-worlds-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.two-worlds-image img,
.two-worlds-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.two-worlds-content {
    background: var(--m-sand-80-t);
    padding: 80px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.two-worlds-title-column {
    position: sticky;
    top: 100px;
}

.two-worlds-title-column h1 {
    margin: 0;
}

.two-worlds-text-column {
    padding-right: 32px;
}


/* Food Section */
.food-section {
    padding: 80px 32px;
    padding-left: 177px;
    background: var(--m-fog-80-t);
}

.food-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.food-images-column {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.food-grid-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

video.food-grid-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.food-text-column {
    padding-top: 0;
    max-width: 449px;
}

.food-text-column h1 {
    color: var(--m-forest);
    font-size: 1.125rem;
    letter-spacing: 0.3em;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 600;
    text-align: left;
}



/* Three Column Section */
.three-column-section {
    margin-top: 0;
    padding: 100px 32px;
    background: var(--m-fog-80-t);
}

.three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

.column:first-child {
    margin-left: 154px;
}

.column img,
.column video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    margin-bottom: 80px;
}

.column p {
    padding: 0;
}

/* Extra Content Section */
.extra-content-section {
    position: relative;
    padding: 0;
    padding-left: 177px;
    padding-right: 32px;
    padding-top: 80px;
    background: var(--m-white);
}

.extra-content-image {
    width: 100%;
    height: 460px;
    overflow: hidden;
}

.extra-content-image img,
.extra-content-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.extra-content-content {
    background: var(--m-white);
    padding: 80px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.extra-content-title-column {
    position: sticky;
    top: 100px;
}

.extra-content-title-column h1 {
    margin: 0;
}

.extra-content-text-column {
    padding-right: 32px;
}

/* Footer Landscape */
.footer-landscape {
    background: var(--m-sand-80-t);
    padding: 80px 32px 40px 177px;
    margin: 0;
}

.landscape-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.landscape-image img,
.landscape-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 900px) {

    /* Hide default mobile menu toggle on frontpage */
    body.home .mobile-menu-toggle:not(.hero-mobile-menu-btn) {
        display: none;
    }

    /* Hero Section Mobile */
    .hero-section-main {
        height: auto;
        min-height: auto;
        padding-top: 72px;
    }

    /* Mobile Top Nav */
    .hero-mobile-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 24px 48px;
        justify-content: space-between;
        align-items: center;
        z-index: 1000000;
        background: transparent;
        pointer-events: none;
    }

    .hero-mobile-nav>* {
        pointer-events: auto;
    }

    .hero-mobile-logo {
        display: flex;
        align-items: center;
    }

    .hero-mobile-logo a {
        display: block;
        line-height: 0;
    }

    .hero-mobile-logo img,
    .hero-mobile-logo svg {
        height: 32px;
        width: auto;
    }

    .hero-mobile-menu-btn .hamburger-icon {
        display: block;
        width: 40px;
        height: 40px;
    }

    .hero-mobile-menu-btn .close-icon {
        display: none;
        width: 40px;
        height: 40px;
    }

    .hero-mobile-menu-btn.active .hamburger-icon {
        display: none !important;
    }

    .hero-mobile-menu-btn.active .close-icon {
        display: block !important;
    }

    .hero-image {
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .hero-image img {
        max-height: 50vh;
        min-height: 300px;
        aspect-ratio: 3 / 4;
        object-fit: cover;
    }

    .hero-bottom-bar {
        position: static;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 40px 32px;
        gap: 24px;
    }

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

    .hero-logo-left .logo-desktop {
        display: none;
    }

    .hero-logo-left .logo-mobile {
        display: block;
        height: 45px;
        width: 168px;
    }

    .hero-logo-left .site-title {
        font-size: 1.2rem;
    }

    .hero-tagline-right {
        text-align: center;
        max-width: 100%;
    }

    .hero-tagline-right p {
        font-size: 14px;
        line-height: 160%;
        letter-spacing: 0.15em;
        text-align: center;
    }

    /* Journey Section Mobile */
    .journey-section {
        padding: 40px 16px;
    }

    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .spacer-column {
        display: none;
    }

    .text-column {
        order: 2;
    }

    .image-column {
        order: 1;
    }

    /* Two Worlds Section Mobile */
    .two-worlds-section {
        padding: 40px 16px;
    }

    .two-worlds-content {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 0;
    }

    .two-worlds-title-column {
        position: static;
    }

    /* Extra Content Section Mobile */
    .extra-content-section {
        padding: 40px 16px;
    }

    .extra-content-content {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 0;
    }

    .extra-content-title-column {
        position: static;
    }

    /* Food Section Mobile */
    .food-section {
        padding: 40px 16px;
    }

    .food-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .food-images-column {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        order: 1;
    }

    .food-text-column {
        order: 2;
    }

    .food-images-column img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        object-fit: cover;
    }

    /* Three Column Activities Mobile */
    .three-column-section {
        padding: 40px 16px;
    }

    .three-columns {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .column:first-child {
        margin-left: 0;
    }

    .column img {
        margin-bottom: 32px;
    }

    /* Footer Landscape Mobile */
    .footer-landscape {
        padding: 40px 16px;
    }

    .landscape-image {
        height: 300px;
    }
}

@media (min-width: 901px) {

    .two-column-layout>*:nth-child(1),
    .two-column-layout>*:nth-child(2) {
        max-width: 449px;
    }

    .three-columns>*:nth-child(1),
    .three-columns>*:nth-child(2) {
        max-width: 449px;
    }
}

#frontpage {
    display: grid;
    grid-template-columns: 1fr;
    grid-row-gap: 16px;
}

/* WYSIWYG content links styling */
.wysiwyg-content a {
    text-decoration: none;
    color: var(--m-forest);
    border-bottom: 1px solid var(--m-forest);
    transition: color 0.3s ease;
}

.wysiwyg-content a:hover {
    color: var(--m-pine);
}

/* External links with button styling */
#frontpage .button-link {
    margin-top: 40px;
}