body {font-family: arial, sans-serif; background:#66bfac;} 
#header {background:white;}
#topimage-container {min-width:82px; height:130px; padding:1px; border:0px solid #fff; background-color:#fff;} 
#topimage-container img {padding:0px 0px; border:0px solid #fff; background-color:#fff;} 
#topimage-right {float:right;}   #topimage-rightr {float:right;} 
#topimage-left {float:left;padding:5px;} 
#topimage-center {display:block;margin:auto;} 

#leftnav {float:left; width:16%; background:white;}
#centre {float:left; width:66%; background:white;}
#rightnav {float:right; width:16%; background:white; text-align: center;}
#leftnav, #centre, #rightnav {padding-bottom:32767px; margin-bottom:-32767px;}
#wrapper {overflow:hidden; background:white;}
#footer {clear:both; background:white;  text-align: center;}
.content {padding:10px;}
.round-corners {border-radius: 20px;}
p {font-size:12px; line-height:1.5em; margin:0; padding:5px 0;}
p.bctlc {text-transform:lowercase; font-size:10px;}
#footer p,
#header p {color:black;}
#footer a {color:blue;}
#footer a:hover {text-decoration:none;}
img {border: 0px;}
#rightcoltop { float: right; width: 170px; border: #66bfac 0px solid; margin: 0 1px 0 1px;}
#floatimage { float: right; }
#right_image {float:right; border:0px; margin: 2px 2px 2px 20px;}
#left_image {float:left; border:0px; margin: 2px 20px 2px 2px;}
.article_img { padding:1px; border:0px solid gray; margin: 1px 1px 1px 0px;}
.article_img p {width:300px; margin-top:0px; margin-bottom:0px; font-size:0.8em; font-style:italic; padding-top:5px;}

#listshutter ul li {border:1px silver; border-bottom-style:dotted;  list-style-image:url('../art/ul-li-shutter.png'); padding-left:2px; margin: 2px}
#listim ul li {border:1px silver; border-bottom-style:dotted;  list-style-image:url('../art/openim.jpg'); padding-left:2px; margin: 2px}
#sitemeter {text-align:left; visibility: hidden;}

.tablist {list-style:none; height:2em; padding:0; margin:0; border: none;}
.tablist li {float:left; margin-right:0.13em;}
.tablist li a {display:block; padding:0 .6em; text-decoration:none; border:0.06em solid #66bfac; border-bottom:0; font:bold 0.88em/2em arial,helvetica,sans-serif; color:#000; background-color:#fff; border-top-right-radius:0.50em; border-top-left-radius:0.50em;}
.tablist li a:hover {background:#66bfac; color:#fff; text-decoration:none;}
.tablist li#current a {background-color: #b0c4de; color: #fff;}
.tablist li#current a:hover { background: #39c;}

/* ================================================
   MODERN RESPONSIVE ENHANCEMENTS
================================================ */

html {
  scroll-behavior: smooth;
}

body {
  background: #f8f9fa;
  color: #111;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

#wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  overflow: hidden;
}

#leftnav, #centre, #rightnav {
  box-sizing: border-box;
  padding: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
  border-radius: 4px;
  margin: 5px;
}

#leftnav { width: 18%; }
#centre  { width: 64%; }
#rightnav { width: 18%; text-align: center; }

#header {
  text-align: center;
  background: #fff;
  border-bottom: 2px solid #66bfac;
  padding: 10px 0;
}

.tablist li a {
  border: none;
  background-color: #fff;
  color: #000;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}
.tablist li a:hover {
  border-bottom: 3px solid #66bfac;
  background-color: #f7f7f7;
  color: #000;
}

#footer {
  background: #fff;
  text-align: center;
  padding: 20px 10px;
  border-top: 2px solid #66bfac;
  font-size: 0.9rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tablet adjustments */
@media (max-width: 1000px) {
  #leftnav { width: 25%; }
  #centre  { width: 50%; }
  #rightnav { width: 25%; }
  h1 { font-size: 1.3rem; }
  h2, h3 { font-size: 1rem; }
  body { font-size: 0.95rem; }
}

/* Mobile layout */
@media (max-width: 768px) {
  #wrapper {
    flex-direction: column;
  }
  #leftnav, #centre, #rightnav {
    width: 100%;
    margin: 5px 0;
    box-shadow: none;
  }
  #header img {
    max-width: 90%;
    height: auto;
  }
  .tablist {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .tablist li {
    float: none;
    margin: 3px;
  }
  .tablist li a {
    font-size: 0.9rem;
    padding: 6px 10px;
    border: 1px solid #66bfac;
    border-radius: 4px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  #header h3 {
    font-size: 0.95rem;
    margin: 5px 0;
  }
  #footer {
    font-size: 0.8rem;
  }
  p {
    padding: 4px 0;
  }
}

