/* ===============  RESET + BASE STYLES  ================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: clamp(12px, 1vw + 0.5rem, 16px);
  font-weight: 500;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  font-family: Georgia, serif;
  line-height: 1.2;
  color: #000;
  background-color: #FBFBFB;
  letter-spacing: 0.4px;
}

.article {font-size: 10px; margin:0; display: block;}

/* Links */
a {
  color: #000099;
  text-decoration: none;
  font-style: italic;
}
a:hover { text-decoration: underline; }

.a2 { color: #00AAFF !important; }

.dark1{
    background-color: #233B66 !important;
    color: #eeeeee;
    font-size: 1.1rem;
    pointer-events: none;
}
.dark2{
    background-color: #DDDDDD;
    color: #004040;
    font-size: 0.9rem;
    pointer-events: none;
}

/* ===============   TYPOGRAPHY SYSTEM   =============== */
:root {
  --font-xs: 0.8rem;
  --font-sm: 0.9rem;
  --font-md: 1rem;
  --font-lg: 1.1rem;
  --font-xl: 1.25rem;
  --font-h1: clamp(0.1rem, 1.1vw + 0.5rem, 1.4rem);
  --font-h2: clamp(0.9rem, 1.1vw + 0.5rem, 1.3rem);
  --font-h3: clamp(0.86rem, 1.1vw + 0.5rem, 1.2rem);
  --font-h5: clamp(0.84rem, 1.1vw, 1.1rem);
  --font-h6: clamp(0.8rem, 1vw, 0.95rem);
  --mrgn_cnt_sec:65px;
  --primary: #000099;
  --colr2nd: #00AAFF;
  --bg-colr: #FBFBFB;
}

.font-xs { font-size: var(--font-xs); }
.font-sm { font-size: var(--font-sm); }
.font-md { font-size: var(--font-md); }
.font-lg { font-size: var(--font-lg); }
.font-xl { font-size: var(--font-xl); }

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, serif;
  color: var(--primary);

}

h1 {
  font-size: var(--font-h1);
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
}
h2 {
  font-size: var(--font-h2);
  /* text-align: center; */
  margin-top: 0.8rem;
  font-style: italic;
}
h3 {
  font-size: var(--font-h3);
  margin-top: 0.6rem;
  font-style: italic;
  /* text-align: center; */
}
/* .seo_search h3, .seo_search h1{
    text-align: start;
} */
h5 {
  font-size: var(--font-h5);
  text-underline-offset: 4px;
  margin: 0.5rem;
  letter-spacing: 1px;
}
h6 {
  font-size: var(--font-h6);
  margin: 0.5rem;
}

.subheads {
  display:flex;
  flex-direction: row;
  flex-wrap: wrap;          /* Allow items to wrap into multiple lines */
  justify-content: center;   
  font-size: var(--font-h5);
  font-weight: bold;
  text-underline-offset: 4px;
  margin: 0.5rem;
  letter-spacing: 1px;
  white-space: pre-wrap;
  text-align: center !important;
}
/* ===============   GRID CONTAINER LAYOUT   ================ */
.container {
  display: grid;
  grid-template-rows: 75px auto auto auto;
  grid-template-columns: 100%;
  grid-template-areas:
    "main-header"
    "main-body"
    "main-bottom-ad"
    "main-footer";
  /* gap: 0.5rem; */
}

/* Define areas */
.main-header  { grid-area: main-header; }
.main-body    { grid-area: main-body;}
.main-bottom-ad { grid-area: main-bottom-ad; }
.main-footer  { grid-area: main-footer; }
.left-body    { grid-area: left-body; }
.right-body   { grid-area: right-body; }

.main-body {
  position: relative; /* Make it the reference for absolute positioning */
}

.main-bottom-ad {
  display: grid;
  margin: 0.25rem;
  grid-template-rows: repeat(6,minmax(0, 1fr));
  gap: 0.4rem;
}

