.bg-header {
  background: url("images/imagenprincipal.webp") center/cover no-repeat;
  background-size: cover;       /* keep it filling the header */
  background-position: center;  /* default: centers image */
  min-height: 800px;
  position: relative;
  overflow: hidden;
}

.bg-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-color: rgba(0, 0, 0, 0.5); /* darker overlay (adjust 0.5 for more/less opacity) */
  z-index: 1;
}

.bg-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px; /* size of the fade */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    #2c2c2c 100% /* fade into the body background */
  );
  z-index: 2;
}

.bg-header .logo {
  position: relative;
  z-index: 2;       /* above overlay */
  width: 550px;     /* adjust size */
  height: auto;
  margin-top: -50px;
  margin-bottom: 0px;
}

.logo {
  width: 150px;       /* adjust as needed */
  opacity: 0;
  transform: translateY(50px); /* start slightly below */
  animation: fadeUp 1.5s ease-out forwards;
  animation-delay: 0.3s; /* wait half a second before starting */
}

.header-subtext {
  opacity: 0;
  transform: translateY(50px);
  animation: fadeUp 1.5s ease-out forwards;
  animation-delay: 0.7s; /* starts after the title */
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bg-header h1,
.bg-header p {
  position: relative;
  z-index: 2; /* keep above dark overlay */
}

.bg-header p {
  background: rgba(0, 0, 0, 0.5); /* optional: semi-transparent bg for readability */
  padding: 5px 15px;
  border-radius: 6px;
  display: inline-block;
}

.header-subtext {
  font-size: 2rem;   /* bigger text */
  font-weight: 300;  /* lighter weight looks more elegant */
  max-width: 1200px;     /* limits how wide it can go */
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

body {
  font-family: Arial, sans-serif; /* or your chosen font */
  margin: 0;
  padding: 0;
  line-height: 1.5;
  background-color: #2c2c2c; /* dark gray */
  color: #f0f0f0; /* optional: light text for readability */
}

.img-frame {
  border: 5px solid #222; /* white frame, change color as needed */
  border-radius: 8px;        /* rounded corners */
  padding: 0px;              /* optional: space between image and border */
}

#trabajos-title, #clientes-title, #contacto-title {
  font-size: 3rem; /* bigger text, adjust as needed */
  font-family: 'Merriweather', serif; /* choose any font you like */
  font-weight: bold;
  /*color: #333;*/ /* optional: change text color */
  text-transform: uppercase; /* optional: all caps */
}

.map-container {
  max-width: 400px;   /* keeps map from stretching too wide */
  width: 100%;
  border-radius: 12px; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  overflow: hidden;
}

.custom-modal {
  max-width: 65%; /* 90% of the screen width */
}

.custom-modal img {
  width: 100%;
  height: auto;
}

.modal-content {
  display: flex;
  justify-content: center; /* centers the image horizontally */
  align-items: center;     /* centers vertically if needed */
  background: transparent; /* keep it transparent if desired */
  border: none;            /* remove default border */
  overflow: auto; /* allow scrolling */
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

#modalImage {
  max-width: 80%;    /* never exceeds modal width */
  height: auto;
  touch-action: pinch-zoom; /* optional */
}

@media (max-width: 768px) {
  .modal-dialog {
    max-width: 95%;   /* almost full screen */
    margin: 0 auto;   /* center horizontally */
  }

  .bg-header .logo {
    max-width: 65%;  /* bigger relative to screen but still fits */
  }

  .navbar-logo {
    height: 30px;  /* smaller on mobile */
  }
}

/* Titles & categories */
h1, .navbar, .category-title {
  font-family: 'Poppins', sans-serif;
}

/* Body text */
body, p, a, li, h2, h3 {
  font-family: 'Open Sans', sans-serif;
}

section {
  scroll-margin-top: 80px; /* space above section when scrolling */
}

header {
  padding-top: 80px; /* space so content is below navbar */
}

.navbar-logo {
  height: 40px;   /* adjust for desktop */
  width: auto;
}

.category-separator {
  width: 550px;             /* length of the line */
  height: 3px;             /* thickness */
  background-color: #fff;  /* color of the line */
  margin: 0 auto 20px;     /* center and add spacing below */
  border: none;            /* remove default border */
}

html, body {
  overflow-x: hidden; /* prevent page overflow */
}

/* .navbar {
  width: 100%;
  overflow-x: hidden;
} */