/* =============================================================
   COSTMASTERS — body.css
   Exact match to original design. Drop-in alongside your
   existing header/footer stylesheet.
   ============================================================= */

/* ── Global resets scoped to body sections ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ── Shared layout wrapper (mirrors .content-wrapper in master) ── */
.content-wrapper {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ──────────────────────────────────────────
   SHARED GRADIENT BUTTON  (reusable)
────────────────────────────────────────── */
.gradient-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 22px;
  border-radius: 50px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, #0d47a1 0%, #0b3d91 60%, #4F9FFF 100%);
  transition: box-shadow 0.3s ease, opacity 0.2s;
}

.gradient-btn:hover {
  box-shadow: 0 6px 20px rgba(13, 71, 161, 0.45);
  color: #fff;
}

/* ══════════════════════════════════════════
   1.  HERO CAROUSEL
══════════════════════════════════════════ */
#heroCarousel {
  height: 450px;
  position: relative;
  overflow: hidden;
}

#heroCarousel .carousel-item {
  height: 450px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(10, 10, 26, 0.85) 20%,
      rgba(10, 10, 26, 0.40) 80%,
      transparent 100%);
  z-index: 1;
}

.hero-text-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  color: #fff;
}

.hero-h1 {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 450;
  font-size: 64px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-sublinks {
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.hero-sublinks span {
  color: #4F9FFF;
}

.hero-subheading {
  font-size: 24px;
  font-weight: 400;
  color: #fff;
  opacity: 0.9;
  margin: 0;
}

/* Carousel indicators – dots */
#heroCarousel .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  margin: 0 6px;
  opacity: 1;
  transition: background 0.3s;
}

#heroCarousel .carousel-indicators .active {
  background: #4F9FFF !important;
}

/* ══════════════════════════════════════════
   2.  WELCOME / ABOUT SECTION
══════════════════════════════════════════ */
.welcome-section {
  padding: 40px 0 30px;
  background: #ffffff;
  color: #333;
  overflow: hidden;
}

.welcome-title {
  font-size: 42px;
  font-weight: 700;
  color: #0a0a1a;
  margin-bottom: 25px;
}

.welcome-title span {
  color: #0d47a1;
}

.welcome-lead {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 40px;
}

.w-feature-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.w-feature-icon {
  width: 50px;
  height: 50px;
  border: 1px solid #4F9FFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4F9FFF;
  font-size: 20px;
  flex-shrink: 0;
}

.w-feature-text strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
  color: #0a0a1a;
}

