/* ===== CSS Reset (modern minimal) ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html, body {
  min-height: 100%;
}
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== Design Tokens ===== */
:root {
  --clr-bg: #ffffff;
  --clr-text: #0b0b0b;
  --clr-muted: #5a5a5a;
  --clr-accent: #ce7f36; /* Vibrant Orange */
  --clr-accent-600: #b76f2f;
  --clr-accent-light: #faf7f4; /* Very subtle tint of theme color */
  --clr-accent-alt: #f7f3ef; /* Alternative subtle tint */
  --clr-surface: #f6f6f6;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
  --header-h: 70px;
}

/* Offset smooth-scroll anchors for sticky header */
:target {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Asta Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Battambang", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

/* ===== Utilities ===== */
.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}
.container.narrow {
  width: min(900px, 92vw);
}

.section {
  padding: 72px 0;
}
.section-title {
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
  margin: 0 0 20px;
}
.lead {
  font-size: 1.125rem;
  color: var(--clr-muted);
}
.grid-2 {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
.split {
  display: grid;
  gap: 16px;
}
/*for hovering */
/* Card container – equal height tiles with hover effect */
.services .card,
.products .card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  height: 340px;                  /* fixed height for all cards */
  background: #fff;
  border: 1px solid #eef2f5;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;                /* feels clickable */
}

/* Hover / tap interaction */
.services .card:hover,
.products .card:hover {
  transform: translateY(-6px);    /* lift effect */
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  border-color: var(--clr-accent);    /* subtle brand accent */
}

/* Unified card images */
.services .card img,
.products .card img {
  width: 100%;
  aspect-ratio: 4/3;
  height: auto;
  max-height: 140px;
  object-fit: contain;
  background: var(--clr-surface);
  padding: clamp(8px, 4vw, 18px);
  border-bottom: 1px solid #eef2f5;
}

/* Caption area fills remaining space */
.services .card figcaption,
.products .card figcaption {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 14px;
  overflow: hidden;
}

/* Unified captions */
.services .card h3,
.products .card h3 {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin: 0 0 0.5rem;
}

.services .card p,
.products .card p {
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  line-height: 1.4;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/*for hovering */
/* General card images (Services / Products) */
.card img {
  width: 100%;
  aspect-ratio: 4/3;        /* balanced ratio */
  height: auto;
  object-fit: contain;      /* never crop the icons */
  background: var(--clr-surface);
  padding: clamp(8px, 4vw, 18px);
  border-bottom: 1px solid #eef2f5;
}

@supports not (aspect-ratio: 4/3) {
  .card img {
    height: clamp(100px, 35vw, 180px);
  }
}

/* Card captions */
.card h3 {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-top: 0.5rem;
}
.card p {
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  line-height: 1.4;
  margin-top: 0.25rem;
}
/* above part added  newly for the resizing the images */
.cards {
  display: grid;
  gap: 18px;
}
.cards-3 { grid-template-columns: 1fr; }
.cards-4 { grid-template-columns: 1fr; }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card.ghost {
  background: var(--clr-surface);
  box-shadow: none;
  border: 1px solid #eee;
}


.card-body h3 {
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

/* ===== Buttons ===== */
.btn {
  --p: 12px;
  display: inline-block;
  padding: var(--p) 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: transform .06s ease, background .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--clr-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--clr-accent-600);
}

.btn-outline {
  background: transparent;
  color: var(--clr-text);
  border-color: var(--clr-text);
}
.btn-outline:hover {
  background: var(--clr-text);
  color: #fff;
}

/* ===== Modern Navigation ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  height: var(--header-h);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  width: 240px;
}

/* Desktop Navigation */
.nav-menu {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--clr-text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--clr-accent);
  background-color: rgba(206, 127, 54, 0.1);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  gap: 4px;
}

.nav-toggle-bar {
  width: 22px;
  height: 2px;
  background-color: var(--clr-text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Navigation Overlay */
.nav-overlay {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-h));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 999;
}

.nav-overlay.active {
  transform: translateX(0);
}

.nav-mobile {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-mobile-link {
  text-decoration: none;
  color: var(--clr-text);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.nav-mobile-link:hover {
  color: var(--clr-accent);
  background-color: rgba(206, 127, 54, 0.1);
  border-left-color: var(--clr-accent);
  transform: translateX(8px);
}

/* Desktop Navigation - Show on larger screens */
@media (min-width: 1100px) {
  .nav-menu {
    display: flex;
  }
  
  .nav-toggle {
    display: none;
  }
  
  .nav-overlay {
    display: none;
  }

}

/* ===== Who We Are ===== */
#who-we-are p {
  font-size: 1.1rem;
  line-height: 1.7;  
  color: var(--clr-text);
  margin-bottom: 1.5rem;
}

#who-we-are .card.ghost h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--clr-text);
}

#who-we-are .card.ghost p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--clr-muted);
  margin-bottom: 0;
}

/* ===== Why Us Section ===== */
#why-us .card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--clr-text);
}

#why-us .card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--clr-muted);
  margin-bottom: 0;
}

/* ===== Our Services Section ===== */
.services-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.service-item {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  align-items: flex-start;
}

.service-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: rgba(206, 127, 54, 0.2);
}

.service-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-accent-light);
  border-radius: 12px;
  padding: 1rem;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-content h3 {
  font-size: 1.4rem;
  margin: 0 0 0.75rem 0;
  color: var(--clr-text);
  font-weight: 700;
}

.service-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--clr-muted);
  margin: 0;
}

.grecaptcha-badge {
      visibility: hidden;
}

