/* ==========================================================
   APIC — Modern Homepage Layer
   Adds: glass header, refreshed hero, 3D scroll-reveal, tilt
   cards, modern buttons/sections. Loaded only on index.html —
   does not affect other pages.
   ========================================================== */

:root {
  --m-navy: #084265;
  --m-teal: #1d9c8d;
  --m-gold: #c9a84c;
  --m-ink: #0d1b2a;
  --m-surface: #ffffff;
  --m-surface-soft: #f6f9fb;
  --m-border: rgba(8, 66, 101, 0.10);
  --m-shadow-sm: 0 2px 10px rgba(13, 27, 42, 0.06);
  --m-shadow-md: 0 12px 30px rgba(13, 27, 42, 0.10);
  --m-shadow-lift: 0 22px 45px rgba(8, 66, 101, 0.18);
  --m-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reveal-on-scroll (3D) ---------- */
.reveal-3d {
  opacity: 0;
  transform: perspective(1200px) translateY(70px) rotateX(14deg) scale(.96);
  transform-origin: center bottom;
  transition: opacity .9s var(--m-ease), transform .9s var(--m-ease);
  will-change: transform, opacity;
}

.reveal-3d.in-view {
  opacity: 1;
  transform: perspective(1200px) translateY(0) rotateX(0deg) scale(1);
}

.reveal-3d.delay-1 { transition-delay: .08s; }
.reveal-3d.delay-2 { transition-delay: .16s; }
.reveal-3d.delay-3 { transition-delay: .24s; }
.reveal-3d.delay-4 { transition-delay: .32s; }
.reveal-3d.delay-5 { transition-delay: .40s; }

/* ---------- Tilt-on-hover cards ---------- */
.tilt-card {
  --rx: 0deg;
  --ry: 0deg;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s var(--m-ease), box-shadow .35s var(--m-ease);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-3d {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .tilt-card {
    transform: none !important;
    transition: none;
  }
}

/* ==========================================================
   Header — glass on scroll
   ========================================================== */
.header {
  transition: background-color .4s var(--m-ease), box-shadow .4s var(--m-ease);
}

.header.is-scrolled {
  /* No backdrop-filter here: it makes this element a new containing
     block for position:fixed descendants (the mobile nav drawer lives
     inside .header), which broke the hamburger menu after scrolling. */
  position: fixed;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 24px rgba(8, 66, 101, 0.12);
}

.header.is-scrolled .logo img {
  max-height: 60px;
  margin-bottom: 0;
  transition: max-height .35s var(--m-ease);
}

.header.is-scrolled .logo h1 {
  margin-top: 0;
}

.header.is-scrolled .logo h1 span,
.header.is-scrolled .navbar > ul > li > a {
  color: var(--m-navy) !important;
}

/* ==========================================================
   Hero
   ========================================================== */
.hero .info h1 {
  letter-spacing: -1px;
}

@media (min-width: 769px) {
  .hero .info h1 {
    margin-top: 33rem;
  }
}

@media (max-width: 768px) {
  .hero .info {
    padding: 0 24px;
  }

  .hero .info h1,
  .hero .info .apic {
    font-size: 46px !important;
  }

  .hero .info .btn-get-started {
    padding: 11px 26px;
    font-size: 13px;
    letter-spacing: 1px;
  }
}

@media (max-width: 425px) {
  .hero .info h1,
  .hero .info .apic {
    font-size: 36px !important;
  }

  .hero .info .btn-get-started {
    padding: 10px 22px;
    font-size: 12px;
  }
}

.hero .info h1 {
  padding-bottom: 14px;
}

.hero .info h1:after {
  background: linear-gradient(90deg, var(--m-teal), var(--m-gold));
  width: 110px;
  height: 3px;
}

.hero .info .btn-get-started {
  color: #fff;
  border: none;
  background: linear-gradient(120deg, var(--m-teal), #16b3a0);
  box-shadow: 0 14px 34px rgba(29, 156, 141, 0.40);
  letter-spacing: 1.5px;
}

.hero .info .btn-get-started:hover {
  background: linear-gradient(120deg, var(--m-gold), #dbb85e);
  box-shadow: 0 18px 40px rgba(201, 168, 76, 0.45);
  transform: translateY(-3px);
}

/* Scroll cue */
.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: apic-bounce 2.2s ease-in-out infinite;
}

.hero-scroll-cue .stick {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent);
}

@keyframes apic-bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: .55; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

@media (max-width: 768px) {
  .hero-scroll-cue { display: none; }
}

/* ==========================================================
   Section headers
   ========================================================== */
.section-header h2 {
  position: relative;
}

.section-header h2 span,
.text-accent {
  color: var(--m-teal) !important;
}

#testimonials #Reviews {
  color: var(--m-navy);
  font-weight: 700;
}

/* ==========================================================
   Why Choose Us — glass tilt cards
   ========================================================== */
.why-us-section {
  background: linear-gradient(180deg, #f6f9fb 0%, #eef3f6 100%) !important;
  position: relative;
}

.why-card {
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  border-radius: 20px;
  box-shadow: var(--m-shadow-sm);
  position: relative;
  overflow: hidden;
}

.why-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--m-teal), var(--m-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--m-ease);
}

.why-card:hover {
  box-shadow: var(--m-shadow-lift);
}

.why-card:hover::before {
  transform: scaleX(1);
}

.why-card .why-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  padding: 14px;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 30%, rgba(29, 156, 141, 0.14), rgba(8, 66, 101, 0.06));
}

