/* =========================
   Global Layout & Reset
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", Arial, sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

/* Container */
.main-container {
  padding: 10px;
  max-width: 1200px;
  margin: auto;
}

/* =========================
   Header
========================= */
.fullheader {
  background-color: #04AA6D;
  color: #fff;
  text-align: center;
  padding: 10px;
}

/* =========================
   Scrolling Ads
========================= */
.scrolling-ad {
  width: 100%;
  overflow: hidden;
  background: #fdf6e3;
  border-top: 2px solid #f1c40f;
  border-bottom: 2px solid #f1c40f;
  padding: 8px 20px;
}

.scrolling-ad p {
  white-space: nowrap;
  display: inline-block;
  animation: scrollText 20s linear infinite;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin: 0;
  padding-left: 100%;
}

@keyframes scrollText {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* =========================
   Services & Categories
========================= */
.services-section,
.categories-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.service-card,
.category-card {
  text-align: center;
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 10px;
}

.service-card:hover,
.category-card:hover {
  transform: scale(1.05);
}

.service-card img,
.category-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;   /* crop to fill the box */
  border-radius: 8px;  /* optional rounded corners */
  background: #fff;    /* keep clean background */
  display: block;
  margin: auto;
}

figcaption {
  margin-top: 8px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

/* =========================
   Floating Ad
========================= */
#floatingAd {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 220px;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  border-radius: 12px;
  overflow: hidden;
  z-index: 9999;
}

#floatingAd img {
  width: 100%;
  display: block;
}

#floatingAd button {
  background: #ff4d4d;
  color: #fff;
  border: none;
  width: 100%;
  padding: 8px;
  font-weight: bold;
  cursor: pointer;
}

/* =========================
   Responsiveness
========================= */

/* Tablets */
@media (max-width: 992px) {
  .scrolling-ad p { font-size: 14px; }
  .service-card img, .category-card img { width: 70px; height: 70px; }
  figcaption { font-size: 13px; }
}

/* Mobiles */
@media (max-width: 600px) {
  .services-section,
  .categories-section {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
  }

  .service-card img,
  .category-card img {
    width: 60px;
    height: 60px;
  }

  figcaption { font-size: 12px; }

  #floatingAd {
    width: 180px;
    bottom: 10px;
    right: 10px;
  }
}

 body.dark{
      --bg:#1e1e2f;
      --text:#f5f5f5;
      --card-bg:#2c2c3e;
    }
   

    /* Carousel Styles */
    .carousel-wrapper {
      perspective: 1500px;
      width: 100%;
      max-width: 900px;
      height: 400px;
      margin: 100px auto 0;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
    }
    .carousel-track {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      cursor: grab;
    }
    .card {
      position: absolute;
      width: 260px;
      height: 200px;
      background: var(--card-bg,#fff);
      border-radius:16px;
      box-shadow:0 15px 40px rgba(0,0,0,0.3);
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:center;
      transition: transform 1s cubic-bezier(0.77,0,0.175,1), opacity 1s ease;
      top:50%;
      left:50%;
      transform-style: preserve-3d;
    }
    .card img {
      width: 90%;
      height: 150px;
      object-fit: cover;
      border-radius: 16px 16px 0 0;
    }
    .card h3 {
      padding: 5px 0;
      text-align:center;
    }

    /* Controls */
    .controls {
      position: absolute;
      bottom: 20px;
      left:50%;
      transform: translateX(-50%);
      display: flex;
      gap: 8px;
      z-index:100;
    }
    .dot {
      width:12px; height:12px;
      border-radius:50%;
      background:#888;
      cursor:pointer;
    }
    .dot.active {
      background:#333;
    }
    .arrow {
      position:absolute;
      top:50%;
      transform:translateY(-50%);
      background: rgba(0,0,0,0.4);
      color:#fff;
      border:none;
      border-radius:50%;
      width:36px;
      height:36px;
      cursor:pointer;
      z-index:100;
    }
    #prevBtn { left:10px }
    #nextBtn { right:10px }