/* صف كروت محركات البحث تحت صورة الهيرو */

.hero-search-engines {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  bottom: -22px;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  pointer-events: none;
}

body.homepage .hero-search-engines .hero-float-card,
body.homepage .hero-search-engines a.hero-float-card,
body.homepage .hero-search-engines .hero-float-card.is-search-trigger,
body.homepage .hero-search-engines .hero-float-card.is-google-search {
  position: relative !important;
  inset: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  top: auto !important;
  pointer-events: auto;
  animation: heroFloatCardAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s both;
  max-width: 238px;
  min-width: 168px;
  flex: 1 1 168px;
  text-decoration: none;
  color: inherit;
  will-change: auto;
}

body.homepage .hero-search-engines .hero-float-card.is-google-search {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.hero-google-hit {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px 17px;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: right;
  cursor: pointer;
  color: inherit;
}

.hero-float-icon.is-google {
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  border: 1px solid #e5e7eb;
}

.hero-g-logo {
  display: block;
}

.hero-google-panel {
  padding: 0 12px 12px;
  border-top: 1px solid #f1f5f9;
}

.hero-google-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  margin: 10px 0 0;
}

.hero-google-field input {
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
}

.hero-google-go {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.hero-google-msg {
  margin: 8px 2px 0;
  font-size: 12px;
  font-weight: 800;
  color: #b91c1c;
  line-height: 1.4;
}

.hero-google-msg[hidden] {
  display: none !important;
}

.hero-search-engines .is-expanded {
  max-width: 300px;
  min-width: 240px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* صفحة google-search.html */
.gcs-page {
  width: 100%;
  max-width: none;
  margin: 20px 0 72px;
  padding-inline: clamp(14px, 2vw, 28px);
  box-sizing: border-box;
  display: grid;
  gap: 18px;
}

.gcs-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #4285f4);
  color: #fff;
  border-radius: 18px;
  padding: 26px 24px;
}

.gcs-hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
  color: #fff !important;
}

.gcs-hero p {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.92) !important;
}

.gcs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  margin-bottom: 14px;
}

.gcs-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
}

.gcs-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 900;
}

.gcs-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.gcs-form input[type='search'] {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
}

.gcs-form button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #4285f4;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gcs-status {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 750;
  color: #475569;
}

.gcs-status[data-kind='error'] {
  color: #b91c1c;
}

.gcs-status[data-kind='loading'] {
  color: #1d4ed8;
}

.gcs-spinner {
  width: 36px;
  height: 36px;
  margin: 18px auto;
  border: 3px solid #dbeafe;
  border-top-color: #4285f4;
  border-radius: 50%;
  animation: gcsSpin 0.8s linear infinite;
}

@keyframes gcsSpin {
  to {
    transform: rotate(360deg);
  }
}

.gcs-results {
  min-height: 120px;
}

/* Google CSE tweaks inside hub */
.gcs-results .gsc-control-cse {
  font-family: inherit !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.gcs-results .gsc-result {
  padding: 12px 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.gcs-results .gs-title {
  font-size: 17px !important;
  font-weight: 800 !important;
}

.gcs-results .gs-snippet,
.gcs-results .gs-visibleUrl {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

@media (max-width: 900px) {
  .hero-search-engines {
    position: static;
    bottom: auto;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    pointer-events: auto;
  }

  body.homepage .hero-search-engines .hero-float-card,
  body.homepage .hero-search-engines a.hero-float-card {
    max-width: none;
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .hero-search-engines {
    flex-direction: column;
    bottom: auto;
  }

  body.homepage .hero-search-engines .hero-float-card,
  body.homepage .hero-search-engines a.hero-float-card,
  .hero-search-engines .is-expanded {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 auto;
  }

  .gcs-form {
    grid-template-columns: 1fr;
  }
}
