/* ===================================================================
   TechFab India — Homepage
   Built from Figma file "TechFab UI" — Home-V3 / Home Page-V2
   =================================================================== */

:root {
  --red: #D71920;
  --red-dark: #B5151C;
  --navy: #101828;
  --navy-2: #1E2939;
  --footer-navy: #162134;
  --map-navy-1: #19273C;
  --map-navy-2: #0D1320;
  --gray-light: #F0F0F0;
  --gray-text: #585858;
  --gray-text-2: #7A7A7A;
  --gray-text-3: #8E8E8E;
  --footer-text: #CDCDCD;
  --contact-text: #D1D5DC;

  --font-heading: 'Host Grotesk', sans-serif;
  --font-ui: 'Inter', sans-serif;

  --container-padding: 88px;
  --section-padding-y: 90px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
ul { list-style: none; }

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section { padding: var(--section-padding-y) 0; position: relative; }

.section-title {
  font-size: clamp(26px, 4.2vw, 45px);
  font-weight: 600;
  line-height: 1.22;
  color: var(--navy);
  max-width: 800px;
}
.section-title--light { color: #fff; }
.section-title--center { text-align: center; margin: 0 auto; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 16px;
  border-radius: 4px;
  padding: 12px 24px;
  white-space: nowrap;
  transition: opacity .2s ease, background-color .2s ease;
}
.btn:hover { opacity: .88; }

.btn-primary {
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 13px 24px;
}
.btn-sm { padding: 10px 22px; font-size: 14px; font-family: var(--font-ui); border-radius: 4px; }

.btn-white { background: #fff; color: var(--navy); }
.btn-outline-white { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }

.btn-cta {
  border-radius: 10px;
  padding: 17px 32px;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
}
.btn-cta--red { background: var(--red); }
.btn-cta--dark { background: var(--navy-2); }

.card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 15px 0;
  transition: background-color .25s ease, box-shadow .25s ease, padding .25s ease;
}
.site-header.scrolled {
  background: var(--navy);
  padding: 10px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo img { width: 110px; }

.main-nav { flex: 1; text-align: center;}
.main-nav ul {
  display: inline-flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
}
.main-nav .caret { opacity: .85; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  border-radius: 50%;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }

.login-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px; height: 28px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.79) 50%, rgba(0,0,0,.85) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-bottom: 90px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 50px;
  justify-content: space-between;
}
.hero-text { max-width: 826px; }
.hero-text h1 {
  font-size: clamp(30px, 5.5vw, 55px);
  font-weight: 600;
  line-height: 1.09;
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-caption {
  max-width: 369px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
}

/* =====================================================================
   SECTOR CARDS (shared by grid + carousel)
   ===================================================================== */
.sector-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 50px;
}

.sector-card,
.product-card {
  position: relative;
  height: 399px;
  background-color: #1a1a1a;
  background-size: cover;
  background-position: center;
  border-right: 1px solid rgba(255,255,255,.15);
  padding: 41px 20px 32px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
/* product-card keeps the dark full-bleed style */
.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.15) 55%, rgba(0,0,0,.05) 100%);
  transition: background .3s ease-out;
}
.product-card:hover::before {
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.3) 55%, rgba(0,0,0,.15) 100%);
}
.product-card .card-arrow,
.product-card h4 { position: relative; z-index: 2; }
.product-card .card-arrow { transition: transform .3s ease-out; }
.product-card:hover .card-arrow { transform: translateX(4px); }

/* ── Sector card: white top + photo bottom (Figma exact match) ── */
.sector-card {
  background-color: #fff;
  border: 1px solid #D1D5DC;
  padding: 0;
  display: block;
}

/* photo panel — sits in the lower 61% of the card, 5px inset on all edges */
.sector-card .card-bg {
  position: absolute;
  left: 5px; right: 5px;
  top: 38.6%;   /* 154 / 399 */
  bottom: 5px;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: top .5s ease-out;
}
.sector-card:hover .card-bg { top: 5px; }

/* dark overlay — hidden in default, fades in on hover */
.sector-card::before {
  content: "";
  position: absolute;
  left: 5px; right: 5px;
  top: 38.6%;
  bottom: 5px;
  background: rgba(0,0,0,.45);
  z-index: 2;
  opacity: 0;
  transition: top .5s ease-out, opacity .5s ease-out;
}
.sector-card:hover::before {
  top: 5px;
  opacity: 1;
}

