/*
 * Started : 18-NOV-2025
 * Updated : 14-JAN-2026
 */

/*
 * This stylesheet accompanies: Building a static website (part 11) blog post.
 */

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

body
{
   color: black;
   font-family: "Noto Sans", "Oxygen-Sans", Ubuntu, Roboto, Helvetica, Arial, sans-serif;
}

@media (min-width: 1200px)
{
   .grid_container
   {
      display: grid;
      grid-template-columns: 200px minmax(800px, auto) 200px;
      grid-template-areas:
         "header header header"
         "left-sidebar article right-sidebar"
         "footer footer footer";
   }
}

header
{
   grid-area: header;
}

.left_sidebar
{
   grid-area: left-sidebar;
   background-color: palegoldenrod;
}

article
{
   grid-area: article;
}

.right_sidebar
{
   grid-area: right-sidebar;
   background-color: powderblue;
}

footer
{
   grid-area: footer;
}

/* If the browser window is narrower than the intrinsic size of an image,
 * display it at 100% of the viewport, until that becomes wider than the intrinsic size of the image.
 * The setting of "display: block;" and "margin: 0 auto;" centres all images within <article> … </article>
 */
article img
{
   max-inline-size: 100%;
}

code
{
   background: lightgrey;
}

/* Style code blocks and include a scrollable area if lines are too long. */
pre.code_block
{
   background-color: lightgrey;
   border: thin solid black;
   overflow: auto;
}

/*
 * Styles for the table of contents section.
 */
ol.contents_tab ul li
{
   list-style-type: none;
}

ol.contents_tab ul
{
   margin-block-end: 0;
}

ol.contents_tab
{
   margin-block-end: 0;
}

ol.contents_tab a:visited { text-decoration: none; }
ol.contents_tab a:active { text-decoration: none; }

/*
 * CSS for the top navigation menu.
 * We set the list not to display any visible bullets and reduce the
 * margin and padding 20 pixels.
 * The list element is set to display mode "inline", which means
 * the items in the list will appear next to each other.
 * We also set the width of the icon graphic to be 40 pixels.
 */
nav ul
{
   list-style-type: none;
   margin: 0;
   padding: 0;
}

nav li
{
   display: inline;
}

nav img
{
   width: 40px;
}

header
{
   background-color: #052962;
   height: 100px;
}

footer
{
   background-color: #052962;
   color: white; /* Make sure the text is visible against the background. */
}

/*
 * CSS to style the "published" section, which displays a small
 * calendar icon and the published and updated dates.
 * We simply set the height of the IMG element (which is the calendar icon)
 * to "1em", to match the font size.
 * Note the "display: inline;" is required because of the CSS used to centre images.
 */
.published img
{
   height: 1em;
   display: inline;
}

h1, h2, h3, h4
{
   font-family: "Noto Serif", "Times New Roman", Georgia, serif;
}

h1
{
   color: #1b0d9f;
   font-size: 3.0rem;
	line-height: 110%;
   margin-block-end: 25px;
}

h2
{
   font-size: 2.5rem;
   margin-block-end: 20px;
}

h3
{
   font-size: 2.0rem;
   margin-block-end: 20px;
}

h4
{
   font-size: 1.6rem;
   margin-block-end: 20px;
}

p, pre, hr, ul, ol, table, details
{
   margin-block-end: 20px;
}

ul, ol
{
   padding-inline-start: 20px;
}

/*
 * Default table style.
 */
table thead tr
{
	background-color: lightgrey;
   border: 1px solid #ffff;
}

table, th, td
{
   border: 1px solid black;
   border-collapse: collapse;
}

.normal_flow1
{
   border: 1px solid black;
}

.normal_flow2
{
   border: 1px solid black;
   font-size: 0;
}

.grid1
{
   display: grid;
   grid-template-columns: 1fr 1fr 1fr;
   border: 1px solid red;
}

.grid_gap
{
   display: grid;
   grid-template-columns: auto auto;
   justify-content: start;
   gap: 10px 15px; /* row gap, column gap */
   border: 1px solid red;
}

.page_layout
{
   display: grid;
   grid-template-columns: repeat(5, 1fr);
   grid-template-rows: repeat(3, 200px);
   border: 1px solid red;
   font-family: "Liberation Sans", Arial, sans-serif;
   font-size: 3rem;
   text-align: center;
}

.header_area
{
   background: #ff9966;
   grid-column: 1 / 5;
   grid-row: 1;
}

.aside
{
   background: #33cc66;
   grid-column: 1;
   grid-row: 2;
}

.content_area
{
   background: #198a8a;
   grid-column: 2 / 5;
   grid-row: 2;
}

.footer_area
{
   background: #cccc00;
   grid-column: 1 / 5;
   grid-row: 3;
}

.sidebar
{
   background: #ff6633;
   grid-column: 5;
   grid-row: 1 / 4;
}

.page_layout div
{
   display: flex;
   justify-content: center;
   align-items: center;
}

.page_layout p
{
   margin: 0;
}
