/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  background: #191625;
  font-family: 'Exo 2', sans-serif;
  overflow-x: hidden;
  color: #fff;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: #15131f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.loader {
  border: 5px solid #15131f;
  border-top: 5px solid #a94600;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}




.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

/* Video */
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Image */
.hero-media .hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Overlay */
.hero-media .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2;
}



.hero-frame {
  position: relative;
  width: 95%;          
  height: 95vh;        
  margin: 20px auto;   
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(169, 70, 0, 0.6);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}



.hero-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;   
  object-position: center; 
}


/* Navbar */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent !important;
  padding: 15px 30px;
  z-index: 1000;
}
.logo {
  height: 40px;
}
/* Logo */
.logo {
  height: 60px;            
  width: auto;
  transition: all 0.3s ease;
  border: none;              
  border-radius: 0;       
  padding: 0;              
  background: none;          
}

/* Logo Hover Effect */
.logo:hover {
  transform: scale(1.2); /* Zoom-in effect */
  filter: drop-shadow(0 0 15px #a94600); 
}



.navbar .nav-link {
  color: #fff !important;
  margin: 0 10px;
  position: relative;
  transition: all 0.3s ease;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: #a94600;
  left: 0;
  bottom: -5px;
  transition: 0.4s;
}
.navbar .nav-link:hover::after {
  width: 100%;
}
.navbar .nav-link:hover {
  color: #a94600 !important;
  backdrop-filter: blur(10px);
  border-radius: 5px;
  padding: 5px 10px;
  box-shadow: 0 0 15px #a94600;
}

.social-icons {
  position: absolute;
  bottom: 20px;
  left: 50px;       
  display: flex;
  justify-content: flex-start; 
  gap: 25px;
  z-index: 1000;
}

.social-icons a {
  color: #fff;
  font-size: 24px;
  position: relative;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: #a94600;
  text-shadow: 0 0 15px #a94600;
  transform: scale(1.2);
}

/* Social Icons */
.social-icons {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 25px;
  z-index: 1000;
}

.social-icons a {
  color: #fff;
  font-size: 24px;
  position: relative;
  transition: all 0.3s ease;
  padding: 5px 8px;
  border-radius: 5px;
}

/* Underline Effect */
.social-icons a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: #a94600;
  left: 0;
  bottom: -5px;
  transition: 0.4s;
}

/* Hover Effect */
.social-icons a:hover::after {
  width: 100%;
}
.social-icons a:hover {
  color: #a94600;
  text-shadow: 0 0 10px #a94600;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 15px #a94600;
  transform: scale(1.2);
}








/* Navbar Links */
.navbar .nav-link {
  color: #fff !important;
  margin: 0 15px;
  position: relative;
  transition: all 0.3s ease;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: #a94600;
  left: 0;
  bottom: -5px;
  transition: 0.4s;
}
.navbar .nav-link:hover::after {
  width: 100%;
}
.navbar .nav-link:hover {
  color: #a94600 !important;
  text-shadow: 0 0 10px #a94600;
}

/* Login Button */
.btn-login {
  background: transparent;
  color: #fff;
  border: 2px solid #a94600;
  padding: 6px 18px;
  border-radius: 25px;
  font-weight: bold;
  transition: all 0.3s ease;
  position: relative;
}

/* Login Hover Effect (Same as other nav elements) */
.btn-login:hover {
  color: #a94600;
  text-shadow: 0 0 10px #a94600;
  box-shadow: 0 0 15px #a94600;
  backdrop-filter: blur(10px);
  transform: scale(1.1);
}






/* Section Frame */
.projects-section {
  background: #191625;                          
  border-radius: 20px;                        
  padding: 50px;                              
  margin: 50px auto;                         
  width: 95%;                                   
  box-shadow: 0 0 40px rgba(169,70,0,0.6);      
  transition: transform 0.3s ease, 
              box-shadow 0.3s ease;            
}


/* Title */
.projects-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}
.projects-subtitle {
  text-align: center;
  color: #a94600;
  font-weight: bold;
  letter-spacing: 2px;
  border-bottom: 2px solid #a94600;
  display: inline-block;
  margin: 0 auto 40px;
  padding-bottom: 3px;
}

/* Grid Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 0; /* grid line effect */
  border: 2px solid rgba(255, 255, 255, 0.313);
}

/* Box */
/* ==================================================================== */
/* FINAL, CONSOLIDATED PROJECT BOX STYLES (DESIGN, ANIMATION & HOVER) */
/* ==================================================================== */

/* --- 1. Base style for the box (combining design and initial animation state) --- */
.project-box {

  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateY(40px); /* Slightly less distance for a subtle effect */
  transition: all 0.25s cubic-bezier(0.25, 0.25, 0.25, 0.25); /* A smoother transition */
}


