/* ============================================================
   F&O Metal Services — Industrial Premium Redesign v2
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --orange:      #F05A12;
  --orange-d:    #C94A0A;
  --orange-glow: rgba(240,90,18,.18);
  --dark:        #0D1117;
  --dark2:       #161B22;
  --dark3:       #21262D;
  --gray:        #8B949E;
  --light-bg:    #F6F8FA;
  --white:       #FFFFFF;
  --text:        #3D4451;
  --heading:     #0D1117;
  --transition:  .28s ease;
  --radius:      3px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Roboto', sans-serif;
  color: var(--heading);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .5rem;
}

p { line-height: 1.8; color: #555E6C; }
a { color: var(--orange); transition: var(--transition); }
a:hover { color: var(--orange-d); text-decoration: none; }

/* ---------- Bootstrap color overrides ---------- */
.text-primary   { color: var(--orange) !important; }
.bg-primary     { background-color: var(--orange) !important; }
.bg-dark        { background-color: var(--dark) !important; }
.bg-secondary   { background-color: var(--light-bg) !important; }
.border-primary { border-color: var(--orange) !important; }

/* ---------- Navbar ---------- */
.navbar {
  background: rgba(13,17,23,.96) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 0 3rem !important;
  transition: box-shadow .3s;
}

.navbar-brand h1 {
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  letter-spacing: .1em;
  margin: 0 !important;
}

.navbar-brand.bg-primary {
  background: var(--orange) !important;
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: .12em;
  padding: 1.6rem 1.8rem !important;
  clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
  margin: 0 .5rem !important;
  transition: background .25s;
}
.navbar-brand.bg-primary:hover { background: var(--orange-d) !important; }

.nav-link {
  font-family: 'Roboto', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65) !important;
  padding: 1.8rem .85rem !important;
  position: relative;
  transition: color .2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: .85rem; right: .85rem;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover,
.nav-link.active { color: #fff !important; }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

/* ---------- Section Layout ---------- */
.section-title {
  margin-bottom: 4rem;
  text-align: center;
}
.section-title h6 {
  color: var(--orange) !important;
  font-family: 'Roboto', sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .9rem;
}
.section-title h6::before,
.section-title h6::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--orange);
  flex-shrink: 0;
}
.section-title h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--heading);
  margin: 0;
}

/* ---------- Hero / Carousel ---------- */
#home .carousel-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(13,17,23,.85) 0%,
    rgba(13,17,23,.55) 55%,
    rgba(240,90,18,.15) 100%
  );
  z-index: 1;
}

/* Texture overlay */
#home .carousel-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(255,255,255,.012) 3px,
      rgba(255,255,255,.012) 4px
    );
  z-index: 1;
  pointer-events: none;
}

.carousel-caption {
  z-index: 2;
  text-align: left !important;
  left: 8% !important;
  right: 8% !important;
  bottom: auto !important;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 !important;
}

.carousel-caption .p-3 {
  padding: 0 !important;
  max-width: 780px !important;
}

.carousel-caption h4 {
  color: var(--orange) !important;
  font-family: 'Roboto', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .35em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.4rem;
}
.carousel-caption h4::before {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: var(--orange);
}

.carousel-caption h3 {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  color: #fff !important;
  margin-bottom: 2.2rem;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}

.carousel-caption .btn {
  font-family: 'Roboto', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 1rem 2.2rem !important;
  background: var(--orange);
  border: 2px solid var(--orange);
  color: #fff;
  clip-path: polygon(6% 0%, 100% 0%, 94% 100%, 0% 100%);
  border-radius: 0;
  transition: var(--transition);
}
.carousel-caption .btn:hover {
  background: var(--orange-d);
  border-color: var(--orange-d);
  transform: translateX(4px);
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 1;
  z-index: 3;
}
.carousel-control-prev .btn,
.carousel-control-next .btn {
  width: 54px !important;
  height: 54px !important;
  background: rgba(240,90,18,.85) !important;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}
.carousel-control-prev .btn:hover,
.carousel-control-next .btn:hover {
  background: var(--orange) !important;
}

