/**
 * ATC Company - Hero & Footer Color Matching Engine
 * Plugin: ATC Company Website Animator
 * Version: 1.2.4
 * Target: https://atccompany.pk/
 * Description: Restores header nav, matches lower footer background to upper footer (#181818), adds 38px hero button spacing, hides line 3.
 */

:root {
  --atc-navy: #0A2540;
  --atc-orange: #E3572B; /* Exact website reddish-orange accent */
  --atc-footer-bg: #181818; /* Exact upper footer dark charcoal background */
  --atc-white: #FFFFFF;
}

/* ==========================================================================
   0. LOWER FOOTER COLOR MATCHING (Matches Upper Footer #181818)
   ========================================================================== */

/* Target lower footer & location matrix bar to match upper footer dark background */
.atc-seo-footer-matrix,
.atc-seo-matrix-bar,
footer + div,
footer ~ div,
.site-footer + div,
.site-footer ~ div,
div[style*="background-color: #0"],
div[style*="background: #0"],
div[style*="background: navy"],
div[style*="background: blue"],
.footer-bottom,
.sub-footer {
  background-color: #181818 !important;
  background: #181818 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Ensure location matrix links stay crisp & readable */
.atc-seo-footer-matrix a,
.atc-seo-matrix-bar a,
footer + div a,
footer ~ div a {
  color: rgba(255, 255, 255, 0.75) !important;
  transition: color 0.25s ease !important;
}

.atc-seo-footer-matrix a:hover,
.atc-seo-matrix-bar a:hover,
footer + div a:hover,
footer ~ div a:hover {
  color: #E3572B !important;
  text-decoration: underline !important;
}

/* ==========================================================================
   1. RESTORE HEADER NAVIGATION MENU (100% Untouched Header Links)
   ========================================================================== */

header a,
nav a,
.site-header a,
.elementor-nav-menu a,
.main-navigation a,
.menu-item a,
.sub-menu a,
.elementor-widget-nav-menu a {
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  overflow: visible !important;
  border-radius: 0 !important;
}

header a::after,
nav a::after,
.site-header a::after,
.elementor-nav-menu a::after,
.main-navigation a::after,
.menu-item a::after,
.elementor-widget-nav-menu a::after {
  display: none !important;
  content: none !important;
}

/* ==========================================================================
   2. HIDE DUPLICATE LINE 3 & HERO TYPOGRAPHY ANIMATION + SPACING
   ========================================================================== */

/* Automatically hide duplicate 3rd hero text line on atccompany.pk */
.elementor-widget-heading:nth-child(3),
.elementor-heading-title:nth-of-type(3),
.atc-hide-line-3 {
  display: none !important;
}

/* High Visibility Base for Hero Text Lines 1 & 2 */
.elementor-widget-heading .elementor-heading-title,
.gsc-heading .title,
.gsc-heading .subtitle,
h1.elementor-heading-title,
h2.elementor-heading-title,
.hero h1, .hero h2 {
  color: #FFFFFF !important;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.95), 0 2px 4px rgba(0, 0, 0, 1) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Add comfortable bottom margin to 2nd line of heading */
.elementor-section:first-of-type .elementor-widget-heading:nth-child(2),
.hero-banner .elementor-widget-heading:nth-child(2) {
  margin-bottom: 28px !important;
}

/* Reddish-Orange Accent Text (#E3572B) */
.elementor-heading-title span,
.atc-orange-text,
.hero-accent-orange {
  color: #E3572B !important;
  text-shadow: 0 3px 14px rgba(227, 87, 43, 0.45), 0 2px 6px rgba(0, 0, 0, 0.9) !important;
}

/* Keyframe 1: Hero Text Entrance Animation */
@keyframes atcHeroPopEntrance {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

.elementor-section:first-of-type .elementor-heading-title,
.gsc-heading .title,
.hero h1, .hero h2 {
  animation: atcHeroPopEntrance 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Staggered Line Entrance Delays for Lines 1 & 2 */
.elementor-widget-heading:nth-child(1) .elementor-heading-title {
  animation-delay: 0.05s !important;
}
.elementor-widget-heading:nth-child(2) .elementor-heading-title {
  animation-delay: 0.25s !important;
  color: #E3572B !important;
}

/* ==========================================================================
   3. HERO BUTTON SPACING & POSITIONING
   ========================================================================== */

.elementor-section:first-of-type .elementor-widget-button,
.elementor-section:first-of-type .elementor-button-wrapper,
.hero .elementor-widget-button,
.hero-banner .btn-group {
  margin-top: 38px !important;
}

@media (max-width: 768px) {
  .elementor-section:first-of-type .elementor-widget-button,
  .elementor-section:first-of-type .elementor-button-wrapper,
  .hero .elementor-widget-button {
    margin-top: 28px !important;
  }

  .elementor-widget-heading .elementor-heading-title,
  .gsc-heading .title,
  .gsc-heading .subtitle,
  h1.elementor-heading-title,
  h2.elementor-heading-title {
    font-size: clamp(1.4rem, 6.5vw, 2.2rem) !important;
    line-height: 1.3 !important;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.95) !important;
  }
}

#atc-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #E3572B 0%, #FF7F50 50%, #0A2540 100%);
  z-index: 999999;
  transition: width 0.08s linear;
  box-shadow: 0 0 10px rgba(227, 87, 43, 0.6);
  pointer-events: none;
}

.atc-reveal {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.atc-fade-up { transform: translateY(25px); }
.atc-reveal.atc-active, .atc-fade-up.atc-active {
  opacity: 1 !important;
  transform: translate(0, 0);
}
