html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans Bengali', sans-serif;
  line-height: 1.6;
  margin: 0;
  color: #222;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Responsive Typography */
@media (max-width: 576px) {
  html {
    font-size: 14px;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  html {
    font-size: 15px;
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  html {
    font-size: 16px;
  }
}

@media (min-width: 993px) {
  html {
    font-size: 16px;
  }
}

/* Responsive Container */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Responsive Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col {
  flex-basis: 0;
  flex-grow: 1;
  max-width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

/* Responsive Buttons */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

@media (max-width: 576px) {
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Responsive Forms */
.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

@media (max-width: 576px) {
  .form-control {
    padding: 0.5rem 0.75rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Responsive Tables */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Responsive Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
}

@media (max-width: 576px) {
  .card {
    margin-bottom: 1rem;
  }
}

/* Responsive Navigation */
.navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
}

/* Responsive Footer */
footer {
  padding: 2rem 0;
}

@media (max-width: 576px) {
  footer {
    padding: 1.5rem 0;
  }
  
  footer .row {
    flex-direction: column;
  }
  
  footer .col-md-4,
  footer .col-md-3 {
    margin-bottom: 1.5rem;
    text-align: center;
  }
}

/* Responsive Images */
.img-fluid {
  max-width: 100%;
  height: auto;
}

@media (max-width: 576px) {
  .img-fluid {
    border-radius: 0.25rem;
  }
}

/* Responsive Spacing */
@media (max-width: 576px) {
  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .mb-4 {
    margin-bottom: 1.5rem !important;
  }
  
  .mt-3 {
    margin-top: 1rem !important;
  }
}

/* Touch-friendly targets for mobile */
@media (max-width: 768px) {
  a,
  button,
  .btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
