/* HEADERS */

section > header,
.dark-mode section > header {
    background-color: #003c24;
}

section > header h2,
.dark-mode section > header h2 {
    color: #FFF;
}

section > header p {
    color: #FFF;
}

section > header > div {
    padding: 0 2em;
    margin: 0 auto;
    max-width: 640px;
    position: relative;
    top: -6em;
}
.living-better-lives {
    margin-bottom: 2em;
    padding: 2em;
    width: 200px;
    background-color: #003c24;
    border: 4px solid orange;
    border-radius: 50%;
}

/* MENU */

.menu-open .id-navigation {
    background-color: #003c24;
}

.menu-open .id-navigation a:hover, 
.menu-open .id-navigation a:active, 
.menu-open .id-navigation a:focus {
    color: #003c24;
}


/* FRONT PAGE */

main > header.has-image h1 {
    background-color: #003c24;
}

main > header.has-image p {
    background-color: #2D5353;
}

main > header.has-image p a:hover, 
main > header.has-image p a:active, 
main > header.has-image p a:focus {
    color: #2D5353;
}

/* BOXES */

.dark-mode .box {
    background-color: #98cbcb;
}


.teal .box,
.dark-mode .teal .box {
    background-color: #98cbcb;
}

.teal .box *,
.dark-mode .teal .box *,
.teal > header h2,
.dark-mode .teal > header h2 {
    color: #3B4E4C;
}

.teal > header,
.dark-mode .teal > header {
    background-color: #98cbcb;
}

.box {
    background-color: #EEE;
    padding: 2em;
    margin: 4em 0;
}

.box p {
    display: block;
    overflow: hidden;
    padding: 0;
    font-size: 1.6em;
    color: #3B4E4C;
}


.box > p {
    margin: 0;
}

.box:not(.inline) p em {
    display: inline-block;
    font-style: normal;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1.5em;
    line-height: 1.25em;
}

.box.text p em {
    font-size: 1.25em;
}

.box.inline p em {
    display: inline;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-style: normal;
}

.box.icon p,
.box.icon em {
    text-align: center;
}

.box.icon::before {
    content: '';
    display: block;
    width: 30%;
    padding-bottom: 30%;
    margin: 0 auto 2em;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top center;
}

.box.icon.img-three-people::before { background-image: url('../images/icons/img-three-people.svg'); }
.box.icon.img-over-65::before { background-image: url('../images/icons/img-over-65.svg'); }
.box.icon.img-house::before { background-image: url('../images/icons/img-house.svg'); }
.box.icon.img-land::before { background-image: url('../images/icons/img-land.svg'); }
.box.icon.img-people::before { background-image: url('../images/icons/img-people.svg'); }
.box.icon.img-bench::before { background-image: url('../images/icons/img-bench.svg'); }
.box.icon.img-book::before { background-image: url('../images/icons/img-book.svg'); }
.box.icon.img-work::before { background-image: url('../images/icons/img-work.svg'); }
.box.icon.img-family::before { background-image: url('../images/icons/img-family.svg'); }
.box.icon.img-children::before { background-image: url('../images/icons/img-children.svg'); }
.box.icon.img-money::before { background-image: url('../images/icons/img-money.svg'); }
.box.icon.img-higher::before { background-image: url('../images/icons/img-higher.svg'); }
.box.icon.img-lower::before { background-image: url('../images/icons/img-lower.svg'); }


