/* ------- RESET / GLOBALS ------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f3f4f6;
  color: #1f3a63;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ------- HEADER & NAV ------- */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}
header img { height: 50px; }
nav {
  display: flex;
  gap: 1.5rem;
}
nav a {
  color: #1f3a63;
  text-decoration: none;
  font-weight: 500;
  position: relative;
}
nav a:hover { color: #0ea5e9; }

/* Dropdown menu for servicios */
nav .dropdown {
  position: relative;
}
nav .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 0.5rem 0;
  z-index: 1001;
}
nav .dropdown-content a {
  display: block;
  padding: 0.5rem 1rem;
  color: #1f3a63;
}
nav .dropdown-content a:hover {
  background: #f0f4f8;
  color: #0ea5e9;
}
nav .dropdown:hover .dropdown-content {
  display: block;
}

/* ------- WATERMARK ------- */
.watermark {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  width: 600px;
  pointer-events: none;
  filter: blur(1px);
  z-index: 0;
}

/* ------- MAIN content ------- */
main {
  flex: 1;
  padding-top: 100px; /* account for header height */
}
.hero {
  text-align: center;
  background-color: #1f3a63;
  color: white;
  padding: 1.5rem;
}
.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.hero p { font-size: 0.95rem; opacity: 0.9; }
.hero button {
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
  background-color: #0ea5e9;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}

/* ------- SECTIONS ------- */
.section {
  padding: 1rem 2rem;
  text-align: center;
}

/* ------- CARD GRID ------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
}
.card {
  background: white;
  border-radius: 12px;
  padding: 1.2rem;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
}
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.9rem; color: #444; }

/* ------- MODAL (CONTACT FORM) ------- */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}
.modal.active { display: flex; }
.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.modal-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
.modal-content h2 {
  position: relative; z-index: 1;
  text-align: center;
  margin-top: 0;
}
.modal-content label,
.modal-content input,
.modal-content select,
.modal-content textarea,
.modal-content button {
  position: relative; z-index: 1;
}
.modal-content label {
  display: block;
  margin: 0.7rem 0 0.3rem;
  color: #1f3a63;
  font-weight: 500;
}
.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.modal-content button {
  margin-top: 1rem;
  width: 100%;
  padding: 0.7rem;
  background-color: #0ea5e9;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Close “X” */
.close-btn {
  position: absolute;
  top: 12px; 
  right: 12px;
  width: 30px; 
  height: 30px;
  font-size: 20px;
  background: #0ea5e9;
  color: white;
  border: none;
  border-radius: 50%;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
}

/* ------- POPUP "Gracias" ------- */
#popup-gracias {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 360px;
  background: white;
  border: 2px solid #0ea5e9;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 9999;
  text-align: center;
}
#popup-gracias img {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  width: 200px;
  pointer-events: none;
}
#popup-gracias > div {
  position: relative;
  z-index: 1;
}
/* Cerrar dentro de popup */
#popup-gracias button {
  margin-top: 1.5rem;
  background: #0ea5e9;
  color: white;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
}

/* ------- FOOTER ------- */
footer {
  text-align: center;
  padding: 1rem;
  background-color: #1f3a63;
  color: white;
  font-size: 0.9rem;
}

.footer-icons img {
  width: 32px;
  height: 32px;
  margin: 0 0.5rem;
  vertical-align: middle;
  transition: transform 0.2s;
}

.footer-icons img:hover {
  transform: scale(1.2);
}

.footer-icons img {
  display: inline-block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-icons a:visited img {
  filter: none !important;
}

/* ------- RESPONSIVE ------- */
@media (max-width: 768px) {
  .cards { grid-template-columns: 1fr; padding: 1rem; }
  .modal-content { width: 90%; padding: 1.5rem; }
  .hero h1 { font-size: 1.4rem; }
  .hero p { font-size: 0.85rem; }
}

/* ------- redes sociales ------- */
.redes-sociales {
  text-align: center;
  margin: 2rem 0;
}

.redes-sociales a {
  margin: 0 10px;
  display: inline-block;
}

.redes-sociales img {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease;
}

.redes-sociales img:hover {
  transform: scale(1.1);
}

/* ------- popup de servicios ------- */
.popup-servicio {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border: 2px solid #0ea5e9;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 9999;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  text-align: center;
  position: relative;
}

.popup-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250px;
  opacity: 0.05;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.popup-descripcion {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  text-align: left;
}

.popup-cerrar {
  display: block;
  margin: 2rem auto 0 auto;
  background: #0ea5e9;
  color: white;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1;
}

/* ------- social iconos ------- */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-icons a {
  display: inline-block;
  width: 40px;
  height: 40px;
  transition: transform 0.2s ease;
}

.social-icons a img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  display: block;
  filter: grayscale(100%) brightness(0) invert(0); /* Negro uniforme */
  transition: filter 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover img {
  filter: brightness(1.5) sepia(1) hue-rotate(180deg) saturate(5); /* Efecto hover cool */
  transform: scale(1.1);
}

/* Contenedor principal centrado del iframe */
.iframe-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  height: calc(100vh - 180px); /* Resta header (aprox 100px) + footer (80px) */
  box-sizing: border-box;
  text-align: center;
  flex-direction: column;
}

/* Estilo del iframe */
.iframe-wrapper iframe {
  width: 100%;
  max-width: 550px;
  height: 100%;
  min-height: 500px;
  border: 1px solid #ccc;
  border-radius: 12px;
}