/* --- 2. Style for when the box comes into view (scroll animation) --- */
.project-box.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* --- 3. Style for hover effect (works only when the box is in view) --- */
.project-box.in-view:hover {
  background: rgba(169, 70, 0, 0.08);
  border: 3px solid #a94600;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(169, 70, 0, 0.8);
  z-index: 2;

  /* FIX: Combining the final transform state with the hover scale */
  transform: translateY(0) scale(1.05);
}


/* Box Content */
.box-content h6 {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: rgba(255,255,255,0.3);
}
.box-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
}
.box-content p {
  font-size: 1.3rem;
  font-weight: bold;
  margin-top: 10px;
  color: rgba(255,255,255,0.3);
}
.box-content p span {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* Hover Effect */
.project-box:hover {
  background: rgba(169, 70, 0, 0.08);
  transform: scale(1.05);
  border: 3px solid #a94600;   
  border-radius: 12px;         
  box-shadow: 0 0 25px rgba(169, 70, 0, 0.8);
  z-index: 2;
}

.project-box:hover h4,
.project-box:hover p,
.project-box:hover h6 {
  color: #fff;
}
.project-box:hover span {
  color: #a94600;
}

/* Row 2 (2 boxes) spanning */
.project-box:nth-child(5),
.project-box:nth-child(6) {
  grid-column: span 2;
}







/* ============================================= */
/* 1. ANIMATIONS (ON LOAD & SCROLL)              */
/* ============================================= */

/* Initial state for elements that will be animated on load */
[data-animation="fadeInDown"],
[data-animation="fadeInUp"] {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-animation="fadeInDown"] {
  transform: translateY(-30px);
}

[data-animation="fadeInUp"] {
  transform: translateY(30px);
}

/* State when animation starts */
.animate-start {
  opacity: 1;
  transform: translateY(0);
}

/* Initial state for scroll-triggered elements */
.project-box {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Staggered animation delay for project boxes */
.project-box:nth-child(2) { transition-delay: 0.1s; }
.project-box:nth-child(3) { transition-delay: 0.2s; }
.project-box:nth-child(4) { transition-delay: 0.3s; }
.project-box:nth-child(5) { transition-delay: 0.4s; }
.project-box:nth-child(6) { transition-delay: 0.5s; }


/* State when elements are in view */
.project-box.in-view {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================= */
/* 2. RESPONSIVE DESIGN & MOBILE MENU            */
/* ============================================= */

/* --- General Adjustments --- */
body.menu-open {
  overflow: hidden; /* Prevents background scroll when menu is open */
}





/* --- Mobile Menu Overlay --- */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  
  z-index: 1030; /* Just below the navbar menu */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;

  
  pointer-events: none;
}

.menu-overlay.show {
  opacity: 1;
  visibility: visible;
}




/* --- For Tablets and smaller devices --- */
@media (max-width: 991.98px) {

  /* --- Custom Hamburger Toggler Button --- */
  .navbar-toggler {
    border: none;
    background: transparent;
    padding: 0;
    z-index: 1051; /* On top of everything */
    flex-direction: column;
  }
  .navbar-toggler:focus {
    box-shadow: none;
  }
  .toggler-icon {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.1s ease-in-out;
    border-radius: 2px;
  }
  
  /* Animate toggler to an 'X' */
  .navbar-toggler:not(.collapsed) .toggler-icon:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .navbar-toggler:not(.collapsed) .toggler-icon:nth-child(2) {
    opacity: 0;
  }
  .navbar-toggler:not(.collapsed) .toggler-icon:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

/* --- Slide-in Menu Container --- */
.navbar-collapse {
  position: fixed;
  top: 0;
  right: -100%; /* Initially hidden */
  width: 75%;
  max-width: 320px;
  height: 100%;
  padding: 100px 30px 30px;

  /* FIX: solid background instead of blur */
  background-color: #191625;  
  

  display: flex;
  flex-direction: column;
  align-items: center;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1050;
  border-left: 1px solid rgba(169, 70, 0, 0.507);
}

.navbar-collapse.show {
  right: 0; /* Slide in */
}


/* Navbar collapse menu fade-in effect */
.navbar-collapse .nav-link,
.navbar-collapse .btn-login {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* যখন menu open হবে */
.navbar-collapse.show .nav-link,
.navbar-collapse.show .btn-login {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger effect: item by item delay */
.navbar-collapse.show .nav-link:nth-child(1) { transition-delay: 0.1s; }
.navbar-collapse.show .nav-link:nth-child(2) { transition-delay: 0.2s; }
.navbar-collapse.show .nav-link:nth-child(3) { transition-delay: 0.3s; }
.navbar-collapse.show .nav-link:nth-child(4) { transition-delay: 0.4s; }
.navbar-collapse.show .btn-login           { transition-delay: 0.5s; }



  .navbar-nav {
    width: 100%;
    text-align: center;
  }
  .navbar .nav-link {
    font-size: 1.25rem;
    padding: 15px 0;
  }
  
  .btn-login {
    margin-top: 30px;
    width: 80%;
    padding: 10px 0;
  }

  /* --- Section Adjustments --- */
  .projects-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers the 'FEATURED' subtitle */
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
    gap: 20px;
    border: none;
  }
  .project-box:nth-child(5),
  .project-box:nth-child(6) {
    grid-column: span 1; /* Reset span for 2-column layout */
  }
   .project-box:nth-child(odd) {
      grid-column: span 1;
   }
   .project-box:last-child {
      grid-column: 1 / -1; /* Make last item span full width if it's alone */
   }
}

/* --- For smaller Tablets & large Phones --- */
@media (max-width: 767.98px) {
  .hero-frame, .projects-section {
    width: 95%;
    margin-left: auto;
    margin-right: auto;
  }
  .social-icons {
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
  }
  .projects-grid {
    grid-template-columns: 1fr; /* 1 column on mobile */
  }
   .project-box:last-child {
      grid-column: auto;
   }
}

/* --- For small Phones (UPDATED FRAME) --- */
@media (max-width: 575.98px) {
  /* Maintaining the frame on all screen sizes as requested */
  .hero-frame, .projects-section {
    width: 95%;
    margin: 40px auto; /* Using auto margin to keep it centered */
    border-radius: 15px; /* Slightly smaller radius for smaller screen */
  }

  .hero-frame {
     height: 90vh; /* Adjusting height for better mobile view */
  }

  .projects-section {
      height: auto; /* Correcting the height to be automatic */
      padding: 40px 15px; /* Adjusting padding for smaller area */
  }

  .logo {
    height: 45px; /* Slightly smaller logo */
  }

  .social-icons a {
    font-size: 20px;
  }

  .projects-title {
    font-size: 1.8rem;
  }
}






/* ================= Estimate Section ================= */
/* ============================= */
/* ESTIMATE SECTION - FINAL STYLES */
/* ============================= */

.estimate-frame {
  position: relative;
  width: 95%;
  margin: 30px auto;
  padding: 40px 20px;
  text-align: center;
  background: rgba(25, 22, 37, 0.95);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(169, 70, 0, 0.6);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.watermark-text {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18vw;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.estimate-heading {
  position: relative;
  margin-bottom: 30px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  z-index: 2;
}

.estimate-form {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  position: relative;
  z-index: 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  font-size: 12px;
  color: #ccc;
  margin-bottom: 4px;
}

.estimate-form .form-group input {
  width: 250px;
  height: 34px;
  padding: 0 10px;
  font-size: 14px;
  line-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  flex: 0 0 auto;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.estimate-form .form-group input:hover,
.estimate-form .form-group input:focus {
  border-color: #a94600;
  box-shadow: 0 0 10px rgba(169, 70, 0, 0.6);
  outline: none;
}

.estimate-form .form-group input::placeholder {
  font-size: 13px;
  color: #777;
}



/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 768px) {
  .estimate-frame {
    padding: 40px 30px;
    margin: 40px auto;
    border-radius: 15px;
  }
  .estimate-heading {
    font-size: 22px;
    line-height: 1.5;
  }
  .watermark-text {
    font-size: 25vw;
  }
  .estimate-form {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  .estimate-form .form-group input {
    width: 100%;
  }
  .btn-estimate {
    width: 100%;
    height: 40px;
    font-size: 14px;
  }
  
}

@media (max-width: 575px) {
  .estimate-frame {
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .estimate-frame {
    width: 95%;
    padding: 30px 20px;
    margin: 30px auto;
  }
  .estimate-heading {
    font-size: 18px;
  }
  .watermark-text {
    font-size: 30vw;
  }
}


/* ================================================= */
/* SCROLL ANIMATION: ESTIMATE SECTION                */
/* ================================================= */

/* Hidden (before scrolling into view) */
.estimate-heading,
.estimate-form > .form-group,
.estimate-form > .btn-estimate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Visible (after entering viewport) */
.estimate-frame.in-view .estimate-heading,
.estimate-frame.in-view .estimate-form > .form-group,
.estimate-frame.in-view .estimate-form > .btn-estimate {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered appearance */
.estimate-frame.in-view .estimate-form > .form-group:nth-of-type(1) {
  transition-delay: 0.2s;
}
.estimate-frame.in-view .estimate-form > .form-group:nth-of-type(2) {
  transition-delay: 0.3s;
}
.estimate-frame.in-view .btn-estimate {
  transition-delay: 0.4s;
}









