﻿/* =========================================================
   MALWA AGRITECH
   GLOBAL WEBSITE LAYOUT
   VERSION: 2026
   ========================================================= */


/* =========================================================
   GLOBAL RESET
   ========================================================== */

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}


/* =========================================================
   BODY
   ========================================================== */

body.malwa-site-body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    background: #ffffff;
}


/* =========================================================
   HEADER
   ========================================================== */

/*
    IMPORTANT:

    Do NOT use position: fixed here.

    Sticky keeps the header in normal document flow.
    Therefore the Hero begins directly after it.
*/

#malwaHeaderContainer,
.malwa-header-container {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 99999;
    background: #ffffff;
}


    /* =========================================================
   REMOVE OLD FIXED OFFSET
   ========================================================== */

    #malwaHeaderContainer::before,
    #malwaHeaderContainer::after {
        display: none !important;
    }


/* =========================================================
   MAIN CONTENT
   ========================================================== */

#malwaMainContent,
.malwa-main-content {
    position: relative;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    top: auto !important;
    left: auto !important;
}


    /* =========================================================
   FIRST CONTENT ELEMENT

   Prevent old pages from creating a gap above Hero.
   ========================================================== */

    #malwaMainContent > section:first-child,
    #malwaMainContent > div:first-child,
    #malwaMainContent > article:first-child {
        margin-top: 0 !important;
    }


    /* =========================================================
   HERO
   ========================================================== */

    #malwaMainContent .malwa-hero:first-child,
    #malwaMainContent .malwa-page-hero:first-child,
    #malwaMainContent .malwa-contact-hero:first-child {
        margin-top: 0 !important;
    }


    /* =========================================================
   REMOVE COMMON TEMPLATE SPACING FROM FIRST ELEMENT
   ========================================================== */

    #malwaMainContent > .mt-5:first-child,
    #malwaMainContent > .mt-4:first-child,
    #malwaMainContent > .mt-3:first-child,
    #malwaMainContent > .pt-5:first-child,
    #malwaMainContent > .pt-4:first-child,
    #malwaMainContent > .pt-3:first-child {
        margin-top: 0 !important;
    }


/* =========================================================
   DO NOT ADD HEADER OFFSET

   Old implementations sometimes use:

       padding-top: var(--malwa-header-height);

   or:

       margin-top: var(--malwa-header-height);

   Both create the unwanted gap with sticky header.
   ========================================================== */

#malwaMainContent {
    --malwa-header-height: 0px;
}


/* =========================================================
   HEADER CHILDREN

   Remove accidental top margins from header.
   ========================================================== */

#malwaHeaderContainer > * {
    margin-top: 0 !important;
}


/* =========================================================
   BACK TO TOP
   ========================================================== */

.malwa-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient( 135deg, #116b3a, #0a4f2c );
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    z-index: 99990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
}


    .malwa-back-to-top.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }


    .malwa-back-to-top:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 30px rgba(0,0,0,.25);
    }


/* =========================================================
   MOBILE
   ========================================================== */

@media (max-width: 991.98px) {

    #malwaHeaderContainer,
    .malwa-header-container {
        width: 100% !important;
    }


    #malwaMainContent,
    .malwa-main-content {
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }
}


/* =========================================================
   SMALL DEVICES
   ========================================================== */

@media (max-width: 575.98px) {

    .malwa-back-to-top {
        right: 14px;
        bottom: 14px;
        width: 44px;
        height: 44px;
        font-size: 14px;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto !important;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