/* -------------------------------------------
   Mobile Refinements for SICIP Article Pages
------------------------------------------- */

@media (max-width: 768px) {

  /* Stack sections neatly */
  #wrapper {
    display: block;
    overflow: visible;
  }

  /* Remove equal height hack that creates blank space */
  #leftnav, #centre, #rightnav {
    float: none !important;
    width: 100% !important;
    margin: 0 0 10px 0;
    padding: 10px;
    border: none;
    box-shadow: none;
    background: #fff;
  }

  /* Make article images and ads fit screen width */
  img, iframe {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Clean up duplicated or tall side menus */
  #lhsnavbox {
    width: 100%;
    margin: 0 auto 15px auto;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
  }
  #lhsnavbox ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  #lhsnavbox ul li {
    width: 45%;
    margin: 2%;
    border: none;
    text-align: left;
  }

  /* Make headings and spacing more readable */
  h1, h2, h3 {
    text-align: center;
    margin-top: 10px;
  }

  p {
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 6px 0;
  }

  /* Compress ads and trustpilot sections */
  #rightnav .content, #footer .content {
    padding: 5px;
  }

  /* Make download button centered */
  a[href$=".pdf"], .article_img img {
    display: block;
    margin: 0 auto;
  }

  /* Prevent repeating sidebars if any are floated */
  #leftnav .content > div + div {
    display: none;
  }

  /* Tidy up footer logos */
  .aaduki, .loxley, .permajet, .mpb {
    max-width: 140px;
    margin: 5px auto;
    display: block;
  }
}

/* Even smaller screens (phones under 480px) */
@media (max-width: 480px) {
  #lhsnavbox ul li {
    width: 100%;
    text-align: center;
  }
  h1 {
    font-size: 1.1rem;
  }
  p {
    font-size: 0.9rem;
  }
  #footer img {
    max-width: 120px;
  }
}

/* -------------------------------------------
   Mobile Navigation & Sidebar Refinement
------------------------------------------- */

@media (max-width: 768px) {

  /* Make the top tab menu scroll horizontally on small screens */
  .tablist {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    display: block;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #66bfac;
    background: #fff;
    margin-bottom: 10px;
  }

  .tablist li {
    float: none;
    display: inline-block;
    margin: 0;
  }

  .tablist li a {
    display: inline-block;
    font-size: 0.9rem;
    padding: 8px 10px;
    border: 1px solid #66bfac;
    border-radius: 4px;
    margin: 3px;
    white-space: nowrap;
  }

  /* Keep the active tab visible */
  .tablist li#current a {
    background: #66bfac;
    color: #fff;
  }

  /* Convert Articles by Subject into compact dropdown on mobile */
  #lhsnavbox ul {
    display: none; /* hide full list by default */
  }

  #lhsnavbox::before {
    content: "📂 Browse Articles by Subject";
    display: block;
    background: #66bfac;
    color: #fff;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
  }

  /* When tapped (simulated via checkbox hack or JavaScript optional), show list */
  #lhsnavbox:hover ul {
    display: block;
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
  }

  #lhsnavbox ul li {
    width: 48%;
    display: inline-block;
    font-size: 0.9rem;
    border: none;
  }

  /* Improve footer logo layout */
  .aaduki, .loxley, .permajet, .mpb {
    max-width: 140px;
    display: inline-block;
    margin: 8px;
    animation: none; /* prevent pulse on small screens */
  }
}

/* Smallest screens fix */
@media (max-width: 480px) {
  #lhsnavbox ul li {
    width: 100%;
    text-align: center;
  }
  #lhsnavbox::before {
    font-size: 0.9rem;
  }
}
