/*============================================================================
  Enhanced style.css (with floating sidebar + repositioned buttons)
  • Updated palette: #FFFFFF, #000000, #221F1F, #0C8BC0, #226B8E, #C1283B
  • Smooth scroll
  • Page-loader overlay
  • Scroll-reveal animations
  • Responsive typography
  • Hover shadows & transitions
  • Back-to-top button on left
  • Floating WhatsApp button on right (larger)
  • Floating contact/social sidebar (mid-right)
  • Contact form validation feedback
============================================================================*/

/*--------------------------------------------
  Root Color Variables
---------------------------------------------*/
:root {
  --white: #FFFFFF;
  --black: #000000;
  --text-dark: #221F1F;
  --nav-bg: #0CA41E;       /* Navbar / top section */
  --primary-color: #0CA41E; /* Buttons, accents */
  --secondary-color: #0CA41E; /* Hover / secondary accent */
  --accent-red: #C1283B;    /* Errors / highlights */
  --light-bg: #FFFFFF;      /* Page background */
  --fw-heading: 700;        /* Heading font-weight */
  --fw-base: 400;           /* Base font-weight */
}

/*--------------------------------------------
  Global Styles
---------------------------------------------*/
* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-bg);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/*--------------------------------------------
  PAGE LOADER OVERLAY
---------------------------------------------*/
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--nav-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Spinner animation */
#page-loader .spinner {
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-top: 6px solid var(--primary-color);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------
  NAVBAR
---------------------------------------------*/
.navbar {
  background-color: var(--nav-bg) !important;
  padding: 1rem 0;
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  background-color: transparent;
}

.navbar.scrolled {
  background-color: var(--nav-bg) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.navbar .navbar-brand {
  font-size: 1.5rem;
  color: var(--white) !important;
  font-weight: var(--fw-heading);
  padding: 5px 0;
}

.navbar .nav-link {
  font-size: 1rem;
  color: var(--white) !important;
  transition: color 0.3s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--light-bg) !important;
}

/*--------------------------------------------
  HERO & SUBPAGE HERO
---------------------------------------------*/
.hero-section,
.subpage-hero {
  position: relative;
  width: 100%;
  height: 75vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 56px; /* offset for fixed navbar */
}

.hero-section .hero-bg,
.subpage-hero .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-section .overlay,
.subpage-hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.hero-section .hero-content,
.subpage-hero .hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 1rem;
  animation: fadeInUp 1s ease-out both;
}

.subpage-hero .hero-content {
  max-width: 700px;
}


/*--------------------------------------------
  Section Fade-In on Scroll
---------------------------------------------*/
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade In Keyframes for hero content */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*--------------------------------------------
  Typography
---------------------------------------------*/
h1,
h2,
h3,
h4,
h5 {
  color: var(--text-dark);
  font-weight: var(--fw-heading);
  margin-bottom: 1rem;
}

h1.display-4,
h1.display-5 {
  color: var(--white);
  font-weight: var(--fw-heading);
}

.lead {
  font-size: 1.125rem;
  font-weight: 300;
}

