/************************************************
************** BASIC LAYOUT SYSTEM **************
*************************************************/
@supports (-ms-ime-align: auto) { /* for edge browser */
    body {
        width: 100vw !important;
        overflow-x: hidden;
    }
}

:root {
    /* Fonts */
    --heading-font-family: 'Poppins', 'DM Sans', Sans-Serif;
    --text-font-family: 'DM Sans', Sans-Serif;

    /* Responsive adjustments */
    --page-width:70%;
    --side-padding:calc((100% - var(--page-width)) / 2);
    --hero-vertical-padding-default:10vh;


    /* Colours defined here */
    --theme-color-green: rgb(156, 184, 3); /* rgb(0,150,0);*/
    --theme-color-orange: #ffab1d;
    --theme-color-red:#e33f33;
    --theme-color-blue: #251f64;
    --theme-color-background-blue: #DBF3FC;
    --theme-color-page-background: rgba(250,250,250,1);
    --link-color:green;
    --text-color-gray:rgb(49, 49, 49);
    --text-color-black:rgb(10, 10, 10);
    --article-quote-background-color:rgba(164, 255, 164,0.5);
    --action-background-color:rgba(206, 255, 92, 0.5);
}

* {
    padding:0;
    margin:0;
    box-sizing: border-box;
}

html {
    font-size:16px; /* Base font size */
    scroll-behavior: smooth;
}

body {
    font-family: var(--text-font-family);
    background-color: var(--theme-color-page-background);
}
header, main, footer {
    width:100%;
}

/************************************************
************** MAIN CONTAINERS ******************
*************************************************/
section {
    width:100%;
    padding:10px var(--side-padding);
    margin-bottom: 30px !important;
}
section > * {
    /* border:1px solid blue; */
}

section:first-child { /* Hero Section of Basic Blog Post Height */
    padding-top:calc(var(--hero-vertical-padding-default) + 50px); /* Buffer for navbar */
    padding-bottom:var(--hero-vertical-padding-default);
    margin-bottom:0;
}
section.home {
    min-height: 70vh;
    gap:20px !important;
}

/********************************
********* CONTAINERS ***********
********************************/
.grid {
    width:100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
    grid-auto-rows: auto;
    align-items: center;
}

.flexbox { /* flex-box will be a grid item as well as standalone */
    width:100%;
    height:100%;
    display: flex;
    flex-direction: column;
    gap:10px;
}

.flexbox.left {
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}
.flexbox.right {
    align-items: flex-end;
    justify-content: center;
    text-align: right;
}
.flexbox.center {
    align-items: center;
    justify-content: center;
    text-align: center;
}
.flexbox.topcenter {
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}
.flexbox.wrap {
    flex-wrap: wrap;
}
.flexbox.stretch {
    align-items: stretch !important;
}
.flexbox.row {
    flex-direction: row !important;
}
.flexbox.space-between {
    justify-content: space-between !important;
}
.flexbox.wrap {
    flex-wrap: wrap !important;
}
.bg-image-prepare {
    background-size: cover;      
    background-position: center;
    background-repeat: no-repeat;
    position:relative;
}

/********************************
********* TEXT FORMATTING ***********
********************************/

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font-family);
    line-height: 160%;
    letter-spacing:0.4px;
    word-spacing: 0.8px;
}

p, div, li, span, a, section {
    font-family: var(--text-font-family);
    line-height: 160%;
    font-size: 1.1rem;
    letter-spacing:0.4px;
    word-spacing: 0.8px;
}

p {
    padding:8px 0; /* top-bottom */
}

p.justify {
    text-align: justify;
}

p.heading-subtitle {
    padding-top:0;
    margin-top:-10px;
    color:var(--text-color-gray);
    font-size: 1rem;
}

a {
    text-decoration: none;
    color:var(--link-color);
}

h1 {
    font-size:2.2rem;
}

section > h2.styled {
    color:rgba(20,20,20,0.9);
    font-weight: bolder;
    letter-spacing: 2px;
    text-align: center;
    position: relative;
    display:flex;
    align-items: center;
    justify-content: center;
    width:100%;
}

section > h2.styled::after { /* Section heading line style */
    content:"";
    flex:1;
    margin-left:15px;
    height: 1px;                  /* line thickness */
    background-color: rgba(20,20,20,0.2); /* line color */
}