@media all and (min-width: 720px) {

    .box.icon {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .box.icon::before {
        margin: 0 2em 0 0;
        width: 20%;
        padding-bottom: 20%;
    }

    .box.icon > *:first-child {
        width: calc( 80% - 2em );
    }

    .box.icon p,
    .box.icon em {
        text-align: left;
    }

}

.box.image {
    padding: 0;
    min-height: 150px;
}

.box.image p {
    margin: 1.25em;
    display: block;
    width: auto;
}

section > figure {
    text-align: center;
}
.round {
    display: inline-block;
    border-radius: 50%;
    border: 4px solid;
    width: 30%;
}
.orange {
    border-color: orange;
}

.timeline-table { border-collapse: collapse; width: 100%; }
.timeline-table th, .timeline-table td { border: 1px solid #ddd; padding:0; font-size: 12px; text-align: center; vertical-align: middle;}
.timeline-table th { background: #222; color: #fff; }
.contract-col { background: #eee; font-weight: bold; width: 220px; height: 60px; }
.bar { width:8px; height: 18px; border-radius: 8px; display: inline-block; }
.bar.strategy { background: #FFD600; }
.bar.docs { background: #7AC143; }
.bar.procurement { background: #009FE3; }
.bar.mobilisation { background: #F37021; }
.bar.commencement { background: #1A237E; }
.key { margin-top: 24px; }
.key span { display: inline-block; vertical-align: middle; margin-right: 6px; margin-top: 6px; }
.key-label { margin-right: 24px; font-size: 15px; }
.year-header { background: #222; color: #fff; font-weight: bold; }
.month-header { background: #444; color: #fff; width: 20px; }
.w-1 { width: 20px; }
.w-2 { width: 40px; }
.w-3 { width: 60px; }
.w-4 { width: 80px; }
.w-5 { width: 100px; }
.w-6 { width: 120px; }
.w-7 { width: 140px; }
.w-8 { width: 160px; }
.w-9 { width: 180px; }
.w-10 { width: 200px; }
.w-11 { width: 220px; }
.w-12 { width: 240px; }
.w-15 { width: 300px; }

.visually-hidden {display: none;}

/* Purchasing and Contracting Cycle Styles - Grid Layout */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    line-height: 1.4;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    color: #2c5530;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* 4x4 Grid Container */
.grid-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
    min-height: 400px;
}

/* Center Title - Absolutely Positioned */
.center-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background-color: #2c5530;
    color: white;
    padding: 5px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-align: center;
}

.center-title h2 {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1.2;
}

/* Flow Arrows */
.arrow {
    position: absolute;
    font-size: 30px;
    color: #677628;
    z-index: 5;
    font-weight: bold;
}

/* Arrow positioning */
.arrow-right {
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.arrow-down {
    top: 50%;
    right: 25%;
    transform: translate(50%, -50%);
}

.arrow-left {
    bottom: 25%;
    left: 50%;
    transform: translate(-50%, 50%);
    color: #d2d5b4;
}

.arrow-up {
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    color: #d2d5b4;
}

/* Grid Items */
.grid-item {
    padding: 20px;
    border-radius: 15px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
    min-height: 180px;
}

.grid-item h3 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
}

.main-desc {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.detail-desc {
    font-size: 12px;
    line-height: 1.3;
    opacity: 0.9;
    text-transform: uppercase;
    font-weight: normal;
}

/* Individual Section Colors */
.analyse {
    background: #677628;
    grid-row: 1;
    grid-column: 1;
}

.plan {
    background: #677628;
    grid-row: 1;
    grid-column: 2;
}

.do {
    background: #d2d5b4;
    color: #2c5530;
    grid-row: 2;
    grid-column: 2;
}

.review {
    background: #d2d5b4;
    color: #2c5530;
    grid-row: 2;
    grid-column: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .grid-container {
        max-width: 400px;
        gap: 15px;
        min-height: 300px;
    }
    
    .center-title {
        padding: 15px;
    }
    
    .center-title h2 {
        font-size: 14px;
    }
    
    .arrow {
        font-size: 18px;
    }
    
    .grid-item {
        padding: 15px;
        min-height: 140px;
    }
    
    .grid-item h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .main-desc {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .detail-desc {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        max-width: 320px;
        gap: 10px;
        min-height: 250px;
    }
    
    .center-title {
        padding: 12px;
    }
    
    .center-title h2 {
        font-size: 12px;
    }
    
    .arrow {
        font-size: 16px;
    }
    
    .grid-item {
        padding: 12px;
        min-height: 110px;
    }
    
    .grid-item h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .main-desc {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .detail-desc {
        font-size: 9px;
    }
}

/* Core Principles Grid Styles */

.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
    background: url('../images/spider-diagram-bg.png') no-repeat center center;
    background-size: 70%;
}

.principle-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.principle-circle {
    width: 140px;
    height: 140px;
    background: #e9a522;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #142C17;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.2;
    padding: 15px;
    transition: all 0.3s ease;
}

.core-circle {
    width: 160px;
    height: 160px;
    background: #2c5530;;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
}

.core-text {
    color: #e6a839;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 1px;
}

.central {
    grid-column: 2;
    grid-row: 2;
}


/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2em;
        margin-bottom: 30px;
    }
    
    .principles-grid {
        gap: 15px;
        max-width: 500px;
    }
    
    .principle-item {
        min-height: 120px;
    }
    
    .principle-circle {
        width: 110px;
        height: 110px;
        font-size: 12px;
        padding: 12px;
    }
    
    .core-circle {
        width: 130px;
        height: 130px;
    }
    
    .core-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .principles-grid {
        gap: 10px;
        max-width: 350px;
    }
    
    .principle-item {
        min-height: 100px;
    }
    
    .principle-circle {
        width: 90px;
        height: 90px;
        font-size: 10px;
        padding: 8px;
    }
        
    .core-circle {
        width: 100px;
        height: 100px;
    }
    
    .core-text {
        font-size: 12px;
    }
}