:root {
    --cassiopeia-color-primary: #000;
    --cassiopeia-color-link: #ffa62e;
    --link-color: #0a29fc;
    --link-color-rgb: 10, 41, 252;
    --cassiopeia-color-hover: #000;
    --link-hover-color: #887602;
    --link-hover-color-rgb: 136, 118, 2;
}
a {font-weight: 700;}

/* Header styling */
.container-header {
    box-shadow: 0 0 32px rgb(0 0 0 / 6%), 0 4px 8px rgb(0 0 0 / 16%);
    background-image: none;
    background-color: #fff;
}
.container-header .container-nav {
    padding-bottom: .5em;
}
.container-header .container-nav nav {
    margin-top: 0px;
}
.container-header .navbar-toggler {
    color: #0219b7;
    border: 1px solid #0219b7;
}

@media (min-width: 992px) {
 .container-header .container-nav nav {
    margin-left: auto;
    margin-right: auto;
 }
}

.metismenu.mod-menu .metismenu-item>a {font-weight: 600; color: #000;}
.metismenu.mod-menu .metismenu-item>a:hover {text-decoration: none;}
.metismenu.mod-menu .metismenu-item:hover {
  /*border: 1px solid #0a29fc;*/
  border-radius: 10px;
  background-color: #dee1fc;
}
.metismenu.mod-menu .mm-toggler {
    color: #0a29fc;
}

/* Offcanvas menu styling */
@media (max-width: 991.98px) {
    .offcanvas {
        max-width: 80%;
   }
}
/*.offcanvas {
    background-color: var(--cassiopeia-color-primary);
}
.offcanvas.showing, .offcanvas.hiding, .offcanvas.show {
    border: 1px solid #ffa62e;
}
.offcanvas-header .btn-close {
   background-color: #ffa62e;
}
*/


/* Homepage styling */
@media (min-width: 992px) {
.frontphoto {
  height: 100vh;
background: linear-gradient(
      rgba(0, 0, 0, 0.8),
      rgba(0, 0, 0, 0.1)
    ), url('https://bangkokcanal.com/images/headers/bangkok-canal-d.webp') no-repeat left;
background-size: cover;}
}
@media (max-width: 991.98px) {
.frontphoto {
  height: 100vh;
background: linear-gradient(
      rgba(0, 0, 0, 0.8),
      rgba(0, 0, 0, 0.1)
    ), url('https://bangkokcanal.com/images/headers/bangkok-canal-m.webp') no-repeat center;
background-size: cover;}
}
.frontcenter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: .5rem 2rem; 
  border: 2px solid #ffffff; 
  border-radius: 100px; 
  background: #0a29fc; 
  text-decoration: none; 
  color: #ffffff; 
  font-size: 1.5em; 
  font-weight: bold; 
  margin-top: 2em;
  text-align: center;
}
a.frontcenter:hover {
  border: 2px solid #0a29fc; 
  background: #ffffff; 
  color: #0a29fc; 
}
.fronttext {
  font-family: var(--cassiopeia-font-family-headings);
  font-weight: var(--cassiopeia-font-weight-headings,700);
  color: white;
  /*text-transform: uppercase;*/
  margin: 0;
  position: absolute;
  top: 30%;
  left: 50%;
  font-size: 2.5rem;
  line-height: 1.2;
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.frontsmall {
  color: #6c7efd;
  font-size: 1.8rem;
}
/*.homecard {border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); width: 100%; margin-left: auto; margin-right: auto; margin-bottom: 20px;}
.homecard img {border-radius: 10px 10px 0 0;}
.btn-home {display: inline-block; position: relative; z-index: 1; padding: .5rem 2rem; border: 1px solid #e18100; border-radius: 100px; background: #ffa62e; text-decoration: none; color: #000000; font-size: 1.3em; font-weight: bold; margin-top: 1em;}
span.home-no {
  background: #ffa62e;
  border-radius: 0.75em;
  color: #000000;
  display: inline-block;
  font-weight: bold;
  line-height: 1.5em;
  margin-right: 5px;
  /* margin-top: 10px;
  text-align: center;
  width: 1.5em; 
  box-shadow: 3px 3px 2px 0px rgba(50, 50, 50, 0.75);
}*/


/* Content styling */
h1 {
  background-color: #010f6d;
  color: #fff;
  padding: 15px;
  margin: 0 0 20px 0;
  border-radius: 5px;
}
.top-home {margin: 0}
h2 {
  background-color: #011492;
  color: #fff;
  padding: 15px;
  margin: 40px 0 20px 0;
  border-radius: 5px;
}
h3 {
  background-color: #0219b7;
  color: #fff;
  padding: 15px;
  margin: 40px 0 20px 0;
  border-radius: 5px;
}
h4 {
  background-color: #4d5ecc;
  color: #fff;
  padding: 15px;
  margin: 40px 0 20px 0;
  border-radius: 5px;
}

.photo-credit {
  margin-top: -10px;
  color: #333;
  font-size: 14px;
  font-style: italic;
  text-align: center;
}
.gygw {
  background-color: #e6e9fe;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.face {background: #222222; padding: 10px; border-radius: 10px;}

/*remove icons from article info*/
span.icon-calendar::before {content: "";}
span.icon-user::before {content: "";}

/*article info in one line*/
dl.article-info {
  display: inline-flex;
  font-size: 0.8em;
  border-bottom: 1px solid grey;
}
dl.article-info a {
  color: black;
}
.author-block {
  padding: 30px 10px;
  font-size: 0.9em;
}
.author-block a {
  color: black;
  text-decoration: none;
}
.author-photo {
  padding-bottom: 20px;
}


/* Right sidebar styling */
body.wrapper-fluid .site-grid {
  grid-template-columns: [full-start] minmax(0,1fr) [main-start] minmax(0,0%) minmax(0,30%) minmax(0,30%) minmax(0,40%) [main-end] minmax(0,1fr) [full-end]
}
div.sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 70px;
  z-index: 0;
  border: solid 1px #0a29fc;
  border-radius: 5px;
  padding: 10px;
  background-color: #f5f6fe;
}
h3.sticky {
  margin: 0 0 20px 0;
}

/* Bottom styling 
.back-to-top-link {
    background-color: #010f6d;
    border: 2px solid #010f6d;
}
.back-to-top-link:hover {
    color: #010f6d;
    border: 2px solid #010f6d;
}*/

/* Ads styling */
.banner-top {display: flex; border: solid 1px lightgray;}
.banner-top-text {padding: 20px; display: flex; align-items: center;}
.banner-top-title {font-size: 2rem; padding-bottom: 20px;}
.banner-top-note {color: rgb(126, 140, 141);}
.banner-top-link {font-size: 1.7rem; font-weight: bold; text-align: center; padding-top: 20px;}
.banner-top-link a {text-decoration: none; margin-right: 15px;}

@media (max-width: 767.98px) {
  .banner-top {display: block;}
  .banner-top-title {font-size: 1.4rem; padding-bottom: 10px;}
  .banner-top-link {font-size: 1.2rem; font-weight: semibold; text-align: center; padding-top: 10px;}
  /*.banner-top-text {display: none;}*/
}

/* Fare Calculator */
  :root {
    --canal:    #1a6b8a;
    --canal-dk: #0f4a61;
    --canal-lt: #e8f4f8;
    --water:    #cce8f0;
    --wave:     #a8d8ea;
    --amber:    #d97c0c;
    --amber-lt: #fdf3e3;
    --text:     #1a2e38;
    --text-2:   #4a6070;
    --border:   #b8d8e8;
    --white:    #ffffff;
    --radius:   10px;
    --shadow:   0 4px 20px rgba(26,107,138,.12);
  }

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

  .c-body {
    background: linear-gradient(160deg, #e8f6fa 0%, #f5fbff 60%, #e0f0f8 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem 4rem;
  }

  .card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 580px;
    overflow: hidden;
  }

  /* ── Header ── */
  .card-head {
    background: linear-gradient(135deg, var(--canal-dk) 0%, var(--canal) 100%);
    padding: 1.4rem 1.5rem 1.2rem;
    position: relative;
    overflow: hidden;
  }
  .card-head::before {
    content: '';
    position: absolute;
    bottom: -12px; left: -10%;
    width: 120%; height: 32px;
    background: var(--white);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  }
  .head-wave {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 180px;
    opacity: .08;
    background: repeating-linear-gradient(
      90deg, transparent 0px, transparent 10px,
      rgba(255,255,255,.6) 10px, rgba(255,255,255,.6) 12px
    );
  }
  .head-row { display: flex; align-items: center; gap: 12px; }
  .head-icon {
    width: 46px; height: 46px;
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
  }
  .head-text h3 {
    font-size: 17px;
    color: var(--white);
    line-height: 1.2;
    background: none;
    margin: 0;
    padding: 0;
  }
  .head-text p { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }

  /* ── Body ── */
  .card-body { padding: 1.4rem 1.5rem 1.5rem; }

  /* ── Base rate badge ── */
  .base-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--amber-lt);
    border: 1px solid #f0d090;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 1.2rem;
    font-size: 13px;
    color: var(--amber);
    font-weight: 600;
  }
  .base-badge .badge-icon { font-size: 16px; }
  .base-badge .badge-note { font-size: 11px; color: #b06010; font-weight: 400; margin-left: auto }

  /* ── Dropdowns ── */
  .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
  .field label { font-size: 12px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 6px; }

  /* Custom searchable dropdown */
  .sel-wrap { position: relative; }
  .sel-btn {
    width: 100%;
    padding: 9px 28px 9px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--canal-lt);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    position: relative;
    transition: border-color .15s, background .15s;
  }
  .sel-btn:hover, .sel-btn.open { border-color: var(--canal); background: var(--water); }
  .sel-btn .arrow { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--canal); font-size: 10px; pointer-events: none; }
  .sel-btn .btn-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
  .sel-btn .btn-num { font-size: 10px; color: var(--canal); font-weight: 700; background: var(--water); padding: 1px 6px; border-radius: 20px; flex-shrink: 0; }

  .sel-drop {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--white);
    border: 1.5px solid var(--canal);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(26,107,138,.15);
    z-index: 999;
    overflow: hidden;
  }
  .sel-drop.open { display: block; }
  .sel-search-wrap { padding: 8px; border-bottom: 1px solid var(--canal-lt); }
  .sel-search {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    outline: none;
  }
  .sel-search:focus { border-color: var(--canal); }
  .sel-options { max-height: 230px; overflow-y: auto; }
  .sel-option {
    padding: 8px 10px;
    font-size: 12.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .1s;
  }
  .sel-option:hover, .sel-option.selected { background: var(--canal-lt); }
  .sel-option.hidden { display: none; }
  .sel-option .opt-num { font-size: 10px; font-weight: 700; color: var(--canal); background: var(--water); padding: 1px 6px; border-radius: 20px; flex-shrink: 0; min-width: 32px; text-align: center; }
  .sel-option .opt-name { flex: 1; }
  .sel-no-results { padding: 12px; font-size: 12px; color: #aaa; text-align: center; display: none; }
  .sel-options::-webkit-scrollbar { width: 4px; }
  .sel-options::-webkit-scrollbar-thumb { background: var(--wave); border-radius: 2px; }

  /* ── Swap button ── */
  .swap-row { display: flex; justify-content: center; margin: -4px 0 10px; }
  .swap-btn {
    background: var(--canal);
    color: var(--white);
    border: none;
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background .15s, transform .1s;
  }
  .swap-btn:hover { background: var(--canal-dk); }
  .swap-btn:active { transform: scale(.96); }

  /* ── Result card ── */
  .result {
    background: linear-gradient(135deg, var(--canal-lt), #d8eef8);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem;
    text-align: center;
  }
  .result .rl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--canal); margin-bottom: 5px; }
  .result .amount { font-size: 48px; font-weight: 700; color: var(--canal-dk); line-height: 1; }
  .result .unit { font-size: 12px; color: var(--text-2); margin-top: 4px; }
  .result hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
  .result .route { font-size: 13px; color: var(--text-2); line-height: 1.7; }
  .result .route strong { color: var(--canal-dk); }
  .result .arrow-sep { color: var(--canal); margin: 0 6px; font-size: 16px; }
  .result .same-pier { font-size: 13px; color: var(--text-2); font-style: italic; }

  /* ── Footer ── */
  .card-foot { padding: 10px 1.5rem 1.2rem; text-align: center; font-size: 11px; color: #aaa; }

  @media (max-width: 440px) { .fields { grid-template-columns: 1fr; } }