/*
 * IMAAR International — Google Reviews Section
 * =============================================
 * Premium corporate design: Deep Navy + Antique Gold
 * Inspired by Big Four consulting aesthetics
 * =============================================
 * File: /assets/css/google-reviews.css
 * Author: IMAAR Web Team
 * Version: 1.0.0
 */

/* ─── Custom Properties ──────────────────────────────────────────────────────── */
:root {
  --gr-navy-deep:    #0A1628;
  --gr-navy-mid:     #152544;
  --gr-navy-light:   #1E3A5F;
  --gr-gold:         #C9A84C;
  --gr-gold-light:   #E8C96B;
  --gr-gold-subtle:  rgba(201, 168, 76, 0.12);
  --gr-white:        #FFFFFF;
  --gr-silver:       #F4F6FA;
  --gr-silver-dark:  #E8ECF2;
  --gr-text-primary: #0A1628;
  --gr-text-body:    #4A5568;
  --gr-text-muted:   #718096;
  --gr-star:         #F5A623;
  --gr-radius:       12px;
  --gr-radius-sm:    8px;
  --gr-shadow:       0 4px 24px rgba(10, 22, 40, 0.10);
  --gr-shadow-hover: 0 12px 40px rgba(10, 22, 40, 0.18);
  --gr-transition:   0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography — loaded via preconnect in HTML */
  --gr-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --gr-font-body:    'Inter', system-ui, -apple-system, sans-serif;
}

/* ─── Section Shell ──────────────────────────────────────────────────────────── */
#imaar-reviews {
  background:  linear-gradient(165deg, var(--gr-navy-deep) 0%, var(--gr-navy-mid) 60%, var(--gr-navy-light) 100%);
  padding:     80px 0 0;
  overflow:    hidden;
  position:    relative;
}

/* Decorative gold grain overlay — very subtle, won't affect legibility */
#imaar-reviews::before {
  content:            '';
  position:           absolute;
  inset:              0;
  background-image:   radial-gradient(circle at 20% 30%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
                      radial-gradient(circle at 80% 70%, rgba(201, 168, 76, 0.04) 0%, transparent 50%);
  pointer-events:     none;
}

.gr-container {
  max-width:   1200px;
  margin:      0 auto;
  padding:     0 24px;
  position:    relative;
  z-index:     1;
}

/* ─── Section Header ─────────────────────────────────────────────────────────── */
.gr-header {
  text-align:    center;
  margin-bottom: 48px;
}

.gr-eyebrow {
  font-family:    var(--gr-font-body);
  font-size:      0.75rem;
  font-weight:    600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color:          var(--gr-gold);
  margin:         0 0 16px;
}

.gr-title {
  font-family:  var(--gr-font-display);
  font-size:    clamp(1.9rem, 4vw, 2.75rem);
  font-weight:  700;
  color:        var(--gr-white);
  line-height:  1.2;
  margin:       0 0 12px;
  letter-spacing: -0.01em;
}

/* The signature element: a short gold rule beneath the heading */
.gr-title::after {
  content:     '';
  display:     block;
  width:       56px;
  height:      3px;
  background:  linear-gradient(90deg, var(--gr-gold) 0%, var(--gr-gold-light) 100%);
  margin:      16px auto 0;
  border-radius: 2px;
}

.gr-subtitle {
  font-family:   var(--gr-font-body);
  font-size:     1rem;
  color:         rgba(255, 255, 255, 0.65);
  margin:        0 0 32px;
  letter-spacing: 0.01em;
}

/* ─── Aggregate Rating Block ─────────────────────────────────────────────────── */
.gr-aggregate {
  display:         inline-flex;
  flex-direction:  column;
  align-items:     center;
  gap:             6px;
  background:      rgba(255, 255, 255, 0.06);
  border:          1px solid rgba(201, 168, 76, 0.25);
  border-radius:   var(--gr-radius);
  padding:         20px 36px;
  margin-bottom:   40px;
  backdrop-filter: blur(8px);
}

