/* ============================================================================
   CANOPUS.LK – COMPONENTS (HERO, CARDS, SERVICES, PROJECT, FORMS, FOOTER)
   ============================================================================ */

/* HERO (generic) */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: clamp(5rem, 12vw, 10rem) 0;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.7),
    rgba(0,0,0,0.4),
    rgba(0,0,0,0.18)
  );
  z-index: 1;
}

.hero .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 750px;
  margin: 0 auto;
}

/* HOMEPAGE HERO override example */
#home-hero {
  background-image: url('../assets/Home_Hero.png'); /* adjust path if needed */
}

/* SERVICE GRID – cards used on services.php when included into index */
.service-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-border);
  padding: clamp(1.6rem, 3vw, 2.1rem);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--c-primary-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.service-card-icon i,
.service-card-icon img {
  font-size: 1.8rem;
  max-width: 32px;
  max-height: 32px;
}

.service-card ul {
  list-style: none;
  padding-left: 0;
  margin-top: var(--space-md);
}

.service-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

/* PROJECT PAGE – hero + meta + info cards */
.project-hero {
  height: 520px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  margin-bottom: 40px;
}

@media (max-width: 992px) {
  .project-hero { height: 420px; }
}

@media (max-width: 576px) {
  .project-hero {
    height: 260px;
    border-radius: 10px;
  }
}

.project-title {
  font-weight: 800;
  color: var(--c-primary);
}

/* META BOX */
.meta-box {
  background: #fff;
  border-radius: 14px;
  padding: 30px 25px;
  box-shadow: var(--shadow-md);
  margin-bottom: 50px;
}

.meta-item i {
  font-size: 1.8rem;
  color: var(--c-primary);
}
.meta-item h6 {
  margin-top: 10px;
  font-weight: 600;
  color: var(--c-primary);
}
.meta-item p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}

/* INFO CARDS (Project Overview, Scope, Outcomes) */
.info-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  margin-bottom: 35px;
}
.info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.info-card h4 {
  color: var(--c-primary);
  font-weight: 700;
  margin-bottom: 20px;
}
.info-card p,
.info-card li {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* HIGHLIGHTED HORIZONTAL SERVICE CARDS (TIA / WWTP / Town Planning) */
.highlight-card {
  display: flex;
  flex-direction: row;
  gap: var(--space-lg);
  padding: 1.8rem;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  transition: 0.3s ease;
}

.highlight-card:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-lg);
}

.highlight-card-icon {
  min-width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(25,135,84,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.highlight-card-icon img {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

.highlight-card-body {
  flex: 1;
}

@media (max-width: 768px) {
  .highlight-card {
    flex-direction: column;
  }
  .highlight-card-icon {
    margin: 0 auto 1rem;
  }
}

/* CONTACT FORM BLOCK */
.contact-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
}

.contact-card h3 {
  margin-bottom: var(--space-md);
}

/* FORMS */
input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #d0d0d0;
  font-size: 1rem;
  margin-bottom: 1rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 2px rgba(25,135,84,0.15);
}

/* FOOTER */
.footer {
  background: var(--c-accent);
  color: #ffffff;
  padding: var(--space-2xl) 0;
}

.footer a {
  color: #cfeede;
}
.footer a:hover {
  color: #ffffff;
}

.footer-columns {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer small {
  display: block;
  margin-top: 2rem;
  color: #aad7c3;
}

/* PREMIUM BADGE OVERLAY */
.category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #198754;
  color: white;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
  z-index: 3;
}

/* ================================
   MASONRY GRID SYSTEM
   ================================ */

.masonry-grid {
  column-count: 3;
  column-gap: 1.5rem;
}

@media (max-width: 992px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 576px) {
  .masonry-grid {
    column-count: 1;
  }
}

/* Masonry Items */
.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

/* Ensure cards behave properly inside masonry */
.masonry-item .card {
  display: block;
}