/* ===== Default: Mobile ≤700px ===== */
@media (max-width: 700px) {
  .container {
    grid-template-rows: auto auto auto auto;
    grid-template-columns: 100%;
    grid-template-areas:
      "main-header"
      "main-body"
      "main-bottom-ad"
      "main-footer";
  }

  .left-body, .right-body { display: none; }

  /* ----- Main header responsive layout ----- */
  .main-header {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 44px auto; /* top row + slogan row */
    grid-template-areas:
      "logo pushpin right-block"
      "slogan slogan slogan";
    align-items: center;
    /* justify-content: space-between; */
    height: auto !important;
  }

  /* --- Assign each child to its grid area --- */
  .main-header .logo {
    grid-area: logo;
    justify-self: start;
  }

  .main-header .pushpin {
    grid-area: pushpin;
    justify-self: center;
  }

  .main-header .right-block {
    grid-area: right-block;
    justify-self: end;
    align-items: end;
  }
  .main-header .slogan {
    grid-area: slogan;
    width:100%;
    /* height:fit-content; */
    padding:5px 0;
    justify-items: center;
    text-align: center;
    background-color: #F6F6F6;
    font-size: clamp(0.9rem, 2vw, 1rem);
    white-space: normal; /* allows wrapping if needed */
  }
  .slogan-menu{padding-top: 6px;}
  
  /* Bottom ads grid: 2 columns × 6 rows */
  /* .main-bottom-ad {
    display: grid;
    margin: 0.25rem;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, auto);
    gap: 0.4rem;
  } */
}

/* ===== Tablet 701–1000px ===== */
@media (min-width: 701px) and (max-width: 1100px) {
  .container {
    grid-template-columns: 5fr 2fr;
    grid-template-areas:
      "main-header right-body"
      "main-body right-body"
      "main-bottom-ad right-body"
      "main-footer right-body";
  }

  .left-body { display: none; }
  .right-body { display: block; }

  /* Bottom ads: 3 columns × 6 rows */
  /* .main-bottom-ad {
    display: grid;
    margin: 0.25rem;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(6, auto);
    gap: 0.5rem;
  } */
}

/* ===== Desktop ≥1001px ===== */
@media (min-width: 1101px) {
  .container {
    grid-template-columns: 1fr 4fr 1fr;
    grid-template-areas:
      "left-body main-header right-body"
      "left-body main-body right-body"
      "left-body main-bottom-ad right-body"
      "left-body main-footer right-body";
  }

  .left-body, .right-body { display: block; }

  /* Bottom ads: 4 columns × 7 rows */
  /* .main-bottom-ad {
    display: grid;
    margin: 0.25rem;
    height:200px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(7, auto);
    /* gap: 1rem; 
  } */
}

/* ===============   HEADER   ============== */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  background-color: #FBFBFB;
  height: 4.2rem; /* 70px */
  border-radius: 5px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-header .logo {
  height: 3.4rem; /* 55px */
  width: auto;
}
.main-header .pushpin {
  height: 1.5rem;
  width: 1.5rem;
}
.main-header .slogan {
  display: flex;
  flex-direction: column;       /* stack children vertically */
  justify-content: space-between; /* push first child to top, last child to bottom */

  flex: 1;
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  /* margin: 0 0.63rem; */
  white-space: nowrap;
  height:100%;
  align-self: start;
  /* justify-items: center; */
  text-align: center;
  background-color: #FBFBFB;
  /* overflow: hidden; */
  text-overflow: ellipsis;
}
.main-header .right-block {
  display: flex;
  min-width:8rem;
  flex-direction: column;
  align-items: flex-end;
  /* margin-top: 7px;
  justify-content: flex-start; */
}
.main-header .welcome {
  font-size: clamp(0.9rem, 1vw, 1rem);
  margin-bottom: 2px;
  white-space: nowrap;
}
.main-header .menu-icon { height: 1.6rem; width: 1.6rem; }
.main-header .Q-icon { height: 1.1rem; width: 1.1rem; }

