/*
Theme Name: Green
Theme URI:
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: green
*/


/* =========================================================
   Global Layout
   ========================================================= */

html,
body
{
    height: 100%;
}

.wp-site-blocks
{
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

/* Main content expands between header and footer. */
.wp-site-blocks > main
{
    flex: 1 0 auto;
}

/* Header and footer retain their natural height. */
.wp-site-blocks > header,
.wp-site-blocks > footer
{
    flex: 0 0 auto;
}

/* Prevent unexpected margins on full-width groups. */
.wp-site-blocks .alignfull
{
    margin-left: 0;
    margin-right: 0;
}

/* =========================================================
   Header /  Logo
   ========================================================= */
.hero-log img
{
    display: block;

    width: auto;
    height: 70px;

    max-width: none;

    object-fit: contain;
}

	
.hero-banner.alignfull
{
    margin-left: 0;
    margin-right: 0;
}


.hero-log img
{
    display: block;

    width: auto;
    height: auto;

    object-fit: contain;
}


.logo-tag
{
    margin-top: -20px;
    margin-left: 20px;

    font-size: 20px;
    font-weight: 500;

    white-space: nowrap;
}


.logo-tag2
{
    margin-top: 3px;
    margin-left: 20px;

    font-size: 20px;
    font-weight: 500;

    white-space: nowrap;
}


.logo-text
{
    display: inline;

    white-space: nowrap;
}


/* Sticky header. */
header .wp-block-group
{
    position: sticky;
    top: 0;
    z-index: 50;
}

/* =========================================================
   Primary Menu
   ========================================================= */

.primary-menu
{
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    height: 100%;
    margin-top: -20px;
}
.primary-menu-toggle
{
    display: none;
}

.primary-menu-panel
{
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}


/* Main menu list generated by wp_nav_menu(). */
.primary-menu-list
{
    display: flex;
    flex-wrap: nowrap;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    list-style: none;
    list-style-type: none;
}

/* Top-level menu item. */
.primary-menu-list > li
{
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-menu-list > li::marker
{
    content: "";
}

/* Top-level menu link. */
.primary-menu-list > li > a
{
    display: block;
    padding: 0.25rem 0;
    color: #ffffff;
    font-size: clamp(1.15rem, 1vw + 0.45rem, 1.5rem);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* Top-level hover / focus. */
.primary-menu-list > li > a:hover,
.primary-menu-list > li > a:focus
{
    color: #ffefd5;
    text-decoration: underline;
}

/* Current page. */
.primary-menu-list > li.current-menu-item > a,
.primary-menu-list > li.current_page_item > a
{
    border-bottom: 2px solid #ffffff;
}

.primary-menu-list > li::before
{
    content: none;
}

/* ---------------------------------------------------------
   Menu Dropdowns - Level 2+
   --------------------------------------------------------- */
.primary-menu-list li ul.sub-menu
{
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    display: none;
    min-width: 180px;
    margin: 0;
    padding: 0.5rem 0;
    background: rgba(0, 128, 64, 0.93);
    list-style: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.primary-menu-list li ul.sub-menu li
{
    position: relative;
}

.primary-menu-list li ul.sub-menu li a
{
    display: block;
    padding: 0.35rem 0.75rem;
    color: #ffffff;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
}

.primary-menu-list li ul.sub-menu li a:hover
{
    background: rgba(255, 255, 255, 0.1);
}

/* Show child dropdowns on hover. */
.primary-menu-list li:hover > ul.sub-menu,
.primary-menu-list li li:hover > ul.sub-menu
{
    display: block;
}

/* ---------------------------------------------------------
   Menu Dropdowns - Level 3+
   --------------------------------------------------------- */

.primary-menu-list li ul.sub-menu li ul.sub-menu
{
    top: 0;
    left: 100%;
    background: rgba(120, 180, 120, 0.96);
}

.primary-menu-list li ul.sub-menu li ul.sub-menu li a
{
    padding-left: 1.25rem;
}

/* ---------------------------------------------------------
   Menu Dropdown Arrows
   --------------------------------------------------------- */

.primary-menu-list li.menu-item-has-children > a::after
{
    margin-left: 0.35rem;
    color: #ffffff;
    content: "▼";
    font-size: 0.6rem;
    vertical-align: middle;
}

.primary-menu-list li ul.sub-menu li.menu-item-has-children > a::after
{
    content: "▶";
}

/* =========================================================
   Responsive Primary Menu
   ========================================================= */

/* Desktop: normal menu, no hamburger. */

.primary-menu-toggle
{
    display: none;
}


/* Tablet / mobile: hamburger replaces normal menu. */

@media (max-width: 1120px)
{
    .primary-menu
    {
        position: relative;

        width: 100%;

        margin-top: 0;
    }


    .primary-menu-toggle
    {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 44px;
        height: 44px;

        margin-left: auto;
        padding: 0;

        background: transparent;
        color: #ffffff;

        border: 0;

        cursor: pointer;
    }


    .primary-menu-toggle::before
    {
        content: "☰";

        font-size: 30px;
        line-height: 1;
    }


    .primary-menu-toggle__icon
    {
        display: none;
    }


    .primary-menu-panel
    {
        display: none;

        width: 100%;
    }


    .primary-menu.is-open .primary-menu-panel
    {
        display: block;
    }


    .primary-menu-list
    {
        display: block;

        width: 100%;
        max-width: 100%;

        margin: 0;
        padding: 0;

        background: rgba(0, 100, 59, 0.98);

        list-style: none;
    }


    .primary-menu-list > li
    {
        display: block;

        width: 100%;

        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }


    .primary-menu-list > li > a
    {
        display: block;

        width: 100%;
        box-sizing: border-box;

        padding: 0.75rem 1rem;

        font-size: 1rem;

        white-space: normal;
    }


    .primary-menu-list li ul.sub-menu
    {
        position: static;

        display: none;

        width: 100%;
        min-width: 0;

        margin: 0;
        padding: 0;

        background: rgba(255, 255, 255, 0.08);

        box-shadow: none;
    }


    .primary-menu-list li:hover > ul.sub-menu,
    .primary-menu-list li:focus-within > ul.sub-menu
    {
        display: block;
    }


    .primary-menu-list li ul.sub-menu li a
    {
        padding: 0.65rem 1.5rem;

        font-size: 0.95rem;

        white-space: normal;
    }


    .primary-menu-list li ul.sub-menu li ul.sub-menu
    {
        position: static;

        background: rgba(255, 255, 255, 0.06);
    }


    .primary-menu-list li ul.sub-menu li ul.sub-menu li a
    {
        padding-left: 2rem;
    }


    .primary-menu-list li ul.sub-menu li.menu-item-has-children > a::after
    {
        content: "▼";
    }
}

/* =========================================================
   Page Tabs
   ========================================================= */

.page-tabs-nav
{
    margin-bottom: 1rem;
}

.page-tabs-list
{
    display: flex;
    margin: 0;
    padding: 0;
    gap: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
    list-style: none;
}

.page-tabs-list > li
{
    margin: 0;
}

/* Default tab. */

.page-tabs-list > li > a
{
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: #a7e3ba;
    color: #004020;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}


/* Tab hover / focus. */

.page-tabs-list > li > a:hover,
.page-tabs-list > li > a:focus
{
    background: #4fa870;
    color: #ffffff;
}

/* Current tab. */
.page-tabs-list > li.current-menu-item > a,
.page-tabs-list > li.current_page_item > a
{
    background: #2d7747;
    color: #ffffff;
}

/* =========================================================
   Page Tab Navigation Buttons
   ========================================================= */

.page-tab-nav-bottom
{
    margin-top: 2rem;
}

.page-tab-nav-inner
{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.page-tab-nav-bottom a
{
    display: flex;
    flex: 1 1 10%;
    flex-direction: column;
    padding: 0.75rem 1rem;
    background: rgba(0, 128, 64, 0.15);
    color: #004020;
    border-radius: 8px;
    text-decoration: none;
}

.page-tab-nav-bottom a:hover
{
    background: rgba(0, 128, 64, 0.3);
}

.page-tab-nav-label
{
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    opacity: 0.8;
    text-transform: uppercase;
}

.page-tab-nav-title
{
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Preserve layout when Previous or Next is missing. */
.page-tab-nav-placeholder
{
    flex: 1 1 35%;
}

/* =========================================================
   Page Turner Card
   ========================================================= */

.page-tab-card
{
    position: relative;
    margin: 1.5rem 0 2.5rem;
    padding: 2rem 2rem 3.5rem;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid grey;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-tab-card .page-turn-corner
{
    position: absolute;
    width: 60px;
    height: 60px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* ---------------------------------------------------------
   Next Page Corner
   --------------------------------------------------------- */

.page-tab-card .page-turn-next
{
    right: 0;
    bottom: 0;
}

.page-tab-card .page-turn-next::before
{
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        #ffffff 50%,
        #e0e0e0 50%
    );

    border-top-left-radius: 16px;
    box-shadow: -4px -4px 8px rgba(0, 0, 0, 0.25);
    content: "";
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.page-tab-card .page-turn-next:hover::before
{
    background: linear-gradient
	(
        135deg,
        #ffffff 45%,
        #d0d0d0 55%
    );

    box-shadow: -6px -6px 12px rgba(0, 0, 0, 0.3);
    transform: translate(-4px, -4px);
}

.page-tab-card .page-turn-next::after
{
    position: absolute;
    bottom: 6px;
    left: 8px;
    color: #555555;
    content: "Next \00bb";
    font-size: 11px;
    font-weight: 600;
}

/* ---------------------------------------------------------
   Previous Page Corner
   --------------------------------------------------------- */

.page-tab-card .page-turn-prev
{
    bottom: 0;
    left: 0;
}

.page-tab-card .page-turn-prev::before
{
    position: absolute;
    inset: 0;
    background: linear-gradient
	(
        225deg,
        #ffffff 50%,
        #e0e0e0 50%
    );
    border-top-right-radius: 16px;
    box-shadow: 4px -4px 8px rgba(0, 0, 0, 0.25);
    content: "";
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.page-tab-card .page-turn-prev:hover::before
{
    background: linear-gradient
	(
        225deg,
        #ffffff 45%,
        #d0d0d0 55%
    );
    box-shadow: 6px -6px 12px rgba(0, 0, 0, 0.3);
    transform: translate(4px, -4px);
}

.page-tab-card .page-turn-prev::after
{
    position: absolute;
    right: 8px;
    bottom: 6px;
    color: #555555;
    content: "\00ab Prev";
    font-size: 11px;
    font-weight: 600;
}

.page-tab-card .page-turn-corner.is-hidden
{
    display: none;
}

/* =========================================================
   Image Collage
   ========================================================= */
.pt-collage-box-left
{
    float: left;
    width: 240px;
    margin: 1.5em 1.5rem 1rem 0;
    transform: translateX(30px);
}

.pt-collage-stack
{
    position: relative;
}

.pt-collage-item
{
    margin-bottom: 1.1rem;
    overflow: hidden;
    background: #ffffff;
    border: 4px solid #2d7747;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
    transform-origin: center center;
}

.pt-collage-item img
{
    display: block;
    width: 100%;
    height: auto;
}

/* Individual image angles. */
.pt-collage-item-1
{
    transform: rotate(-3deg) translateX(-4px);
}

.pt-collage-item-2
{
    transform: rotate(2deg) translateX(6px);
}

.pt-collage-item-3
{
    transform: rotate(-1.5deg) translateX(-8px);
}

.pt-collage-item-4
{
    transform: rotate(3deg) translateX(3px);
}

.pt-collage-item-5
{
    transform: rotate(-2.5deg) translateX(5px);
}

.pt-collage-item-6
{
    transform: rotate(1.5deg) translateX(-6px);
}

/* Hide collage before it starts competing with page content. */

@media (max-width: 1450px)
{
    .pt-collage-box-left
    {
        display: none;
     }
}

/*
This rule currently never becomes visible because the collage is
already hidden below 1450px. Retained for now in case the 1450px
behaviour changes later.
*/

@media (max-width: 768px)
{
    .pt-collage-box-left
    {
        float: none;
        width: 80%;
        margin: 0 auto 1.5rem auto;
    }
}

/* =========================================================
   General Text Helpers
   ========================================================= */

.big_bold_text
{
    font-size: 20px;
}

/* =========================================================
   Group Detail
   ========================================================= */

.group-detail
{
    max-width: 800px;
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border: 1px solid #d0d4da;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.group-detail__title
{
    margin-top: 0;
    color: #2d7747;
}

.group-detail__body
{
    margin-top: 0.75rem;
}

/* =========================================================
   Section Banner
   ========================================================= */

.pt-section-banner
{
    width: 90%;
    margin: 2.5rem auto;
    padding: 10px;
    background: #00643b;
    color: #ffffff;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.25);
}

/* =========================================================
   Clauses / Procedures / Appendices
   ========================================================= */

.pt-clause
{
    display: flex;
    align-items: flex-start;
    margin-bottom: 1em;
    font-size: 20px;
}

.pt-clause-number
{
    flex-shrink: 0;
    width: 3em;
}

.pt-clause-text
{
    flex: 1;
}

.pt-subclause
{
    display: flex;
    align-items: flex-start;
    margin-top: 0.5em;
}

.pt-subclause-letter
{
    flex-shrink: 0;
    width: 2em;
}

.pt-subclause-text
{
    flex: 1;
}

.pt-procedure
{
    margin-top: 0.75em;
}

.pt-proc-item
{
    display: flex;
    align-items: flex-start;
    margin-top: 0.35em;
}

.pt-proc-label
{
    flex-shrink: 0;
    width: 3em;
}

.pt-proc-text
{
    flex: 1;
}

.pt-appendix
{
    font-size: 20px;
}

/* =========================================================
   Green Buttons
   ========================================================= */

.green-buttons
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80%;
    margin: 2.5rem auto;
    gap: 1rem;
}

.green-button
{
    display: inline-block;
    padding: 0.7rem 1.4rem;
    background: #8fbc8f;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.green-button:hover,
.green-button:focus
{
    background: #76a876;
    color: #ffffff;
    text-decoration: none;
}

/* Small-screen button layout. */

@media (max-width: 600px)
{
    .green-buttons
    {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        width: 80%;
        gap: 1rem;
    }


    .green-button
    {
        width: 100%;
        box-sizing: border-box;
    }
}