/* ---------- About ---------- */
#about { background: var(--white); padding: 6rem 0; }

#about img {
  border-radius: 0;
  box-shadow: 16px 16px 0 var(--orange);
  object-fit: cover;
  width: 100%;
  max-height: 500px;
}

#about h6 { color: var(--orange) !important; }
#about h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.2;
}
#about .text-primary { color: var(--orange) !important; }
#about p { font-size: .97rem; }

/* ---------- Stats Bar ---------- */
.stats-bar {
  background: var(--dark2);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(255,255,255,.012) 10px,
      rgba(255,255,255,.012) 11px
    );
  padding: 4rem 0;
  border-top: 3px solid var(--orange);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.stat-item {
  text-align: center;
  padding: 0 1rem;
  position: relative;
}
.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,.1);
}

.stat-item .stat-number {
  display: block;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
  letter-spacing: -.02em;
}
.stat-item .stat-label {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-top: .6rem;
}

/* ---------- Services ---------- */
#service {
  background: var(--light-bg);
  padding: 6rem 0;
}

.product-item {
  background: var(--white);
  border-radius: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  border-top: 4px solid var(--orange);
  position: relative;
}
.product-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--orange);
  z-index: 2;
}
.product-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0,0,0,.14);
}

.product-img {
  position: relative;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.product-item:hover .product-img img { transform: scale(1.07); }

.product-img > a {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,17,23,0);
  transition: background .3s;
  border: none;
  border-radius: 0;
}
.product-item:hover .product-img > a { background: rgba(240,90,18,.75); }
.product-img > a i { font-size: 1.8rem; opacity: 0; transition: opacity .3s; }
.product-item:hover .product-img > a i { opacity: 1; }

.product-item .bg-secondary {
  background: var(--white) !important;
  padding: 1.4rem 1.6rem !important;
  border-top: 1px solid #E8EDF2;
}
.product-item .bg-secondary h3 {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: .02em;
}

/* ---------- Gallery ---------- */
.bg-gallery {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
}
.bg-gallery::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13,17,23,.75);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  cursor: pointer;
}
.gallery-item img {
  transition: transform .5s ease;
  display: block;
  width: 100%;
}
.gallery-item:hover img { transform: scale(1.1); }

.gallery-item > a {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240,90,18,0);
  border: none;
  border-radius: 0;
  transition: background .3s;
}
.gallery-item:hover > a { background: rgba(240,90,18,.7); }
.gallery-item > a i { font-size: 2rem; opacity: 0; transition: opacity .25s; }
.gallery-item:hover > a i { opacity: 1; }

/* ---------- Projects ---------- */
#team { background: var(--white); padding: 6rem 0; }

#team .bg-secondary {
  background: var(--dark) !important;
  position: relative;
}
#team .bg-secondary::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--orange);
}
#team .bg-secondary h5 {
  color: var(--orange);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#team .bg-secondary p {
  color: rgba(255,255,255,.55);
  font-size: .88rem;
  line-height: 1.7;
  margin: 0;
}

#team .col-sm-6.p-0 { overflow: hidden; }
#team .col-sm-6.p-0 img {
  transition: transform .5s ease;
}
#team .row:hover .col-sm-6.p-0 img { transform: scale(1.04); }

/* ---------- FAQs ---------- */
#faqs {
  background: var(--light-bg);
  padding: 6rem 0;
}

#faqs h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 1.5rem;
}

#faqs h5 {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: .8rem;
  display: flex;
  align-items: baseline;
  gap: .6rem;
}

#faqs .fa-check {
  color: var(--orange) !important;
  flex-shrink: 0;
  font-size: .8rem;
}

#faqs .border-right {
  border-color: var(--orange) !important;
  border-width: 2px !important;
}

/* FAQ card styling */
#faqs .col-md-6 > div {
  background: var(--white);
  border-radius: 0;
  padding: 2rem 2rem !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  height: 100%;
  border-top: 4px solid var(--orange);
}

/* ---------- Contact ---------- */
#contact {
  background: var(--white);
  padding: 6rem 0;
}

