/* ================= GLOBAL ================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* =============== SECTION ================= */
.contact-section {
  display: flex;
  flex-direction: column;
  gap: 3em;
  padding: 2em;
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden; /* evita scroll horizontal accidental */
}

/* =========== CONTENEDOR BASE =========== */
.contact-container {
  border-radius: 10px;
  padding: 2em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background-color: transparent;
  
  /* INICIAL: oculto y desplazado */
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  animation: fadeInSimple 0.8s ease-out forwards;
}

/* Delays para escalonar la animación */
.contact-container:nth-child(1) { animation-delay: 0.2s; }
.contact-container:nth-child(2) { animation-delay: 0.4s; }
.contact-container:nth-child(3) { animation-delay: 0.6s; }

/* Keyframes */
@keyframes fadeInSimple {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ====== PRIMER CONTENEDOR: WALLPAPER ====== */
.contact-wallpaper {
  position: relative;
  min-height: 400px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.contact-wallpaper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 1;
  border-radius: 10px;
}
.contact-content {
  position: relative;
  z-index: 2;
  color: #fff;
}
.contact-content h2,
.contact-content h3 {
  margin-top: 1em;
}
.contact-content p {
  margin: 0.5em 0;
}
.contact-content a {
  color: #fff;
  text-decoration: none;
  transition: color .2s;
}
.contact-content a:hover,
.contact-content a:active {
  color: #b71c1c;
}
.icon {
  width: 20px;
  vertical-align: middle;
  margin-right: 8px;
}
.contact-section img.icon[data-icon="phone"] {
  filter: brightness(0) invert(1);
}

/* ====== SEGUNDO CONTENEDOR: DOS COLUMNAS ====== */
.two-column {
  background-color: #f1f1f1;
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
  border-radius: 10px;
}
.contact-info {
  flex: 1;
  padding: 1.5rem;
  background: #fff;
  border-radius: 10px;
}
.contact-info h3 {
  font-size: 1.25rem;
  color: #b71c1c;
  margin-bottom: 1rem;
  border-left: 4px solid #b71c1c;
  padding-left: 0.75rem;
}
.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}
.contact-info a {
  color: #444;
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}
.contact-info a:hover,
.contact-info a:active {
  color: #b71c1c;
}
.contact-image {
  flex: 1;
  min-height: 350px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
}

/* ====== TERCER CONTENEDOR: MAPA ====== */
.map-container {
  background-color: #f1f1f1;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.map-container iframe {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  border: 0;
  display: block;
}

/* ========== HOVER & TRANSICIONES ========== */
.contact-container {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}
.contact-container:hover {
  transform: translateY(0) scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 2;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1010px) {
  .two-column {
    flex-direction: column;
  }
  .contact-image {
    order: 2;
    margin-top: 1.5rem;
  }
  .contact-info {
    order: 1;
  }
}

@media (max-width: 600px) {
  .contact-section {
    padding: 1.5em;
  }
  .contact-container {
    padding: 1.5em;
  }
}