section > h2.styled::before {  /* Section heading line style */
    content:"";
    flex:1;
    margin-right:15px;
    height: 1px;                  /* line thickness */
    background-color: rgba(20,20,20,0.2); /* line color */
}

/************************************
********** ADDITIONAL ITEMS *********
*************************************/
.welcome-text {
    font-family: 'Courier New', sans-serif;
    color: rgba(40,40,40,0.6);
    font-weight:bold;
    letter-spacing: 2px;
    font-size:1.2rem;
    text-align: left;
}

img.hero-image {
    display: block;
    width:100%;
    max-width: 400px;
    min-width: 250px;
    padding:15px;
}

/* CTA BUTTONS OF DIFFERENT DESIGNS */


/* BUTTONS */
a.button {
    min-width: 100px;
    background-color: white;
    border-radius: 4px;
    color:var(--text-color-black);
    transition: background-color 0.2s ease-in-out;
    text-align: center;
    display: block;
    cursor: pointer;
}
a.button.small {
    padding:5px 20px;
}
a.button.medium {
    padding:8px 15px;
}
a.button.large {
    padding:12px 24px;
}
a.button.orange {
    border:1px solid var(--theme-color-orange);
    background-color: var(--theme-color-orange);
    color:black;
}
a.button.green {
    border:1px solid var(--link-color);
    background-color: var(--link-color);
    color:white;
}
a.button.blue {
    border:1px solid rgb(16, 20, 255);
    background-color: rgb(16, 20, 255);
    color:white;
}

a.button.darkgreen {
    background-color: var(--theme-color-green);
    border:1px solid var(--theme-color-green);
    color:white;
}
a.button.white {
    background-color: lightgray;
    border:1px solid rgb(163, 163, 163);
    color:black
}
a.button.shadow {
    box-shadow: 2px 2px 4px 1px lightgray;
}

a.button:hover {
    filter:brightness(90%);
}

/****************************************************
********* MOVE TO TOP FLOAT BUTTON ******************
****************************************************/
.float-button {
    position: fixed;
    bottom:20px;
    right:20px;
    width:50px;
    height:50px;
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    box-shadow: 0 2px 6px var(--theme-color-blue);
    z-index: 1000;
    background-color: var(--theme-color-orange);
    cursor:pointer;
    transition: display 0.2s ease-in-out;
    opacity: 0.5;
}

/****************************************************
********* BLOG LIST (home.php) **********************
****************************************************/
section.blog-list {
    display: flex;
    flex-direction: column;
    gap:15px;
}
section.blog-list .single-blog-item {
    padding:5px;
    display: flex;
    flex-direction: row;
    gap:10px;
    justify-content: flex-start;
    align-items: center;
    border-radius: 4px;
    border:1px solid lightgray;
}
section.blog-list .single-blog-item img {
    width:150px;
    height:auto;
    display: block;
    aspect-ratio: 1.91 / 1;
    object-fit:contain;
}
section.blog-list .single-blog-item .post-title {
    font-size:1.2rem;
    font-weight: bold;
}
/************************************************
********** HERO & GLOBAL RESPONSIVENESS *********
*************************************************/

/* Ultra large devices */
@media (min-width: 1401px) {
    :root {
        --page-width:60%;
    }
}

/* Modern FullHD laptops & devices */
@media (max-width:1400px) {
    :root {
        --page-width:70%;
    }
}

/* Large Tablets & Old computers */
@media (max-width: 1024px) {
    :root {
        --page-width:85%;
    }
}

/* Small: Normal Mobiles & Tablets */
@media (max-width: 768px) {
    :root {
        --page-width:90%;
    }

    .grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    h1 {
        font-size:1.8rem;
    }
    .hide-on-medium {
        display: none !important;
    }
    .center-on-medium {
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        align-self: center !important;
    }
}

/* Very Small Devices */
@media (max-width:480px) {
    :root {
        --page-width:95%;
    }

    a.button.large {
        padding:6px 12px;
    }
    h1 {
        font-size:1.6rem;
    }
    p.hero-subtitle {
        font-size:1rem;
    }
    .hide-on-small {
        display: none !important;
    }
    .center-on-small {
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        align-self: center !important;
    }
}