/* red dot — top-right */
.sector-card .dot {
  position: absolute;
  top: 23px;
  right: 20px;
  width: 8px; height: 8px;
  background: var(--red);
  z-index: 4;
}

/* text + arrow block — top-left, column layout */
.sector-card .card-body {
  position: absolute;
  top: 41px;
  left: 20px;
  right: 48px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.sector-card h3 {
  color: var(--navy);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  transition: color .5s ease-out;
}
.sector-card:hover h3 { color: #fff; }

.sector-card .card-arrow {
  color: var(--red);
  transition: color .5s ease-out;
}
.sector-card:hover .card-arrow { color: #fff; }

/* =====================================================================
   SECTORS CAROUSEL
   ===================================================================== */
.sectors-carousel .section-title { margin-bottom: 0; }
.carousel-wrap {
  margin-top: 50px;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  gap: 0;
  transition: transform .4s ease;
  width: max-content;
}
.carousel-track .sector-card { width: 255px; flex-shrink: 0; }

.carousel-nav {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  margin-top: 36px;
}
.carousel-btn {
  width: 51px; height: 51px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(113,113,113,.12);
  color: var(--navy);
  transition: background .2s ease;
}
.carousel-btn:hover { background: rgba(113,113,113,.25); }

/* =====================================================================
   PRODUCTS
   ===================================================================== */
.products {
  background-color: var(--navy);
  color: #fff;
}
.products-bg-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.products-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.products-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(9,13,18,.55) 0%, transparent 60%),
    rgba(9,13,18,.45);
}
.products-inner {
  position: relative;
  z-index: 2;
  padding-left: 75px;
  padding-right: 75px;
}

.products .section-title { margin-bottom: 40px; }

.products-cards-wrap {
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 71px;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 20px;
}
.tab {
  color: rgba(150,150,150,1);
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-heading);
  position: relative;
  padding-left: 25px;
}
.tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background:
    linear-gradient(var(--red), var(--red)) center / 2px 100% no-repeat,
    linear-gradient(var(--red), var(--red)) center / 100% 2px no-repeat;
  opacity: 0;
}
.tab.is-active { color: #fff; }
.tab.is-active::before { opacity: 1; }

.product-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.product-card {
  width: 129px;
  height: 164px;
  padding: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.product-card[data-noimg="true"] { background-color: #2a2a2a; }

.product-card .card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.product-card .card-arrow {
  position: relative;
  z-index: 2;
  transition: transform .3s ease-out, color .3s ease-out;
}
.product-card:hover .card-arrow { transform: translateX(5px); color: var(--red); }

.product-card h4 {
  position: relative; z-index: 2;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 12px;
}

/* =====================================================================
   CERTIFICATES
   ===================================================================== */
.certificates { padding-bottom: 60px; }
.certificates .section-title { margin-bottom: 40px; }

.cert-tabs {
  display: flex;
  justify-content: center;
  gap: 45px;
}
.cert-tab {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  font-weight: 700;
  font-size: 16px;
  color: rgba(0,0,0,.5);
}
.cert-tab.is-active { color: var(--navy); }

.marquee {
  margin-top: 56px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  gap: 23px;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

.cert-card {
  width: 157px;
  height: 173px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}
.cert-card img { max-height: 56px; max-width: 110px; object-fit: contain; }
.cert-card span { font-size: 14px; line-height: 1.3; color: #000; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =====================================================================
   STATS
   ===================================================================== */
.stats {
  background: linear-gradient(to bottom, var(--gray-light), #fff);
}
.stats-inner { display: flex; flex-direction: column; gap: 60px; }
.stats-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}
.stat-card {
  position: relative;
  background: #fff;
  border-right: 1px solid #ececec;
  padding: 56px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 29px;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 26px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
}
.stat-number {
  font-size: 40px;
  font-weight: 600;
  color: #2c2c2c;
  line-height: 1.5;
}
.stat-card p {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-text-2);
  line-height: 1.25;
}

/* =====================================================================
   MAP
   ===================================================================== */
/* .map-section {
  
} */
.map-inner { 
  padding: 80px 30px 20px;
  background: radial-gradient(circle at 18% 78%, var(--map-navy-1), var(--map-navy-2) 98%);
  display: flex; flex-direction: column; align-items: center; 
  border-radius: 20px;
}
.map-section .section-title { margin-bottom: 36px; }
.map-graphic {
  position: relative;
  width: 100%;
  max-width: 1246px;
  aspect-ratio: 1246 / 623;
}
.map-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =====================================================================
   CTA DETAILS
   ===================================================================== */
.cta-details { text-align: center; padding-bottom: 110px; }
.cta-details .section-title { margin: 0 auto 24px; }
.cta-subtitle {
  font-size: 20px;
  color: var(--gray-text-3);
  margin-bottom: 40px;
}
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--footer-navy); color: #fff; }

.footer-expand { background: var(--footer-navy); }
.footer-expand .container { padding-top: 26px; padding-bottom: 0; }
.read-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
}
.read-toggle svg { transition: transform .2s ease; }
.read-toggle.is-collapsed svg { transform: rotate(180deg); }
.footer-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  color: var(--footer-text);
  font-size: 16px;
  line-height: 1.4;
  max-width: 945px;
  margin: 0 auto;
  padding-bottom: 48px;
}
.footer-text.is-collapsed {
  max-height: 110px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}

.footer-main {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 40px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 48px;
}
.footer-brand { display: flex; align-items: flex-start; }
.footer-brand img { width: 160px; }

.footer-col h5 { font-size: 18px; font-weight: 500; margin-bottom: 16px; }

.contact-person {
  color: var(--contact-text);
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 12px;
}
.contact-person span { color: var(--footer-text); }

.newsletter-form {
  display: flex;
  background: rgba(255,255,255,.41);
  border-radius: 10px;
  padding: 4px;
  max-width: 341px;
}
.newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  padding: 12px 16px;
  outline: none;
}
.newsletter-form input::placeholder { color: #bcbcbc; }
.newsletter-form button {
  background: #fff;
  color: #505050;
  font-weight: 600;
  font-size: 16px;
  border-radius: 10px;
  padding: 12px 24px;
}

.footer-contact { justify-self: end; }
.footer-contact ul { display: flex; flex-direction: column; gap: 12px; }
.footer-contact li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--contact-text);
  font-size: 16px;
}