.gr-aggregate-stars {
  display:  flex;
  gap:      4px;
  color:    var(--gr-star);
  font-size: 1.4rem;
  line-height: 1;
}

.gr-aggregate-score {
  font-family:  var(--gr-font-display);
  font-size:    2rem;
  font-weight:  700;
  color:        var(--gr-white);
  line-height:  1;
}

.gr-aggregate-score span {
  font-size:   1.1rem;
  font-weight: 400;
  color:       rgba(255, 255, 255, 0.65);
}

.gr-aggregate-count {
  font-family: var(--gr-font-body);
  font-size:   0.85rem;
  color:       rgba(255, 255, 255, 0.55);
  margin:      0;
}

/* Skeleton loader for aggregate */
.gr-aggregate.is-loading .gr-aggregate-score,
.gr-aggregate.is-loading .gr-aggregate-count {
  background:    linear-gradient(90deg, rgba(255,255,255,0.08) 25%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.08) 75%);
  background-size: 200% 100%;
  animation:     gr-shimmer 1.4s infinite;
  border-radius: 4px;
  color:         transparent;
  min-width:     100px;
}

/* ─── Carousel ───────────────────────────────────────────────────────────────── */
.gr-carousel-wrap {
  position: relative;
  overflow: hidden;
  margin:   0 -4px;          /* slight negative bleed for card gutters */
  padding:  4px 4px 8px;     /* space for box-shadows */
}

.gr-carousel-track {
  display:    flex;
  gap:        24px;
  transition: transform var(--gr-transition);
  will-change: transform;
}

/* ─── Review Card ────────────────────────────────────────────────────────────── */
.gr-card {
  flex:           0 0 calc((100% - 48px) / 3);   /* 3-up desktop */
  background:     var(--gr-white);
  border-radius:  var(--gr-radius);
  padding:        28px 24px 24px;
  box-shadow:     var(--gr-shadow);
  display:        flex;
  flex-direction: column;
  gap:            14px;
  position:       relative;
  overflow:       hidden;
  transition:     transform var(--gr-transition), box-shadow var(--gr-transition);
  cursor:         default;
  /* Left accent border — appears on hover */
  border-left:    3px solid transparent;
}

.gr-card:hover {
  transform:   translateY(-4px);
  box-shadow:  var(--gr-shadow-hover);
  border-left: 3px solid var(--gr-gold);
}

/* Skeleton loader for cards */
.gr-card.is-skeleton {
  pointer-events: none;
}