.scroll_margin{
  scroll-margin-top: 4.2rem;
}
/* ===============   FOOTER   =============== */
.main-footer .copyright {
  background-color: var(--primary);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 2.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 0.25rem;
  padding: 2px;
}

/* =========   Menu settings   ========= */
/* keyboard accessibility: focus outline for menu links */
.subheads a.active-nav{
  color:#00AAFF;
}

.right-block a,
.swift-block a,
.dropdown a {
  outline: none;
}
.right-block a:focus,
.swift-block a:focus,
.dropdown a:focus{
  outline: 3px solid rgba(0, 85, 204, 0.25);
  outline-offset: 2px;
  border-radius: 4px;
}
.right-block ul, 
.swift-block ul{
    list-style-type: none;
    margin: 0;
    padding-top: 5px;
    gap: 3px;        
}
.right-block > ul > li,
.slogan-menu > ul > li{
    display: inline-block;
}
.right-block li,
.swift-block li{
    margin: 0;
    padding: 2px;
}
.swift-block li .help{
  color:var(--bg-colr)}

.dropdown{
    display: none;
    padding: 5px 0;
    text-align:left;
}

.dropdown a{
    background-color: var(--primary);
    color:whitesmoke;    
}

.dropdown li {
    display: block;
    margin: 0;
    padding: 2px 10px;
}

.dropup{
    display: none;
    position: absolute;
    background-color: var(--colr2nd);
    color: var(--primary);
    border-radius: 5px;
    width:fit-content;
    height:fit-content;
    margin: -3.5rem 0 0 -1rem;
    font-size: 0.7rem;
    text-wrap: none;
    font-weight: bold;
    padding: 0 4px;
}
.right-block ul li:hover .dropup{
    display: block;
}

.right-block ul li:hover .dropdown,
.swift-block ul li:hover .dropdown,
.slogan-menu ul li:hover .dropdown{
    display: block;
    position: absolute;
    background-color: var(--primary);
    color:whitesmoke;
    border-radius: 5px;
    width:fit-content;
    justify-content:flex-start;
}

.right-block ul li:hover .dropdown{
    margin: -1px 0 0 -55px;
}
.swift-block ul li:hover .dropdown{
    margin: -1px 0 0 -35px;
}
.slogan-menu ul li:hover .dropdown{
    margin: -1px 0 0 -25px;
}

/* Quick Links */
#quicklinks {
  background-color: whitesmoke;
  color: var(--primary);
  scroll-margin-top: 100px;
}
.ql_grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, auto);
  /* gap: 0.3rem; */
  /* padding: 1rem; */
}
.ql_head {
  grid-row: 1;
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: bold;
}
.ql_col1,.ql_col2,.ql_col3,.ql_col4,.ql_col5{
    grid-row: 2;
    font-size: 1rem;
    justify-self: center;}

.ql_bottom {
  grid-row: 3;
  grid-column: 1 / -1;
  text-align: center;
  /* width:100%; */
  font-size: 1.1rem;
  font-weight: bold;
  margin: 1rem 0;
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 4px;
  color: var(--primary);
}
.ql_grid ul{
    margin:7px 0 7px 0;
    font-weight: bold;
}
.ql_grid ul li{
    margin-top:7px;
    font-weight: normal;
}
@media (max-width: 700px) {
  .ql_grid {display: grid;  grid-template-columns: 1fr 1fr;}
  .ql_head {grid-row: 1;grid-column: 1 / -1;}
  .ql_col1{grid-row: 2;grid-column:1;}
  .ql_col2{grid-row: 2;grid-column:2;}
  .ql_col3{grid-row: 3;grid-column:1;}
  .ql_col4{grid-row: 3;grid-column:2;}
  .ql_col5{grid-row: 4;grid-column:1;}
  .ql_col1,.ql_col2,.ql_col3,.ql_col4,.ql_col5{justify-self: center;width:70%}
  .ql_bottom {grid-row: 5;grid-column: 1 / -1;font-weight: normal; width:110%;justify-self: center;}
}

