/**
 * aj Pro – custom UI tweaks (loaded after main.css).
 * 1) Rounded search / CF7 / 2-line menu icon  2) Mobile & tablet fixes
 */

/* Sidebar search: round input + red button */
.aj-pro-sidebar .wp-block-search__inside-wrapper {
  gap: 8px;
  align-items: stretch;
}

.aj-pro-sidebar .wp-block-search__input {
  border-radius: 999px !important;
  padding: 8px 18px !important;
  border: 1px solid #e5e5e5;
  background: #fff;
  outline: none;
}

.aj-pro-sidebar .wp-block-search__input:focus {
  border-color: #ff0000;
}

.aj-pro-sidebar .wp-block-search__button {
  border-radius: 999px !important;
  padding: 10px 24px !important;
  margin: 0 !important;
  background-color: #ff0000 !important;
  color: #fff !important;
  border: none;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.aj-pro-sidebar .wp-block-search__button:hover,
.aj-pro-sidebar .wp-block-search__button:focus {
  background-color: #000 !important;
  color: #fff !important;
}

/* Contact Form 7: round fields + red submit button */
.wpcf7 form input[type="text"],
.wpcf7 form input[type="email"],
.wpcf7 form input[type="tel"],
.wpcf7 form input[type="url"],
.wpcf7 form input[type="number"],
.wpcf7 form .wpcf7-form-control.wpcf7-text {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e5e5 !important;
  border-radius: 999px !important;
  padding: 12px 20px !important;
  background: #fff;
  outline: none;
  transition: border-color 0.25s ease;
}

/* Textarea: full pill would look odd on a tall box, so use a soft large radius */
.wpcf7 form textarea.wpcf7-form-control.wpcf7-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e5e5 !important;
  border-radius: 24px !important;
  padding: 14px 20px !important;
  background: #fff;
  outline: none;
  transition: border-color 0.25s ease;
}

.wpcf7 form input[type="text"]:focus,
.wpcf7 form input[type="email"]:focus,
.wpcf7 form input[type="tel"]:focus,
.wpcf7 form input[type="url"]:focus,
.wpcf7 form input[type="number"]:focus,
.wpcf7 form textarea.wpcf7-form-control.wpcf7-textarea:focus {
  border-color: #ff0000 !important;
}

/* Submit button */
.wpcf7 form input[type="submit"].wpcf7-submit {
  background-color: #ff0000 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 12px 32px !important;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.wpcf7 form input[type="submit"].wpcf7-submit:hover,
.wpcf7 form input[type="submit"].wpcf7-submit:focus {
  background-color: #000 !important;
  color: #fff !important;
}

/* Header search: round input + red button */
#aj-pro-header-search .search-field {
  border: 1px solid #e5e5e5 !important;
  border-radius: 999px !important;
  padding: 0 20px !important;
  background: #fff;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#aj-pro-header-search .search-field:focus,
#aj-pro-header-search .search-field:focus-visible,
#aj-pro-header-search .search-field:active {
  border: 1px solid #ff0000 !important;
  border-color: #ff0000 !important;
  outline: none !important;
  box-shadow: 0 0 0 1px #ff0000 !important;
}

#aj-pro-header-search .aj-pro-search-submit {
  border: none !important;
  border-radius: 999px !important;
  padding: 0 24px !important;
  background-color: #ff0000 !important;
  color: #fff !important;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

#aj-pro-header-search .aj-pro-search-submit:hover,
#aj-pro-header-search .aj-pro-search-submit:focus {
  background-color: #000 !important;
  color: #fff !important;
}

/* আগের ৩ লাইন লুকানো */
.aj-pro-menu-toggle > * {
  display: none !important;
}

.aj-pro-menu-toggle {
  position: relative;
}

/* নতুন ২ লাইন */
.aj-pro-menu-toggle::before,
.aj-pro-menu-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  background: #111; /* লাইনের রঙ */
  border-radius: 2px;
  transform: translateX(-50%);
  transition: all .25s ease;
}

.aj-pro-menu-toggle::before { top: calc(50% - 5px); }
.aj-pro-menu-toggle::after  { top: calc(50% + 3px); }

/* মেনু খোলা অবস্থায় X আইকন */
.aj-pro-menu-toggle[aria-expanded="true"]::before {
  top: 50%;
  transform: translateX(-50%) rotate(45deg);
}
.aj-pro-menu-toggle[aria-expanded="true"]::after {
  top: 50%;
  transform: translateX(-50%) rotate(-45deg);
}


/* ==========================================================================
   Fixes: mobile / tablet
   ========================================================================== */

/* Elementor Nav Menu widget: same 2-line icon (hide the 3rd bar). */
.aj-pro-el-menu-bars i:nth-child(3) { display: none; }
.aj-pro-el-menu-wrap .aj-pro-el-menu-toggle[aria-expanded="true"] .aj-pro-el-menu-bars i:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.aj-pro-el-menu-wrap .aj-pro-el-menu-toggle[aria-expanded="true"] .aj-pro-el-menu-bars i:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.aj-pro-el-menu-bars i { transition: transform .25s ease; }

/* Blog sidebar: nothing may overflow the card or the screen (search bar was cut in half). */
.aj-pro-sidebar,
.aj-pro-sidebar > *,
.aj-pro-sidebar .widget,
.aj-pro-sidebar .wp-block-search,
.aj-pro-sidebar .wp-block-group,
.aj-pro-sidebar .wp-block-latest-posts,
.aj-pro-sidebar .wp-block-search__inside-wrapper {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.aj-pro-sidebar { overflow-wrap: anywhere; }

.aj-pro-sidebar .wp-block-search__inside-wrapper {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
}

.aj-pro-sidebar .wp-block-search__input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
}

.aj-pro-sidebar .wp-block-search__button {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Classic search form (searchform.php) used inside the sidebar */
.aj-pro-sidebar .aj-pro-search-form { display: flex; gap: 8px; max-width: 100%; }
.aj-pro-sidebar .aj-pro-search-form label { flex: 1 1 0; min-width: 0; }
.aj-pro-sidebar .aj-pro-search-form .search-field { width: 100%; min-width: 0; box-sizing: border-box; }

/* Tablet + mobile: one column so the cards never run off-screen */
@media (max-width: 900px) {
  .aj-pro-content-grid { grid-template-columns: minmax(0, 1fr); }
  .aj-pro-sidebar { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .aj-pro-sidebar .wp-block-search__inside-wrapper { gap: 6px; }
  .aj-pro-sidebar .wp-block-search__button { padding: 10px 18px !important; }
  .aj-pro-sidebar .wp-block-heading,
  .aj-pro-sidebar .widget-title { font-size: clamp(24px, 8vw, 34px); line-height: 1.2; }
}