.contact-form .form-control {
  background: var(--light-bg) !important;
  border: 2px solid #E5E7EB !important;
  border-radius: var(--radius);
  color: var(--heading) !important;
  font-family: 'Montserrat', sans-serif;
  font-size: .92rem;
  transition: border-color .2s, box-shadow .2s;
  padding: .9rem 1.1rem !important;
  height: auto !important;
}
.contact-form textarea.form-control { resize: none; }
.contact-form .form-control:focus {
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 3px var(--orange-glow) !important;
  background: var(--white) !important;
  outline: none;
}
.contact-form .form-control::placeholder { color: #9CA3AF; }

/* ---------- Buttons ---------- */
.btn {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  border: 2px solid var(--orange);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--orange-d);
  border-color: var(--orange-d);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240,90,18,.35);
}

.btn-light {
  background: var(--white);
  border: 2px solid var(--white);
  color: var(--dark);
}
.btn-light:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.btn-outline-primary {
  color: var(--orange);
  border: 2px solid var(--orange);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--orange);
  color: #fff;
}

/* ---------- Footer ---------- */
#footer { background: var(--dark) !important; }

.footer-contact-bar {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 2rem !important;
}

#footer h5 {
  color: var(--orange) !important;
  font-size: .65rem;
  letter-spacing: .22em;
  font-weight: 700;
  margin-bottom: .5rem;
}
#footer p { color: rgba(255,255,255,.55); font-size: .9rem; }
#footer a { color: rgba(255,255,255,.55); }
#footer a:hover { color: var(--orange); }
#footer h4.text-white { color: #fff !important; font-size: 1.2rem; font-weight: 800; }

#footer ul.list-unstyled li a {
  font-size: .88rem;
  line-height: 1.5;
  display: inline-block;
  transition: padding-left .2s, color .2s;
}
#footer ul.list-unstyled li a:hover {
  padding-left: 6px;
  color: var(--orange);
}

.container-fluid.border-top {
  border-color: rgba(255,255,255,.07) !important;
  background: rgba(0,0,0,.25) !important;
}

/* ---------- Back to top ---------- */
.back-to-top {
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: #fff !important;
  border-radius: var(--radius) !important;
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.back-to-top:hover {
  background: var(--orange-d) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(240,90,18,.45);
}

/* ---------- Modal ---------- */
.modal-content { border: none; border-radius: 0; overflow: hidden; }
.modal-header {
  background: var(--dark);
  border-bottom: 3px solid var(--orange);
  padding: 1.2rem 1.5rem;
}
.modal-title { color: #fff !important; font-weight: 700; letter-spacing: .06em; font-size: .95rem; }
.modal-header .close { color: rgba(255,255,255,.5); opacity: 1; text-shadow: none; }
.modal-header .close:hover { color: #fff; }

.modal-content p { font-size: .94rem; line-height: 1.8; color: #3D4451 !important; }

/* ---------- Misc ---------- */
.font-secondary { font-family: 'Roboto', sans-serif; }
.section-title .position-relative { overflow: visible; }

/* ---------- Navbar scrolled ---------- */
.navbar-scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,.45) !important;
}

/* ---------- Phone links ---------- */
.tel-link {
    position: relative;
    cursor: pointer;
    display: inline-block;
}
.tel-link .tel-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(.9);
    background: #F05A12;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 4px 10px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    z-index: 10;
}
.tel-link .tel-tooltip::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #F05A12;
}
.tel-link.show-tip .tel-tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .navbar { padding: .8rem 1.2rem !important; }
  .nav-link { padding: .65rem 1rem !important; }
  .nav-link::after { display: none; }
  .navbar-brand.bg-primary { clip-path: none; }
  .carousel-caption { left: 5% !important; right: 5% !important; }
  .stat-item + .stat-item::before { display: none; }
  #faqs .col-md-6 > div { margin-bottom: 1rem; }
}

@media (max-width: 767.98px) {
  .carousel-caption h3 { font-size: 1.9rem; }
  .section-title h1 { font-size: 1.7rem; }
  .stat-item .stat-number { font-size: 2.2rem; }
  #about img { box-shadow: 8px 8px 0 var(--orange); }
}
