/* =========================
   THEME VARIABLES
   ========================= */
:root {
  --fafco-body-bg: #ffffff;
  --fafco-major: #014e4e;
  --fafco-accent: #f9d67b;
  --fafco-navbar-bg: #eaeef1;
  --fafco-footer-bg: #222222;
  --fafco-overlay: #252525;

  --fafco-text-main: #111827;
  --fafco-text-muted: #6b7280;
}

/* =========================
   GLOBAL TYPOGRAPHY
   ========================= */
body {
  font-family: "Comfortaa", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background-color: var(--fafco-body-bg);
  color: var(--fafco-text-main);
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  font-family: "Anek Telugu", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--fafco-text-main);
}

/* shared UI fonts */
.navbar .nav-link,
.btn,
.footer-link,
.bullet-pill,
.manpower-box span,
.section-label,
.client-pill {
  font-family: "Montserrat Alternates", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* helper text styles with better contrast */
.section-lead {
  color: var(--fafco-text-muted);
  max-width: 720px;
  margin-inline: auto;
}

.card-text-muted {
  color: var(--fafco-text-muted);
}

/* =========================
   LOGO IMAGES
   ========================= */
.logo-img {
  height: 32px;
  width: auto;
  display: inline-block;
}

.navbar-brand .logo-dark {
  display: none;
}

/* logo in footer: place side-by-side with small gap */
.footer .logo-img {
  height: 30px;
  margin-right: 6px;
}

/* =========================
   NAVBAR
   ========================= */
.fafco-navbar {
  background-color: var(--fafco-navbar-bg);
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.fafco-navbar.scrolled {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* nav links */
.nav-link {
  font-weight: 500;
  color: var(--fafco-text-main) !important;
}

.nav-link:hover {
  color: var(--fafco-major) !important;
}

.nav-link.active {
  color: var(--fafco-major) !important;
}

/* theme toggle button */
.btn-theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background-color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-theme-toggle:hover {
  background-color: #f3f4f6;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

/* =========================
   HERO SECTION
   ========================= */
.hero-section {
  padding-top: 4rem;
  padding-bottom: 3.5rem;
  background-color: #f5f7fb;
}

@media (min-width: 992px) {
  .hero-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.hero-row {
  align-items: stretch;
}

/* glass surface */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* hero rginin card now behaves like a cover */
.hero-main-card {
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

/* extra spacing for the wide cover */
.hero-cover {
  padding: 1.5rem;
}

@media (min-width: 992px) {
  .hero-cover {
    padding: 1.8rem;
  }
}

/* pills */
.mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background-color: rgba(1, 78, 78, 0.07);
  color: var(--fafco-major);
}

.mini-pill-light {
  background-color: #eef3f7;
  color: #374151;
}

/* hero media */
.hero-media {
  height: 100%;
  min-height: 288px;
}

@media (min-width: 992px) {
  .hero-media {
    min-height: 378px;
  }
}

.hero-banner-img {
  width: 100%;
  height: 90%;
  object-fit: cover;
  display: block;
}

/* make banner look wider / cinematic */
.hero-banner-wide {
  transform: scale(1.02);
}

/* overlay */
.hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 1.8rem;
  background: linear-gradient(
    to top,
    rgba(37, 37, 37, 0.9),
    rgba(37, 37, 37, 0.4),
    transparent
  );
  color: #ffffff;
}

/* on larger screens, middle-left positioning */
@media (min-width: 992px) {
  .hero-overlay.hero-overlay-left {
    inset: 0;
    padding: 2.2rem 2.6rem;
    background: linear-gradient(
      to right,
      rgba(10, 16, 26, 0.88),
      rgba(10, 16, 26, 0.6),
      transparent 60%
    );
    max-width: 60%;
    left: 0;
    right: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.hero-overlay-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.85;
}

.hero-title {
  color: #ffffff;
}

.hero-highlight {
  color: var(--fafco-accent);
}

.hero-subtext {
  font-size: 0.96rem;
  max-width: 32rem;
  color: #e5e7eb;
}

/* hero stats bar */
.hero-stats {
  gap: 1.4rem;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-value {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fafco-accent);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: #e5e7eb;
}

/* client strip */
.client-strip {
  border-radius: 16px;
  padding: 0.9rem 1.4rem;
  margin-top: 1.6rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.client-strip-text {
  color: var(--fafco-text-muted);
}

.client-pill {
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  background-color: #f9fafb;
}

/* =========================
   BUTTONS
   ========================= */
.btn-fafco-main {
  background-color: var(--fafco-major);
  color: #ffffff;
  border-radius: 999px;
  border: 1px solid var(--fafco-major);
  padding-inline: 1.6rem;
}

.btn-fafco-main:hover {
  background-color: #013636;
  border-color: #013636;
  color: #ffffff;
}

.btn-fafco-accent {
  background-color: var(--fafco-accent);
  color: var(--fafco-major);
  border-radius: 999px;
  border: 1px solid var(--fafco-accent);
  padding-inline: 1.6rem;
}

.btn-fafco-accent:hover {
  background-color: #f7c352;
  border-color: #f7c352;
  color: var(--fafco-major);
}

/* =========================
   FEATURES / CARDS
   ========================= */
.feature-card {
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
  border-color: rgba(1, 78, 78, 0.35);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--fafco-major), var(--fafco-accent));
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: translateX(0);
}

/* circular icon */
.feature-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(1, 78, 78, 0.08);
  color: var(--fafco-major);
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-circle {
  background-color: var(--fafco-major);
  color: white;
  transform: scale(1.1);
}

/* service cards */
.service-card {
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.12);
  border-color: var(--fafco-major);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--fafco-major), var(--fafco-accent));
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: translateX(0);
}

.service-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(1, 78, 78, 0.08);
  color: var(--fafco-major);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon-wrapper {
  background-color: var(--fafco-major);
  color: white;
  transform: scale(1.05);
}

.service-card ul {
  list-style-type: none;
  padding-left: 0;
}

.service-card ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.service-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--fafco-major);
  font-weight: bold;
}

