/* === BASIC RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html, body {
    height: 100%;
    background-color: white;
    color: #333;
}

/* === BODY FLEX === */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === HEADER === */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Logo Bar */
.logo-bar {
    display: flex;
    align-items: center;
    padding: 10px 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.logo-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-name .highlight {
    color: #007bff;
}

/* === NAVIGATION MENU === */
.main-nav {
    background-color: #007bff;
    position: relative;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

/* Increased spacing for modern look, smaller font */
.main-nav ul li {
    position: relative;
    margin: 0 40px; /* slightly larger spacing for modern look */
}

.main-nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 15px 0; /* slightly smaller padding for smaller menu font */
    display: block;
    font-weight: 600;
    font-size: 0.9rem; /* slightly smaller font */
    transition: background 0.3s, color 0.3s;
}

.main-nav ul li a:hover {
    background-color: #0056b3;
    border-radius: 5px; /* subtle rounded hover effect */
}

/* === SUBMENU === */
.submenu {
    display: none !important; 	/* hidden by default */
    position: absolute; 	
    top: 100%;
    left: 0;
    background-color: #007bff;
    min-width: 220px; 	/* slightly wider submenu */
    z-index: 1000;
    border-radius: 0 0 5px 5px;
}

.submenu li {
    position: relative;
}

.submenu li a {
    padding: 10px 20px; /* slightly smaller submenu items to match font */
    font-size: 0.9rem;
}

/* show submenu only on hover of parent */
.main-nav ul li:hover > .submenu {
    display: block !important;
}

/* nested submenu appears to the right */
.submenu li:hover > .submenu {
    display: block !important;
    top: 0;
    left: 100%;
    /* *** CRITICAL FIX ADDED HERE *** */
    margin-top: -1px;
    margin-left: -1px;
    /* ******************************* */
    border-radius: 0 5px 5px 0;
}

/* === MAIN CONTENT === */
main {
    flex: 1;
    padding: 40px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Intro section */
.intro h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #007bff;
}

.intro p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* === ARTICLE PAGE === */
h1 {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 20px;
}

article img, img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

p, li {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Use ordered list for steps */
ol.steps {
    margin-left: 20px;
    margin-bottom: 20px;
}

/* === FOOTER === */
footer {
    background-color: #007bff;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    margin-top: auto;
}

/* === RESPONSIVE MENU FOR SMALL SCREENS === */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .submenu, .submenu li:hover > .submenu {
        position: static;
        display: none !important; 	/* keep hidden until clicked */
        border-radius: 0;
    }

    .main-nav ul li a {
        width: 100%;
    }
}

/* Add indentation for ordered list and list items */
ol {
    margin-left: 20px; /* Indentation from the left */
}

ol li {
    margin-left: 20px; /* Indentation between the numbers and text */
}

/* Add indentation for ordered list and list items */
ul {
    margin-left: 20px; /* Indentation from the left */
}

ul li {
    margin-left: 20px; /* Indentation between the numbers and text */
}

/* --- GENERAL HEADER SPACING - Added on 12/6/2025 --- */

/* Largest space for major sections (h2) */
h2 {
  margin-top: 35px;    /* Space above to separate from previous content */
  margin-bottom: 20px; /* Space below to separate from sub-sections or text */
}

/* Medium space for sub-sections (h3) */
h3 {
  margin-top: 25px;    /* Less space above than h2 */
  margin-bottom: 15px; /* Less space below than h2 */
}

/* Smallest space for minor sub-sections (h4) */
h4 {
  margin-top: 15px;    /* Even less space above */
  margin-bottom: 10px; /* Smallest space below before content starts */
}

/* --- CENTER ALIGNING IMAGES - Added on 12/6/2025 --- */
img {
  display: block;  /* 1. Change the image from inline to block */
  margin-left: auto; /* 2. Set the left margin to automatically expand */
  margin-right: auto; /* 3. Set the right margin to automatically expand (centering it) */
}

/* --- AUTHOR NAME AND PUBLISHED DATE - Added on 12/6/2025 --- */
.byline {
  margin-top: 20px;
  margin-bottom: 20px;
}


/* --- INDENTATION FOR PITFALLS - Added on 12/6/2025 --- */
.indented-heading {
  margin-left: 30px; /* Indentation for both h3 and h4 */
  margin-top: 20px;  /* Spacing above for both h3 and h4 */
  color: blue;       /* <--- Add this line to make the text blue */
}