body{
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
    background-color: #f9f9f9;
}

/* Navbar Styling */
.navbar {
    background: linear-gradient(135deg, #2c3e50, #34495e, #2c3e50) !important;
    background-size: 300% 300% !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.navbar .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
    font-size: 1.6rem;
    letter-spacing: 0.7px;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    font-family: 'Montserrat', sans-serif;
}

.navbar-brand img {
    margin-right: 10px;
    height: 28px;
    width: auto;
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.6));
}

.navbar-nav {
    margin: 0 auto;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.navbar-nav .nav-link:hover {
    color: #3498db !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: #3498db;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

.navbar-nav .nav-item.active .nav-link {
    color: #3498db !important;
}

.navbar-nav .nav-item.active .nav-link::after {
    width: 80%;
}

.navbar .switch-mod {
    position: relative;
    top: 0;
    right: 0;
    margin-left: 15px;
}
a:hover{
    text-decoration: none;
}
.section-currencies-table td{
    font-size: 13px;
    vertical-align: middle!important;
    border: none;
}
.section-currencies-table td.flag{
    text-align: center;
}

.select-wrap {
    display:block;
    margin-top:5px;
}
.support-title{
    margin: 50px 0px;
}


.header{
    background: url(../img/header5-bg.png) no-repeat center center;
    background-position: bottom;
    min-height: 600px;
}
.converter {
    padding-top: 80px;
    width: 75%;
    margin: auto;
}
.converter h1 {
    color: #2c3e50;
    font-family: sans-serif;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-size: 40px;
}
.converter h2{
    text-align: center;
    color: #34495e;
    font-size: 24px;
}
.convert-box {
    position: relative;
    background-color: #fff;
    padding: 40px 20px;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
/* Adjust row layout to align columns in one line on desktop */
.convert-box .row {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
}
.convert-box .col-md-5,
.convert-box .col-md-2 {
    padding: 0 10px;
    margin-bottom: 0;
}
.convert-box .col-md-2 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}
.btn-light:not(:disabled):not(.disabled).active:focus, .btn-light:not(:disabled):not(.disabled):active:focus, .show>.btn-light.dropdown-toggle:focus {
    box-shadow: none;
}
.input-wrap{
    width: 30%;
    display: inline-block;
    vertical-align: top;
}
.input-wrap .form-control {
    box-shadow: none;
    border-radius: 5px 0 0 5px;
    height: 50px;
    line-height: 50px;
    border: 1px solid #ddd;
    border-right: 0;
    padding: 0 15px;
    text-align: center;
    margin-bottom: 0;
    font-size: 14px;
    background-color: #f8f9fa;
}
.select {
    display: flex;
    align-items: center;
    width: 100%;
}
label.label {
    color: #626161; 
    text-align: center; 
    display: block; 
    font-size: 16px; 
    margin-bottom: 10px;
}
th.caption-col {
    background-color: #2c3e50 !important;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}
table {
    background-color: #ffffff;
    margin-bottom: 0 !important;
}
.table-responsive{
    -webkit-box-shadow: 0px 15px 40px rgba(0, 0, 0, 0.07);
    box-shadow: 0px 15px 40px rgba(0, 0, 0, 0.07);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}
.table>thead>tr>th {
    padding: 12px 8px;
}
footer{
    background: url(../img/xetex-footer.png) no-repeat center center;
    background-position: top;
    height: 220px;
    margin-top: 70px;
}
.footer-social {
    margin-bottom: 20px;
    margin-top: 15px;
    padding: 0;
}
footer .footer-social li {
    display: inline-block;
}
footer .footer-social li a {
    display: block;
    font-size: 16px;
    color: #ffffff !important;
    background: rgba(44, 62, 80, 0.8) !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    line-height: 46px;
    text-align: center;
    margin-right: 10px;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
footer .footer-social li a:hover {
    background: rgba(52, 152, 219, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
footer .footer-social li a i{
    width: 100%;
    height: 100%;
    line-height: 46px;
    transition: transform 0.3s ease;
}
footer .footer-social li a:hover i {
    transform: scale(1.1);
}
.footer{
    padding-top: 60px;
    color: #2c3e50;
}
p.copyright {
    font-size: 16px;
    font-weight: bold;
    line-height: 30px;
}
p.copyright a{
    color: #2c3e50;
}
p.copyright i{
    color: red;
}
.list-currencies {
    padding: 40px 0;
}
.list-currencies h2 {
    margin: 40px 0;
    font-size: 36px;
    text-transform: capitalize;
    font-family: 'Montserrat', sans-serif;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}
.header,
.converter,
.convert-box,
.list-currencies {
  position: relative;
  z-index: auto;
}

/* Ensure the converter section is above the background and below navbar, but not overlapping tables */
.converter, .convert-box {
  z-index: 1;
}

/* Create clear separation before World currencies section */
.list-currencies {
  margin-top: 30px;
  clear: both;
}

/* Fix any stray floats within convert-box that could collapse container height */
.convert-box::after {
  content: "";
  display: table;
  clear: both;
}

/* Also ensure rows create stacking context properly */
.convert-box .row {
  position: relative;
  z-index: 1;
}

/* On small screens keep spacing consistent */
@media (max-width: 768px){
  .list-currencies { margin-top: 20px; }
}
.converter {
    padding-top: 40px;
    width: 95%;
    margin: auto;
}
.converter h1 {
    font-size: 28px;
}
.converter h2 {
    font-size: 18px;
    padding: 0 10px;
}
.convert-box {
    padding: 20px 15px;
    margin-top: 30px;
}
/* FINAL overrides to ensure horizontal alignment of input + select on desktop */
.convert-box > .row {
  display: flex;
  flex-direction: row !important;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: nowrap;
}
.convert-box > .col-md-5,
.convert-box > .col-md-2 {
  width: auto !important;
  padding: 0 10px;
  margin-bottom: 0 !important;
}
/* Keep input and select on a single line */
.select {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
}
.select .input-wrap {
  width: 30% !important;
  display: inline-block;
  vertical-align: top;
  box-sizing: border-box;
}
/* Target the generated bootstrap-select wrapper next to the native select */
.select > .bootstrap-select,
.select > .bootstrap-select.form-control {
  display: inline-flex !important;
  align-items: center;
  width: 70% !important;
  margin: 0 !important;
  height: 50px;
}
.select > .bootstrap-select .dropdown-toggle {
  width: 100% !important;
}
/* Mobile: stack neatly */
@media (max-width: 768px){
  .convert-box > .row { flex-direction: column !important; align-items: stretch; }
  .convert-box > .col-md-5,
  .convert-box > .col-md-2 { width: 100% !important; margin-bottom: 15px !important; padding: 0; }
  .select { flex-wrap: wrap; }
  .select .input-wrap { width: 100% !important; margin-bottom: 10px; }
  .select > .bootstrap-select { width: 100% !important; }
}
.exchange-btn {
    width: 45px;
    height: 45px;
}
.table-responsive {
    margin-bottom: 15px;
}
.dropdown.bootstrap-select.bs-select.form-control{
    width: 70% !important;
    display: inline-block;
    position: relative;
    vertical-align: top;
    height: 50px;
}
button.btn.dropdown-toggle.btn-light {
    background-color: #f8f9fa !important;
    height: 50px;
    border: 1px solid #ddd;
    border-left: 0;
    box-shadow: none;
    width: 100% !important;
    border-radius: 0 5px 5px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
button.btn.dropdown-toggle.btn-light:focus, button.btn.dropdown-toggle.btn-light:active{
    outline: none !important;
}
.bootstrap-select > select {
    position: absolute !important;
    bottom: 0;
    left: 0;
    display: block !important;
    width: 0.5px !important;
    height: 100% !important;
    padding: 0 !important;
    opacity: 0 !important;
    border: none;
    width: 100% !important;
}
.dropdown-menu{
    width: 100%;
    max-width: 100% !important;
    min-width: 100% !important;
    right: 0;
}
.currency_name {
    color: #aaa;
    display: block;
    overflow: hidden;
    font-weight: normal;
    line-height: 1.4em;
    font-size: 12px;
}
.bootstrap-select .dropdown-toggle .filter-option-inner {
    padding-right: 0;
}
.currency_code {
    color: #03A9F4;
    font-weight: bold;
    font-size: 14px;
}
.flag {
    vertical-align: middle;
    float: left;
    margin-right: 5px;
    max-width: 64px;
    width: 26px;
}
a.dropdown-item {
    border-bottom: 1px solid #dedede;
    background-color: #f9f9f9;
}
.bs-searchbox input.form-control {
    border: 1px solid #dedede;
    box-shadow: none;
    margin-bottom: 10px !important;
    border-radius: 0;
}
.dropdown-menu>.active>a, .dropdown-menu>.active>a:focus, .dropdown-menu>.active>a:hover{
    background-color: #7e7cf2;
    outline: none;
}
.dropdown-menu>.active>a span.currency_code,
.dropdown-menu>.active>a span.currency_name
{
    color: #fff !important; /* confined to dropdown active state */
}
span.text {
    width: 100%;
}
.dropdown-menu>li>a{
    padding: 5px 10px;
}
.exchange-btn {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0px 8px 20px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.exchange-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0px 12px 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #3498db) !important;
}
.exchange-btn:focus{
    outline: none;
}
.exchange-btn i {
    font-size: 16px;
}
.switch-mod {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 999;
}
.switch {
    margin-left: 10px;
    position: relative;
    display: inline-block;
    width: 55px;
    height: 30px;
}
.switch input {
    display: none;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
    box-shadow: 0 0 12px rgb(149 146 146 / 13%);
}
.slider:before {
    height: 16px;
    width: 16px;
    left: 5px;
    border-radius: 50%;
    position: absolute;
    content: "";
    transition: .4s;
    background-color: #e5e3ef;
    top: 50%;
    transform: translateY(-50%);
}
input:checked + .slider:before {
    transform: translate(5px, -50%);
}
.switch i {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    right: 5px;
    font-size: 12px;
    cursor: pointer;
}
.switch i:before {
    content: "\f185";
    color: #7e7cf2;
}
/* Ensure flags show properly inside World currencies tables */
.section-currencies-table td.flag {
    float: none !important;
    width: 40px;
    text-align: center;
}
.section-currencies-table td.flag img {
    display: inline-block;
    width: 24px;
    height: auto;
}