/* info cards */
.info-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
}

/* manpower cards */
.manpower-box {
  background-color: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.manpower-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
  border-color: var(--fafco-major);
}

.manpower-box i {
  color: var(--fafco-major);
  transition: all 0.3s ease;
}

.manpower-box:hover i {
  transform: scale(1.1);
}

/* =========================
   BULLET PILLS
   ========================= */
.bullet-pill {
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background-color: rgba(1, 78, 78, 0.06);
  font-size: 0.95rem;
  color: var(--fafco-text-main);
  transition: all 0.2s ease;
}

.bullet-pill:hover {
  background-color: rgba(1, 78, 78, 0.1);
  transform: translateY(-2px);
}

/* =========================
   SECTION LABELS
   ========================= */
.section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fafco-text-muted);
}

.section-label-light {
  color: #e5e7eb;
}

/* =========================
   CTA SECTION
   ========================= */
.cta-section {
  background-color: var(--fafco-major);
  color: #ffffff;
}

.cta-section h2 {
  color: #ffffff;
}

.cta-text {
  color: #e5e7eb;
}

/* =========================
   ABOUT / IMAGES
   ========================= */
.about-image-wrapper img,
.about-img {
  object-fit: cover;
}

/* =========================
   CERTIFICATES GRID
   ========================= */
.certificate-grid {
  max-width: 1000px;
  margin-inline: auto;
}

.certificate-tile {
  border-radius: 18px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.certificate-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.1);
}

.certificate-tile img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.certificate-tile:hover .certificate-overlay {
  opacity: 1;
}

.certificate-overlay i {
  font-size: 2rem;
  color: white;
}

/* Certificate Modal */
.certificate-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.certificate-modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  margin: 5% auto;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.certificate-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: var(--fafco-major);
  color: white;
}

.btn-close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-zoom {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.btn-zoom:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

#zoomLevel {
  min-width: 50px;
  text-align: center;
}

.certificate-modal-body {
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  max-height: 80vh;
}

.certificate-modal-body img {
  max-width: 100%;
  transition: transform 0.3s ease;
}

/* =========================
   CONTACT
   ========================= */
.contact-card {
  border-radius: 1.5rem;
}

.text-fafco {
  color: var(--fafco-major) !important;
}

.contact-link {
  color: var(--fafco-major);
  text-decoration: none;
  transition: all 0.2s ease;
}

.contact-link:hover {
  color: var(--fafco-accent);
  text-decoration: underline;
}

/* =========================
   FOOTER
   ========================= */
.footer {
  background-color: var(--fafco-footer-bg);
  color: #ffffff;
}

.footer-link {
  color: #e5e7eb;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.sangram-link {
  color: #f7c352;
  position: relative;
  display: inline-block;
  padding: 0 5px;
  transition: all 0.3s ease;
}

.sangram-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.sangram-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #ffffff;
  transition: width 0.3s ease;
}

.sangram-link:hover::after {
  width: 100%;
}

/* =========================
   SECTIONS / BACKGROUNDS
   ========================= */
.bg-section {
  background-color: #f3f4f6;
}

/* offset for fixed navbar */
section {
  scroll-margin-top: 10px;
}

/* =========================
   SCROLL TO TOP BUTTON
   ========================= */
.scroll-top-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background-color: var(--fafco-major);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1080;
}

