/* ===================================
   Champ Ian Construction LLC
   One-Page Website Stylesheet
   =================================== */

/* ---- Variables (custom properties) ---- */
:root {
  --nav-bg: #1a1a2e;
  --nav-bg-scrolled: rgba(26, 26, 46, 0.95);
  --nav-text: #ffffff;
  --gold: #c8a951;
  --gold-light: #dfc072;
  --gold-dark: #a68a3a;
  --dark: #1a1a2e;
  --gray: #6c757d;
  --light-bg: #f8f9fa;
}

/* ---- Base Typography ---- */
html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  color: #333;
  overflow-x: hidden;
  padding-top: 56px; /* fixed navbar offset */
}

/* Override Bootstrap navbar brand font */
.navbar-brand {
  font-family: 'Montserrat', sans-serif;
  color: var(--nav-text) !important;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.4s ease, color 0.3s ease;
}

/* ---- Navbar ---- */
.navbar {
  background-color: transparent !important;
  padding: 1rem 0;
  transition: background-color 0.4s ease, padding 0.3s ease, box-shadow 0.3s ease;
  border-bottom: none;
}

/* Navbar when scrolled */
.navbar.scrolled {
  background-color: var(--nav-bg-scrolled) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar.scrolled .navbar-brand,
.navbar.scrolled .nav-link {
  opacity: 1 !important;
}

.navbar .nav-link {
  color: var(--nav-text) !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
  padding: 0.5rem 1rem;
  position: relative;
  opacity: 0;
  transition: color 0.3s ease, opacity 0.4s ease;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: width 0.3s ease;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 60%;
}

.navbar .nav-link:hover {
  color: var(--gold) !important;
}

/* ---- Hero Section ---- */
#hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Heavy dark overlay for text readability */
.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 25, 0.82) 0%,
    rgba(10, 10, 25, 0.93) 100%
  );
  z-index: 1;
}

/* Content sits above overlay */
.hero-content {
  position: relative;
  z-index: 2;
}

.hero-services-tagline span i {
  color: var(--gold) !important;
}

/* ---- Section Headings ---- */
.section-heading {
  position: relative;
  padding-bottom: 1.5rem;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--gold);
  margin: 1.5rem auto 0;
}

/* ---- Gold Text / Buttons ---- */
.text-gold { color: var(--gold) !important; }
.text-gauge { color: var(--gold) !important; }

.btn-gold {
  background-color: var(--gold);
  border: 2px solid var(--gold);
  color: var(--dark) !important;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.btn-gold:hover {
  background-color: transparent;
  color: var(--gold) !important;
  border-color: var(--gold);
}

/* ---- Services ---- */
.service-card {
  transition: all 0.3s ease;
  background-color: #fff;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.12) !important;
  border-color: var(--gold) !important;
}

.service-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--nav-bg);
  color: var(--gold);
  font-size: 1.8rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background-color: var(--gold);
  color: var(--dark);
}

/* ---- Portfolio Cards ---- */
.portfolio-hero img {
  transition: transform 0.5s ease;
}

.portfolio-hero:hover img {
  transform: scale(1.03);
}

.portfolio-card img {
  transition: transform 0.4s ease;
}

.portfolio-card:hover img {
  transform: scale(1.05);
}

.portfolio-hero-overlay {
  background: linear-gradient(to top, rgba(26, 26, 46, 0.85) 0%, transparent 70%) !important;
}

/* ---- Contact Cards ---- */
.contact-card {
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.1) !important;
}

.contact-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--nav-bg);
  color: var(--gold);
  font-size: 1.5rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Footer ---- */
footer {
  background-color: var(--nav-bg);
  color: rgba(255,255,255,0.7);
}

/* ---- Utility Classes ---- */
.text-uppercase { text-transform: uppercase; }
.ls-wide { letter-spacing: 2px; }
.ls-tight { letter-spacing: -1px; }
.ls-small { letter-spacing: 2px; }

/* ---- About Image ---- */
.about-img {
  transition: transform 0.5s ease;
}

.about-img:hover {
  transform: scale(1.02);
}

/* ---- Section Backgrounds ---- */
#services, #portfolio {
  background-color: #fff;
}

#about, #contact {
  background-color: var(--light-bg);
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 991.98px) {
  .navbar-brand,
  .navbar .nav-link {
    opacity: 1 !important;
  }

  .navbar-toggler-icon {
    filter: brightness(0) invert(1);
  }
}

@media (max-width: 767.98px) {
  .navbar {
    background-color: var(--nav-bg-scrolled) !important;
    padding: 0.5rem 0;
  }

  #hero h1.display-3 {
    font-size: 2.5rem;
  }

  #hero p.display-5 {
    font-size: 1.8rem;
  }

  .section-heading.display-5 {
    font-size: 1.8rem;
  }

  .portfolio-hero img {
    max-height: 250px !important;
  }

  .contact-card {
    margin-bottom: 1rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  #hero h1.display-3 {
    font-size: 2.5rem;
  }
}

/* ---- Scroll Animations (fade in on scroll) ---- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Custom Scrollbar (Webkit) ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--nav-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* ---- Selection Color ---- */
::selection {
  background-color: var(--gold);
  color: var(--dark);
}

::-moz-selection {
  background-color: var(--gold);
  color: var(--dark);
}
