/* DoctorRank 1.0.1 */

/* Grid: 2 columns desktop, 1 column mobile */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}
@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.medical-gallery-widget {
  padding: 20px 0;
}
.gallery-breadcrumbs {
  font-size: 14px;
  margin-bottom: 20px;
}
.gallery-breadcrumbs .separator {
  margin: 0 8px;
}

.medical-gallery-title {
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 30px;
  line-height: 1.2;
}

.gallery-category-section {
  display: flex;
  flex-direction: column;
}
.feature-box-wrapper {
  margin-bottom: 18px;
  position: relative;
}
.feature-box {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.feature-overlay {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.feature-title {
  text-align: center;
  margin-top: 10px;
}
.category-title {
  font-size: 1.4em;
  margin: 0;
}
.category-title a {
  text-decoration: none;
}

/* Sub-category row: always inline (no stacking) */
.procedures-list {
  margin-top: 8px;
}
.procedure-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  transition: background 0.3s ease;
  flex-wrap: nowrap; /* keep inline */
}
.procedure-item:hover {
  background: rgba(44, 90, 160, 0.05);
}
.procedure-content h3 {
  margin: 0;
  font-size: 1.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-all-btn {
  display: inline-block;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid currentColor;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: transform 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap; /* keep button inline */
}
.view-all-btn:hover {
  transform: translateY(-2px);
}

/* Separator: square logo, no shadow */
.category-separator {
  position: relative;
  background-color: rgba(44, 90, 160, 0.3);
  height: 2px;
  margin: 24px 0 8px;
}
.category-separator .separator-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: 1 / 1;
  background: #fff;
}
.category-separator .separator-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Keep inline on mobile as well */
@media (max-width: 768px) {
  .procedure-item {
    flex-direction: row !important;
  }
}

/* Elementor Editor Enhancements */
.elementor-editor-active .medical-gallery-widget {
  pointer-events: auto;
}

/* Prevent conflicts with Elementor repeater controls */
.elementor-control[data-setting="subcats"] .elementor-repeater-add {
  z-index: 10;
  position: relative;
}

/* Visual distinction for nested repeaters in editor */
.elementor-control[data-setting="subcats"] {
  border-left: 3px solid #2c5aa0;
  padding-left: 15px;
  margin-left: 10px;
  background: rgba(44, 90, 160, 0.05);
}

/* Ensure proper spacing in editor */
.elementor-control[data-setting="subcats"] .elementor-repeater-row {
  margin-bottom: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Make "Add Item" buttons visually distinct - FORCE OVERRIDE Elementor styles */
.elementor-control[data-setting="gallery_categories"] .elementor-repeater-add {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: 2px solid #667eea !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.elementor-control[data-setting="gallery_categories"]
  .elementor-repeater-add:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.elementor-control[data-setting="subcats"] .elementor-repeater-add {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
  color: white !important;
  border: 2px solid #f093fb !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.elementor-control[data-setting="subcats"] .elementor-repeater-add:hover {
  background: linear-gradient(135deg, #e085e8 0%, #e54b5f 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Add visual indicators to distinguish button types - FORCE OVERRIDE */
.elementor-control[data-setting="gallery_categories"]
  .elementor-repeater-add::before {
  content: "📁 " !important;
  margin-right: 5px !important;
  display: inline-block !important;
}

.elementor-control[data-setting="subcats"] .elementor-repeater-add::before {
  content: "📄 " !important;
  margin-right: 5px !important;
  display: inline-block !important;
}

/* Force button text color */
.elementor-control[data-setting="gallery_categories"]
  .elementor-repeater-add
  span,
.elementor-control[data-setting="gallery_categories"]
  .elementor-repeater-add
  i {
  color: white !important;
}

.elementor-control[data-setting="subcats"] .elementor-repeater-add span,
.elementor-control[data-setting="subcats"] .elementor-repeater-add i {
  color: white !important;
}

/* Additional high-specificity selectors to override Elementor */
body
  .elementor-control[data-setting="gallery_categories"]
  .elementor-button-wrapper
  .elementor-button.elementor-repeater-add {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: 2px solid #667eea !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

body
  .elementor-control[data-setting="subcats"]
  .elementor-button-wrapper
  .elementor-button.elementor-repeater-add {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
  color: white !important;
  border: 2px solid #f093fb !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

/* Force override for any Elementor inline styles */
body
  .elementor-control[data-setting="gallery_categories"]
  .elementor-repeater-add[style] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: 2px solid #667eea !important;
}

body .elementor-control[data-setting="subcats"] .elementor-repeater-add[style] {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
  color: white !important;
  border: 2px solid #f093fb !important;
}

/* Ensure icons are visible */
.mgw-icon {
  display: inline-block !important;
  margin-right: 5px !important;
  font-size: 14px !important;
}

/* Additional specificity for button states */
body
  .elementor-control[data-setting="gallery_categories"]
  .elementor-repeater-add:hover,
body
  .elementor-control[data-setting="gallery_categories"]
  .elementor-repeater-add:focus {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

body .elementor-control[data-setting="subcats"] .elementor-repeater-add:hover,
body .elementor-control[data-setting="subcats"] .elementor-repeater-add:focus {
  background: linear-gradient(135deg, #e085e8 0%, #e54b5f 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

body .medical-gallery-widget h3 {
  font-family: Optima LT W05 Roman !important;
}

body .medical-gallery-widget .view-all-btn {
  font-family: Helvetica !important;
}

body .procedures-list {
  margin-top: 8px;
  z-index: 1111;
  position: relative;
}

body .feature-box:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 10px 25px rgb(0 0 0 / 41%) !important;
}
