/* ============================================
   AveronOpen - Responsive Layout Fixes
   ============================================ */

/* --- Global Responsive Foundations --- */
*, *::before, *::after {
  box-sizing: border-box;
}

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

/* --- Header / Navbar Fixes --- */
.navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 15px;
}

.navbar .container-fluid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-header {
  flex-shrink: 0;
}

.agileits_w3layouts_logo a img {
  height: 80px;
  max-width: 320px;
  width: auto;
}

/* --- Welcome Container (layout-styles.css override) --- */
.welcome-container {
  width: 100%;
  max-width: 500px;
  padding: 0 15px;
}

/* --- Home Page Journal Cards --- */
.home_j_b {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.home_j_b .col-md-3 {
  flex: 0 0 auto;
  max-width: 100%;
}

/* --- Login Page Responsive --- */
.banner-bottom {
  margin-top: 5% !important;
  padding: 0 10px;
}

#main-connection-div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

#log-in-main-connection-div,
#register-main-connection-div {
  float: none !important;
}

.login_averon {
  min-height: auto;
  padding: 20px;
}

.sign_averon {
  min-height: auto;
}

.main-connection-div .input-field {
  width: 90%;
  margin: 20px auto;
}

/* Password reset modal responsive */
.content-password-reset-div {
  width: 90%;
  max-width: 600px;
  min-width: auto !important;
  margin: auto;
  padding: 20px;
}

.content-content-password-reset-div .input-field {
  width: 100%;
}

/* --- Footer Responsive --- */
.footer_grid {
  margin-bottom: 20px;
}

/* --- Side Menu Responsive --- */
#about_journal {
  word-wrap: break-word;
}

/* --- Search Form --- */
.search-form-wrapper {
  width: 100%;
  padding: 0 15px;
}

.search-form .input-group {
  max-width: 100%;
}

/* --- Container Fixes --- */
.container,
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

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

table {
  max-width: 100%;
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

/* --- Tablet (max-width: 991px) --- */
@media screen and (max-width: 991px) {
  .navbar {
    padding: 8px 10px;
  }

  .agileits_w3layouts_logo a img {
    max-height: 50px;
  }

  .home_j_b .col-md-3 {
    width: 48%;
    flex: 0 0 48%;
  }

  .banner-bottom {
    margin-top: 8% !important;
  }

  #log-in-main-connection-div,
  #register-main-connection-div {
    width: 80%;
    max-width: 400px;
    margin: 10px auto;
    float: none;
  }

  .content-password-reset-div {
    width: 85%;
  }

  /* Fix inline float styles on home page CTAs */
  .da-slide h4 {
    float: none !important;
    text-align: center;
    margin: 5px 0;
  }

  .ban_content {
    text-align: center;
    padding: 10px;
  }
}

/* --- Mobile (max-width: 768px) --- */
@media screen and (max-width: 768px) {
  .navbar .container-fluid {
    flex-direction: column;
    align-items: center;
  }

  .nav.navbar-nav.navbar-right {
    float: none !important;
    margin: 5px 0;
  }

  .home_j_b .col-md-3 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 400px;
  }

  .home_j_b {
    justify-content: center;
  }

  .banner-bottom {
    margin-top: 15% !important;
  }

  #log-in-main-connection-div,
  #register-main-connection-div {
    width: 95%;
    max-width: none;
    padding: 10px;
  }

  .login_back {
    margin-bottom: 15px;
  }

  .title-log-in-main-connection-div,
  .title-register-main-connection-div {
    font-size: 17px;
    margin-left: 10px;
  }

  .password-forgotten {
    width: 100% !important;
    border-bottom: 1px dotted blue;
  }

  /* Register button fix - remove hardcoded margin */
  #register-main-connection-div .btn {
    margin: 40px auto !important;
    display: block;
    width: 60% !important;
    position: static !important;
  }

  .footer_grid {
    text-align: center;
  }

  /* Overlay search */
  .overlay .closebtn {
    font-size: 50px;
    top: 10px;
    right: 20px;
  }

  /* Issue/article listings */
  .issue_loop {
    padding: 10px;
  }

  /* Side menu */
  .charges-menu-title {
    font-size: 16px;
  }
}

/* --- Small Mobile (max-width: 480px) --- */
@media screen and (max-width: 480px) {
  .agileits_w3layouts_logo a img {
    max-height: 45px;
  }

  .hmeaveron .fa-home {
    font-size: 24px;
  }

  .da-slider {
    min-height: auto;
  }

  .ban_content p {
    font-size: 14px;
    padding: 5px 10px;
  }

  .da-slide h4 {
    font-size: 14px !important;
  }

  .home_j_b .col-md-3 {
    max-width: 100%;
  }

  .readmore .btn {
    font-size: 13px;
    padding: 8px 15px;
  }

  .content-password-reset-div {
    width: 95%;
    height: auto;
    min-height: 240px;
  }

  .cookies-used {
    width: 95%;
    max-width: none;
  }

  .title-content-password-reset-div {
    font-size: 20px;
  }

  /* Footer columns stack */
  .col-md-3.footer_grid {
    width: 100%;
    float: none;
  }
}

/* --- Extra Small (max-width: 360px) --- */
@media screen and (max-width: 360px) {
  .agileits_w3layouts_logo a img {
    max-height: 40px;
  }

  .title-log-in-main-connection-div,
  .title-register-main-connection-div {
    font-size: 15px;
  }

  .btn {
    font-size: 13px;
    padding: 6px 12px;
  }
}