.scroll-top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================
   DARK THEME
   ========================= */
body.theme-dark {
  --fafco-body-bg: #020617;
  --fafco-navbar-bg: #0f172a;
  --fafco-footer-bg: #0f172a;
  --fafco-text-main: #e5e7eb;
  --fafco-text-muted: #9ca3af;

  background-color: var(--fafco-body-bg);
  color: var(--fafco-text-main);
}

/* headings in dark */
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6 {
  color: #e5e7eb;
}

/* navbar in dark */
body.theme-dark .fafco-navbar {
  background-color: var(--fafco-navbar-bg);
  border-bottom: 1px solid #334155;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

body.theme-dark .nav-link {
  color: #e5e7eb !important;
}

body.theme-dark .nav-link:hover,
body.theme-dark .nav-link.active {
  color: var(--fafco-accent) !important;
}

/* theme toggle in dark */
body.theme-dark .btn-theme-toggle {
  background-color: #1e293b;
  border-color: #475569;
  color: #e5e7eb;
}

/* logos in dark */
body.theme-dark .navbar-brand .logo-light,
body.theme-dark .footer .logo-light {
  display: none;
}
body.theme-dark .navbar-brand .logo-dark,
body.theme-dark .footer .logo-dark {
  display: inline-block;
}

/* hero background */
body.theme-dark .hero-section {
  background-color: #020617;
}

/* glass surface in dark */
body.theme-dark .glass-card {
  background: rgba(30, 41, 59, 0.86);
  border-color: rgba(71, 85, 105, 0.4);
}

/* text-muted override */
body.theme-dark .text-muted,
body.theme-dark .card-text-muted,
body.theme-dark .section-lead {
  color: #9ca3af !important;
}

/* feature/service/info areas */
body.theme-dark .bg-section {
  background-color: #0f172a;
}

body.theme-dark .client-strip {
  background: rgba(30, 41, 59, 0.86);
  border-color: transparent;
}

body.theme-dark .client-strip-text {
  color: #9ca3af;
}

/* cards in dark mode */
body.theme-dark .feature-card,
body.theme-dark .service-card,
body.theme-dark .info-card,
body.theme-dark .manpower-box,
body.theme-dark .certificate-tile {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(71, 85, 105, 0.5);
  color: #e5e7eb;
}

body.theme-dark .feature-card:hover,
body.theme-dark .service-card:hover,
body.theme-dark .info-card:hover,
body.theme-dark .manpower-box:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--fafco-major);
}

body.theme-dark .feature-icon-circle,
body.theme-dark .service-icon-wrapper {
  background-color: rgba(1, 78, 78, 0.2);
  color: var(--fafco-accent);
}

body.theme-dark .feature-card:hover .feature-icon-circle,
body.theme-dark .service-card:hover .service-icon-wrapper {
  background-color: var(--fafco-major);
  color: white;
}

body.theme-dark .bullet-pill {
  background-color: rgba(1, 78, 78, 0.15);
  color: #e5e7eb;
}

body.theme-dark .bullet-pill:hover {
  background-color: rgba(1, 78, 78, 0.25);
}

/* certificate modal in dark mode */
body.theme-dark .certificate-modal-content {
  background-color: #1e293b;
}

body.theme-dark .certificate-modal-header {
  background-color: var(--fafco-major);
}

/* contact form in dark mode */
body.theme-dark .form-control {
  background-color: rgba(30, 41, 59, 0.7);
  border-color: rgba(71, 85, 105, 0.5);
  color: #e5e7eb;
}

body.theme-dark .form-control:focus {
  background-color: rgba(30, 41, 59, 0.9);
  border-color: var(--fafco-major);
  color: #e5e7eb;
}

body.theme-dark .form-label {
  color: #cbd5e1;
}

/* footer */
body.theme-dark .footer {
  background-color: #0f172a;
  border-top: 1px solid #334155;
}

/* scroll-top button in dark */
body.theme-dark .scroll-top-btn {
  background-color: var(--fafco-accent);
  color: var(--fafco-major);
}

a:hover {
  color: #013636;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
  .hero-overlay {
    position: relative;
    background: linear-gradient(
      to bottom,
      rgba(10, 16, 26, 0.8),
      rgba(10, 16, 26, 0.9)
    );
    padding: 2rem 1.5rem;
    margin-top: 1rem;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtext {
    font-size: 0.9rem;
  }
  
  .hero-stats {
    justify-content: space-between;
  }
  
  .hero-stat-item {
    flex: 1;
    text-align: center;
  }
  
  .certificate-modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  /* Hero tag row mobile adjustments */
  .hero-tag-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .mini-pill {
    font-size: 0.7rem;
    padding: 0.25rem 0.7rem;
  }
}