/* ==============================
   CARDS / BUTTONS
============================== */
.card {
  margin: 0.25rem;
  border: 0.5px solid gray;
  border-radius: 8px;
  padding: 1.25rem;
  background: #fff;
  transition: all 0.3s ease;
}
.searresult.card:hover,
.card:hover {
  background-color: #F6F6F6;
  border-color: #00AAFF #00AAFF #000099 #000099;
  border-width: 2px;
  /* color: var(--primary); */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1),
              0 6px 12px rgba(0, 0, 0, 0.15);
}

button, .smallbutton, .smallerbutton, .deletebutton {
  border: none;
  font-family: Georgia, serif;
  border-radius: 6px;
  cursor: pointer;
  padding: 0.4em 0.8em;
  color: #fff;
  background-color: var(--primary);
  font-size: 0.8rem;
  transition: 0.3s;
  margin: 0 0.25rem;
}
.smallerbutton { background-color: #00AAFF; font-size: 0.65rem; }
.deletebutton { background-color: red; font-size: 0.65rem;}
button:hover, .deletebutton:hover {
  background-color: #00AAFF;
  color: var(--primary);
  text-decoration: underline;
}

/* ==============================
   POPUP & HELP TOOLTIP
============================== */
.help {
  position: relative;
  /* display: inline-block; */
    margin: 0 7px;
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: bold;
}
.help2{
    color:white !important;
    font-style: normal !important;
}

.help .note {
  display: none;
  position:fixed;
  margin-top:-1px;
  left: 50%;
  transform: translateX(-50%);
  min-width: min(30%,fit-content);
  max-width: 40%;
  background: #565449;
  color: #FFFBF4;
  font-size: 0.8rem;
  padding: 0.5rem;
  border-radius: 8px;
  border: 2px solid var(--primary);
  z-index: 300;
  text-align: left !important;
}

.note2{
    min-width: 350px !important;
    font-weight: normal !important;
    font-style: normal !important;
    z-index:200;
}

.help:hover .note, .help2:hover .note2 { display: flex !important; }

/* ==============================
   ADS + POPUPS
============================== */
/* .ad-sense{
  border-radius: 8px;
  padding: 3px;
  margin: 0.25rem;
  margin-top:0 !important;
  border: dashed 0.5px lightgrey;
  text-align: center;
} */
#popup-message {
    white-space: pre-line;
    text-wrap:wrap;
}
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); color: #e50000;
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.popup-box {
  background: yellow;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-width: 50%;
  min-width: 250px;
  text-align: center;
  position: relative;
}
.popup-close {
  position: absolute;
  top: -1px; right: 0.25rem;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
}

/* ==============================
   CONTENT READING AREAS
============================== */
.read {
  padding: 2em 4em;
  font-size: 1rem;
}

.read p {
  text-indent: 2em;
  margin-bottom: 1rem;
}
.read ul,.read ul {
  padding-left: 3em;
}

#aboutsearch p, #aboutlisting p, #aboutus p {
  text-indent: 1em;
  padding: 0.25em 1em;
}
#aboutsearch ul, #aboutlisting ul, #aboutus ul {
    padding:0 3em 0 5em;
}
#aboutsearch span, #aboutlisting span, #aboutus span {
    padding:0 0 3em 3em;
}

/* ============ Scroll to top - stationery / constant on screen ========== */
  #scrollTopBtn {
    display: none;
    justify-self: end;
    position:sticky;
    margin-right: 5px;            /* distance from right edge */
    bottom: 50%;           /* vertical mid of the screen */
    transform: translateY(50%); /* center vertically */
    z-index: 300;          /* stay on top of other elements */
    background-color: #00AAFF;
    color: white;
    border: none;
    padding: 0.1rem 0.35rem;
    border-radius: 12%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: background-color 0.3s, opacity 0.3s;
    opacity: 0.5;
  }

  #scrollTopBtn:hover {
    background-color: #0056b3;
    opacity: 1;
  }