/* ===================================
   Blackstone Construccion
   Custom Styles (Bootstrap 5.3.8)
   =================================== */

/* ===================================
   1. General
   =================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333333;
}

section {
  padding: 80px 0;
}

.text-accent {
  color: #D4922E;
}

.section-label {
  display: inline-block;
  color: #D4922E;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.section-heading {
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 15px;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #D4922E;
}

.section-heading:not(.text-center)::after {
  left: 0;
  transform: none;
}

/* ===================================
   2. Navbar
   =================================== */
.navbar-brand img {
  height: 50px;
}

@media (max-width: 576px) {
  .navbar-brand img {
    height: 38px;
  }
}

.navbar .nav-link {
  transition: color 0.3s;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #D4922E !important;
}

.navbar-toggler {
  margin-right: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 10px;
}

/* Navbar: transparent at top, glass on scroll */
.navbar.navbar-transparent {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.navbar.navbar-transparent.navbar-scrolled {
  background: rgba(17, 17, 17, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* ===================================
   3. Hero Section
   =================================== */
.hero-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  color: #ffffff;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  background-image: url('https://images.unsplash.com/photo-1613490493576-7fde63acd811?w=1920&q=85&fit=crop');
  background-size: cover;
  background-position: center;
  z-index: 0;
  will-change: transform;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.hero-section > *:not(.hero-bg):not(.hero-features):not(.hero-scroll-arrow) {
  position: relative;
  z-index: 2;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 500px;
  margin-bottom: 30px;
}

.btn-accent {
  background: #D4922E;
  color: #ffffff;
  padding: 14px 40px;
  border-radius: 0;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  border: none;
  transition: all 0.3s;
}

.btn-accent:hover {
  background: #b87a24;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 146, 46, 0.4);
}

/* Hero scroll arrow */
.hero-scroll-arrow {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  text-decoration: none;
  animation: pulseArrow 2s ease-in-out infinite;
  transition: opacity 0.4s ease, color 0.3s;
}

.hero-scroll-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-scroll-arrow:hover {
  color: #D4922E;
}

@keyframes pulseArrow {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

@media (max-width: 576px) {
  .hero-scroll-arrow {
    bottom: 90px;
    font-size: 1.2rem;
  }
}

.hero-features {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0;
  background: rgba(0, 0, 0, 0.7);
}

.hero-feature-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 30px;
  color: #ffffff;
  font-size: 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-feature-item:last-child {
  border-right: none;
}

.hero-feature-item i {
  font-size: 1.5rem;
  color: #D4922E;
}

/* ===================================
   4. About Section
   =================================== */
.about-section {
  background: #f5f5f5;
}

.about-section img {
  border-radius: 8px;
  width: 100%;
  max-height: 450px;
  object-fit: cover;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #D4922E;
  line-height: 1;
}

.stat-label {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: #666;
  margin-top: 5px;
}

/* ===================================
   5. Services Section
   =================================== */
.services-section {
  background: #1a1a2e;
  color: #ffffff;
}

.service-card {
  background: #16213e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 35px 25px;
  text-align: center;
  transition: all 0.3s;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: #D4922E;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-card .icon {
  font-size: 2.5rem;
  color: #D4922E;
  margin-bottom: 20px;
  display: block;
}

.service-card h3 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.service-card p {
  color: #aaaaaa;
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ===================================
   6. Projects Section
   =================================== */
.projects-section {
  background: #ffffff;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s;
}

.project-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.project-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.5s;
  display: block;
}

.project-card:hover img {
  transform: scale(1.08);
}

/* Projects: Desktop grid visible, mobile carousel hidden */
.projects-carousel {
  display: none;
}

@media (max-width: 767px) {
  .projects-grid {
    display: none !important;
  }

  .projects-carousel {
    display: block;
  }

  .projects-carousel .project-card {
    border-radius: 10px;
    margin: 0 5px;
  }

  .projects-carousel .project-card img {
    height: 250px;
    border-radius: 10px;
  }

  .projects-carousel .carousel-control-prev,
  .projects-carousel .carousel-control-next {
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    opacity: 1;
  }

  .projects-carousel .carousel-control-prev {
    left: -5px;
  }

  .projects-carousel .carousel-control-next {
    right: -5px;
  }

  .projects-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
  }

  .projects-arrow:hover {
    background: #D4922E;
    color: #fff;
  }

  .projects-carousel .carousel-item {
    transition: transform 0.5s ease-in-out;
  }
}

/* ===================================
   7. Process Section
   =================================== */
.process-section {
  background: #f5f5f5;
}

.step {
  text-align: center;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #D4922E;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.step-icon {
  font-size: 2rem;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.step h3 {
  font-weight: 600;
}

.step p {
  color: #666;
  font-size: 0.9rem;
}

/* Process connecting lines */
.process-section .row {
  position: relative;
}

.process-section .col-md-3 {
  position: relative;
}

.process-section .col-md-3:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 30px;
  right: -8%;
  width: 16%;
  height: 2px;
  background: #D4922E;
}

@media (max-width: 767px) {
  .process-section .col-md-3::after {
    display: none;
  }
}

/* ===================================
   8. Clients Section
   =================================== */
.clients-section {
  background: #ffffff;
}

#testimonialCarousel {
  overflow: visible;
}

#testimonialCarousel .carousel-inner {
  min-height: 280px;
}

#testimonialCarousel .carousel-item {
  transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

#testimonialCarousel .carousel-item .row {
  align-items: stretch;
}