.w-feature-text p {
  font-size: 14px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* Globe assembly */
.about-right {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 20px;
}

.about_globe {
  position: relative;
  width: 100%;
  max-width: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 120%;
  max-width: none !important;
  animation: rotateCircle 10s linear infinite;
}

.globe-img {
  position: relative;
  z-index: 2;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.images-outer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.images-outer img {
  width: 100%;
  max-width: 450px;
  max-height: 450px;
  object-fit: contain;
  background: transparent !important;
  box-shadow: none !important;
  animation: floatCenterEffect 5s ease-in-out infinite;
}

@keyframes rotateCircle {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes floatCenterEffect {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

/* ================= OUR ESTEEMED CLIENTS GRID SECTION ================= */
.esteemed-clients-section {
  padding: 60px 0;
  min-height: 85vh;
  /* Slightly less than screen height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 15px;
  height: 100%;

  /* Add these two lines to squeeze the cards inward */
  max-width: 900px;
  margin: 0 auto;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 15px;
  height: 100%;
}

.client-grid-box {
  background: rgb(255, 255, 255);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* REMOVED padding */
  overflow: hidden;
  /* ADDED so image corners don't overlap the border-radius */
  transition: all 0.3s ease;
}

.client-grid-box:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(79, 159, 255, 0.3);
  transform: translateY(-2px);
}

/* Logos made smaller here (60% instead of 100%) */
.client-grid-box img {
  width: 100%;
  /* CHANGED from max-width: 60% */
  height: 100%;
  /* CHANGED from max-height: 60% */
  object-fit: contain;
  /* KEEPS aspect ratio intact so logos never stretch */
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.client-grid-box:hover img {
  opacity: 1;
}

/* Specific styling for the 20th item button slot */
.client-btn-slot {
  background: transparent;
  border: none;
  padding: 0;
  /* Ensures the button fills the slot perfectly */
}

.client-btn-slot:hover {
  background: transparent;
  border: none;
  transform: none;
}

.client-btn-slot .gradient-btn {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  font-size: 14px;
  margin: 0;
}

/* Custom indicators spacing */
.grid-carousel-indicators {
  position: relative;
  margin-top: 40px;
  margin-bottom: 0;
}

.grid-carousel-indicators button {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  margin: 0 6px !important;
  background-color: rgba(255, 255, 255, 0.4) !important;
  border: none !important;
}

.grid-carousel-indicators .active {
  background-color: #4F9FFF !important;
}

/* Mobile responsiveness */
@media (max-width: 991px) {
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(10, 1fr);
    height: auto;
  }

  .clients-grid-container {
    height: auto;
  }

  .client-grid-box {
    height: 80px;
  }

  .esteemed-clients-section {
    min-height: auto;
  }
}

/* ══════════════════════════════════════════
   4.  TRUST STATS
══════════════════════════════════════════ */
.trust-stats-section {
  position: relative;
  padding: 50px 0 5px;
  overflow: hidden;
}

.stats-bg-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 18px;
  background: #ffffff;
  transform: translateY(-50%);
  z-index: 1;
}

.stat-card {
  position: relative;
  height: 250px;
  background-size: cover;
  background-position: center;
  /* fallback when no bg image supplied */
  background-color: #0d1b3e;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 26, 0.75);
  transition: background 0.3s ease;
}

.stat-card:hover .stat-overlay {
  background: rgba(10, 10, 26, 0.6);
}

.stat-content {
  position: relative;
  z-index: 3;
  padding: 20px;
}

.stat-number {
  font-size: 80px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0;
  line-height: 1;
}

.stat-label {
  font-size: 32px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.stat-subtext {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto;
}

/* ══════════════════════════════════════════
   5.  SERVICES — WHO WE ARE
══════════════════════════════════════════ */
.services-section {
  padding: 40px 0;
  background: transparent;
}

.services-section>h2 {
  text-align: center;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.services-section>p {
  text-align: center;
  color: rgb(230, 230, 230);
  margin-bottom: 30px;
  font-size: 15px;
}

.service-card {
  background: #ffffff;
  border-radius: 4px;
  padding: 40px 25px 80px;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: block;
  text-decoration: none;
}

.s-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #0d47a1;
  margin-bottom: 30px;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.s-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.s-card-list li {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.5;
  transition: color 0.3s ease;
}

.s-arrow-box {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 50px;
  background: #0088cc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-left-radius: 15px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.s-arrow-box i {
  color: #fff;
  font-size: 18px;
  transition: color 0.3s ease;
}

/* Hover */
.service-card:hover {
  background: linear-gradient(145deg, #0d47a1 0%, #0b3d91 60%, #4F9FFF 100%);
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(13, 71, 161, 0.35);
}

.service-card:hover .s-card-title,
.service-card:hover .s-card-list li {
  color: #fff;
}

.service-card:hover .s-arrow-box {
  right: auto;
  left: 0;
  background: #fff;
  border-top-left-radius: 0;
  border-top-right-radius: 15px;
}

.service-card:hover .s-arrow-box i {
  color: #0088cc;
}

/* ══════════════════════════════════════════
   6.  LATEST NEWS — fixed side panel
══════════════════════════════════════════ */
.latest-news-wrapper {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 2000;
  height: 246px;
  display: flex;
  align-items: center;
}

.latest-news-container {
  position: relative;
  height: 246px;
  display: flex;
  align-items: center;
}

.latest-news-strip {
  width: 35px;
  /* 62% of 246px ≈ 153px */
  height: 153px;
  background: #3a3a3a;
  border-radius: 14px 0 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  z-index: 2;
  cursor: pointer;
  flex-shrink: 0;
}

.latest-news-strip i {
  color: #3b82f6;
  font-size: 14px;
}

.latest-news-strip span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 1.5px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.latest-news-panel {
  width: 294px;
  height: 153px;
  background: #0b0f14;
  border-radius: 14px 0 0 14px;
  padding: 14px;
  position: absolute;
  right: 35px;
  /* sits immediately left of the strip */
  top: 50%;
  transform: translateY(-50%) translateX(100%);
  transition: transform 0.45s ease;
  box-shadow: -7px 0 28px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.latest-news-wrapper:hover .latest-news-panel {
  transform: translateY(-50%) translateX(0);
}

.featured-label {
  color: #3b82f6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 2px;
  white-space: nowrap;
  display: block;
}

.news-content h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 2px;
  color: #fff;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.news-date {
  color: #9ca3af;
  font-size: 12px;
  margin: 2px 0 8px;
  display: block;
}

.news-date i {
  margin-right: 4px;
}

.news-read-btn {
  background: #2f2f2f;
  padding: 5px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  transition: background 0.3s ease, color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  width: fit-content;
}

.news-read-btn:hover {
  background: #3b82f6;
  color: #000;
}

.news-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
}

.news-dots .dot {
  height: 7px;
  width: 7px;
  background: #555;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
  display: inline-block;
}

.news-dots .dot.active {
  background: #3b82f6;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1199px) {
  .content-wrapper {
    padding: 0 24px;
  }

  .hero-h1 {
    font-size: 52px;
  }

  .clients-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

@media (max-width: 991px) {

  #heroCarousel,
  #heroCarousel .carousel-item {
    height: 360px;
  }

  .hero-h1 {
    font-size: 40px;
  }

  .hero-sublinks {
    font-size: 15px;
  }

  .hero-subheading {
    font-size: 18px;
  }

  .welcome-section {
    padding: 40px 0 20px;
  }

  .welcome-title {
    font-size: 32px;
  }

  .about-right {
    height: 400px;
    justify-content: center;
    padding-right: 0;
    margin-top: 20px;
  }

  .about_globe {
    max-width: 340px;
  }

  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat-number {
    font-size: 56px;
  }

  .stat-label {
    font-size: 24px;
  }

  .latest-news-wrapper {
    display: none;
  }
}

@media (max-width: 767px) {

  #heroCarousel,
  #heroCarousel .carousel-item {
    height: 280px;
  }

  .hero-h1 {
    font-size: 30px;
  }

  .hero-sublinks {
    font-size: 12px;
    letter-spacing: 0;
  }

  .hero-subheading {
    font-size: 14px;
  }

  .welcome-title {
    font-size: 26px;
  }

  .welcome-lead {
    font-size: 14px;
  }

  .about-right {
    height: 320px;
  }

  .about_globe {
    max-width: 260px;
  }

  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .client-logo-card {
    height: 72px;
  }

  .client-logo-card img {
    max-height: 36px;
    max-width: 90px;
  }

  .client-view-more {
    height: 72px;
    font-size: 12px;
  }

  .section-title {
    font-size: 26px;
  }

  .stat-card {
    height: 150px;
  }

  .stat-number {
    font-size: 42px;
  }

  .stat-label {
    font-size: 20px;
  }

  .stat-subtext {
    font-size: 13px;
  }

  .stats-bg-line {
    height: 10px;
  }

  .s-card-title {
    font-size: 18px;
  }

  .service-card {
    padding: 28px 18px 70px;
  }
}

@media (max-width: 575px) {
  .content-wrapper {
    padding: 0 16px;
  }

  #heroCarousel,
  #heroCarousel .carousel-item {
    height: 240px;
  }

  .hero-h1 {
    font-size: 24px;
  }

  .clients-grid {
    gap: 8px;
  }

  .stat-card {
    height: 130px;
  }

  .stat-number {
    font-size: 36px;
  }

  .stat-label {
    font-size: 18px;
  }
}

/* 1. Grid Container */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
}

/* 2. The Box: Flexbox prevents cropping */
.client-grid-box {
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  /* Slightly taller to accommodate square logos */
  padding: 12px;
  /* Uniform safety buffer */
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: visible;
  /* Ensures nothing is cut off if there's a shadow */
}

/* 3. The Figure/Container */
.client-grid-box figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 4. The Image: The specific "No-Crop" logic */
.client-grid-box img {
  /* These 4 lines ensure the logo stays complete and centered */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;

  /* Branding consistency */
  display: block;
  opacity: 0.95;
}

/* 5. Hover State */
.client-grid-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(223, 221, 221, 0.1);
  border-color: #4F9FFF;
}

.client-btn-slot .gradient-btn {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  padding: 0;
  margin: 0;
}