.footer-social {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  justify-self: end;
}
.footer-social a { color: #fff; }
.footer-social a:hover { opacity: .8; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  padding-bottom: 24px;
  font-family: var(--font-ui);
  font-size: 14px;
}
.footer-legal { display: flex; gap: 24px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1200px) {
  :root { --container-padding: 48px; }
  .sector-cards { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-social { grid-column: 1 / -1; justify-self: start; }

  /* Products: 75px padding fits 1290px cards only at 1440px viewport; below that, scroll */
  .products-inner { padding-left: 48px; padding-right: 48px; }
  .products-cards-wrap { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .products-cards-wrap::-webkit-scrollbar { display: none; }
  .product-cards { flex-wrap: nowrap; }
  .product-card { flex-shrink: 0; }
}

@media (max-width: 900px) {
  .stats-intro { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  :root { --container-padding: 24px; --section-padding-y: 56px; }

  .header-inner { gap: 12px; justify-content: space-between; }
  .header-actions .login-link, .header-actions .icon-btn { display: none; }
  .hamburger { display: flex; z-index: 101; }
  .header-actions { gap: 12px; }

  .main-nav {
    position: fixed;
    top: 0; right: 0;
    width: 280px; height: 100vh;
    background: var(--navy);
    box-shadow: -8px 0 24px rgba(0,0,0,.25);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 100;
    padding: 90px 32px 32px;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 22px; }

  .hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.is-active span:nth-child(2) { opacity: 0; }
  .hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { min-height: 600px; }
  .hero-inner { flex-direction: column; align-items: flex-start; padding-bottom: 48px; }
  .hero-caption { text-align: left; max-width: 100%; }

  .sector-cards { grid-template-columns: repeat(2, 1fr); }
  .sector-card { height: 320px; }

  /* Products section */
  .products-inner { padding-left: 24px; padding-right: 24px; }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 24px;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; white-space: nowrap; }

  /* Product cards: already nowrap+scrollable from 1200px rule, keep snap */
  .product-cards { scroll-snap-type: x mandatory; }
  .product-card { scroll-snap-align: start; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-main { grid-template-columns: 1fr; }
  .footer-contact { justify-self: start; }
  .footer-social { justify-self: start; }

  .cta-buttons { flex-direction: column; align-items: center; width: 100%; }
  .btn-cta { width: 100%; max-width: 340px; }
}

@media (max-width: 480px) {
  .sector-cards { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