/*--------------------------------------------
  BUTTONS
---------------------------------------------*/
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  transition: background-color 0.3s, border-color 0.3s, transform 0.2s;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-light {
  background-color: var(--light-bg);
  color: var(--text-dark);
  border: 2px solid var(--white);
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.btn-light:hover {
  background-color: rgba(255, 255, 255, 0.8);
  color: var(--nav-bg);
  transform: translateY(-2px);
}

/*--------------------------------------------
  SECTIONS
---------------------------------------------*/
section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.bg-light {
  background-color: var(--light-bg) !important;
}

/* Hover shadow helper */
.hover-shadow {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-shadow:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Icon thumbnail */
.icon-thumb {
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.icon-thumb:hover {
  transform: scale(1.05);
}

/*--------------------------------------------
  CARDS & GRID (Service Previews)
---------------------------------------------*/
.card .card-img-top {
  height: 200px;
  object-fit: cover;
}

/*--------------------------------------------
  BACK TO TOP BUTTON (LEFT BOTTOM, CIRCLE)
---------------------------------------------*/
#backToTop {
  position: fixed;
  bottom: 40px;
  left: 40px;
  width: 50px;            /* explicit equal width/height */
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50%;     /* perfect circle */
  display: flex;          /* center the arrow */
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: none;
  opacity: 0.8;
  transition: opacity 0.3s, background-color 0.3s;
  z-index: 999;
}

#backToTop:hover {
  opacity: 1;
  background-color: var(--secondary-color);
  cursor: pointer;
}


/*--------------------------------------------
  FLOATING WHATSAPP BUTTON (RIGHT BOTTOM, CIRCLE)
---------------------------------------------*/
.whatsapp-float {
  position: fixed;
  bottom: 40px;         /* same bottom as backToTop */
  right: 40px;          /* far right corner */
  width: 60px;          /* explicit equal width/height */
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;   /* perfect circle */
  display: flex;        /* center icon */
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: opacity 0.3s, transform 0.3s;
  text-decoration: none;
}

.whatsapp-float:hover {
  opacity: 0.85;
  transform: translateY(-3px);
}

.whatsapp-icon-large {
  font-size: 2rem;      /* keep icon large */
  line-height: 1;       /* ensure vertical centering */
}


/*--------------------------------------------
  FLOATING CONTACT/SOCIAL SIDEBAR (far-right, smaller)
---------------------------------------------*/
.floating-sidebar {
  position: fixed;
  top: 50%;
  right: 0;                 /* fully at the right edge */
  transform: translateY(-50%);
  background-color: var(--nav-bg);
  border-radius: 8px 0 0 8px;
  padding: 8px 6px;         /* slightly reduced padding */
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.floating-sidebar a {
  display: block;
  color: white;
  font-size: 1.1rem;        /* slightly smaller icons */
  margin: 8px 0;            /* slightly tighter margin */
  text-align: center;
  transition: color 0.3s;
}

.floating-sidebar a:hover {
  color: var(--secondary-color);
}


/*--------------------------------------------
  FOOTER
---------------------------------------------*/
footer {
  background-color: var(--nav-bg);
  color: var(--white);
  padding: 2rem 0;
  margin-top: 4rem;
}

footer h6 {
  font-size: 0.875rem;
  text-transform: uppercase;
}

footer a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover {
  color: var(--primary-color);
}

/*--------------------------------------------
  FORM VALIDATION (CONTACT PAGE)
---------------------------------------------*/
input.is-invalid,
textarea.is-invalid {
  border-color: var(--accent-red) !important;
}

input.is-valid,
textarea.is-valid {
  border-color: #198754 !important; /* Bootstrap valid green */
}

/*--------------------------------------------
  ICON LIST STYLES (using Bootstrap Icons)
---------------------------------------------*/
.fa-ul {
  padding-left: 1.5rem;
  list-style: none;
}

.fa-li {
  position: absolute;
  left: -1.5rem;
  top: 0.2rem;
  color: var(--primary-color);
}

/*--------------------------------------------
  RESPONSIVE TYPOGRAPHY & SPACING TWEAKS
---------------------------------------------*/
@media (max-width: 1199px) {
  h1.display-4 {
    font-size: 2.75rem;
  }
}
@media (max-width: 991px) {
  h1.display-4 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.75rem;
  }
}
@media (max-width: 767px) {
  .hero-section .hero-content,
  .subpage-hero .hero-content {
    padding: 0 1rem;
    text-align: center;
  }
  h1.display-4 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .lead {
    font-size: 1rem;
  }
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/*--------------------------------------------
  KEYFRAMES
---------------------------------------------*/
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}



/*--------------------------------------------
  MAINTENANCE
---------------------------------------------*/

.maintenance-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-bg);
  color: var(--text-dark);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  text-align: center;
}

.maintenance-content {
  max-width: 600px;
  padding: 2rem;
  position: relative;
}

.construction-animation {
  position: relative;
  height: 150px;
  margin: 2rem auto;
}

.construction-worker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 60px;
  height: 100px;
  animation: worker-move 3s infinite alternate;
}

.hard-hat {
  position: absolute;
  top: 0;
  left: 10px;
  width: 40px;
  height: 20px;
  background-color: #FFD700;
  border-radius: 5px 5px 0 0;
}

.worker-body {
  position: absolute;
  top: 20px;
  width: 40px;
  height: 60px;
  background-color: #4169E1;
  border-radius: 5px;
}

.tools {
  position: absolute;
  top: 30px;
}

.hammer {
  position: absolute;
  left: -20px;
  width: 30px;
  height: 5px;
  background-color: #555;
  transform: rotate(45deg);
  animation: hammer-swing 2s infinite;
}

.hammer:before {
  content: '';
  position: absolute;
  left: 0;
  top: -5px;
  width: 10px;
  height: 15px;
  background-color: #333;
}

.wrench {
  position: absolute;
  right: -20px;
  width: 25px;
  height: 5px;
  background-color: #777;
  transform: rotate(-30deg);
  animation: wrench-turn 3s infinite;
}

.wrench:before {
  content: '';
  position: absolute;
  right: 0;
  top: -5px;
  width: 10px;
  height: 15px;
  background-color: #555;
  border-radius: 50%;
}

.cone {
  position: absolute;
  left: 30%;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 40px solid #FFA500;
  animation: cone-blink 1.5s infinite;
}

.barrier {
  position: absolute;
  right: 30%;
  bottom: 0;
  width: 40px;
  height: 20px;
  background-color: #FF0000;
  animation: barrier-blink 2s infinite;
}

.barrier:before, .barrier:after {
  content: '';
  position: absolute;
  width: 5px;
  height: 40px;
  background-color: #FF0000;
  top: -40px;
}

.barrier:before {
  left: 5px;
}

.barrier:after {
  right: 5px;
}

.progress-container {
  width: 100%;
  height: 20px;
  background-color: #333;
  border-radius: 10px;
  margin: 1rem 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background-color: #4CAF50;
  animation: progress-load 30s linear forwards;
}

.estimated-time {
  margin-top: 1rem;
  font-size: 1.2rem;
}

.countdown {
  font-weight: bold;
  color: #FFD700;
}

@keyframes worker-move {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(-30%); }
}

@keyframes hammer-swing {
  0%, 100% { transform: rotate(45deg); }
  50% { transform: rotate(80deg); }
}

@keyframes wrench-turn {
  0% { transform: rotate(-30deg); }
  100% { transform: rotate(330deg); }
}

@keyframes cone-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes barrier-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes progress-load {
  0% { width: 0%; }
  100% { width: 100%; }
}
