/* ====================================
   SECCIÓN DE CONTACTO (CSS puro)
   ====================================
   Sustituye Tailwind; usa variables y breakpoints del sitio.
*/

.contact {
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 5rem 0;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top center, rgba(255, 255, 255, 0.08), transparent 40%);
  pointer-events: none;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-base);
}

.contact-map {
  display: block;
  width: 100%;
  height: 340px;
  margin: 0 auto 1.25rem;
  border: 0;
  border-radius: 0.95rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

/* Grid principal: info | formulario | social */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center; /* Centra verticalmente las columnas en mobile */
  min-height: 600px;
  position: relative;
  z-index: 1;
}

/* Columna: información */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: center; /* Centra verticalmente */
  align-items: center; /* Centra horizontalmente */
  height: 100%;
  text-align: center;
  padding: 1.5rem;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(2px);
}

.contact-title {
  font-size: 2.25rem; /* ~ text-4xl */
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.24);
}

.contact-text {
  margin-top: 1rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Tarjeta formulario */
.contact-form-card {
  background-color: rgba(0, 0, 0, 0.33);
  backdrop-filter: saturate(120%) blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-top: 4px solid rgba(255, 255, 255, 0.55);
  padding: 2rem 3rem;
  border-radius: 0.95rem;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

/* Formulario */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.contact-label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.contact-input,
.contact-textarea {
  width: 100%;
  border: none;
  border-radius: 0.65rem;
  padding: 1rem;
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
  outline: none;
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.contact-input:focus,
.contact-textarea:focus {
  background-color: rgba(255, 255, 255, 0.36);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(40, 106, 77, 0.45);
}

.contact-submit {
  width: 100%;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 0.65rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-submit:hover {
  background-color: #1e5a3d; /* hover primary */
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

/* Columna social */
.contact-social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 1.5rem;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(2px);
}

.contact-social p { font-weight: 600; }

.contact-social .social-links {
  display: flex;
  gap: 1rem;
}

.contact-social .social-links a {
  color: var(--color-white);
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background-color: rgba(255, 255, 255, 0.06);
  transition: color 0.3s ease, transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}

.contact-social .social-links a:hover {
  color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

/* ====================================
   Breakpoints
   ==================================== */
@media (min-width: 768px) {
  .contact-map {
    height: 320px;
    margin-bottom: 1.75rem;
  }

  .contact-grid {
    grid-template-columns: 3fr 6fr 3fr;
    gap: 2rem;
    align-items: center;
    min-height: 500px;
  }
  .contact-form-card {
    max-width: 700px;
    padding: 2.5rem 3rem;
  }
  .contact-title { font-size: 2.5rem; }
  .contact-info {
    height: 100%;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
  }
  .contact-social {
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .contact-container { padding: 0 2rem; }
}

/* ====================================
   MODAL DE CONTACTO
   ====================================
   Estilos para el modal de confirmación de envío
*/

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background-color: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: 3rem 2rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
  z-index: 10000;
}

.modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.modal-icon.success {
  background-color: #d4edda;
  color: #155724;
}

.modal-icon.error {
  background-color: #f8d7da;
  color: #721c24;
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.modal-message {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.modal-button {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  padding: 0.875rem 2.5rem;
  border-radius: var(--border-radius-lg);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-button:hover {
  background-color: #1e5a3d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 106, 77, 0.3);
}

.modal-button:active {
  transform: translateY(0);
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    padding: 2rem 1.5rem;
    width: 95%;
  }
  
  .modal-title {
    font-size: 1.5rem;
  }
  
  .modal-icon {
    width: 60px;
    height: 60px;
    font-size: 2.5rem;
  }
}