.gr-card.is-skeleton .gr-card-avatar,
.gr-card.is-skeleton .gr-card-name,
.gr-card.is-skeleton .gr-card-stars,
.gr-card.is-skeleton .gr-card-text {
  background:    linear-gradient(90deg, #e8ecf2 25%, #f4f6fa 50%, #e8ecf2 75%);
  background-size: 200% 100%;
  animation:     gr-shimmer 1.4s infinite;
  color:         transparent;
  border-radius: 4px;
}

/* Card: author row */
.gr-card-author {
  display:     flex;
  align-items: center;
  gap:         12px;
}

.gr-card-avatar {
  width:         44px;
  height:        44px;
  border-radius: 50%;
  object-fit:    cover;
  flex-shrink:   0;
  background:    var(--gr-silver-dark);
}

.gr-card-avatar-fallback {
  width:           44px;
  height:          44px;
  border-radius:   50%;
  flex-shrink:     0;
  background:      linear-gradient(135deg, var(--gr-navy-deep) 0%, var(--gr-navy-light) 100%);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-family:     var(--gr-font-body);
  font-weight:     600;
  font-size:       1rem;
  color:           var(--gr-gold);
  letter-spacing:  0.05em;
}

.gr-card-meta {
  flex: 1;
  min-width: 0;
}

.gr-card-name {
  font-family:   var(--gr-font-body);
  font-size:     0.9rem;
  font-weight:   600;
  color:         var(--gr-text-primary);
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
  margin:        0 0 2px;
}

.gr-card-verified {
  font-family:  var(--gr-font-body);
  font-size:    0.7rem;
  color:        var(--gr-text-muted);
  display:      flex;
  align-items:  center;
  gap:          4px;
}

/* Google logo (inline SVG path) */
.gr-google-icon {
  width:  14px;
  height: 14px;
  flex-shrink: 0;
}

/* Card: stars + date row */
.gr-card-rating-row {
  display:     flex;
  align-items: center;
  justify-content: space-between;
}

.gr-card-stars {
  color:       var(--gr-star);
  font-size:   0.9rem;
  letter-spacing: 1px;
  line-height: 1;
}

.gr-card-date {
  font-family: var(--gr-font-body);
  font-size:   0.72rem;
  color:       var(--gr-text-muted);
}

/* Card: review text */
.gr-card-text {
  font-family:   var(--gr-font-body);
  font-size:     0.875rem;
  line-height:   1.65;
  color:         var(--gr-text-body);
  margin:        0;
  flex:          1;
}

.gr-card-text.is-clamped {
  display:            -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow:           hidden;
}

/* "Read more" toggle */
.gr-read-more {
  font-family:  var(--gr-font-body);
  font-size:    0.8rem;
  font-weight:  600;
  color:        var(--gr-navy-mid);
  background:   none;
  border:       none;
  padding:      0;
  cursor:       pointer;
  align-self:   flex-start;
  transition:   color var(--gr-transition);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gr-read-more:hover { color: var(--gr-gold); }

/* Card: Google footer */
.gr-card-footer {
  display:     flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 10px;
  border-top:  1px solid var(--gr-silver-dark);
  margin-top:  auto;
}

.gr-card-footer-link {
  font-family:  var(--gr-font-body);
  font-size:    0.72rem;
  color:        var(--gr-text-muted);
  text-decoration: none;
  display:      flex;
  align-items:  center;
  gap:          5px;
  transition:   color var(--gr-transition);
}

.gr-card-footer-link:hover { color: var(--gr-navy-mid); }

/* ─── Carousel Controls ──────────────────────────────────────────────────────── */
.gr-carousel-controls {
  display:     flex;
  align-items: center;
  justify-content: center;
  gap:         16px;
  margin-top:  32px;
}

.gr-btn-nav {
  width:           42px;
  height:          42px;
  border-radius:   50%;
  border:          1px solid rgba(201, 168, 76, 0.4);
  background:      rgba(255, 255, 255, 0.06);
  color:           var(--gr-gold);
  display:         flex;
  align-items:     center;
  justify-content: center;
  cursor:          pointer;
  transition:      background var(--gr-transition), border-color var(--gr-transition);
  flex-shrink:     0;
}

.gr-btn-nav:hover {
  background:   rgba(201, 168, 76, 0.15);
  border-color: var(--gr-gold);
}

.gr-btn-nav:focus-visible {
  outline:        2px solid var(--gr-gold);
  outline-offset: 3px;
}

.gr-btn-nav svg {
  width:  18px;
  height: 18px;
  fill:   currentColor;
}

.gr-dots {
  display: flex;
  gap:     8px;
}

.gr-dot {
  width:         8px;
  height:        8px;
  border-radius: 50%;
  background:    rgba(255, 255, 255, 0.25);
  border:        none;
  padding:       0;
  cursor:        pointer;
  transition:    background var(--gr-transition), width var(--gr-transition);
  flex-shrink:   0;
}

.gr-dot.is-active {
  background: var(--gr-gold);
  width:      22px;
  border-radius: 4px;
}

.gr-dot:focus-visible {
  outline:        2px solid var(--gr-gold);
  outline-offset: 3px;
}

/* ─── External Review Buttons ────────────────────────────────────────────────── */
.gr-review-actions {
  display:         flex;
  justify-content: center;
  flex-wrap:       wrap;
  gap:             16px;
  margin-top:      40px;
}

.gr-btn {
  font-family:     var(--gr-font-body);
  font-size:       0.875rem;
  font-weight:     600;
  padding:         12px 28px;
  border-radius:   6px;
  cursor:          pointer;
  text-decoration: none;
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  transition:      all var(--gr-transition);
  line-height:     1;
  letter-spacing:  0.01em;
}

.gr-btn-primary {
  background:  var(--gr-gold);
  color:       var(--gr-navy-deep);
  border:      2px solid var(--gr-gold);
}

.gr-btn-primary:hover {
  background:   var(--gr-gold-light);
  border-color: var(--gr-gold-light);
  transform:    translateY(-2px);
  box-shadow:   0 6px 20px rgba(201, 168, 76, 0.35);
}

.gr-btn-outline {
  background:  transparent;
  color:       var(--gr-white);
  border:      2px solid rgba(255, 255, 255, 0.35);
}

.gr-btn-outline:hover {
  border-color: var(--gr-gold);
  color:        var(--gr-gold);
  transform:    translateY(-2px);
}

.gr-btn:focus-visible {
  outline:        2px solid var(--gr-gold);
  outline-offset: 3px;
}

/* ─── Trust Badges ───────────────────────────────────────────────────────────── */
.gr-trust {
  background:  rgba(255, 255, 255, 0.04);
  border-top:  1px solid rgba(255, 255, 255, 0.08);
  padding:     36px 0;
  margin-top:  56px;
}

.gr-trust-title {
  font-family:    var(--gr-font-body);
  font-size:      0.72rem;
  font-weight:    600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          rgba(255, 255, 255, 0.4);
  text-align:     center;
  margin:         0 0 20px;
}

.gr-trust-grid {
  display:         flex;
  flex-wrap:       wrap;
  justify-content: center;
  gap:             10px 12px;
  list-style:      none;
  margin:          0;
  padding:         0;
}

.gr-trust-item {
  display:      flex;
  align-items:  center;
  gap:          7px;
  background:   rgba(255, 255, 255, 0.06);
  border:       1px solid rgba(201, 168, 76, 0.2);
  border-radius: 40px;
  padding:      7px 16px;
  font-family:  var(--gr-font-body);
  font-size:    0.78rem;
  font-weight:  500;
  color:        rgba(255, 255, 255, 0.80);
  transition:   background var(--gr-transition), border-color var(--gr-transition);
}

.gr-trust-item:hover {
  background:   rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.5);
  color:        var(--gr-white);
}

.gr-trust-icon {
  width:      14px;
  height:     14px;
  color:      var(--gr-gold);
  flex-shrink: 0;
}

/* ─── CTA Section ────────────────────────────────────────────────────────────── */
.gr-cta {
  background:  var(--gr-white);
  padding:     64px 24px;
  text-align:  center;
}

.gr-cta-inner {
  max-width: 720px;
  margin:    0 auto;
}

.gr-cta-eyebrow {
  font-family:    var(--gr-font-body);
  font-size:      0.72rem;
  font-weight:    600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          var(--gr-gold);
  margin:         0 0 14px;
}

.gr-cta-heading {
  font-family:  var(--gr-font-display);
  font-size:    clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight:  700;
  color:        var(--gr-navy-deep);
  line-height:  1.25;
  margin:       0 0 12px;
  letter-spacing: -0.01em;
}

.gr-cta-sub {
  font-family: var(--gr-font-body);
  font-size:   1rem;
  color:       var(--gr-text-body);
  margin:      0 0 36px;
}

.gr-cta-buttons {
  display:         flex;
  justify-content: center;
  flex-wrap:       wrap;
  gap:             14px;
}

.gr-cta-btn {
  font-family:     var(--gr-font-body);
  font-size:       0.9rem;
  font-weight:     600;
  padding:         14px 30px;
  border-radius:   6px;
  cursor:          pointer;
  text-decoration: none;
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  transition:      all var(--gr-transition);
  line-height:     1;
}

.gr-cta-btn-primary {
  background:  var(--gr-navy-deep);
  color:       var(--gr-white);
  border:      2px solid var(--gr-navy-deep);
}

.gr-cta-btn-primary:hover {
  background:  var(--gr-navy-light);
  transform:   translateY(-2px);
  box-shadow:  0 8px 24px rgba(10, 22, 40, 0.22);
}

.gr-cta-btn-whatsapp {
  background:  #25D366;
  color:       var(--gr-white);
  border:      2px solid #25D366;
}

.gr-cta-btn-whatsapp:hover {
  background:  #1EB85A;
  transform:   translateY(-2px);
  box-shadow:  0 8px 24px rgba(37, 211, 102, 0.3);
}

.gr-cta-btn-gold {
  background:  var(--gr-gold);
  color:       var(--gr-navy-deep);
  border:      2px solid var(--gr-gold);
}

.gr-cta-btn-gold:hover {
  background:  var(--gr-gold-light);
  transform:   translateY(-2px);
  box-shadow:  0 8px 24px rgba(201, 168, 76, 0.35);
}

.gr-cta-btn-outline {
  background:  transparent;
  color:       var(--gr-navy-deep);
  border:      2px solid var(--gr-navy-deep);
}

.gr-cta-btn-outline:hover {
  background:  var(--gr-navy-deep);
  color:       var(--gr-white);
  transform:   translateY(-2px);
}

.gr-cta-btn:focus-visible {
  outline:        2px solid var(--gr-navy-mid);
  outline-offset: 3px;
}

/* ─── Internal Links ─────────────────────────────────────────────────────────── */
.gr-internal-links {
  display:         flex;
  flex-wrap:       wrap;
  justify-content: center;
  gap:             8px 16px;
  margin-top:      28px;
  list-style:      none;
  padding:         0;
}

.gr-internal-links a {
  font-family:     var(--gr-font-body);
  font-size:       0.8rem;
  color:           var(--gr-text-muted);
  text-decoration: none;
  transition:      color var(--gr-transition);
  position:        relative;
}

.gr-internal-links a::after {
  content:    '';
  position:   absolute;
  bottom:     -2px;
  left:       0;
  right:      0;
  height:     1px;
  background: var(--gr-gold);
  transform:  scaleX(0);
  transition: transform var(--gr-transition);
  transform-origin: left;
}

.gr-internal-links a:hover       { color: var(--gr-navy-deep); }
.gr-internal-links a:hover::after { transform: scaleX(1); }

/* ─── Shimmer Animation ──────────────────────────────────────────────────────── */
@keyframes gr-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ─── Error State ────────────────────────────────────────────────────────────── */
.gr-error {
  text-align:  center;
  padding:     40px 20px;
  color:       rgba(255, 255, 255, 0.65);
  font-family: var(--gr-font-body);
  font-size:   0.9rem;
}

/* ─── Responsive — Tablet ────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .gr-card {
    flex-basis: calc((100% - 24px) / 2);   /* 2-up */
  }

  #imaar-reviews  { padding-top: 64px; }
  .gr-title       { font-size:   clamp(1.6rem, 5vw, 2.2rem); }
  .gr-aggregate   { padding:     16px 24px; }
}

/* ─── Responsive — Mobile ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .gr-card {
    flex-basis: 100%;                       /* 1-up */
  }

  #imaar-reviews    { padding-top: 48px; }
  .gr-container     { padding:     0 16px; }
  .gr-aggregate     { padding:     14px 20px; }
  .gr-aggregate-score { font-size: 1.6rem; }
  .gr-review-actions { flex-direction: column; align-items: center; }
  .gr-btn           { width: 100%; justify-content: center; max-width: 280px; }
  .gr-cta-buttons   { flex-direction: column; align-items: center; }
  .gr-cta-btn       { width: 100%; justify-content: center; max-width: 300px; }
  .gr-btn-nav       { width: 36px; height: 36px; }
  .gr-trust         { padding: 28px 0; }
}

/* ─── Reduced motion ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .gr-carousel-track,
  .gr-card,
  .gr-btn,
  .gr-cta-btn,
  .gr-trust-item { transition: none !important; }

  @keyframes gr-shimmer { to { background-position: 0 0; } }
}