#testimonialCarousel .carousel-item .col-md-4,
#testimonialCarousel .carousel-item .col-12 {
  display: flex;
}

#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
  display: none;
}

.testimonial-card {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 30px;
  width: 100%;
  min-height: 260px;
  border-left: 4px solid #D4922E;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.testimonial-stars i {
  color: #D4922E;
  font-size: 0.9rem;
}

.testimonial-text {
  font-style: italic;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

.testimonial-author {
  margin-top: 15px;
}

.testimonial-author strong {
  display: block;
  color: #333;
}

.testimonial-author span {
  font-size: 0.85rem;
  color: #999;
}

/* Carousel Controls */
.carousel-indicators-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  position: relative;
}

.carousel-ctrl-prev,
.carousel-ctrl-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #D4922E;
  background: transparent;
  color: #D4922E;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.carousel-ctrl-prev:hover,
.carousel-ctrl-next:hover {
  background: #D4922E;
  color: #fff;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  padding: 0;
}

.carousel-dot.active {
  background: #D4922E;
  transform: scale(1.3);
}

/* ===================================
   9. FAQ Section
   =================================== */
.faq-section {
  background: #f5f5f5;
}

.faq-section .accordion-button {
  font-weight: 600;
  font-size: 1rem;
  color: #333;
  background: #fff;
  border-radius: 0 !important;
}

.faq-section .accordion-button:not(.collapsed) {
  background: #fff;
  color: #D4922E;
  box-shadow: none;
}

.faq-section .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(212, 146, 46, 0.25);
}

.faq-section .accordion-body {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-section .accordion-item {
  border: 1px solid #eee;
  margin-bottom: 8px;
  border-radius: 0 !important;
}

/* ===================================
   10. CTA Section
   =================================== */
.cta-section {
  position: relative;
  color: #ffffff;
  text-align: center;
  padding: 80px 0;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  background-image: url('../img/construccion_img3.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
  will-change: transform;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 46, 0.88);
  z-index: 1;
}

.cta-section > *:not(.cta-bg) {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  font-weight: 700;
}

.cta-icon {
  font-size: 3rem;
  color: #D4922E;
  margin-bottom: 20px;
  display: block;
}

.cta-section .btn-accent {
  padding: 14px 45px;
  font-size: 1rem;
}

/* ===================================
   11. Contact Section
   =================================== */
.contact-section {
  background: #ffffff;
}

.contact-info li {
  margin-bottom: 15px;
}

.contact-info i {
  color: #D4922E;
  font-size: 1.2rem;
  min-width: 30px;
}

.contact-info a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-info a:hover {
  color: #D4922E;
}

.form-control {
  border-radius: 0;
  border: 1px solid #ddd;
}

.form-control:focus {
  border-color: #D4922E;
  box-shadow: 0 0 0 0.2rem rgba(212, 146, 46, 0.25);
}

.form-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  text-align: center;
  transition: opacity 0.5s ease;
}