/* reCAPTCHA Notice */
    .recaptcha-notice {
      margin-top: 0px;
      font-size: 0.75rem;
      color: var(--clr-muted);
      text-align: left;
      line-height: 1.4;
    }

    .recaptcha-notice a {
      color: var(--clr-accent-600);
      text-decoration: none;
      transition: color 0.3s ease;
    }

    .recaptcha-notice a:hover {
      color: var(--color-primary-dark);
      text-decoration: underline;
    }

/* Mobile Services Layout - 3 rows to utilize width */
@media (max-width: 767px) {
  .service-item {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto;
  }
  
  .service-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }
  
  .service-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

/* Responsive Services Grid */
@media (min-width: 768px) {
  .services-grid {
    gap: 1.5rem;
  }
  
  .service-item {
    padding: 1.8rem;
  }
  
  .service-icon {
    width: 70px;
    height: 70px;
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .service-item {
    padding: 2rem;
  }
  
  .service-icon {
    width: 80px;
    height: 80px;
  }
}

/* ===== Our Products Section ===== */
#our-products .card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  color: var(--clr-text);
}

#our-products .card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--clr-muted);
}

/* ===== Contact Section ===== */
#contact .sec-title {
  font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.4rem);
  margin-bottom: 1.5rem;
  color: var(--clr-text);
}

#contact .contact-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--clr-text);
}

#contact .contact-card .contact-list li {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

#contact .contact-card .muted {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===== Hero ===== */
.hero {
  padding-top: 24px;
  background: var(--clr-accent-light);
}
.hero h1 {
  font-size: clamp(1.8rem, 1.35rem + 2.2vw, 2.8rem);
  line-height: 1.2;
  margin: 0 0 8px;
}
.hero .lead {
  margin-bottom: 16px;
}
.hero-media img {
  width: 100%;
  height: auto;
}
.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Why Us ===== */
.section-alt {
  background: var(--clr-accent-alt);
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  gap: 18px;
}
.form-card .form-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.form-card label {
  font-weight: 600;
}
.form-card input,
.form-card textarea {
  width: 100%;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-card input:focus,
.form-card textarea:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(206,127,54,.15);
}
.form-card .error {
  color: #b00020;
  min-height: 1em;
  font-size: .85rem;
}
.form-note {
  font-size: .9rem;
  color: var(--clr-muted);
  margin: 8px 0 0;
}

/* Contact form placeholder styles */
#contactForm input::placeholder,
#contactForm textarea::placeholder {
  font-family: "Asta Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--clr-muted);
  opacity: 0.8;
}

#contactForm input::-webkit-input-placeholder,
#contactForm textarea::-webkit-input-placeholder {
  font-family: "Asta Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--clr-muted);
  opacity: 0.8;
}

#contactForm input::-moz-placeholder,
#contactForm textarea::-moz-placeholder {
  font-family: "Asta Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--clr-muted);
  opacity: 0.8;
}

#contactForm input:-ms-input-placeholder,
#contactForm textarea:-ms-input-placeholder {
  font-family: "Asta Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--clr-muted);
  opacity: 0.8;
}

/* Contact form input text styles */
#contactForm input,
#contactForm textarea {
  font-family: "Asta Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.5;
}

#contactForm label {
  font-family: "Asta Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-weight: 700;
}

.contact-card .contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.contact-card .contact-list li + li {
  margin-top: 8px;
}
.muted { color: var(--clr-muted); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid #eee;
  padding: 24px 0;
  background: #fff;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-inner p {
  font-size: 0.95rem;
  color: var(--clr-muted);
  margin: 0;
}
.site-footer nav a {
  color: var(--clr-text);
  text-decoration: none;
  margin-left: 12px;
  font-weight: 600;
  font-size: 0.9rem;
}
.site-footer nav a:hover {
  color: var(--clr-accent);
}

/* ===== Responsive Layouts ===== */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1.1fr .9fr; align-items: center; }
  .split { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: 1.2fr .8fr; }
}

@media (min-width: 980px) {
  .navbar {
    --header-h: 76px;
  }
}

/* ===== RB INFOTECH — Final unified cards ===== */
#our-products .card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  height: 340px;
  background: #fff;
  border: 1px solid #eef2f5;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}
#our-products .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  border-color: var(--clr-accent);
}
#our-products .card:hover h3 { color: var(--clr-accent); }

#our-products .card img {
  width: 100%;
  height: auto;
  max-height: 140px;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: var(--clr-surface);
  padding: clamp(8px, 4vw, 18px);
  border-bottom: 1px solid #eef2f5;
}

#our-products .card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 14px;
  overflow: hidden;
}
#our-products .card h3 {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin: 0 0 0.5rem;
  transition: color .25s ease;
}
#our-products .card p {
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  line-height: 1.4;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* styles for fixing the card truncation */
/* === Fix card truncation on larger screens === */
@media (min-width: 980px) {
  /* Let cards grow with their content on desktop */
  #our-products .card {
    height: auto;                 /* remove fixed height */
    min-height: 340px;            /* keep a nice minimum height for visual rhythm */
  }

  /* Allow captions to expand naturally */
  #our-products .card .card-body {
    overflow: visible;            /* was overflow: hidden; */
  }

  /* Show full text on desktop (remove ellipsis) */
  #our-products .card p {
    overflow: visible;
    text-overflow: unset;
    display: block;               /* ensure it's not clamped */
    max-height: none;
  }
}

/* Optional: keep tidy clamping on small screens only (2–3 lines) */
@media (max-width: 979.98px) {
  #our-products .card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;        /* clamp to 3 lines on mobile/tablet */
    line-clamp: 3;                /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