/* ==========================================================
   About Us image
   ========================================================== */
.img-bg {
  /* main.css never gives this empty background-image div a height —
     on desktop it borrows height from its sibling column via the row's
     flex stretch, but once columns stack on mobile there's no sibling
     to stretch against, so it collapses to a sliver (just its border
     + shadow) spanning the full width above the text. */
  min-height: 260px;
  border-radius: 22px;
  box-shadow: var(--m-shadow-md);
}

@media (min-width: 992px) {
  .img-bg {
    min-height: 100%;
  }
}

/* ==========================================================
   Material Description tabs
   ========================================================== */
.features .nav-tabs {
  border: none;
  gap: 10px;
}

.features .nav-tabs .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 62px;
  border: 1px solid var(--m-border);
  border-radius: 14px;
  background: var(--m-surface);
  box-shadow: var(--m-shadow-sm);
  transition: all .3s var(--m-ease);
}

.features .nav-tabs .nav-link h4 {
  margin: 0;
  padding: 0 !important;
  font-size: 14px;
  line-height: 1.3;
  color: var(--m-navy);
  white-space: normal;
  overflow-wrap: break-word;
}

@media (max-width: 767px) {
  .features .nav-tabs .nav-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .features .nav-tabs .nav-link h4 {
    font-size: 15px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .features .nav-tabs .nav-link h4 {
    font-size: 12px;
  }
}

.features .nav-tabs .nav-link.active {
  background: linear-gradient(120deg, var(--m-navy), #0e5680);
  box-shadow: var(--m-shadow-md);
}

.features .nav-tabs .nav-link.active h4 {
  color: #fff;
}

.features .tab-pane img {
  border-radius: 18px;
  box-shadow: var(--m-shadow-md);
}

/* ==========================================================
   Product cards
   ========================================================== */
#projects .card {
  border: 1px solid var(--m-border);
  border-radius: 20px !important;
  overflow: hidden;
  box-shadow: var(--m-shadow-sm) !important;
}

#projects .card:hover {
  box-shadow: var(--m-shadow-lift) !important;
}

#projects .card-img-top {
  transition: transform .6s var(--m-ease);
}

#projects .card:hover .card-img-top {
  transform: scale(1.06);
}

#projects .card-img-top-wrap {
  overflow: hidden;
}

#projects .btn {
  border-radius: 50px;
  background: linear-gradient(120deg, var(--m-teal), #16b3a0) !important;
  border: none;
  box-shadow: 0 10px 24px rgba(29, 156, 141, 0.28);
  transition: transform .3s var(--m-ease), box-shadow .3s var(--m-ease);
}

#projects .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(29, 156, 141, 0.35);
}

/* ==========================================================
   Chairman message
   ========================================================== */
.chairman-modern-img {
  border-radius: 22px;
  box-shadow: var(--m-shadow-md);
}

.chairman-quote-mark {
  font-size: 70px;
  line-height: 1;
  color: var(--m-gold);
  opacity: .5;
  font-family: Georgia, serif;
}

/* ==========================================================
   Testimonials — glass cards
   ========================================================== */
.testimonial-item {
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  border-radius: 20px;
  box-shadow: var(--m-shadow-sm);
  padding: 34px 30px;
  height: 100%;
}

.testimonial-item .stars i {
  color: var(--m-gold);
}

.testimonial-item h3 {
  color: var(--m-navy);
}

/* ==========================================================
   Logos strip
   ========================================================== */
.w-100.bg-light.py-4 {
  background: var(--m-surface-soft) !important;
}

/* ==========================================================
   Mobile nav — modern glass drawer (replaces the plain
   black slide-in panel from the base template)
   ========================================================== */
@media (max-width: 1279px) {
  .navbar {
    max-width: 260px;
    box-shadow: -18px 0 50px rgba(8, 24, 38, 0.28);
  }

  .navbar ul {
    background: linear-gradient(180deg, #ffffff 0%, #f4f8f9 100%);
    padding: 64px 0 20px;
    display: flex;
    flex-direction: column;
  }

  .navbar ul::before {
    content: "Menu";
    display: block;
    padding: 0 22px 12px;
    margin-bottom: 4px;
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--m-teal);
    border-bottom: 1px solid rgba(8, 66, 101, 0.10);
  }

  .navbar > ul > li {
    padding: 0;
  }

  .navbar a,
  .navbar a:focus {
    color: var(--m-navy) !important;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-left: 3px solid transparent;
    transition: all .25s var(--m-ease);
  }

  .navbar a:hover,
  .navbar .active,
  .navbar .active:focus,
  .navbar li:hover > a {
    color: var(--m-teal) !important;
    background: rgba(29, 156, 141, 0.08);
    border-left-color: var(--m-teal);
  }

  .mobile-nav-active .navbar:before {
    background: rgba(8, 24, 38, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .mobile-nav-hide {
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--m-navy);
    font-size: 20px;
    border-radius: 50%;
    box-shadow: var(--m-shadow-md);
  }
}

/* ==========================================================
   General mobile tightening
   ========================================================== */
@media (max-width: 400px) {
  .testimonial-item {
    padding: 24px 20px;
  }

  .why-card {
    padding: 28px 20px !important;
  }
}

/* Soften the 3D reveal on small screens so it feels quick, not floaty */
@media (max-width: 576px) {
  .reveal-3d {
    transform: perspective(1000px) translateY(28px) rotateX(6deg) scale(.98);
  }
}