.form-success i.bi-check-circle-fill {
  color: #22c55e;
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.form-success p {
  color: #333;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.form-success-wpp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #25D366;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.3s;
}

.form-success-wpp:hover {
  color: #1da851;
}

/* ===================================
   12. Footer
   =================================== */
footer {
  background: #111111;
  color: #ccc;
}

.footer-logo {
  height: 45px;
  margin-bottom: 15px;
}

footer p {
  color: #999;
}

footer a {
  color: #999;
  transition: color 0.3s;
}

footer a:hover {
  color: #D4922E;
}

/* ===================================
   13. WhatsApp Widget
   =================================== */
.whatsapp-widget {
  position: fixed;
  bottom: 30px;
  right: 25px;
  z-index: 9999;
}

.whatsapp-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  border: none;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.2s;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-popup {
  display: none;
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 340px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.whatsapp-popup.active {
  display: block;
  animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.whatsapp-popup-header {
  background: #075E54;
  color: #fff;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.whatsapp-popup-header .whatsapp-popup-logo {
  height: 40px;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
}

.whatsapp-popup-header strong {
  display: block;
  font-size: 0.95rem;
}

.whatsapp-popup-header span {
  font-size: 0.75rem;
  opacity: 0.8;
}

.whatsapp-popup-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.whatsapp-popup-body {
  padding: 20px 15px;
  background: #e5ddd5 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><text y="50" font-size="50">💬</text></svg>');
}

.whatsapp-bubble {
  background: #fff;
  padding: 12px 16px;
  border-radius: 0 8px 8px 8px;
  font-size: 0.9rem;
  color: #333;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  max-width: 85%;
}

.whatsapp-popup-footer {
  padding: 12px 15px;
  background: #fff;
}

.whatsapp-send-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #25D366;
  color: #fff;
  padding: 12px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.3s;
}

.whatsapp-send-btn:hover {
  background: #1da851;
  color: #fff;
}

/* ===================================
   14. Scroll to Top Button
   =================================== */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  left: 25px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #D4922E;
  color: #fff;
  border: none;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
  z-index: 9998;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: #b87a24;
}

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

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

/* ===================================
   16. Responsive
   =================================== */
@media (max-width: 992px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  section {
    padding: 50px 0;
  }

  .hero-feature-item {
    padding: 15px 10px;
    font-size: 0.8rem;
    gap: 8px;
  }

  .navbar .nav-link {
    padding: 12px 16px;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding-bottom: 80px;
  }

  .hero-section h1 {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .btn-accent.btn-lg {
    padding: 10px 28px;
    font-size: 0.85rem;
  }

  .hero-feature-item {
    flex-direction: column;
    text-align: center;
    padding: 10px 8px;
    font-size: 0.7rem;
    gap: 4px;
    border-right: none;
  }

  .hero-feature-item i {
    font-size: 1rem;
  }

  .testimonial-card {
    min-height: 220px;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }

  .whatsapp-widget {
    bottom: 25px;
    right: 14px;
  }

  .whatsapp-btn {
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
  }

  .whatsapp-popup {
    width: 260px;
    bottom: 58px;
    right: 0;
    border-radius: 10px;
  }

  .whatsapp-popup-header {
    padding: 8px 10px;
    gap: 8px;
  }

  .whatsapp-popup-header .whatsapp-popup-logo {
    height: 28px;
    padding: 3px;
  }

  .whatsapp-popup-header strong {
    font-size: 0.8rem;
  }

  .whatsapp-popup-header span {
    font-size: 0.6rem;
  }

  .whatsapp-popup-close {
    font-size: 1.2rem;
  }

  .whatsapp-popup-body {
    padding: 10px 8px;
  }

  .whatsapp-bubble {
    font-size: 0.78rem;
    padding: 8px 10px;
    max-width: 90%;
  }

  .whatsapp-popup-footer {
    padding: 6px 8px;
  }

  .whatsapp-send-btn {
    padding: 8px;
    font-size: 0.8rem;
    border-radius: 20px;
  }

  .scroll-top-btn {
    bottom: 25px;
    left: 14px;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}
